Junior — Middle
What annotations from the Allure library do you know and have used in your tests?
sobes.tech AI
Answer from AI
In the Allure library for test automation, the following annotations are often used:
-
@Step— for marking test steps. Allows logging actions with understandable names. -
@Attachment— for adding attachments (screenshots, logs, etc.) to the report. -
@Epic— for grouping tests by large functional blocks. -
@Feature— for indicating functional capabilities being tested. -
@Story— for describing user stories or scenarios. -
@Severity— for indicating the level of test importance (BLOCKER, CRITICAL, NORMAL, MINOR, TRIVIAL).
Example of using @Step:
@Step("Perform login with user {username}")
public void login(String username, String password) {
// login code
}
These annotations help structure reports and make them more informative and easier to analyze.