Coded UI Automation Testing Walkthrough : Description of Record Buttons

        This is which will let you explore of how the UI looks like after we have added a Coded UI test item into our project. A class file gets generated with the C# code language and the small pop up comes at the bottom right corner of the screen. Going for the code details , it has three segments to be understood for the sake of good logical flow understanding of us all. The default name that the Coded UI test file has is CodedUITest1.cs. This is a class file, drilling down into the same gives us insight into the Constructor of this very class having the same name , Then we have one method name which by default has the the same starting name Prefixed to it hence the name being : CodedUITestMethod1.

So now we have three code segments with us, namely a class file having the same class name then a constructor and finally a Method name associated with it. Do keep intimated that  these are default named components and the same can be renamed as per our wish. Going at the top within the source file , we have the Namespace with which this very Class file is associated namely : TestGmail, if you can remember it is actually the same as the Project name we have associated with our current discussion. If you are aware of the hierarchy that the .Net framework follows is of Namespace, Assembly, Class, Method.

The bottom right corner of the screen lists a small pop up window which is actually the Recording tool and is the new addition that has added to great flexibility of this very tool to Testers and rapid Automation.It infact has associated with it three main buttons that are of preliminary interest to us, and one more button which is of important analysis interest. We will be discussing them all one at a time. And again while using them in our complete walkthrough of this very course shall let us have practical exposure to a profound extent. The first red coloured button is a recording button which when clicked turns into a Pause like button and instantly recording starts happening. Do remain informed that whatever you do with your machine after clicking this very button from red to pause will get recorded.
Is this a shortcoming , or do we have any option to control whatever we have recorded, at times things unknowingly which should not have been part of any recordings. Yeah we can control it in two ways, One is suppose we have some new mails in our outlook inbox and we wish to check the same , we can click on the Pause button(Record button in Record mode becomes Pause button) and check the same. Another case arises when we unknowingly out of some surprise just check the mails of "sweets at my desk", without actually clicking on the pause button.Do we have an alternative on the same, yes, we have one button just to the right of Record button, you can click on it to view the Recorded Steps.
 Since the content is in the simple english language , anybody can understand the same, and select and delete the recorded steps which are of no relevance to our business requirements.This is a flexible utility to be used in cases wherein we may have the privilege of enjoying chat with friends online in the communicator while record is on. Third from left is the "Cross Hair" button which is simple Validation button used to put some assertion on the system under test, by dragging it on the control content that needs to be validated. Do remember that it is the analog of the Checkpoint provision provided within the QTP tool. We shall definitely take this in detail. Fourth and final one is the "Generate Code " button , which as the name suggests is the code generator tool for all the Recording and the Validations that we have been putting on the system. Herein we have the option of checking the complete code that ought to be generated in order to make the VSTS playback the recorded scripts.Let us have a look of all these one at a time.






Some Related posts on Coded UI Testing using VSTS :

0 comments:

Post a Comment