Logs are the perfect way to know what went wrong during the execution. What if we don't understand the error shown in the log?
A video recording of the execution will be the exact thing we may need in this scenario.
Visual Studio 2017 version 15.5 onwards supports this functionality inbuilt.
We just need to enter the configuration in the .runsettings file under DataCollectionRunSettings tag.
Enter the below code in your runsettings file and execute the test, this will add an attachment of video recording as part of the test output.
<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> <!-- 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> </DataCollectors> </DataCollectionRunSettings>
No comments:
Post a Comment