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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:34:37+00:00 2026-05-24T21:34:37+00:00

For example if I write Add A customer feature which might go like this:

  • 0

For example if I write Add A customer feature which might go like this:

Scenario: Add A customer
Given I am on the customer page
When I enter login name
then I press Add
And I should see the newly added customer confirmation message

I start to write the code in watin to open the browser and go to the customer page.
Which doesn’t exist at this point.

The questions are:
1) do I then jump into unit tests and write a unit test for the page that doesn’t exist? in MVC this would be a controller but in asp.net webforms it’s the same test that is in the step definition.
2) How does the unit test tie in with the step definition? Let’s say at the end of the project I have a load of features and a load of unit tests. Then one of the features starts failing if I looked at that how would I know which unit tests correspond to it? Or does this even matter?

I’m not sure if this is a best practice question or it’s whatever people feel is right.

Thanks in advance.

  • 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-24T21:34:38+00:00Added an answer on May 24, 2026 at 9:34 pm

    One of the cool things about specflow (and cucumber…) is that you can write the test before any page exists. So what I’d do is exactly what you planned to do.

    1) Write a specflow test, which describes how you want to work with the page. Looks like you have that already.
    2) Run the test. The first line will fail (Given I am on the customer page).

    Now you have a choice. Do you just wan to write the code that fires up watin and navigates to the customer page? Fine, do that; then write the customer page (just enough so that the first line of the test passes).

    Or, recognize that your test requires a customer page. There’s lots here to test: do all the data fields exist? Does the page do input validation correctly? If I post to the server, do I get the correct response? If I post to the server, does the DB get updated correctly? And so on. Some of these sound like unit tests (business logic that takes the form data and stores it in the DB); some sound like UI tests that would be good with SpecFlow (page details, validation) and some sound like integration tests (probably good with specflow).

    Once you’ve written all those and they pass, go back to your original test, and get the second step to pass (I click…)

    And so on.

    To answer your second question, hopefully you’re running the unit tests and specflow tests often enough that if a test fails, it’s due to something you’ve done in the last few minutes. It shouldn’t be too hard to see what failed and match it to what you just did.

    If you’re not running your tests that often, then well you should be.

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

Sidebar

Related Questions

It is valid JavaScript to write something like this: function example(x) { Here is
For example, how would I write a program like senuti ? Are there any
I want to write an application like hotkey helpers for games, for example, in
This example shows how to add a field to let customers to choose their
I want to write a Console application which will just add a new User
Let's take example of a command example-command. I open terminal I write example-command in
I am trying to read in a string from a C# Response.Write(string example) into
I'm pretty new to XQuery and I'm trying to write an example function that
I frequently write throwaway code (in a research environment ) - for example to
For example, how can I write an expression where the following is implicitly applied:

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.