To test a specific feature in karate i run this command:
mvn test -Dkarate.options="classpath:myfeature.feature"
there is a way to run a single scenario defined into a feature?
Thanks, Lorenzo
Yes, you can via tags: https://github.com/intuit/karate#tags
Also note that you can run a scenario by name, for eg if the name is "first":
mvn test -Dkarate.options="classpath:myfeature.feature --name ^first$"
And if you use IntelliJ - you can right click and do the above.
EDIT: Karate now supports being able to use a line-number, for eg some.feature:42
so it will invoke only the Scenario
or outline Example
on line 42 - this is designed only for IDE-s and developer mode, use a tag for maintainability.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.