Lesson 6: Perform regression tests

In this lesson, you will execute your script on a different build. When you have a new build of an 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; you do it here to simulate getting a new build of the application.)


  1. In the Java Editor (script window), verify that your script (Classics.java) is the active script.

    At the top of the script, beneath the template information, note the start application command:

  2. Change the "A" to "B".

    Java code is case-sensitive, and 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.

  3. Click the Run Functional Test Script toolbar button (Run) to play back the script.
  4. In the Select Log window, select Classics and then click Finish.
    You will be prompted to overwrite the log.
  5. Click Yes.

    The script begins to play back quickly, but slows near the end on the Member Logon window. That is because Build B of the application has different text in the field beside the check box. HCL OneTest UI is looking for an object that matches the recognition properties recorded in Build A. We'll show how to fix this problem later in the tutorial.

  6. 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 (OrderForTrentCulpito_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? That difference did not cause the script to fail, however. The same objects are present but in a different location on the two applications. This did not cause a failure because HCL OneTest 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.