Skip to content

Commit 49988cb

Browse files
author
d.bogatko
committed
to quick demo of screenshot attachments made changes to make screenshots each time after test (not only for failed)
as aquality tracking uses extension in the fileName to decide how to show the file preview, added '.png' to the screenshot name in the aquality settings changed: - placeholders' text of dynamic variables - projectId configured to 1 as default as 0 is not allowed
1 parent fbc674c commit 49988cb

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

aquality-selenium-template-cucumber/src/test/java/aquality/selenium/template/cucumber/hooks/ScreenshotHooks.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ public ScreenshotHooks(IScreenshotProvider screenshotProvider) {
1717

1818
@After(order = 1)
1919
public void takeScreenshot(Scenario scenario) {
20-
if (scenario.isFailed()) {
21-
scenario.attach(screenshotProvider.takeScreenshot(), "image/png", "screenshot");
22-
}
20+
scenario.attach(screenshotProvider.takeScreenshot(), "image/png", "screenshot.png");
2321
}
2422
}

aquality-selenium-template-cucumber/src/test/resources/aqualityTracking.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"enabled": false,
3-
"host": "{aquality_tracking_address}",
4-
"token": "{api_token}",
5-
"projectId": 0,
3+
"host": "{protocol_host_and_port}",
4+
"token": "{generated_api_token}",
5+
"projectId": 1,
66
"executor": "Azure DevOps",
7-
"suiteName": "Demo",
7+
"suiteName": "{project_suite_name_to_import}",
88
"buildName": "1.0.0",
99
"environment": "Stage",
1010
"attachmentsDirectory": "target/attachments"

0 commit comments

Comments
 (0)