如何在运行设置文件中配置录像机数据收集器的目录? VS 2019

问题描述 投票:0回答:1

之前我们使用了测试设置,但它已被弃用,我们希望至少将 VS 版本从 2017 年升级到 2019 年, 我们还有自己的记录器作为测试中所有操作的 html 报告,我已经使用录像机数据收集器配置了运行设置文件,但它的工作原理如下: 如果我在运行设置中有录像机,它会在远程计算机上创建视频,但我们没有 html 文件 如果我在运行设置中不使用录像机,那么它会创建并附加 html 文件,因为它会以某种方式在单独的新文件夹中创建视频。

问题 - 如何配置将视频写入同一文件夹以将 html 和视频作为测试结果附件?

我还配置了结果目录,但没有帮助。

运行设置文件示例:

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<!-- Path relative to solution directory -->
<ResultsDirectory>.\TestResults</ResultsDirectory>

<!-- [x86] | x64  
 - You can also change it from menu Test, Test Settings, Default Processor Architecture -->
<TargetPlatform>x86</TargetPlatform>
<BatchSize>1000</BatchSize>
<TestSessionTimeout>72000000</TestSessionTimeout>
</RunConfiguration>

<LegacySettings>
<Execution>
<TestTypeSpecific>
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
</AssemblyResolution>
</UnitTestRunConfig>
</TestTypeSpecific>
<Timeouts testTimeout="2700000" />
</Execution>
</LegacySettings>

<!-- Configurations for data collectors -->
<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" />
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>

<!-- MSTest adapter -->
<MSTest>
<MapInconclusiveToFailed>False</MapInconclusiveToFailed>
<CaptureTraceOutput>False</CaptureTraceOutput>
<DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
<DeploymentEnabled>False</DeploymentEnabled>
</MSTest>
</RunSettings>

我尝试更改目录本身,在没有配置目录的情况下运行它,因为 azure 中的发布管道本身有单独的设置,但它没有帮助。

visual-studio video-capture runsettings
1个回答
0
投票

它与旧适配器版本 ~ 1.3 相关,需要在 MSTest 适配器设置中添加 ForcedLegacyMode 等于 true 才能工作。

© www.soinside.com 2019 - 2024. All rights reserved.