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

  • Home
  • SEARCH
  • 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 6945027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:22:58+00:00 2026-05-27T13:22:58+00:00

We are employing BDD and using SpecFlow to drive our development (ATDD). Our QA

  • 0

We are employing BDD and using SpecFlow to drive our development (ATDD).

Our QA team would like to define their own ‘end-to-end regression tests (in Gherkin/SpecFlow) and re-use the Steps we have already defined.

(Please note – I know that this is not a great example but it should provide enough details)

A test may include..

  1. Log in
  2. Search for a product
  3. Select a product to buy
  4. Create an order
  5. Select delivery option.
  6. Submit the order.
  7. Cancel the order.

This would suggests a scenario like..

Given I am logged in
When I Search for a product
And I Select a product to buy
And I Create an order
And I Select delivery option
And I Submit the order
And I Cancel the order
Then ??!!

Which is clearly wrong as we are not checking the output at each step.

So this may be resolved as a sequence of scenarios:

Scenario 1:
Given I am logged in
When I Search for a product
Then I see a list of products

Scenario 2:
When I select a product to buy
Then I can create an order

Scenario 3:
When I create the order
And I Select delivery option
Then I can submit the order

etc etc

The main issue with this is that there seems no way to specify the order/sequence that the scenarios are run in (a characteristic of nUnit?). Because there are dependencies between scenarios (they are not set to a know starting point) they must be run in sequence.

My questions are:

a) Are we trying to fit a square peg in a round hole?!

b) Does anyone know if there is a way to use SpecFlow/Gherkin in this way?

c) Or does anyone know what alternatives there are?

Many thanks!

  • 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-05-27T13:22:59+00:00Added an answer on May 27, 2026 at 1:22 pm

    I would say that you are writing your scenarios on the wrong abstraction level. But that depends on what you want to use them for;

    If you want to write test-scripts then you are on the right track… but it will be a nightmare to maintain as it, in the first case (long script) will be very brittle and the second case (several scenarios) need to ensure a certain execution order. Both of them are discouraged and considered anti-patterns.

    I would suggest that you merge the ATDD-tests you are writing and talk to the test department to get their view on the matter and include the test-cases they need to ensure that the system is thoroughly tested. Who know? You might even learn something from each other 😛

    And when you write those “specifications” (as I rather call them) you write them on a higher level. So instead of writing:

    Given I am logged in
    When I Search for a product
      And I Select a product to buy
      And I Create an order
      And I Select delivery option
      And I Submit the order
    

    you write something like

    When I submit an order for product 'Canned beans'
    

    In the step-definitions behind that step you perform all that automation (login, browsing to the product page, select the delivery options, submit the order).

    All of this can be read about in these great articles on how to write maintainable UI Automation tests:

    • http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/
    • http://elabs.se/blog/15-you-re-cuking-it-wrong
    • http://www.marcusoft.net/2011/04/clean-up-your-stepsuse-page-objects-in.html
    • http://dhemery.com/pdf/writing_maintainable_automated_acceptance_tests.pdf
    • http://gojko.net/2010/01/05/bdd-in-net-with-cucumber-part-3-scenario-outlines-and-tabular-templates/
    • http://chrismdp.github.com/2011/09/layers-of-abstraction-writing-great-cucumber-code/
    • http://benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories.html
    • http://mislav.uniqpath.com/2010/09/cuking-it-right/

    I hope this helps

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

Sidebar

Related Questions

We're using the WPF DataGrid from the WPF Toolkit and are employing MVVM. I'm
Our group is somewhat new to JVM based development. We are developing applications that
I am trying to write specs for a controller without using fixtures (instead employing
Is it possible, without employing pinvoke, to restart a PC using .NET? I kind
I've been exploring BDD/DDD and as a consequence trying to come up with a
When employing custom attributes to store meta-data, is it best to decorate the interface,
I am employing ThreadPool.QueueUserWorkItem to play some sound files and not hanging up the
I'm employing a custom webpart that is made by an unaffiliated third party. I've
Been having some trouble implementing a single-column index in LaTeX. I've been employing the
I'm exploring the possibility of writing an application in Erlang, but it would need

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.