In this video, We will learn about tags in Cucumber-
In Cucumber, tags are a way to label and categorize scenarios and features. They allow you to control which scenarios are executed during test runs based on specific criteria. Tags are defined using the "@" symbol followed by a tag name. You can add tags to both feature files and individual scenarios.
Using tags in Cucumber allows you to create a flexible and organized test suite, making it easier to run specific sets of scenarios or features based on your testing needs.
It looks simple when we just have one, two, or maybe five scenarios in a feature file. However, in real life it does not happen. For each feature under test, we may have 10, 20, or may be more number of scenarios in a single feature file. They may represent different purpose (Smoke test/Regression test), different prospectives (Developer/QA/BA), different status (Ready for execution/Work in progress), etc. How to manage execution for such a mass?
For this, Cucumber has already provided a way to organize your scenario execution by using tags in feature file. We can define each scenario with a useful tag. Later, in the runner file, we can decide which specific tag (and so as the scenario(s)) we want Cucumber to execute. Tag starts with “@”. After “@” you can have any relevant text to define your tag. Let’s understand this with an example.
Suppose, there are two or more scenarios in a feature file. We want to execute only one scenario as part of smoke test. So first thing is to identify that scenario and second is to tag it with “@SmokeTest” text at the beginning of the scenario.
Playlists in this channel:
Selenium Cucumber BDD Framework development with Java and TestNG -
[ Ссылка ]
Playwright with Java script [2023 latest] - End to end - By SDET Adda for QA Automation: [ Ссылка ]
TestNG + Selenium 4 Tutorial -2022/2023 🔥🔥🔥: [ Ссылка ]
Selenium webdriver issues and solutions: [ Ссылка ]
Basic Linux (UNIX) Commands with Shell Scripting Tutorial for Testers [2023]: [ Ссылка ]
Top 100 Java programs for QA testing Interviews: [ Ссылка ]
#cucumber #tags #cucumbertags #bddevelopment #pageobjectmodel #pagefactory #framework #selenium #seleniumtraining #cucumbertraining #sdet #sdetaddaforqaautomation #automationframework #automationinterviewquestions #javainterviewquestionsandanswers
#singletags #multipletags #featurefiles #scenarios
Selenium Cucumber BDD Framework with Java and TestNG | Tags
Теги
cucumber with seleniumcucumberselenium webdrivercucumber bdd with testng frameworkcucumber java seleniumcucumber java frameworkbdd framework in seleniumbdd framework with junitmultiple tagssingle tag in cucumberType mismatch: cannot convert from String[] to Stringcucumber framework seleniumcucumber framework automation step by stepcucumber BDDSelenium Cucumber BDD Framework with JavaCucumber BDD Selenium + Javaselenium tutorial for beginnersjava