From 8f3bde3ef7393c6ea5ec3844f3ba287658a97a53 Mon Sep 17 00:00:00 2001 From: "Meleshko, Aleksey2" Date: Thu, 10 Sep 2020 16:54:53 +0300 Subject: [PATCH] to quick demo of screenshot attachments made changes to make screenshots each time after test (not only for failed) in the aquality settings changed: - placeholders' text of dynamic variables - projectId configured to 1 as default as 0 is not allowed Also updated nuget package versions to latest compatible --- .../Aquality.WinAppDriver.Template.SpecFlow.csproj | 14 +++++++------- .../Hooks/ScreenshotHooks.cs | 3 +-- .../Resources/aqualityTracking.json | 8 ++++---- .../Aquality.WinAppDriver.Template.csproj | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Aquality.WinAppDriver.Template.SpecFlow.csproj b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Aquality.WinAppDriver.Template.SpecFlow.csproj index 1927cfd..c40cdc2 100644 --- a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Aquality.WinAppDriver.Template.SpecFlow.csproj +++ b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Aquality.WinAppDriver.Template.SpecFlow.csproj @@ -7,18 +7,18 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + diff --git a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/ScreenshotHooks.cs b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/ScreenshotHooks.cs index 077cb59..9470b61 100644 --- a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/ScreenshotHooks.cs +++ b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/ScreenshotHooks.cs @@ -22,8 +22,7 @@ public ScreenshotHooks(ScenarioContext scenarioContext, ScreenshotProvider scree [AfterScenario(Order = 0)] public void TakeScreenshot() { - if (scenarioContext.ScenarioExecutionStatus != ScenarioExecutionStatus.OK - && AqualityServices.IsApplicationStarted) + if (AqualityServices.IsApplicationStarted) { var pathToScreenshot = screenshotProvider.TakeScreenshot(); TestContext.AddTestAttachment(pathToScreenshot); diff --git a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Resources/aqualityTracking.json b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Resources/aqualityTracking.json index 92e0d7b..cd66f13 100644 --- a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Resources/aqualityTracking.json +++ b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Resources/aqualityTracking.json @@ -1,10 +1,10 @@ { "enabled": false, - "host": "{aquality_tracking_address}", - "token": "{api_token}", - "projectId": 0, + "host": "{protocol_host_and_port}", + "token": "{generated_api_token}", + "projectId": 1, "executor": "{name_of_executor}", - "suiteName": "{name_of_test_suite}", + "suiteName": "{project_suite_name_to_import}", "buildName": "{name_of_ci_build}", "environment": "{name_of_execution_environment}", "ciBuild": "{link_to_ci_build}", diff --git a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.csproj b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.csproj index e6ba8c0..cbd9958 100644 --- a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.csproj +++ b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.csproj @@ -15,7 +15,7 @@ - +