Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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?

i.e.

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
add comment

1 Answer 1

up vote 3 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
add comment

Your Answer

 
discard

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.