1.

What are tags in Cucumber and why are they important?

Answer»

When we only have one, two, or maybe FIVE situations in a feature file, it appears to be simple. In reality, however, this does not occur. In a single feature file, we may have 10, 20, or even more scenarios for each feature under test. They could reflect various purposes (smoke test/regression test), perspectives (developer/QA/BA), and statuses (ready for execution/work in progress).
Tags in cucumber provide a way to run scenarios in a specific SEQUENCE from a runner file. Each situation can be LABELED with a useful tag. Later, in the runner file, we may specify which tag (and hence which scenario(s)) Cucumber should run. “@” is the first character in a tag. Any RELEVANT content after "@" can be USED to define your tag.
Example - ‘@InitialTest’ 



Discussion

No Comment Found