Testing / Karate Framework Interview questions
What are tags used for in Karate?
Tags are @-prefixed labels placed above a Feature or Scenario that let a test run be filtered to include or exclude specific groups of tests, without commenting out or physically separating files.
@smoke Scenario: basic health check Given url baseUrl + '/health' When method get Then status 200 @regression @slow Scenario: full data migration check ...
A tag can be applied to an entire feature (applying to every scenario inside it) or to individual scenarios for finer control. At execution time, tag expressions passed to the runner (like @smoke or @regression and not @slow) determine which subset actually runs, which is what lets a CI pipeline run a fast smoke suite on every commit while reserving the full regression suite for a nightly build.
More Related questions...