Coded UI Automation Testing Walkthrough : Generate Code For Assertion Steps

Some Related posts on Coded UI Testing using VSTS :

Having Logged into the Gmail acoount what we generally need to check out for is whether we have logged into our account or not. In Testing terms it is called as a Validation of the Scenario and in the terminology of the Automation Testing it can referred as Checkpoint Validation. A very generic term is a Assertion . Here also we shall be introducing ourselves to the various types of Assertions that are available for use. Some of the common types being equals, contains, match, doesnotmatch,start with, ends with, et al.
Here I shall be using an assertion which is String Assert.Contains. which validates that the string as parameterized has its presence in the web page.

The following screenshot will be ample enough to clarify the flow that ought to be followed in order to put some verification checkpoints in the Automation scenarios.

Here as well we follow the same mechanism of creating the method to reflect the script codes association within the validation scenario. Suppose we name this method this time as ValidateUesrLogin, by default the method name that gets populated this time is AssertionMethod1. And same intelli sense facility is available here as well.

Post a Comment


Close Menu