Coded UI Automation Testing Walkthrough : Generate Code For Recorded Steps

Some Related posts on Coded UI Testing using VSTS :

 


After having recorded the scenario, let us now concentrate on what to do next. To start with let us stop our recording after having logged into the Gmail Account. This can be done by  clicking on the last button in the pop up window, which indicates the Generate Code option. After clicking on the Generate Code button we get another small combo-box in which we can give the function modules which is signified by the current recorded set of scripts. Exempli gratia in the current context we have the scenario like Loginto gmail account, so we can give the name as LogIn method, but by default a name gets generated for the code and it in this case is RecordedMethod1. There is an intelli-sense associated with this very feature and if at all you have already created a method name it gets displayed as already available method and hence cannot be created, in only case wherein you want to remove the earlier code you can replace the earlier method content with the one that is generated this occasion. Normally these methods are practically named with the Test Case Id to which the scenario corresponds. Herein we will be naming it as LogIntoGmail and click Generate Code.

Let us have some screenshots that shall help you understand of the workflow in this regard.









0 comments:

Post a Comment