1

We recently started using karate for API testing in our project and we are using Executable Jar File with visual studio plugin for karate. Currently We are not using any test runner classes or Junit in our framework and still able to achieve almost everything by usage of tags and karate-config.js file. We are using both cucumber-html report and surefire-report plugins and results generated at target folder on execution.

Now we are looking to customize the outputs to different folders. I assume we could use the reportDir() parameter to set the output folder path. Can someone please advice is it achievable in Executable Jar version and without Junit framework? If possible, where can I set this path in our tests? Do I need to create a test runner class for this ?

Rahul Raj
  • 13
  • 3

1 Answers1

0

Can you please start evaluating the RC version, details here: https://github.com/intuit/karate/wiki/1.0-upgrade-guide

You should be able to set a different "output" folder using the command-line -o or --output flag.

Based on your feedback, we can improve it.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • Thanks Peter. We will try out the RC version! Regarding the option "-o" , we were able to pass the output path using this option from command line. But here the folder name has to be a predefined one. In our scenario, we are looking to create new folders dynamically at run time (like time stamp based) to keep different versions for each execution. Is there an option to pass a variable from config file to the command ? – Rahul Raj Jan 04 '21 at 04:16
  • @RahulRaj you can wait for a new version, or I strongly recommend you build locally the `develop` branch: https://github.com/intuit/karate/wiki/Developer-Guide - because we added a new behavior - the old `karate-reports` folder will be backed up using a name derived from the time-stamp – Peter Thomas Jan 04 '21 at 05:15
  • 1
    sure Peter, Thanks! – Rahul Raj Jan 04 '21 at 05:22