1

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
4

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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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