Testing / Cucumber Interview Questions
What is an Examples table in Cucumber?
An Examples table supplies the concrete data values a Scenario Outline is run against, with each column header matching a placeholder name used in the outline's steps, and each subsequent row producing one independent execution of that outline.
Examples: | item | quantity | expectedTotal | | Widget | 1 | 9.99 | | Widget | 3 | 29.97 | | Gadget | 2 | 39.98 |
A single Scenario Outline can also have multiple Examples tables, each optionally with its own descriptive name and tags, which is useful for grouping related sets of inputs separately, like one table for valid inputs and another, differently tagged, table specifically for edge cases or invalid inputs.
More Related questions...