Integrate with automation tools using the REST API

Overview

Our REST API provides a simple and secure way to integrate with any automation tool. You can use it from any programming language or tool that supports HTTP requests. The API supports both basic and advanced use cases.

How to set it up

Endpoint URL:

Use the following URL for your POST requests: POST https://serviceX.testuff.com/api/v0/testone/?token=TOKEN

  • TOKEN: Replace TOKEN with your Testuff user token (find it in your Testuff user Settings under Details).
  • serviceX: Replace the ‘X’ with the number of your service (find this in your Testuff account Settings under Company details).

Parameters: Include the following parameters in your POST request:

  • branch_id: The relevant Testuff branch where the test result should appear.
  • name: The name of the test.
  • status: The test execution status (should be passed, blocked, or failed).
  • lab_name (optional): The path of the lab where the test result should appear.
  • seconds (optional): The runtime of the test in seconds.
  • comment (optional): A free text comment about the execution.
  • automation_id (optional): The relevant Testuff automation_id if you want to link to a specific Testuff test.

Response: After making the POST request, the response header should include a Location result, which is the URI for the newly created run. Ensure you receive an HTTP 201 response, which indicates successful creation. If you receive a different response, check the details provided in the HTTP response for troubleshooting.

Sample cURL

Copy to Clipboard

Advanced Use

Using automation_id Parameter:

  • Find the automation_id in the Testuff test properties.
  • When provided, the branch_id parameter will be ignored, and the branch associated with the test will be used.
  • The newly created test execution will inherit all the test meta data.
  • Branch copying retains test IDs for automation, ensuring new branches do not break existing automation scripts.

Using lab_name Parameter:

  • If not specified, the test will be created in a lab called “Automation” (it will be created if missing).
  • You can specify a path format to create a nested lab hierarchy. For example, “Automation->Selenium” will create a lab named “Automation” with a sub-lab named “Selenium”.

As usual, feel free to contact us if you have any issues or questions.