To work with Allure Testops projects using the IDE plugin for IDE, you need to have at least ROLE_USER authority and at least project:write permission.
Open plug-in settings.
Enter the URL of your Allure Testops instance.
Provide the personal access token.
Click Check connection
If all the data above (items 2 and 3) are correct, system will provide your username as it registered in Allure Testops.
Plug-in allows you to select the default Allure Testops project for the current IDE's project, i.e. all the operations will be for a certain project in ATO Allure Testops, and you won't need to select the project each time you need to upload the results.
Proceed to IDE > Preferences > Tools > Allure Testops > Project settings and select the project you want to be used by default by the plug-in.
Upload test results to Allure Testops from IntelliJ IDEA
Use case for the test results upload is pretty simple: surely, you want to see how your freshly baked automated tests look like in the Allure Testops launches. So, you'll be able to check. Plug-in will create a new launch and upload your test results to this new launch on Allure Testops side.
Run tests on your development environment, i.e. on your local machine.
Select folder with allure results in the project tree and then right click the folder.
In the context menu select Allure: Upload results
Update the name for a new launch plug-in is going to create (if needed)
The results will be available in the Allure Testops in section Launches.
Link tests in IDE to Tests cases in Allure Testops via AllureID
Allure Testops uses certain rules to link your automated test to Allure Testops test case.
Linking rules depend on a test framework, but generally it works similar to the next example:
AllureID will be linked to the full path of your test method like <package>.<class name>.<method name>.
Allure Testops also uses the parameters of a test to link a test case to certain AllureID, i.e. test <package>.<class name>.<method name> without parameters and with one parameter aren't the same, these will be two different test cases with different AllureIDs.
Simply, AllureID is the ID of a test case in the database of Allure Testops. AllureID is a unique number, meanwhile the full path and parameters of a test could change over time due to refactoring of your code for example.
If you modify any part of this mapping, Allure Testops will consider such test as a new test case and will create one for you with new AllureID.
So, you will have to test cases – one with old path (set of parameters) and the new one with new path and set of parameters.
This will lead to the following:
old test case will stop receiving updates from your code and will become abandoned one, statistics will be frozen on the latest result referring to the old test case
new test case will receive updates and statistics will start with the first test result.
Ultimately, your statistics and analytics will become irrelevant for these two test cases.
To avoid abandoning test cases, you must mark your test with AllureID annotation.
If the tests were never reported to Allure Testops, you need to upload your test results first time your tests into Allure Testops as described:
right click the allure results' folder
select Allure: Upload results
select the project to upload to
name the launch
Close the Launch to process the results, new test cases will be created
test cases are created and updated in Allure Testops only when a launch is closed.
Right click a package or a class to be processed and select Allure: Assign ID
In the modal window select the project in Allure Testops to which you've sent the test results
Tests will be annotated with @AllureId.
Now, if you modify either package name or the class name or the test name it will be correctly mapped to Allure Testops test case.
Manual test cases automation
Following workflow allows you easy-peasy automation of a manual test case you have in Allure Testops.
Say, in a project you have a manual test case you want to automate.
In IDE create new class or use an existing one and add a new method (test) marked with @Test annotation
Right click the method and select Allure: Import test case
In the modal dialogue provide Allure ID from Allure Testops to Test Case ID field and select the items to import from Allure Testops manual test case.
Your test in IntelliJ IDEA will be updated with the information you selected and will have @AllureId assigned
Close the Launch on Allure Testops side to process the results
You Allure Testops manual test case will become an automated one
Now, to complete the automation process you need to compare manual and automated scenarios by clicking compare button near Scenario item
If you're satisfied with the results, remove the manual scenario, and the scenario from test results will be used
Now, your test case's scenario is being taken from the latest test result
Now, your test is fully automated
Creation of automated tests form IDE and and reservation of Allure ID
If you are developing an automated test from scratch, you don't need importing the data from a manual test case, so you can create an empty automated test case from IDE and assign Allure ID to it form the very beginning, so all the changes in names and parameters will be reflected in the same Test case on Allure Testops side.
Workflow is the following:
You create a test method in your IDE
You request the Allure ID for your test
Allure Testops reserves the AllureID for your test and makes link between AllureID and full path of your test (<packageName>.<ClassName>.<methodName>).
The test case in Allure Testops is marked as deleted until you sent test results to Allure Testops.
Create a new test method and right click on it. Select Allure: Create Test Case
Select project name where you want your TC to be created in.
Allure Testops plug-in will create a test case in deleted state and will provide AllureID to your code.
Now, you can open test case in Allure Testops interface by clicking on the context menu item Allure: Open Test Case
Created test case is added in deleted state as the creation only does the reservation of AllureID.
Run your test to create test results and upload the test results the test results to Allure Testops. Remember you need to close the created launch for magic to happen. Click the close button.
As soon as test results arrived and launch was closed, your test case will appear in the list with the other test cases and Deleted state will be removed.