Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm very new to BDD testing, and would like to ask, is it possible/OK to test ASP MVC3 actions directly (using WebClient) using SpecFlow?


Feature: Login

Scenario: Logging in
    Given I post form to http://someurl/account/logon with parameters username='test' and password='123'
    Then I expect it to be redirected to the http://someurl/home
share|improve this question
up vote 4 down vote accepted

You certainly can. Both WebClient, or HttpRequest would work well as the 'glue' for this scenario.

Note that I'd probably rephrase your Given/When/Then Statement as something like:

Given the logon page at http://someurl/account/logon 
When I post with parameters username='test' and password='123'
Then I am redirected to http://someurl/home
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.