Questions tagged [vstest.console.exe]

102 questions
46
votes
9 answers

TFS Tests do not match framework settings

I am attempting to move a solution from TFS 2012 to TFS 2018 SP2RC2 but I can't get the unit tests to run correctly. All projects have been re-targeted to 4.7.1 and are built as x86 platform. We have a testsettings file that supplies nothing but…
Sam
  • 1,325
  • 1
  • 13
  • 26
16
votes
0 answers

vstest.console.exe execution model and isolation behaviors

I'm trying to determine the considerations that should be made when writing tests that are going to run under vstest.console.exe. Example 1: Let's say that I have two tests both of which rely on MyClass.Singleton.Counter having a value of zero. Now…
Kaleb Pederson
  • 45,767
  • 19
  • 102
  • 147
15
votes
2 answers

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

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 { …
Joseph Katzman
  • 1,959
  • 6
  • 21
  • 47
10
votes
1 answer

Why is vstest.console.exe suddenly giving me a warning about isolation mode?

I have a Jenkins server running tests using vstest.console.exe. All of a sudden, between two builds with no change to the contents of the workspace, it is reporting that it is running in isolation mode: 10:52:38 D:\Program Files…
magnusarinell
  • 1,127
  • 14
  • 22
7
votes
2 answers

Why doesn't VSTS Build "Visual Studio Test" step find my NUnit tests?

I've configured a VSTS build job to build my MockingFrameworkExamples .NET 4.7.1 (C#) solution from GitHub. This solution includes five assemblies with NUnit v3.10 unit tests. I included a Visual Studio Test step in the build definition, but when it…
John M. Wright
  • 4,477
  • 1
  • 43
  • 61
7
votes
2 answers

Can vstest.console.exe run an appx without a security certificate

I'm trying to set up automated builds on my build agent using MSBuild on the command line. The two projects I'm focussed on at the moment are a UWP and it's associated unit test project. To build, I have to use…
Ash
  • 2,021
  • 2
  • 26
  • 59
7
votes
1 answer

AppDomain.DynamicDirectory is not generated

I am creating a AppDomain using the below code String pa = @"C:\Users\user\AppData\Local\Temp\2\db5fjamk.xnl"; System.IO.Directory.CreateDirectory(pa); AppDomainSetup setup = new AppDomainSetup(); setup.ApplicationBase =…
user2934433
  • 343
  • 1
  • 5
  • 20
6
votes
2 answers

Selenium screenshots in VSTS (Azure DevOps)

According to my searches, it should "just work". This is the best article I found. I've followed the steps, but nowhere in the VSTS (Azure DevOps) interface does it indicate there are any screenshots attached. I am running this on a privately hosted…
Brian Ball
  • 12,268
  • 3
  • 40
  • 51
6
votes
1 answer

vstest.console.exe generate cover for only Moq.dll

I am trying to generate code coverage report using vstest.console.exe. I am also using .runsettings file and passing it as a parameter. Whatever I am trying to do, it generates a coverage report for only moq.dll. I am sharing below the full text of…
Nazim
  • 639
  • 2
  • 10
  • 26
6
votes
3 answers

Vstest.console.exe can't find nunit tests

I have VS 2017 and .net 4.6 On trying to run via cmd prompt using vstest.console: vstest.console.exe bin\Release\Tests.dll /UseVsixExtensions:true I am getting warning "No test is available in /bin/Release/test.dll Make sure that installed test…
roxy
  • 71
  • 1
  • 3
6
votes
2 answers

vstset.console.exe assembly resolution fails

I have a UnitTests.dll, to which Common.dll is referenced (both built with VS2015). I have following directory structure: C:\Test\ - UnitTests.dll - UnitTests.runsettings C:\Bin\ - Common.dll UnitTests.runsettings content is as…
jwaliszko
  • 16,942
  • 22
  • 92
  • 158
5
votes
1 answer

How to only run previously failed tests with dotnet vstest

I have a test suite of over 10,000 tests and sometimes only want to rerun the tests, that failed on the previous run, using the dotnet vstest CLI.
lauxjpn
  • 4,749
  • 1
  • 20
  • 40
5
votes
4 answers

How to install vstest.console.exe offline

I am supposed to do an offline installation of vstest.console.exe in the folder path as follows: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow I have tried using offline packages such as…
Gluon
  • 81
  • 1
  • 1
  • 9
5
votes
1 answer

Why does TFS agent doesn't discover a VSTEST capability

We have TFS 2015 server and also a build server with Visual Studio 2017 Ultimate. TFS agent is not able to detect VisualStudio or VsTest capabilities (as it should) but when added manually, there is still a problem. When it comes to Visual Studio …
lekso
  • 1,731
  • 3
  • 24
  • 46
4
votes
3 answers

VSTest.Console.exe Could not load file or assembly Microsoft.TestPlatform.CoreUtilities

I'm trying to set up a C# project with the latest version of Visual Studio, 2022; this is with .Net 6 on Windows 10. It's a simple console program, and I've set up the project and a corresponding unit test project basically following the steps…
rwallace
  • 31,405
  • 40
  • 123
  • 242
1
2 3 4 5 6 7