Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:24:14+00:00 2026-06-10T05:24:14+00:00

Is it acceptable to write a Given When Then When Then test in Gherkin?

  • 0

Is it acceptable to write a “Given When Then When Then” test in Gherkin?
A real-life example is as follows all AllPlayers.com

Scenario: Successfully register a user
  Given I am on homepage
    And I am not logged into an account
  When I follow "create a new account"
    And I fill in "First Name" with "Bobby"
    And I fill in "Last Name" with "Bricks"
    And I fill in "E-mail" with "bbricks@example.com"
    And I select "Jun" from "Birthday Month"
    And I select "22" from "Birthday Day"
    And I select "1985" form "Birthday Year"
    And I select "Male" from "Gender"
    And I fill in "Password" with "123testing"
    And I fill in "Confirm Password" with "123testing"
    And I solve the captcha math problem
    And I click "Create new account"
  Then I should see "the user dashboard"
    And I should see the Registration Wizard
  When I push "Proceed to next step"
  Then the "First Name" field should contain "Bobby"
    And the "Last Name" field should contain "Bricks".

I know it works using behat, so parsing it isn’t a problem. I’m just trying to write better tests. I could write in the first then And the Registration Wizard should be filled out with data but that doesn’t seem specific enough…

Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:24:15+00:00Added an answer on June 10, 2026 at 5:24 am

    It depends on the target audience of the feature as written. It seems highly likely that the gherkin you’ve got there was not written with a stakeholder (i.e. somebody not-techie but has a vested interest in the business and the website). BDD is really about the conversation about requirements and expectations – and Gherkin is a tool which gives a standard/recognised way that everyone should be able to read that you can write the requirements and expectations; in a way that serves as automated tests for a developer and perhaps test scripts for a tester.

    Trying to take my developer hat off now – I would say that a business stakeholder would rather read, and understand easily…

    Scenario: Should be able to successfully register on website
        Given I am new to the website
        And I want to register for a user account
        When I go to the registration form
        And I complete all the required registration details correctly
        Then I will be registered on the website
        And I will be automatically logged in
    

    You can still build the same test behind the scenes of this specification – but this specification has larger readership, it is a more easily understood requirement that anyone should understand. I’m not saying what you have got has no value – far from it. It will be a very valid test. But it is quite developer specific, and highly coupled to the UI implementation (if you refactor/redesign the UI, you now need to refactor your Requirements…).

    I started off having plenty of gherkin specifications much like yours – and I still use them on occasion. Once your testing framework has built up a little gherkin is a really great way of kind of writing data-driven/configurable unit tests; and they still have great value to my development process. But I do try to separate the more “pure” specifications from my “developer” ones – but folder and tags/categories.

    Edit: I guess in summary what I’m getting at is… what you have is a great “test”, but a fairly bad “requirement”. Stick with it though!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to write a voicechat program in python. All tips/trick is welcome
I'm biased towards writing fool-proof applications. For example with PHP site, I validate all
Is the following code acceptable. That is, is this the right way to do
Is the following always acceptable code? It seems to work, but does it consistently
Is it considered an acceptable practice to use Modules instead of Classes with Shared
Is it acceptable for a J2EE container to provide an implementation that complies with
Is it acceptable to dynamically generate the total of the contents of a field
Which one is more acceptable (best-practice)?: namespace NP public static class IO public static
I am looking for an acceptable starting point for placing applications settings in a
I was just wondering whether it is acceptable to close a common tag, eg.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.