1

The karate summary report and individual feature file reports has it steps mixed with the feature file steps called from the config file.

I am using karate Version 1.1.0 with Junit5 and Parallel Runner.

  1. Project has only 2 feature files

    one.feature - called from Runner

    auth.feature - called from config file using karate.callSingle.

  2. Runner

    @Test
    public void tParallel() {
     Results results = Runner.path("classpath:features/**one.feature**")
             .outputCucumberJson(true)
             .parallel(1);
    

    }

  3. karate-config.js

    function fn(){
      var env = 'qa';
      var config = {};
    
      if( env == 'qa'){
         config.url = "www.google.com";
         var values = karate.callSingle('classpath:utilsfeatures/**auth.feature**');
      }
     return config;
    

    }

Report : auth.feature steps are mixed with one.feature in the report which makes the steps count incorrect. Please let me know if I have done any incorrect config here.

Karate summary report

alraj
  • 11
  • 2

1 Answers1

0

I'll be honest, especially a callSingle() in JS is pushing the limits of Karate's reporting system. Most teams don't care about the reports from such re-usable utilities. So what if the "steps count is incorrect" - that should be the least of your troubles when you are just trying to get some tests to run with assertions.

Also note that you can suppress reports if needed to make things more readable and manageable: https://github.com/karatelabs/karate#report-verbosity

So it can be a bug, you are welcome to log an issue - but you HAVE to follow this process: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue

Even better is if you contribute code to fix it, because I personally don't consider this a priority.

That said you can also explore other ways to get stuff in the logs, e.g. using Java or JS code. In Java code you can do ScenarioEngine.get().logger.debug() and in JS code you can do karate.logger.debug().

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248