-1

I have found if I only add karate core dependency and run my tests, they run fine and report is generated. So what is importance of making a test runner class? I can run my karate tests without it as well. Kindly explain!

1 Answers1

0

With Karate runner class , you can use @KarateOptions to include or exclude feature files that you want to run eg @KarateOptions(features = "classpath:FeatureFiles/test.feature" , tags = "~@Smoke") will run all feature files other than the one having @Smoke tag .

How to pass parameter to run Karate tests from cmd/terminal as maven project If we want to run only 'Smoke' tests then code can be written as :

Open cmd/terminal cd 'karate project path' mvn test -Dkarate.options="--tags @Smoke classpath:FeatureFiles"