IntelliJ IDEA plug-in
Intellij plug-in is developed to help you working on the test cases. It allows you to do the following:
- Upload the test results of your tests from IntelliJ to Allure TestOps
- You can check how the results look like in Allure TestOps
- You will be able to create test documentation in Allure TestOps
- You will be able easily automate the manual test cases by importing the scenario of manual test case to IDE.
- You will be able to assign Allure ID to the test cases, so changes of the names will update the test documentation.
Go to plug-ins section of IntelliJ IDEA settings.
- go File > Settings > Plugins
In search field start typing Allure TestOps Support
Then in the results field find the plug-in and hit
Plug-in connection settings
- Go to Tools -> Allure -> Authorize
- Provide Allure TestOps URL
- Provide personal access token
- Click OK
If there is no error message, then authentication is completed and you can start using the integration.
Upload test results to Allure TestOps from IntelliJ IDEA
- 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 Upload Results to Allure
- Select a Project to sent the test results and name your launch
- The results will be available in the Allure TestOps in section Launches of the project selected in step 4.
Link tests in IDE to Tests cases in Allure TestOps
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 for jUnit5:
Allure ID will be linked to
<package>.<class name>.<method name>.
If you will modify any part of this mapping Allure TestOps will consider such test as a new test case and will create one for you. So, you will have duplicated tests. To avoid it you need to mark your test with allure ID annotation.
- Upload first time your tests into Allure TestOps as described above.
- Close the Launch to process the results, new test cases will be created
- Right click the package to be processed and select Assign Allure 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
- In the Test cases section create a manual test case and add scenario to it.
- 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 Automate
- In the modal dialogue provide Allure ID from Allure TestOps to Test Case ID 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
- Update the scenario of your test
- Execute your updated test and upload the results
- 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 is fully automated