Tag Info

Hot answers tagged

2

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


1

The insertion of Thread.Sleep() is typically indicative of a race condition in your test and your test is running out of sync with the thing is it testing. One suggestion may be to insert a polling loop to wait for the redirect, or an event to indicate the redirect has happened. See http://www.testingmentor.com/imtesty/2012/06/11/sleepy-automated-tests/ ...


1

You can use Given/When/Then for scenarios with any complicity level, for instance, Very specific scenario: Scenario: Error when the password and confirm password do not match Given I am on User Registration From When I fill the Form fields as follow: | Field | Value | | Name | myusrname| | Password| password123| |Confirm Password | ...



Only top voted, non community-wiki answers of a minimum length are eligible