Scan desktop (image-based)
Your application has various controls, which are elements that Tosca Cloud interacts with when you run your tests. To make this possible, you must first scan your application. This gets the necessary technical data into Tosca Cloud.
This topic explains how to scan
During the image-based scan, you take screenshots of areas in your application. At runtime, Tosca Cloud uses these screenshots to identify the controls you want to test.
Important considerations
When it comes to identifying controls by image, keep these things in mind:
-
The state of your implementation. How much change do you still expect in your application? If there are major design changes after the scan, Tosca Cloud will have trouble finding a match for the screenshot.
-
The screen resolution, color depth, or scrolling. Make sure that the user who scans the application has the same settings as the machine that runs your tests.
-
The number of screenshots you need to reliably identify a control. Controls don't always look the same. For example, you might have text boxes with changing content or toggle buttons with a different look in ON and OFF mode. Use more than one screenshot per control. For example, add a screenshot of an input field's label, or take screenshots of a toggle button in ON and in OFF mode.
-
The test execution time. At runtime, Tosca Cloud searches for a match for the first screenshot. If Tosca Cloud can't find a match, it moves on to the next screenshot, then the next, and so on. In other words, each additional screenshot increases test execution time. Limit the number of screenshots per control to what's absolutely necessary for identification.
Start the scan
To start the scan, follow these steps:
-
Open the test case building area by selecting
Create test case in the menu bar on the left.
-
Select Modules and then + Create module.
-
Select Desktop application (image-based) from the dropdown menu.
Choose your controls
To add controls to your module, follow these steps:
-
In the scan window, select Scan.
-
In the application you're scanning, define your control:
-
Either save or redo your control:
-
If you're happy with the identifying screenshot, select the Save icon.
-
If you want to use a different one, select the Back icon and highlight a new area. Then, save.
-
-
Back in the scan window, enter a Name for your control.
-
To add an additional screenshot for identification, select the Plus icon in the Identifying Images section. Then, highlight a new area. This new area can overlap with the screenshot you already have.
-
Each identifying screenshot has properties. You can customize some of them to your needs:
Description
Is customizable
Name
Name of the identifying image.
yes
ScreenResolution
Screen resolution at the time you created the image.
no
Accuracy
Expected accuracy level. This determines how closely the identifying image must match the application on the screen at runtime. The lower the value, the less closely the image must match.
yes
Method
Desired method of identification at runtime:
-
Fullscreen: always search the entire screen.
-
Controlbased: only search the vicinity of the control.
-
Auto: leave the decision up to Tosca Cloud.
yes
Offset
Distance between the control and the identifying image.
no
-
-
To add another control to your module, select Save & New and repeat the process.
-
Once you've defined all controls you want to add to the module, select Save in the scan window.
What's next
Now that you have your image-based modules, you can start creating test cases.