繁体   English   中英

Visual Studio 2019,使用 Azure Devops 上的运行设置进行 UI 测试视频捕获,wmv 0 字节

[英]Visual Studio 2019, UI test video capture using runsettings on Azure Devops, wmv 0 bytes

有没有人从事视频拍摄工作? 使用 runsettings 文件,视频捕获在本地工作正常。 但是,当我尝试在 Azure Devops 管道上运行 UI 测试用例时,它会在附件中创建 WMV 0 字节和 1 kb 的recordedmedia.trmx。它没有捕获 wmv 文件中的任何数据。 它仅在在 devops 管道上运行 UI 测试用例时登录到代理时才捕获 wmv 的数据。有什么解决方案吗?

<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">

我尝试以两种不同的方式运行登录代理,另一种方式是不登录代理。 它产生了两种不同的结果

登录到自托管代理它创建了数据 2828 kb wmv 文件

未登录自托管代理并创建了 0KB wmv 文件

如果您使用Visual Studio test任务运行测试,则可以捕获测试视频并自动作为测试结果的附件提供。 为此,您必须在.runsettings文件中配置视频数据收集器,并且必须在任务设置中指定此文件。

<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">
        <!--Video data collector was introduced in Visual Studio 2017 version 15.5 -->
        <Configuration>
          <!-- Set "sendRecordedMediaForPassedTestCase" to "false" to add video attachments to failed tests only -->
          <MediaRecorder sendRecordedMediaForPassedTestCase="true"  xmlns="">           
            <ScreenCaptureVideo bitRate="512" frameRate="2" quality="20" />
          </MediaRecorder>
        </Configuration>
</DataCollector>

在此处输入图像描述

此外,您必须将代理设置为作为进程而不是服务运行,您可以检查您的代理。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM