What is BDD in selenium?BDD (Behavior Driven Development) is software development approach that allows developer or tester to create the script base on the behavior or functionality of the application.The steps of behavior or functionality, user write in feature file in plain English language...
Saturday, April 22, 2023
7:44 PM
World Business Zone
Selenium Automation, Selenium Cucumber, Selenium Testing
No comments
Test Runner classTest runner class is the starting point in BDD from where the script get executed with the help of junit annotation. Test runner class use junit class annotation which is @Runwith(). This gets execution once we execute the script. There is one another annotation with the name @cucumberOptions. This is use to do some configuration before running the script.Some options are given below.a) features:- This option...
7:41 PM
World Business Zone
Selenium Automation, Selenium Cucumber, Selenium Testing
No comments
What Is Hooks In Cucumber?Hooks is nothing but the script which run before or after each scenarios. There are some annotation which are used to execute script before or after each scenarioes.Below are the lists of cucumber annotation which can use in BDD.1. @Before:-This annotation is same like...
7:40 PM
World Business Zone
Selenium Automation, Selenium Cucumber, Selenium Testing
No comments
Regular expression in step definitionBelow are some lists of special character that can be used while writing step definition.1. .(dot)-We can use any character in place of "." In below example, single step definition will work for both the steps mentioned in feature file. It will replace...
7:39 PM
World Business Zone
Selenium Automation, Selenium Cucumber, Selenium Testing
2 comments
How to pass the Parameter?Passing parameter by using “” (double quotes) OR <> signFrom feature file, we can pass a single parameter by using “” in the step.Example is given below.Step in Feature file Given user logged with "userID"
We can also repeat the same step with different parameter...
7:37 PM
World Business Zone
Selenium Automation, Selenium Cucumber, Selenium Testing
No comments
How to write step definition in cucumber?Java class is used for writing step definition file. This execute each given steps in feature file. We have to write a method for each step in step definition java class with same annotation and with the same steps given in feature file. Each step associate to one method which get executed.Annotation is step definitionBelow are the lists of annotations which are generally used in feature file and same...
7:35 PM
World Business Zone
Selenium Automation, Selenium Cucumber
1 comment
BDD cucumber Secondary keywords in feature fileSecondary keywords in feature fileBelow are some lists of secondary keywords which can be use in feature file while writing test case.1. # (hash sign): -hash(#) is used to comment the line in feature file. So for commenting any line in feature file, we can put # before the start of the line.2. @ (at the rate of): -@ is used for mentioning the tag name in feature file. Tag name is use for running...
7:33 PM
World Business Zone
Selenium Automation, Selenium Cucumber
No comments
Selenium BDD cucumber Keywords in Feature fileKeywords in Feature fileFeature file is use to write the test step in Gherkin language. Below are some important keywords in feature file which are used to write test case.• Background
• Feature
• Scenario/Example
• Scenario outline
• Examples
Background: -Background keywords in cucumber are used, when we have some common step in each scenario, which need to be executed every time. So instead of...
Subscribe to:
Posts (Atom)