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 7173771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:53:39+00:00 2026-05-28T15:53:39+00:00

I am implementing some smoke tests to our website. I’m using a Given/When/Then format

  • 0

I am implementing some smoke tests to our website.

I’m using a Given/When/Then format for existing automated acceptance tests/User stories. But now I want to do an initial smoke test of:


Given I'm on the homepage


Then I should see "Welcome To The Site"

Am I missing something? Is it “ok” to not have a When?

Tools Used: MVC3, SpecFlow, Nunit, Watin

  • 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-28T15:53:40+00:00Added an answer on May 28, 2026 at 3:53 pm

    It is completely valid syntax to omit any of Given, When or Then (and even to mix them in any order – specflow doesn’t care.)

    However, for the purpose of readability, rather than omit the When I often rephrase the Given, i.e.

    When I view the homepage
    Then I should see "Welcome To The Site"
    

    I prefer to omit the Given section, because the When is supposed to indicate what the tested action is.

    If the code for the step binding is the same and you want to re-use it, you can always bind your given and my when to the same method.

    [Given(@"I'm on the homepage"]
    [When(@"I view the homepage"]
    public void NavigateToHomePage()
    {
         ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm planning on implementing some tests using nUnit. I also have a homegrown metrics
I'm looking at implementing some form of anonymous user system in Rails. I need
I am implementing some networking stuff in our project. It has been decided that
I am going to start implementing some unit tests for a codebase that is
I'm implementing some networking code using the selector pattern in C# / .NET 3.5.
I'm implementing some code using the java.util.concurrency framework. I will be passing a collection
I'm implementing some Yahoo API in one of my projects. I was using the
I am implementing some keyboard code for an existing java swing application, but I
I am interested in implementing some particle techniques for fluid simulation on GPU's using
I'm implementing some caching by using the nifty Rails.cache.fetch . However, in one particular

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.