Posted on

How to use the AI component by yourself (video)

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.

Link to the source code of our component:
https://github.com/thetaris/testup-ai-driver/ .

Posted on

Jumps with Sub-Return function

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).

Example:

JUMPsub:switch_user

… some more actions …

TAG#sub:switch_user

…some recurrent actions…

JUMPreturn:switch_user
Posted on Leave a comment

How to use Branching

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.

  1. Create a test and record actions in one of your chosen browsers (e.g. Firefox, Chrome, etc).
  2. In the mode create a new variable by clicking .
  3. Name your variable BRANCH using upper case and insert the value according to the current browser (e.g. Firefox).
  4. Click .

Create a second branch

Then create a second branch in your successor test.

  1. Create a new test as a successor and choose in the test settings your previously created predecessor.
  2. 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).
  3. Play your test until the step where the branching should start.
  4. Go to mode and enter your variable for the first browser in the field “branch selector” (e.g. Firefox).
  5. Jump to the next step using in the menu of the following step.
  6. 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.
  7. If the next action of your test is different in the second setting, repeat steps 4 – 6.
  8. 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.

Posted on

Videotutorial 09: Variables and Data

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:

  • Using the clipboard
  • Seting runtime variables
  • Working with test variables

Also read our post about how to integrate tests into Gitlab CI/CD pipelines

You’ll find more information about useful PHP commands in the using the editor advances section of our documentation. 

Posted on Leave a comment

CI-CD Results API

This page lists the API calls that are meant for external integration. Currently there is one endpoint to get information in JSON format.

Also look at Integrate testup into the CICD pipeline, for API calls to start schedules and get response in plain

Authentication

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:

curl … -H “Authentication: ApiKey-v1 $TESTUP_APIKEY”

Project status

The project status call returns the result of the previous test runs. You can call the following address to the get the current status

https://app.testup.io/cicd/project/$PROJECT_ID/results

The following query parameters are possible:

limit Number of past executions that are included in the response (default 20)
fromDate start time of the execution list (Iso format: YYYY-mm-DDTHH:MM:SS)
toDate end time of the execution list (Iso format: YYYY-mm-DDTHH:MM:SS)

Example:

curl “https://app.testup.io/cicd/project/$PROJECT_ID/results?limit=1” -H “Authorization: ApiKey-v1 $TESTUP_APIKEY”

Response:

{
  "project": {
    "id": 1,
    "name": "Project name"
  },
  "executions": [
    {
      "id": 2,
      "name": "Run by Schedule",
      "startTime": "2023-10-18T16:15:00.239571Z",
      "tests": [
        {
          "id": 3,
          "name": "Test case one",
          "status": "PASSED",
          "failedRecordings": []
        },
        {
          "id": 4,
          "name": "Test case two",
          "status": "PASSED",
          "failedRecordings": []
        }
      ]
    }
  ]
}
Posted on Leave a comment

How to use Find with multiple anchor areas

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.

  1. Use to search for the first anchor area.
  2. Click .
  3. Enter the following PHP command to save the result of the find to a runtime variable:
  4. EVAL set("some_var_name")
  5. Use to search for the second anchor area.
  6. Enter the following PHP command to save the combined result of this and all previous finds to the runtime variable:
  7. EVAL set("some_var_name", $CLIPBOARD=="True" || get("some_var_name")=="True")
  8. Repeat step 4 and 5 for every possible anchor area.
  9. Enter the following PHP command to throw an error if none of the previous finds was successful:
  10. EVAL get("some_var_name") || error("a custom error message")