vstest

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

北战南征 提交于 2020-01-22 12:22:07
问题 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

How to stop MsTest tests execution on first failure?

半世苍凉 提交于 2020-01-03 07:01:06
问题 We are running nightly builds which at the end run all of our UnitTest using the MsTest framework. We must have 100% pass rate, so if one fails there is no point running the others; hence we will like to stop the execution on the first failed test. Is there anyway we can do achieve it? 回答1: Are you really sure you want to throw away test results? Say somebody has a bad day and introduces multiple bugs A, B, and C into your code. You might only find out about A on Monday, so you fix that, and

No xunit tests discovered by vstest.console.exe

有些话、适合烂在心里 提交于 2019-12-31 12:54:18
问题 I'm putting together a new stack of unit tests to be run together as a CI job. I'm using vstest.console.exe instead of mstest.exe mainly for its ability to run tests from several frameworks, but right now the focus is a few xUnit dlls. The jobs are run as part of a Jenkins pipeline. I have tested everything successfully on a couple of dev boxes, but annoyingly test discovery is not working on any of the CI build boxes so far. This is after the addition of the 0.99.8 xUnit test adapter vsix

VSTest-Task not running .NET Core 2.1 xUnit-Tests from Test-plan

核能气质少年 提交于 2019-12-23 19:01:39
问题 I'm trying to create a release pipeline in VSTS that runs my xUnit-tests as specified in a Test Plan . Long story short: I can't get it to work. What I'm using: Azure DevOps (formerly VSTS) Visual Studio Test task (v2.*) Test project targeting .NET Core 2.1 xunit 2.4 with xunit.runner.visualstudio 2.4 In Azure DevOps I defined a Test Plan that contains a Test Suite which contains a Test that has an Associated Automation which points to my xUnit test. I had to use the REST API to link the test

VStest code coverage report in jenkins

▼魔方 西西 提交于 2019-12-21 06:04:04
问题 I am setting CI for .Net project using Jenkins. I used MSTest Plugin and VStestrunner plugin to run test. Now I have .trx file and .Coverage file I am facing problem in displaying code coverage report Please help me is you know any plugin to do this. 回答1: To display coverage report you need to convert it in XML format and use MSTest Plugin to publish report. MSTest Plugin recommends (https://wiki.jenkins-ci.org/display/JENKINS/MSTest+Plugin) to use thrid party application to convert in XML

VSTS test task failed despite of success tests

此生再无相见时 提交于 2019-12-16 18:04:45
问题 I get below error even after all the test passed under VsTest task. 2019-04-04T10:22:14.3913769Z Unable to find d:\a\r1\a\xxx\e2e\bin\Release\netcoreapp2.1\testhost.dll. Please publish your test project and retry. 2019-04-04T10:22:15.1564640Z Results File: d:\a\r1\a\TestResults\VssAdministrator_fv-az153_2019-04-04_10_22_13.trx 2019-04-04T10:22:15.1606430Z 2019-04-04T10:22:15.1607111Z Test Run Aborted. 2019-04-04T10:22:15.1607372Z Total tests: Unknown. Passed: 6. Failed: 0. Skipped: 0. 2019-04

How to enable vstest.console.exe logging?

让人想犯罪 __ 提交于 2019-12-12 04:21:33
问题 I am trying to see what exactly vstest command is executed when I run tests in Visual Studio 2013. How can I enable vstest.console.exe logging? 回答1: The command executed would be VSTest.Console.exe with the relevant parameters. Likely Visual Studio is calling this for you when you run tests: VSTest.Console.exe [Path\NameOf.dll] /Logger:trx To check if VSTest actually has a logger: VSTest.Console.exe /ListLoggers Write your own logger for VSTest More about calling VSTest.Console.exe 来源: https:

vstest executionengine error pdbs missing

一曲冷凌霜 提交于 2019-12-12 02:55:13
问题 I'm running VS2013 premium and it's built-in testing engine. Earlier today is started throwing the following errors for any test. I've tried re-starting VS bu that didn't help, any ideas? 'vstest.executionengine.x86.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file. 'vstest.executionengine.x86.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\PROGRAM FILES (X86)

TFS - Enabling “Rerun Failed Tests”

偶尔善良 提交于 2019-12-11 14:22:14
问题 I have a TFS Release definition that runs several tests as part of the deployment: When I check the "Rerun Failed Tests" Option in my "Visual Studio Test" step in: My unit tests no longer run as part of my release. The release fails with the following error in the "Visual Studio Test" step: 2019-02-22T16:21:33.0983821Z ##[error]Error opening response file 'C:\TFS' 2019-02-22T16:21:33.1413767Z ##[error]The test source file "C:\TFS Agent\ _work\r6\a\Agent_work_temp\ea14a091-36bd-11e9-99f5

VSTESTcode coverage broken after SP1 for Visual Studio 2015 installed

天涯浪子 提交于 2019-12-11 12:18:25
问题 This worked before SP1 was installed. namespace Test { public class Adder { public int Add(int n1, int n2) { return n1 + n2; } } } namespace AdderTest { [TestFixture] public class Class1 { [Test] public void AddTest1() { var add = new Adder(); var res = add.Add(2, 3); Assert.AreEqual(5, res); } } } This command still works after SP1 installed vstest.console.exe /usevsixextensions:true /framework:framework45 /platform:x86 AdderTest.dll This one doesn't and it fails on every PC in our team