From 36da5b0219f642abde155cfb700ae0adfdbf1cbd Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 31 Jul 2024 11:11:48 +0200 Subject: [PATCH 1/2] Record video for failing win32 integration tests. --- azure-pipelines-integrationtests.yml | 18 +++++++++++++++--- .../record-video.runsettings | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 tests/Avalonia.IntegrationTests.Appium/record-video.runsettings diff --git a/azure-pipelines-integrationtests.yml b/azure-pipelines-integrationtests.yml index ce9b38c44de..b020277fde6 100644 --- a/azure-pipelines-integrationtests.yml +++ b/azure-pipelines-integrationtests.yml @@ -83,11 +83,23 @@ jobs: projects: 'samples/IntegrationTestApp/IntegrationTestApp.csproj' - task: DotNetCoreCLI@2 + displayName: 'Build test project' + inputs: + command: 'build' + projects: 'tests\Avalonia.IntegrationTests.Appium\Avalonia.IntegrationTests.Appium.csproj' + + - task: VSTest@2 displayName: 'Run Integration Tests' - retryCountOnTaskFailure: 3 inputs: - command: 'test' - projects: 'tests/Avalonia.IntegrationTests.Appium/Avalonia.IntegrationTests.Appium.csproj' + testAssemblyVer2: '**/Avalonia.IntegrationTests.Appium.dll' + runSettingsFile: 'tests\Avalonia.IntegrationTests.Appium\record-video.runsettings' + + - task: PublishTestResults@2 + displayName: 'Publish test results' + inputs: + testResultsFormat: 'XUnit' + testResultsFiles: '**/*.trx' + condition: succeededOrFailed() - task: Windows Application Driver@0 inputs: diff --git a/tests/Avalonia.IntegrationTests.Appium/record-video.runsettings b/tests/Avalonia.IntegrationTests.Appium/record-video.runsettings new file mode 100644 index 00000000000..9f11fd97a5a --- /dev/null +++ b/tests/Avalonia.IntegrationTests.Appium/record-video.runsettings @@ -0,0 +1,14 @@ + + + + + + + ​ + ​ + ​ + + + + + From c73792ccd03cdd57db60a9511b6fd21bb3426988 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 2 Aug 2024 09:21:24 +0200 Subject: [PATCH 2/2] Be more specific when selecting the test dll. https://github.com/microsoft/vstest/issues/3939 --- azure-pipelines-integrationtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-integrationtests.yml b/azure-pipelines-integrationtests.yml index b020277fde6..2c3a2abc255 100644 --- a/azure-pipelines-integrationtests.yml +++ b/azure-pipelines-integrationtests.yml @@ -91,7 +91,7 @@ jobs: - task: VSTest@2 displayName: 'Run Integration Tests' inputs: - testAssemblyVer2: '**/Avalonia.IntegrationTests.Appium.dll' + testAssemblyVer2: '**\bin\**\Avalonia.IntegrationTests.Appium.dll' runSettingsFile: 'tests\Avalonia.IntegrationTests.Appium\record-video.runsettings' - task: PublishTestResults@2