T-Plan Ltd Home
T-Plan Robot Enterprise 4.4.7 Doc Collection
GUI Reference
29/01/19

T-Plan Robot Enterprise 4.4.7 Image Doctor

Contents

1. Overview
2. Image Doctor Warning
3. Image Doctor Records


1. Overview

The Image Doctor wizard was delivered in v3.5. It allows to resolve image comparison failures in executed test scripts, especially in cases where the Application Under Test (AUT) has changed and the image comparison code and/or the template images must be updated.

The wizard consists of three elements:
  1. The Image Doctor Warning pop up window allows to resolve image comparison interactively.
  2. The Image Doctor Records facility records failed image comparisons in the automation (unattended) mode for later resolution. 
  3. The ImageDoctor command (for TPR test scripts) and the corresponding imageDoctorXXX() methods (Java test scripts) control the Image Doctor behavior from a test script.
Behavior of the Image Doctor is subject to the Robot's start up mode and options selected in the Edit -> Preferences -> Image Doctor configuration screen:


2. Image Doctor Warning

The Image Doctor Warning window allows to resolve comparison failures immediately without having to stop the currently executing test script. 

Image Doctor Warning
  1. The "Resolve Now" button opens up the command editor (the command "Properties" window). Update the comparison parameters and/or the template images as needed (limitations apply) and save the changes with OK. You may optionally apply other changes directly in the script editor and/or the Project View while the script is paused. Then resume the test script by clicking the ResumeResume button and the comparison command will re-execute. This will allow the test script to continue as if the failure had never happened.
  2. The "Record & Resume" button will store the data of the failure to the hard drive and resume the script. The record may be then viewed in and eventually resolved through the Image Doctor Records window.
  3. The "Ignore & Resume" button will resume the script without any further action.


LIMITATIONS:

TPR Scripts: 
You may modify the command parameters and/or recreate, add or remove the template images. You may also modify the code after the command. No changes in the preceding code (the already executed one) will be picked up unless they are in an already existing procedure.

Java Scripts:
You will be allowed then to modify the method call parameters and/or recreate, add or remove the image templates under the following rules:


3. Image Doctor Records

The Image Doctor Records facility captures data about failed image comparisons for later use. This approach is used mainly when the script is executed through the -r/--run CLI option in a production environment. It works as follows:

  1. An image comparison fails in a script started through the -r/--run CLI option.
  2. The facility detects the failure and records a PNG screen shot and a .properties text file with the details (failure cause and location, date, environment). The data is stored to the imgdoctor/ folder under the home of the project the script belongs to. If there's no project the data goes to <userHome>/imgdoctor.
  3. The facility saves an entry of the new record to the user configuration file. This mechanism ensures that the new incidents are reported later after Robot gets started in the development mode.
  4. The script resumes as expected.

The records may be also created manually through the Record & Resume button of the Image Doctor Warning window. The next time the user starts T-Plan Robot Enterprise in the development mode (without -r/--run), the GUI reports that there are new records and suggests to resolve them through the Image Doctor Records window. The window is also available through the Script->Image Doctor Records menu item.

Image Doctor Records

  1. The New Records tree branch displays new incidents which haven't been reported yet. This list is loaded from the configuration file and it may comprise of records created across multiple projects.

    The Current Project Records tree branch lists all records available in the current project.
  2. The tabbed pane at the bottom displays details of the currently selected record.
  3. The Resolve button allows to resolve the failure in three steps:

    a)  The script is opened in the script editor and it changes the position to the failure location. The GUI also reopens the script project if it is different from the current one.

    b)  The PNG screen shot is loaded either to the desktop view through the Static Image connection or to the command Properties dialog only. The latter option will preserve the current desktop connection.

    c)   The command Properties window gets displayed to allow adjusting of the command against the recorded screenshot image.

  4. The Show Location button will show location of the selected record in the script editor. This action will not reload the script project if it differs from the current one.
  5. The Open Project button will reopen the project the selected record belongs to. The tree of records will be updated accordingly.
  6. The Delete button will delete the selected record(s).
  7. The Configure button leads to the Image Doctor screen of the Preferences window. It controls the facility behavior.