Questions tagged [gherkin]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

Can Robot Framework framework iterate over example data?

The BDD sample below is written using Katalon Studio Scenario Outline: Verify Price of <plan> Plan Given <accountType> account is currently logged in When User navigates to Publish ...
0
votes
2answers
30 views

In Gherkin files, should I repeat the steps in the previous scenario if my following scenario depends on it?

I have read about the Cardinal Rule of BDD from various places when writing Gherkin files. In many of these examples, they have the following scenarios in a feature file: Feature: Google Searching ...
3
votes
2answers
70 views

Is it good practice to skip the When clause in Gherkin/Cucumber/SpecFlow?

Is it a good practice to skip the When clause in Gherkin/Cucumber/SpecFlow? For instance: Scenario: user has to open a website Given User has access to website Then User should be able to validate ...
3
votes
2answers
57 views

API Testing with Specflow BDD Selenium?

I'm developing a BDD test automation solution with C# using Specflow (Cucumber) with tests written as plain text Gherkins. I am currently writing a regression test suite amongst others. When ...
0
votes
0answers
201 views

How to run background only once

Using Cucumber with Javascript and Selenium I have the following Gherking file Feature: Login Background: Given database is filled with these emails and passwords. | tobias@hotmail.com | ...
3
votes
3answers
91 views

Should scenarios be short or complete?

Assuming the following scenario: Scenario: A not logged in user must be able to register Given a non-logged in user When filling the registration form with full name Pepe Roni, email peperono@...
2
votes
1answer
49 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 ...
3
votes
2answers
5k 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
204 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
104 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
47 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
5k 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 ...
2
votes
4answers
99 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
461 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
651 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
533 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
102 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 ?