Questions tagged [gherkin]

The language Gherkin is used to write Cucumber Features in plain-text English manner.

Filter by
Sorted by
Tagged with
2
votes
1answer
44 views

BDD Given - How do you set the starting page?

Given user is currently at Login page With the Given above it would be invalid if I include the actual navigation to login page in the step definition simply because navigating to a page is an action ...
2
votes
2answers
2k views

IntelliJ feature file undefined step reference with import io.cucumber.java.en.Given

I have a feature file with the following: Scenario: Test something Given I do something to test something My step definition: import io.cucumber.java.en.Given; ... @Given("I do something to ...
1
vote
2answers
159 views

Using same table for When and Then in gherkin scenario

I have a scenario where I need to insert some data in the system and after that, I check if that data was inserted correctly. Something like: Given the user in the insertion screen When he inserts ...
2
votes
3answers
95 views

Behavioural Gherkin Steps requiring complex Step Definitions when Automating

I'm currently part of a team that is trying to reinforce BDD in our tests and automation. Our tests up to this point were procedural and we want to move towards behavioural steps. An example of our ...
0
votes
1answer
46 views

How do I write a gherkin specification to check a large list of values? [closed]

I'm working to write a specification with gherkin (for the first time) for a REST API which will return a long list of paged items (1000 items per page). I'm curious if there's a good way in gherkin ...
4
votes
1answer
4k views

Can a scenario have multiple example tables?

I would like to write a gherkin scenario that specifies a table of parameters but represents a test for every combination of values in the table. For example: Given I visit <site> When I enter ...
1
vote
4answers
93 views

Automation: how to isolate test cases when they really depend on another one?

I know good test cases are isolated (that is, they don't depend on other tests or objects created by other tests). However, how should one proceed when a test becomes the precondition for another test?...
1
vote
3answers
357 views

Use Gherkin syntax for Acceptance Criteria without accompanying BDD tool

Pretty straightforward question: Does anyone have experience writing or consuming Acceptance Criteria written with Gherkin, but doesn't use a BDD tool like Cucumber, Specflow, etc.? Is this method of ...
3
votes
3answers
562 views

Where to state test data in Cucumber

I'm struggling to understand the best place to place test data in Cucumber scenarios. My scenario reads like the following: Scenario: Register member for first time Given I have navigated to new ...
0
votes
3answers
368 views

Cucumber feature file steps not requiring a step def

This seems like an obvious question to me but I cant seem to find an answer on it anywhere which is making me think its a practice that I shouldn't be doing. I have a feature file step which is there ...
1
vote
1answer
95 views

How can I handle dependencies in Cucumber tests?

When I have dependencies such as http or authenticate, how can I use Cucumber without being slowed down on these services ?