Integration with Allure TestOps
Integration with Allure TestOps allows you to automatically export test cases and launches from one project to another, including exporting to projects located on a different instance of Allure TestOps. You can use Allure Query Language to select the required set of data to be exported.
To enable this integration, you need to:
- Add Allure TestOps integration in the Administration panel.
- Request an API token to authenticate API calls to recipient Allure TestOps instance.
- Enable the integration in the project settings using the received API token.
- Create one or more export rules in the integration settings.
Adding new integration
Log in to Allure TestOps using an administrator account.
Click on your avatar and go to Administration → Integrations.
Click Add integration in the top right corner of the page.
In the opened up window, select Allure TestOps.
Fill in the fields:
- Name — a name to help you recognize this integration later (e.g., "Allure TestOps production").
- Endpoint — a URL of the Allure TestOps server to which you want to export the data (e.g., "https://demo.testops.cloud/").
If the specified Allure TestOps server uses a self-signed SSL certificate, select the Disable certificate validation checkbox.
Click Add integration.
Getting an API token
If you want to export data to another Allure TestOps instance, you need to get an API token from an administrator of the target instance.
If you are the administrator and want to grant access to receive the data from another instance (or if you are exporting data to the same server), follow the steps below to create an API token:
- Log in to Allure TestOps using an administrator account.
- Click on your avatar and go to Administration → Your profile.
- Under the API tokens, click on the Create button.
- Enter a name for the token (e.g., "Allure TestOps integration") and click Submit. Always try to give meaningful names to the created tokens.
- Copy the created token and save it in a safe place. Once created, API tokens cannot be viewed or changed.
Enabling integration for the project
- Go to the project page.
- In the menu on the left, click Settings → Integrations.
- Find the Allure TestOps integration and click Add integration.
- Enter the API token you received from the administrator (see Getting an API token).
- Click Add integration.
Creating an export rule
- Go to the project page.
- In the menu on the left, click Settings → Integrations.
- Click on the previously added Allure TestOps integration.
- Click on the TMS Sync tab on top.
A list of export rules will be shown where you can edit and delete previously created rules.
To create a new export rule, click Create.
In the resulting window, you will be able to select the project to which to export the data, and filter your project's test cases using Allure Query Language to limit the set of test cases and launches that will be exported:
- In the Project list, select the project to which you want to export data.
- In the Test Case AQL box, enter an AQL query to filter the test cases you want to export. If you leave this field blank, all test cases will be exported.
- Optionally, in the Launches AQL box, enter an AQL query to limit the set of launches to be exported for the selected test cases. If you leave this field blank, all launches will be exported. You can also disable exporting launches completely by selecting the Disable Launches sync checkbox.
Additionally, you can specify mapping settings if you need to export test case properties (such as workflow statuses). Please refer to Mapping test case properties for more information. If you don't specify mapping settings, no properties will be exported.
When you are finished, click the Submit button.
After the rule has been created and the test cases have been successfully exported, you can disable the export of new test cases that match that rule by selecting the Disable Test Case create checkbox. If this checkbox is selected, only the changes and launches of the previously exported test cases will be exported.
To disable the export rule without deleting it, select the Disable export checkbox.
Mapping test case properties
Test cases on different Allure TestOps instances may have different sets of property values. In other words, if you are using, for example, a custom workflow status in your test cases, it exists only on your instance. If you try to export a test case that uses that status, the other instance will not know what to do with it.
The default behavior is to ignore all properties, including built-in values such as Draft, Review, etc. To change that, you can create mapping rules to specify how properties from your instance should be handled on the other instance.
Each mapping rule links two values: the value on your instance (Source) and the value on the other instance (Target). For example, if you create a rule that links the Review status to the Review status, all test cases that have the Review status will retain it on export. If you link Review to some other status, it will be replaced with that status instead.
- As was previously mentioned, all built-in values are ignored by default. You can select the Map as identity checkbox to export them without the need to create mapping rules manually (i.e., all Drafts will be exported as Drafts, Reviews as Reviews, etc.).
- You can set a value that will be used if some property value is missing in the mapping rules. For example, if you set Review as the default status and don't specify any mapping rules, all exported test cases will have the Review status. You need to enter the ID of the value, not its name (see the next step for more info).
- To create a new mapping, click Add and enter Source ID (ID of a value on your instance) and Target ID (ID of a value on the other instance). You can find these IDs in the Administration panel of Allure TestOps (see the image below). If you don't specify Target ID, the source property value will be deleted on export.
To get the IDs of values, log in to Allure TestOps as administrator, click on your avatar, go to Administration and select the required section. For example, you can find the ID of the Draft status (-1) under Status.