Sometimes we want to check elements that are not displayed in our system all the time, like notification messages that disappear after a short while. For that you would need two lines in your action list. Follow these steps:
Step 1:
Go to mode and select .
Step 2:
Draw an anchor area around the element that you want to check while it is still displayed.
Step 3:
Click and set the number of seconds the app should look for the image in the action.
Step 4:
Go back to mode and select .
Step 5:
Insert the following string into the entry field: $FLAG || error(‘specific failure description’) and type in the text that should appear when the image isn’t found.
The AI component of the testup.io test automation service has been released to the public. This video describes what you can find inside, how to download and how to run it. The repository contains a selenium wrapper and all training data for parameter fine tuning. You can also run the tests from our online service at testup.io.
For actions which needs to be recurrently run several times throughout the test (e.g. switching users) you can use Jump with Sub-Return function.
With JUMP #sub:tagName you set the base of the following jump session. The command makes you jump to the TAG #sub:tagName. With the JUMP #return:tagName you jump back to the place where you started (set the baseline).
If you need to create the same test for your product multiple times due to minor differences of different settings (e.g. language, browser, environment, etc.), you can use Branching. This function allows to record test steps for all settings under test in just one test case.
Create a first branch
First, you need to create a branch in your predecessor test.
Create a test and record actions in one of your chosen browsers (e.g. Firefox, Chrome, etc).
In the mode create a new variable by clicking .
Name your variable BRANCH using upper case and insert the value according to the current browser (e.g. Firefox).
Click .
Create a second branch
Then create a second branch in your successor test.
Create a new test as a successor and choose in the test settings your previously created predecessor.
In the mode click on the overwrite symbol to the right of your BRANCH variable
and insert the new value for your second branch (i.e. Chrome).
Play your test until the step where the branching should start.
Go to mode and enter your variable for the first browser in the field “branch selector” (e.g. Firefox).
Jump to the next step using in the menu of the following step.
Click on “Insert action” and record the first action of your second branch (e.g. double click on Chrome browser). The step will be automatically marked with the name of your second branch.
If the next action of your test is different in the second setting, repeat steps 4 – 6.
If it is the same, simply play the following steps one by one until the action is different again and repeat steps 4 – 6.
In order to run both branches in one schedule, simply create a second successor test and name it according to your first branch.
This is the nineth tutorial of this series explaining how to use variables and data in testup.io. So if you want to learn how to use variables and data in your test, testup.io is is ready for you:
All calls to our api can be authorized via the ApiKey. You can get this key from your user, or your project settings page. Please check for a description on to get this ApiKey in step one of cicd integration. For following we assume that $TESTUP_APIKEY is set to your key.
To access any REST endpoints you need to set the following header
Authentication: ApiKey-v1 $TESTUP_APIKEY
In curl commands you can set the Header like this:
In case there are multiple possible anchor areas in the system under test and you need to check if at least one of them can be found on the device screen, you can use .
This function searches for every possible anchor area and saves the result in a runtime variable with . In the end, you can either throw or not throw an error, depending on the value of the runtime variable.
Insert multi-check into a test.
Make sure you are in mode.
Use to search for the first anchor area.
Click .
Enter the following PHP command to save the result of the find to a runtime variable:
EVAL set("some_var_name")
Use to search for the second anchor area.
Enter the following PHP command to save the combined result of this and all previous finds to the runtime variable: