scenario outline and data table

Scenario Outline vs Data Tables

The Scenario Outline keyword can be used to run
the same Scenario multiple times, 
with different combinations of data set.
Scenario Outline runs for each row in the 
Examples section beneath it (not counting the first header row).
This works for the whole test
Cucumber automatically runs the complete 
test number of times equal to the number 
of data in the Test Set.
Example tables always have a header row, 
because the compiler needs to match the header 
columns to the placeholders in the Scenario Outline’s steps.

No keyword is used to define Data Table
This works only for the single step, below which it is defined
A separate code is need to understand 
the test data and then it can be run
single or multiple times but again just 
for the single step, not for the complete test

Data tables are passed wholesale to the
step definitions, and it's up to the user to
interpret them. They don't necessarily have a header row:

* When To Use What?
Use Example Table where ENTIRE scenario
needs to be tested with different/multiple test data.
Use Data table where test data is Explicitly meant
for specific steps and user would like to interpret
based on use case internally.

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source