GUIRT recorder

Notes before use

Oplon Global Distributed Gateway GUI Reliability Tools Recorder (GUIRT-R from now on) is the activity logging tool desktop for repetitive autoplay later.

Through Oplon GUIRT-R you can record new tracks of sequence of operations, modify traces of sequence of operations, try the tracks both as a whole and step by step or starting from a specific step. You can also test images of portions of the screen or sentences on input fields and check the times of wait by calculating the actual end-to-end speeds of the applications.

Start of the Recorder

After installing the portable-app (see manual of installation), to start the recoder you must do the following operations:

1) From file manager go to the directory C: TCOProjectbinLBLLBLLoadBalancer image1

2) Run the lblguirecorder.bat command

3) image2 After the splash screen the window of the recorder and you can start the activities of registration

The Recorder

The recorder is the tool that allows the recording of user operations and contextually allows you to add the control characteristics on each single operation. The interface is composed of some panels with control buttons and a section where all the single ones are displayed, with the possibility of modification operations that make up the trace of the operator sequences (from now on then simply Trace).

image2

By pressing the "Insert after selected step" or "Insert before selected step "you can add a step that will contain the characteristics of the step.

image3

Must read before your first recording

The recording activity is the phase in which all are performed step by step the operations which, once defined, can be repeated endlessly. It should be specified immediately that human interaction with desktop events or with machines in general, that's a lot complex and the breakdown of transactions into single units can a sometimes marvel at the complexity and automatic and unconscious operations that we carry out, such as the waiting times between an operation and the other one.

It is also important to highlight that to create a sequence track able to "decide" or at least realize that something is not right working, we must educate it of all the involuntary checks that normally we perform unconsciously, wait for the window to open, check that it's time to type, check that the result is consistent ...

For these reasons the recording interface was meant to be interactive as possible during registration in order to add checks and waits during registration itself usually a human being unconsciously performs automatically.

Registration can be suspended at any time, they can modify/delete/add steps and descriptions that will allow us to understand, even at a later time, the meaning of the single action.

Another consideration in autorun is track engineering. As for the human being some repetitive operations, once learned, are performed in automatic without thinking. In this case it is possible to break down into more tracks our automations and then plays the tracks sequentially. A practical example can be explained with this simple test flow:

1) Start browser

2) Request URL

3) Waiting for the login request

4) Enter login

5) Enter password

6) Confirmation of the operation

7) Waiting for the application features menu

8) Choice of functionality (A)

9) Function test (A.1)

10) Function test (A.2)

11) Logout

12) Close the browser

It is clear from the outset that operations 1 to 7 and operations from 11 to 12 can be used both for testing the functionality (A) and other application functionalities within that context and that it would be inconvenient to have different tracks for the different functionalities with the same operations inside repeated. In this case you can create a track that contains the login step and a trace that contains the logout steps and then generate lots of traces to test the functionality put in that context. Tracks can be put together in phase "Playing" also reporting further tags that identify them during running.

Another consideration is the initial state of the desktop when starting a track. When a track is played we don't really know what it is like the state of the desktop because it may be different from how we have it we wait based on the test performed previously (browser open, open windows etc ...). It is therefore important to use a trace of reset capable of returning the desktop to a "zero" state in which you can start a new test track as if it were the first one time. For this purpose, a track with some steps always useful for this activity. Obviously it will have to be modified to adapt to the needs of the moment.

The desktop language is influential to perform some operations such as short-cut or system commands. It is appropriate to choose the language, the format of date and time and the reference keyboard from be used both during recording and during playback.

Once you have read the recommendations, you can proceed with the first one registration.

First Recording

At the start Oplon GUIRT Recorder sets itself automatically with mode "Always on top" to allow a mouse pointer to the desktop or applications while maintaining control of the registration.

The basic operation involves performing multiple positioning of the mouse alternating pointing on the desktop, confirming the operation clicking on the Oplon GUIRT Recorder interface and then repositioning the mouse on the next point.

image5 After the start press the "Start recording "the description will change to" Mouse position capture enable "and moving the mouse and clicking will record the first position.

image6

Once you have registered the first step, go with the mouse on the interface to determine the action, in this case choose "double click".

image7

So to perform the test of this step it is already possible to perform the start through "Run step"

image8

The GUI interface will minimize and after about 3 seconds it will come performed the step. The waiting time between minimization of the interface and the execution of the step is to allow time for move your hand away from the mouse so as not to interfere with playback. To the at the end of the execution the recorder interface will be visible again e will show the result of the operation.

image9

To stop capturing position recording mouse press the "Pause" button. The description "Mouse position capture "will change from red to black with the description "disable".

image10

First Recording with text comparison

Oplon GUIRT is able to compare textual values and images with portions of desktop. As an example of a comparison test for values textual we will start the notepad program, we will type in his inside the phrase "Hello world!" and then we will check that inside there is exactly this text and then close the notepad window without saving.

First we will have to start notepad. To perform it start of notepad, but more generally of any executable, they can use different techniques: By double clicking on an icon, by clicking on the taskbar or more simply by starting the program we know its name.

In this case we will perform two start tests, the first through the run windows and the second through the start of the program contextually to the step (OScommand).

With the mouse, press the insert step down button

image11

In the new step inserted write in the KeyboardEvent cell Windows + R and in the KeyboardInput notepad.exe

image12

image13

If we execute the step with Run step we should get the following result ...

The windows run window remains open because it has not been confirmed and the trace ended successfully.

image14

We then add another step which confirms with "Enter" the operation ...

image15

We reposition the selection on the first step and execute the Run the whole track from the beginning ...

image16

Run the entire track from the selected step, in this case the first step ...

image16

The result is the opening of the notepad window ...

image17

Now let's add a step that types the phrase "Hello world!" ... we select the step from which to insert the new element and then on KeyboardInput cell we type the phrase "Hello world!" (Beware that the lowercase and uppercase are considered different)

image18

image19

Let's cancel the step selection ...

image20

Let's run the track that will start from the first step as it is not there selected steps ....

image20

The result is the opening of the program window notepad.exe and typing the text "Hello world!" inside of editor ...

Notepad window with text "Hello world!"

image21

Warning: If we have not closed the previous notepad window we will we will find with two overlapping notepad windows ... we don't have yet instructed the track to close the window at the end of operations ...

We then manually close all the existing notepad windows on the desktop ...

image21

At this point it is better to save the current state in order not to rush the risk of losing our registration.

image20

The saving window will open and we will indicate the name file with Test.xml

image22

In the top window bar you will see the name of the file currently in use.

image23

Let's now make the comparison of the value inside editor ...

With the mouse we go to add a step, we select the cell text appears and then we insert the value we want on the KeyboardInput compare...

image24

Let's cancel the step selection and run the track from the beginning...

image25

Note that Oplon GUIRT makes the selection as the last operation of the value to be able to perform the comparison which in this case gives as "Normal end" result ...

image26

Let's try changing the comparison value from "Hello world!" to "Hellooo world!", We deselect the steps and execute the run from the beginning of the track ....

image27

This time the comparison result indicates a difference e ends with the error window ...

image28

We now proceed to restore the comparison text with the value "Hello world!" and add the commands to close notepad without the saving ... here are the commands in sequence ...

Alt + F4 - to execute the close command

Right - to move the focus to the right of a button (don't save)

Enter - to confirm exit without saving

image29

Let's save our registration ...

image29

Tip: At start we do not know the status of the desktop and if there are other notepad windows from previous tests. To perform a Initial "cleanup" of the desktop would be appropriate to close any notepad left pending. To do this we will go to enter a command to close all notepads as the first step on the desktop.

To get all the desktop notepads closed we will run the operating system command Taskkill/F/IM notepad.exe directly in the first step of our track

Let's select the first step

image30

We use the insert before button and on the OSCommand cell we write the command to delete all notepad running Taskkill/F/IMnotepad.exe image31

We open a notepad to verify the execution of the command ... ed let's play the track from the beginning ...

image32

Another desktop cleaning trick is to make all the icons icon applications present. This can be achieved with the Windows + M command

image33

We perform from the beginning ...

Any other windows on the desktop will minimize first execution ...

image34

Finally we will run notepad.exe without going through the run of windows but simply by using one step and running notepad directly from OSCommand ...

We must take care to clear the KeybordEvent cells that contain the Windows + R command and KeyboardInput that contains typing the notepad.exe command ...

image35

And deleting the step with Enter ....

We select the step we want to delete

image36

The result must be the same as the following image

image37

Run from the start

image38

Let's save our first registration.

image39

First Recording with image comparison

With Oplon GUIRT it is possible to perform visual comparison tests on portions of the desktop.

We will now replace the textual comparison with the visual comparison. To obtain this result we are going to perform the start manually of notepad and then to take a portion of the desktop to check "Hello World!"

We manually open notepad and write "Hello world!"

image40

To delimit a portion of the desktop we are going to point the corners upper left and lower right creating two temporary steps that us they will then allow you to take a snapshot of the rectangle.

We activate registration

image41

We point the mouse to a point at the top left of the notepad window (without causing the window menu to open)

image42

Let's select the Oplon GUIRT window again

image43

And then we point the mouse at the lower right corner that will delimit our image to compare ...

image44

The result will be two steps with the indication of the points in coordinates X Y of our rectangle

image45

We perform the mouse stop position capture to avoid inserting unwanted steps

image46

We select the two steps with the mouse

image47

Let's take the snapshot of the portion of the desktop bounded by the angles that we will have described image47

The result will be one step with the image comparison cell selected, the CF cell set to 15% and the wait after to 1000 milliseconds (1 second)

image48

If we press the button with the film symbol of the line of comparison a window will appear with the snapshot stored.

image49

You can also check if the snapshot is recognized through the single step run key of the step itself.

image50

If the result matches, the window with normal end

image51

We now move the image comparison step below to the textual comparison with the move row up button

image52

Up to the desired position below the textual comparison

image53

Cancel the comparison textual ... image54

... and perform a save by changing the name of the track with the "Save as" button with name TestImageCompare.xml

image55

image56

The name of the new file is displayed in the top bar of the window

image57

We run from the beginning of the track

image58

Start

image58

The visual comparison track is also finished correctly. image59

Some considerations on comparisons

We have deliberately overlooked the recordings of the previous tracks on deepening the meanings of the CF, Retry Wait Before and Wait After. These parameters allow us to perform tests on the expected result and at the same time to evaluate the speed of reply.

Where there is a comparison, typically a window is expected to appear with matching values or images, the system is capable of checked at regular time intervals described in the Wait cells After and for a maximum number of attempts described in the Retry cell the comparison took place. In practice if the result of the comparison fails, the system retries n times until reaching the comparison or upon reaching the maximum number of attempts first to signal an error with the simultaneous stop of the track.

This allows you to calculate the actual response times of the applications with a granularity equal to the waiting time between a control and the other of comparison.

The Compare Factor (CF) cell is used to perform equality or similitude. Expresses the% deviation to decree an image similar to another. If CF is 0 (zero) the images must be perfectly alike. If it is> 0 (typically 10% to 15%) the images can deviate from equality. This is important because it allows for very slight color or image changes present in the new interfaces.

image60

Comparisons, conditional jumps and use of reserved labels

The trace may contain textual or image comparisons which, if they are not successful, they may contain controls of flow with conditional jumps to other steps. It is possible in fact, assign a symbolic name to a step that can be used either during the comparisons and during the normal flow obtaining a execution of the non-sequential steps.

In this case we will intentionally modify the comparison text from "Hello World!" to "Hello World" without the exclamation point.

image61

The ENDERR, @STOP_RUN and ENDTRACE labels have been added to the column StepLabel.

The @STOP_RUN label is a reserved keyword that ends the execution of the trace, while the other two labels, ENDERR and ENDTRACE are i step references that can be used in the flow control columns.

Running this trace, not finding a match with the text, will make a conditional jump to the step with the ENDERR label that then it will end at the step with the label @STOP_RUN and will not continue further.

If instead we change the comparison back to "Hello World!", the execution will continue after the comparison and once it reaches the step 8 will perform a jump to the ENDTRACE step by skipping the other steps.

Reserved labels:

@STOP_RUN Terminates trace execution without error


@STOP_ERR Ends trace execution with error

Replacement list

With Oplon GUIRT it is possible to perform traces that report in step of variable values ​​based on a predetermined list. Through a semicolon (;) separated csv file is possible in fact, prepare lists of values ​​on several lines whose reference to be used in the trace is placed in the first row.

For example, if we take into consideration the following layout we can note that the first line contains the identifiers, the following lines contain the corresponding values per column:

COD; DESCRIPTION; PRICE;

0012; White Toothpaste; 2.30;

0015; Toothbrush; 3.5;

0072; Electric toothbrush; 18.10;

To be able to use the values in the tracks while playing is just indicate on the "Keyboard Input" fields the identifier of the first line of the value you want to use including% symbols. Example% DESCRIPTION%.

image62

image63

If the trace was performed without other actions the result would be a literal automatic typing than in notepad would be exactly the same as typed in the Keyboard fields Input: %DESCRIPTION%

If instead we associate a file with the above list to the track we will get as a result a first run with the value "White Toothpaste ", a second execution with" Toothbrush "value and a third version with "Electric toothbrush" value.

To associate the performance with a replacement list click on "Open CSV replacement list "and select the file containing the list of replacement.

image64

image65

The execution of the track will be carried out for as many times as there are lines contained in the file, in this case 3, taking the first row as reference.

Initial desktop cleaning

We mentioned running test tracks with a default and known initial environment. It is important that every trace does make sure you start in a state that allows for it to run like it was the first time.

Brief description of cells step

Cell Description
N # Is the original line number of the line, it is not editable
Step label If available, you can use the identifier in the GoOK and GoKO gonditional jumps
X If different from -1 it indicates the X position of the mouse. With -1, the step does not involve moving the mouse
Y If different from -1 it indicates the Y position of the mouse. With -1, the step does not involve moving the mouse
MouseEvent Indicates the action of the mouse. The possible actions are:
- click
- doubleclick
- clickcenter
- doubleclickcenter
- clickright
- doubleclickright
KeyboardEvent

Value of a keyboard event. A keyboard event means shortened actions or special keys. Examples include pressing the Windows, Del, Tab, Escape key or multiple key actions: Control + C, Windows + M . The value + identifies the simultaneous pressure of the reserved keywords. The list of possible keywords is directly available from the interface on the KEYS tab

FindTextValue If the value is checked, the player searches for the textual value of the selection if it is equal to the value present on KeyboardInput . If it does not correspond, check it again for the number described in the Retry cell with a waiting time between one attempt and the other described on Wait after .
CompareTextValue If the value is checked, the player checks if the textual value corresponding to the context is equal to the value present on KeyboardInput . If it does not correspond, check it again for the number described in the Retry cell with a waiting time between one attempt and the other described on Wait after .
KeyboardInput It is the textual value that is typed in the corresponding context of the step. If the CompareTextValue cell is checked it is instead the textual comparison value
OSCommand It is any system command such as starting notepad, firefox, chrome or any batch procedure present
Description Free description. This description is very important to fill it in during registration to understand, after some time, the meaning of the step
Wait before This is the time to wait before any action of the specific step is performed
Wait after It is the waiting time after performing all the actions of the step and before moving on to the next step. In the case of text or image comparisons, it also represents the waiting time between one attempt and the next in the event that the comparison fails.
Retray Number of attempts to make if the comparison, textual or image, returns with error
GoOK If set, the next step will no longer be the immediately consequent step but will be the step with the indicated label. If the step that contains the GoOK is a comparison, textual or image, if the result of the comparison is positive the value of this field is taken into consideration otherwise if the result of the comparison is negative, the value contained in GoKO is taken into consideration
GoKO In the case of a comparison step and if evaluated, this value indicates the step on which to continue the trace in case of comparison with a negative result. If not completed and the result of the comparison is negative, the trace ends the execution with an error
FindImage If the value is checked, the player searches in the desktop from coordinate x0 y 0 the value of the image corresponding to the context if it is equal to the value present on the snapshot stored in the step and visible through the View key image . If it does not correspond, re-check for the number described in the Retry cell with a waiting time between one attempt and the other described on Wait after .
CompareImage If the value is checked, the player checks if the value of the image corresponding to the context is equal to the value present on the snapshot stored in the step and visible through the View image . If it does not correspond, re-check for the number described in the Retry cell with a waiting time between one attempt and the other described on Wait after .
CF Percentage of similarity for the comparison of the image. This parameter is very important in determining whether an expected page is classified as a match. It is a percentage as the pages may have small color differences that do not absolutely determine the mismatch. A tar value of 10% and 15% usually corresponds to similarity. If set to 0% (zero) the player checks for complete pixel-to-pixel correspondence without any tolerance.
View image It is the button that in the case of comparing the image of portions of the Desktop allows you to view the image to be compared in a popup window
Run step Button that allows you to execute the single corresponding step