When I go to Test > Analyze Code coverage > All Tests, the output is "0 found". How do I get Visual Studio 2013 to pick up my XUnit tests?
This shows up in the output window the first time I try (Output > Tests).
------ Discover test started ------
NUnit VS Adapter 2.0.0.0 discovering tests is started
NUnit VS Adapter 2.0.0.0 discovering test is finished
========== Discover test finished: 0 found (0:00:00.4240424) ==========
If I try a second time, the output window is blank.
Am I supposed to look somewhere else?
I'm using ReSharper to run my tests. ReSharper works, but VS's Test > Run all Tests doesn't find any tests either.
As per Lex Li, I installed the NuGet package xunit.runner.visualstudio, which resolved the issue
Related
I have a unit test project in Visual Studio 2022.
The project works perfectly on a first machine. However, I'm trying to run the same project in a new machine but I'm unable.
The tests just don't run. No error, no exception, nothing.
Visual Studio shows : Test run finished: 0 Tests (0 passed, 0 Failed, 0 Skipped) run in < 1 ms.
Both the test and the projects are set to x64.
Does anyone know any idea how to investigate why VS doesn't run the tests please ?
Thanks.
Cheers,
I had everything working until a few days ago. After latest update of VS, VS is not able to discover tests. I have tried updating MSTest.TestFramework, MSTest.TestAdapter, Microsoft.Net.Test.sdk nuget pacakges as well but VS studio is still not able to discover the tests.
Warning : A testsettings file or a vsmdi file is not supported with the MSTest V2 Adapter.
[12/21/2019 11:19:36 AM Warning] No test matches the given testcase filter `FullyQualifiedName=Microsoft.ConvAI.FrontEnd.End2EndTests.ConvAIClientTests.VerifyBotGetsRecognitions` in D:\Git\Skyman\conversational-ai\src\Testing\Microsoft.ConvAI.FrontEnd.End2EndTests\bin\Debug\netcoreapp2.1\Microsoft.ConvAI.FrontEnd.End2EndTests.dll
[12/21/2019 11:19:36 AM Informational] ========== Run test finished: 0 run (0:00:07.7975681) ==========
Can someone please help me to fix this?
It was runsettings file which I had to uncheck "Run settings file" from "configure run setting" option under test menu.
I have an ASP.NET core 1.0 project I created in Visual Studio 2015 (update 3). If I try to build the project within VS I get the following in my output window and there are no errors in the Error List:
1>------ Build started: Project: QuickStartIdentiyServer4, Configuration: Debug Any CPU ------
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
However, if I build the project using the dotnet CLI command (dotnet build) it builds and runs just fine.
UPDATE:
Apparently, .net core does not work properly when running Visual Studio as Admin. You would think everything should work as Admin, I guess not... go figure.
There are simply too many reasons why this type of thing might happen. The easiest way to diagnose the problem is to change the build output verbosity under options to verbose. This might help put you on the trail:
With regards to this type of thing happening with .Net Core and ASP Core. I have noticed that the project.json dependencies json fragment is a bit buggy especially if you start renaming projects and changing their file system location.
If you see in the diagnostic below you know there is some dangling reference issue:
Done building target "_GetDependencyFragmentFiles" in project "<<?YOUR_CORE_PROJECT?>>.xproj" -- FAILED
May be you are not seeing build errors. Go to Error List window and change 'Show Issues generated' box from 'Build + Intellisense' to 'Build Only' and try to build again.
See if this helps.
I have VS 2010 Premium SP1 and using MSTest
The project has a web reference to a Web Service
The tests are integration tests
TestDriven.NET-3.8.2877 RTM which includes NCover 1.5.8
My problem is that it runs the MSTests and creates the pass/fail *.trx file but will not create a coverage report. I get the coverage report if I right click and select test with\NCover. The problem is I want to run in in the command line so I can just make it a task in my continuous integration pipeline.
The error returned is:
Profiled process terminated. Profiler connection not established.
I searched for solutions and tried the following:
Using the //reg in the command line
Updating the config.exe file to use .NET 4.0
Forcing the NCover DLL to register
Here is my command line:
ncover.console.exe //x mstest_coverage.nccov "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /testcontainer:D:\Perforce3666\serviceengine\SessionStorage\dev\SQATesting\SessionStorage.SQA.Testing\bin\Release\SessionStorage.SQA.Testing.dll
Is it possible to integrate chutzapah test running with visual studio build?
What I mean here is - if any test fails the build fails.. .that way..
I think you have 2 ways of doing this:
install the Chutzpah test adapter on each build machine and get the running the tests in test explorer.
Then customize your msbuild scripts to run the tests.
Use the command line + custom msbuild task
It looks like Chutzpah has a command-line runner, so you can create a PowerShell script which gets called from your build server to run the tests. See the Chutzpah documentation for more information, but it should be chutzpah.console.exe under: Chutzpah.3.2.4\tools
Next if you want to integrate with Visual Studio build it means msbuild integration. Take a look at the exec task on how to run custom commands and react based on the results