vstest

How to get logs into the Tool Log in Release Management for Visual Studio

偶尔善良 提交于 2019-12-11 11:52:16
问题 In the Release Management for Visual Studio Deployment log, which can be found under the Details button found when viewing the details of a release, there are a number of columns. The last three of these are Tool Log, Command Output and Status. I have never seen anything in Tool Log, but I am in the situation now where I have a component running tests using vstest.console.exe. Under "Command Output", I see the output from this program as it appears in the console window. However, vstest

Missing “Code Coverage” tab on Python project

蹲街弑〆低调 提交于 2019-12-11 09:29:50
问题 I have a Python project hosted on GitHub, which I test using Azure Pipelines (here is a link to the configuration). I am running unit tests with pytest and get coverage results, which I upload in my pipeline. I get an overall code coverage percentage in the pipeline execution summary (example), but I don't see a "Code Coverage" tab that contains the details of which lines are covered. The build artifacts contain the HTML code coverage report, which contains this information, but it'd be nicer

vstest crashed when running some particular tests

为君一笑 提交于 2019-12-11 04:57:08
问题 When I let run all tests (ca. 800 tests) in my solution, after some time a popup window with error is shown that vstest.executionengine.x86.exe has stopped working. Some Examples of problem details, that I get are here: Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: vstest.executionengine.x86.exe Problem Signature 02: 14.0.23107.0 Problem Signature 03: 559b7b6c Problem Signature 04: mscorlib Problem Signature 05: 4.6.1076.0 Problem Signature 06: 56d79fa2 Problem

Missing Method Exception When Referencing .Net Standard Project From .Net 4.6.1 Unit Test

荒凉一梦 提交于 2019-12-10 02:44:55
问题 I am getting the following exception when running a .Net 4.6.1 unit test that uses System.IO.Compression.ZipFile.Open , if the unit test project references a .Net Standard 2.0 assembly: System.MissingMethodException: Method not found: 'System.IO.Compression.ZipArchive System.IO.Compression.ZipFile.Open(System.String, System.IO.Compression.ZipArchiveMode)'. at UnitTestProject.UnitTest1.TestMethod1() The unit test project was created using the VS 2017 Unit Test project (not the .NET Core one)

How to specify a run timeout with VSTest.Console?

南笙酒味 提交于 2019-12-09 10:04:58
问题 With MSTest.exe, you can specify a total timeout for a test run by setting the /TestSettings/Execution/Timeouts/@runTimeout attribute in a .testsettings file. With VSTest.Console.exe, the .testsettings has been deprecated in favor of .runsettings, which apparently has a completely different schema (with, ahem, sparse documentation). I know that I can configure the .runsettings file to use legacy MSTest mode (thereby allowing me to use a .testsettings file), but I would prefer to avoid that if

Set “Path” environment variable during vsts build so it would persist across build tasks specifically vsTest task

余生长醉 提交于 2019-12-07 02:14:57
问题 I have a vsts build definition in which I try to set the PATH environment variable using PowerShell (and before I tried cmd) task, so that in a later vsTest task, the tests could run an exe from that path, however setting the PATH using the ps\cmd tasks doesn’t seem to work, I tried a few options such as: [Environment]::SetEnvironmentVariable("Path", $env:Path + ";" + $newPath, [EnvironmentVariableTarget]::User) setx path " %newPath;%PATH%" Any suggestions? 回答1: Set the process environment

VSTests - Could not find diagnostic data adapter 'Code Coverage'

非 Y 不嫁゛ 提交于 2019-12-05 19:02:34
问题 I'm new to VS Code Coverage, and I'm trying to use the VSTests tool from the command line (in windows). But i get this error. Warning: Diagnostic data adapter message: Could not find diagnostic data adapter 'Code Coverage'. Make sure diagnostic data adapter is installed and try again. Although the tests ran and passed, the *.coverage file is nowhere to be found. Why? Note: I'm using Visual Studio 2015 Enterprise 回答1: Not sure if you figured this out or not yet but I found the following

Missing Method Exception When Referencing .Net Standard Project From .Net 4.6.1 Unit Test

。_饼干妹妹 提交于 2019-12-05 02:23:14
I am getting the following exception when running a .Net 4.6.1 unit test that uses System.IO.Compression.ZipFile.Open , if the unit test project references a .Net Standard 2.0 assembly: System.MissingMethodException: Method not found: 'System.IO.Compression.ZipArchive System.IO.Compression.ZipFile.Open(System.String, System.IO.Compression.ZipArchiveMode)'. at UnitTestProject.UnitTest1.TestMethod1() The unit test project was created using the VS 2017 Unit Test project (not the .NET Core one) and references were added to System.IO.Compression.FileSystem and my standard class library: using

VSTest: A testsettings file or a runsettings with a ForcedLegacyMode set to true is not supported with the MSTest V2 Adapter. No test is available

喜夏-厌秋 提交于 2019-12-03 06:25:35
How to use .testsettings file running unit tests via vstest.console.exe ? I created empty visual studio solution, created empty unit test project, added Local.testsettings file as a solution item. [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { } } <?xml version="1.0" encoding="UTF-8"?> <TestSettings name="Local" id="1109524d-9809-4423-b7fa-fad429ebfd8d" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> <Description>These are default test settings for a local test run.</Description> <Deployment enabled="false" /> <Execution hostProcessPlatform="MSIL

SonarQube Test Coverage with MsTest

风格不统一 提交于 2019-11-30 09:11:20
问题 I have been trying to get SonarQube working with a simple dot net app. I have had some success getting it up and running but code coverage is not working. It looks like many other people have faced this issue when SonarQube discontinued support for many of the 'go to' coverage tool such as DotCover and OpenCover via Gallio Examples which I have followed are: Sonar Runner errors out during processing of .coveragexml file produced from Visual Studio's MSTest VS2013 CodeCoverage.exe runsettings