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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:13:19+00:00 2026-05-26T14:13:19+00:00

About half a year ago, I started digging into unit testing. I made my

  • 0

About half a year ago, I started digging into unit testing. I made my way into TDD (or what I thought it was) and now I want to develop a MVC Application behavior-driven.
The concept of acceptance testing (real end-to-end) is new to me, because my last project didn’t run in a acceptance testable environment.

I started out by reading some good articles, notably Sanderson’s http://blog.stevensanderson.com/2010/03/03/behavior-driven-development-bdd-with-specflow-and-aspnet-mvc/ and am backing up my MVC skills by reading his book on that topic.

I’m using SpecFlow and SimpleBrowser for end-to-end testing.
Driving navigation through the navigation bar was a piece of cake, however I’m stuck now.
I aim to implement user accounts for further creating articles and commenting. Driving the registration process gave me headaches. Given this feature file:

Feature: User accounts
    In order to customize and influence page content
    As a user
    I want to able to create an own user account

Scenario: Create a user
    Given  I am on the /Account/Create page
    When I fill out the registration formular as follows
    | NickName | EmailAddress                 |
    | test123  | test.address@test-server.com |
    And I click the "Create" button
    And I clicked the link in the authentication mail
    Then I should be on the root page
    And I should see the message "Welcome test123!"

I can’t really figure out how to provide the necessary testing environment (a mail server in this example) and make the test less brittle (think of relabeling the “Create” button to “Submit”). Let alone weaving in a capture generator to prevent automatic user creation (oh irony) at a later time. Maybe I’m just thinking too much ahead, which you actually shouldn’t in TDD, but there are times I’m just staring at the screen and thinking about my next test.


Soo.. after that wall of text the actual question: How should I implement this kind of behavior?

  • Stick to UI level tests and refactor as necessary for implementing capture logic
  • Fall back to controller level testing
  • Any other way you enlighten me on
  • 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-26T14:13:20+00:00Added an answer on May 26, 2026 at 2:13 pm

    I would not combine both the clicking on create button and clicking on the confirmation link in one test. I would finish the first test (clicking on create button) as I should see some message that says to check my email. If you want to test the rest of the behavior, you should create another test where given a confirmation URL and clicking on it, you should see the welcome page.

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

Sidebar

Related Questions

About half a year ago, when I started to learn Ruby and Rails, I
About half year ago I decided to improve my programming efficiency, so I learned
So I similar question was asked about a year an half ago here: How
I have an in-house iPhone app. Developed about a year and a half ago.
I started using the MVC pattern a half year ago, and I still have
Most of the existing questions about unit testing JavaScript code and integrating it into
When I run this code, About half-way through the concatenation loop, $xml becomes null
About a half dozen times now, I’ve been doing a regular chore in Visual
I have been programming using Python for slightly more than half an year now
For about a year and a half I used Codeigniter to build my sites.

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.