TMS Annotations
Annotations are special markers in code that contain metadata about code. You can configure TMS annotations to provide additional information about tests. This allows IntelliJ IDEA to link your unit tests to TMS items.
TMS annotations enable IntelliJ IDEA to perform better analysis, for example, to find test cases that are already referenced from unit tests.
For this purpose, you can use third-party annotations or create your custom annotation.
Import a third-party annotation
Open pom.xml in the root directory of your project.
tip
To quickly navigate to a file, press Ctrl+Shift+N and enter its name.
In pom.xml, press Alt+Insert, select Dependency. In the dialog that opens, enter the name of the dependency, for example,
io.qameta.allure:allure-java-commons:2.13.8
.Apply the changes in the build script. For that, press Ctrl+Shift+O or click Load Maven Changes in the notification that appears in the top-right corner of the editor.
If, for some reason, you cannot add extra dependencies to your module, you can create your own annotation class.
After the annotation is already in the project, you need to tell the TMS plugin to use that specific annotation.
Enable annotations in TMS settings
Go to Settings/Preferences | Tools | TMS | TMS Annotations.
Click Add
and specify the annotation class.
Finally, for IntelliJ IDEA to establish a linkage between a unit test and a TMS item, the test needs to be annotated with one of the annotations configured for the project.