Lesson 6: Perform regression tests
In this lesson, you will execute your script on a different build. When you have a new build of the application, you can run the automated test you recorded by playing back your script on the new build. To execute your script on the new build, you must change the name of the application in your script. (You would not need to do this on a development project; do it here to simulate getting a new build of the application.)
To start at the beginning of the tutorial, see the HCL DevOps Test UI (Test UI) Tutorial.
-
In the script window, verify that your script (Classics.vb) is the active script.
At the top of the script, beneath the template information, is the start application command:
StartApp("ClassicsJavaA")
-
Change the "A" to "B".
VB.Net code is case-sensitive, so be sure to use an uppercase B. You do not need to save or compile the script for the change to take effect. It is done automatically when you run the script.
-
Click the Run Functional Test Script toolbar button to play back the script.
-
In the Select Log dialog, select Classics if necessary and click Finish. You will be prompted to overwrite the log.
-
Click Yes.
The script begins to play back quickly, but slows near the end on the Member Logon dialog. That is because Build B of the application has different text in the field beside the check box. Test UI is looking for an object that matches the recognition properties recorded in Build A. We will show how to fix this problem later on.
-
When the log opens after playback, look at the messages. You should see two failures and one warning in the log. (Keep the log open in preparation for lesson 7.)
The properties verification point (OrderFor TentCulpito_standa) and the image verification point (Album_image) failed because of a change in the application. Next, we'll see how to update the verification point baseline to fix this. An object recognition warning was generated for the password check box field. We'll also show how to fix that in the object map using a regular expression in a later section of the tutorial.
Did you notice that the main screen of ClassicsB looks different from ClassicsA, but that did not cause the script to fail? The same objects are present but in a different location in the two applications. This did not cause a failure because Test UI uses robust recognition methods to locate the objects. For example, it does not rely on superficial properties such as screen coordinates to find objects. Instead, it uses internal recognition properties. This method allows for flexibility in the user interface design, without requiring that you alter or re-record your scripts.
Advance to Lesson 7: Use the Comparator to update a verification point.