Record video for failing win32 integration tests on CI. (#16546)

* Record video for failing win32 integration tests.

* Be more specific when selecting the test dll.

https://github.com/microsoft/vstest/issues/3939

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
This commit is contained in:
Steven Kirk 2024-08-03 23:40:01 +02:00 коммит произвёл GitHub
Родитель 0400665c57
Коммит e0e99b31a8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 30 добавлений и 4 удалений

Просмотреть файл

@ -83,11 +83,23 @@ jobs:
projects: 'samples/IntegrationTestApp/IntegrationTestApp.csproj'
- task: DotNetCoreCLI@2
displayName: 'Run Integration Tests'
retryCountOnTaskFailure: 3
displayName: 'Build test project'
inputs:
command: 'test'
projects: 'tests/Avalonia.IntegrationTests.Appium/Avalonia.IntegrationTests.Appium.csproj'
command: 'build'
projects: 'tests\Avalonia.IntegrationTests.Appium\Avalonia.IntegrationTests.Appium.csproj'
- task: VSTest@2
displayName: 'Run Integration Tests'
inputs:
testAssemblyVer2: '**\bin\**\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:

Просмотреть файл

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector uri="datacollector://microsoft/VideoRecorder/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TestTools.DataCollection.VideoRecorder.VideoRecorderDataCollector, Microsoft.VisualStudio.TestTools.DataCollection.VideoRecorder, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Screen and Voice Recorder">
<Configuration>
<MediaRecorder sendRecordedMediaForPassedTestCase="false" xmlns="">
<ScreenCaptureVideo bitRate="512" frameRate="2" quality="20" />
</MediaRecorder>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>