Selenium Cucumber BDD Framework with Java and TestNG | Tags

Описание к видео Selenium Cucumber BDD Framework with Java and TestNG | Tags

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 -
   • Selenium Cucumber BDD Framework devel...  

Playwright with Java script [2023 latest] - End to end - By SDET Adda for QA Automation:    • Playwright with Java script [2024 lat...  

TestNG + Selenium 4 Tutorial -2022/2023 🔥🔥🔥:    • TestNG + Selenium 4 Tutorial -2024 Up...  

Selenium webdriver issues and solutions:    • Selenium webdriver issues and solutions  

Basic Linux (UNIX) Commands with Shell Scripting Tutorial for Testers [2023]:    • Linux and Bash Scripting Tutorial [20...  

Top 100 Java programs for QA testing Interviews:    • Top 100 Java programs for programming...  


#cucumber #tags #cucumbertags #bddevelopment #pageobjectmodel #pagefactory #framework #selenium #seleniumtraining #cucumbertraining #sdet #sdetaddaforqaautomation #automationframework #automationinterviewquestions #javainterviewquestionsandanswers
#singletags #multipletags #featurefiles #scenarios

Комментарии

Информация по комментариям в разработке