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..55483ef 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 @@ -1,24 +1,24 @@  - netcoreapp3.1 + net8.0 false - + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + diff --git a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/PluginsHooks.cs b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/PluginsHooks.cs index e0f80ad..9a7320c 100644 --- a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/PluginsHooks.cs +++ b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/PluginsHooks.cs @@ -1,4 +1,4 @@ -using Allure.Commons; +using Allure.Net.Commons; using AqualityTracking.Integrations.Core; using NUnit.Framework; using System.Text.RegularExpressions; @@ -19,8 +19,7 @@ public PluginsHooks(ScenarioContext context) [AfterScenario(Order = -1)] public void UpdateAllureTestCaseName() { - context.TryGetValue(out TestResult testresult); - AllureLifecycle.Instance.UpdateTestCase(testresult.uuid, testCase => + AllureLifecycle.Instance.UpdateTestCase(testCase => { testCase.name += GetScenarioNameSuffix(); testCase.historyId = TestContext.CurrentContext.Test.FullName; 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..0e34899 100644 --- a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/ScreenshotHooks.cs +++ b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.SpecFlow/Hooks/ScreenshotHooks.cs @@ -1,4 +1,4 @@ -using Allure.Commons; +using Allure.Net.Commons; using Aquality.WinAppDriver.Applications; using Aquality.WinAppDriver.Template.Utilities; using AqualityTracking.Integrations.Core; @@ -8,26 +8,18 @@ namespace Aquality.WinAppDriver.Template.SpecFlow.Hooks { [Binding] - public class ScreenshotHooks + public class ScreenshotHooks(ScreenshotProvider screenshotProvider) { - private readonly ScreenshotProvider screenshotProvider; - private readonly ScenarioContext scenarioContext; - - public ScreenshotHooks(ScenarioContext scenarioContext, ScreenshotProvider screenshotProvider) - { - this.scenarioContext = scenarioContext; - this.screenshotProvider = screenshotProvider; - } + private readonly ScreenshotProvider screenshotProvider = screenshotProvider; [AfterScenario(Order = 0)] public void TakeScreenshot() { - if (scenarioContext.ScenarioExecutionStatus != ScenarioExecutionStatus.OK - && AqualityServices.IsApplicationStarted) + if (AqualityServices.IsApplicationStarted) { var pathToScreenshot = screenshotProvider.TakeScreenshot(); TestContext.AddTestAttachment(pathToScreenshot); - AllureLifecycle.Instance.AddAttachment(pathToScreenshot, "Screenshot"); + AllureApi.AddAttachment(pathToScreenshot, "Screenshot"); AqualityTrackingLifecycle.Instance.AddAttachment(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..04a1ec9 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 @@ - + diff --git a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template/Resources/settings.json b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template/Resources/settings.json index 7f97d20..aa3e6a9 100644 --- a/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template/Resources/settings.json +++ b/Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template/Resources/settings.json @@ -26,5 +26,11 @@ }, "elementCache": { "isEnabled": true + }, + "visualization": { + "defaultThreshold": 0.03, + "comparisonWidth": 16, + "comparisonHeight": 16, + "pathToDumps": "../../../Resources/VisualDumps/" } } \ No newline at end of file