- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHPPhysics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to do single data parameterization without Examples in Cucumber?
We can do single data parametrization without using Examples in Cucumber by passing the value directly in the feature file.
Example
Feature file.
Feature: Tutorialpoint Job page Scenario: Tutorialpoint job page look and fee Given Launch site https://www.tutorialspoint.com/about/about_careers.htm Then Verify the tabs on the page
URL is directly passed in the Given statement in the feature file.
The step definition file should have the mapping of the Given statement.
Example
@Given (“^Launch site \"([^\"]*)\"$”)
public void launchJobsite(String url){
System.out.println("url is : " + url);
}
@Then (“^Verify the tabs on the page"$”)
public void tabverification(){
System.out.println("Tabs verified successfully);
}
@Given (“^Launch site \"([^\"]*)\"$”) passes the UR at the runtime.
Advertisements