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!
Asked
Active
Viewed 465 times
-1
-
maybe this helps:https://stackoverflow.com/a/65578167/143475 – Peter Thomas Aug 09 '22 at 18:40
1 Answers
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"

ajaytripathi16
- 21
- 2