Questions tagged [test-explorer]

The test explorer is a tool included with Visual Studio used to run tests within the IDE. From Microsoft, "Use Test Explorer to run unit tests from Visual Studio or third-party unit test projects. You can also use Test Explorer to group tests into categories, filter the test list, and create, save, and run playlists of tests. You can also analyze code coverage and debug unit tests."

136 questions
47
votes
2 answers

How can XUnit be configured to show just the method name in the Visual Studio 2015 Test Explorer?

When using xunit.runner.visualstudio version 2.0.1 in Visual Studio 2015, the names of the tests show up fully qualified. Is there a way for the tests to show only the method name? Consider the following test: - namespace MySolution.Tests { …
Wayne Birch
  • 601
  • 5
  • 12
43
votes
9 answers

Visual Studio Test Explorer window will not open

For some reason I can't open the test explorer window in Visual Studio 2012. I click Test->Windows->Test Explorer and nothing happens... This problem may have been caused by recently uninstalling DotCover. I did this because my licence expired and…
33
votes
4 answers

VS2012: Clear the test results in Test Explorer when re-running a test that previously failed

On running an individual test in VS2012, a window is shown at the bottom of Test Explorer that includes (assuming failure) a red icon with "Test Failed" next to it. There follows the failure message with "elapsed time" directly beneath. I would…
Coder_Dan
  • 1,595
  • 2
  • 20
  • 29
24
votes
6 answers

VS2012 Test explorer locks native .dll, making rebuilds fail

I am using Visual Studio 2012 for a solution with a C# and a C++/CLI .dll, with the C++/CLI dll referencing native .dlls such as boost. The C++ code is compiled as x64. When I open VS, I can clean and build my project. Using test explorer, I can run…
Wilbert
  • 6,534
  • 6
  • 38
  • 81
23
votes
4 answers

How to get console output in Visual Studio 2012 Unit Tests

I have a managed C++ unit test in VS 2012. The test runs fine and I can verify that a loop with multiple cout calls is executed. However when I look at the test explorer the test is marked as passed but there is no hyper link for the output as I am…
bradgonesurfing
  • 28,325
  • 12
  • 101
  • 188
20
votes
8 answers

VS 2017 not discovering tests on .NET Core

can anyone help me get VS2017 to work with .NET Core test projects? I tried creating both MSTest and xUnit unit test projects for .NET Core from the VS 2017 templates. Neither of them works in the test explorer (not discovered), however running…
valorl
  • 1,290
  • 2
  • 9
  • 27
18
votes
3 answers

Test are being shown under "External" category in Test Explorer when Grouped By Project

Whenever I try to run tests on Test Explorer from Visual Studio 2012, SOME test are being categorized as "External", even though the Group By is set as "Group By Project" Then the source code is not recognized
Jorge Alvarado
  • 2,554
  • 19
  • 32
15
votes
2 answers

What is the $RANDOM_SEED$ file generated by Visual Studio build of C# solution?

We noticed that on a certain dev machine a Visual Studio (2015 update 3) debug build of a C# solution was generating a $RANDOM_SEED$ file alongside every built DLL. The content of the file is just a single number e.g. 1443972318 Deleting the file(s)…
12
votes
4 answers

I cannot get specflow's code behind files to regenerate

When I edit a specflow feature file test, it doesn't update the code-behind file. When I try to manually regenerate the code-behind files by right-clicking the project and choosing 'Regenerate Feature Files' I get an error: Error: cannot find…
Megan Styles
  • 471
  • 4
  • 10
12
votes
1 answer

Where is the Visual Studio 'Test Explorer' Output located? Is it a saved file?

I'm using SpecFlow for unit testing in Visual Studio 2013, and when I run tests from the Test Explorer window, there is a link to an Output which shows anything written to the console during the test. When right-clicking the tab, I don't have the…
austincrft
  • 324
  • 2
  • 12
10
votes
1 answer

Is it possible to use ReSharper as a test runner ONLY?

I don't really like ReSharper (let's not go into that), but it's test runner is way better than VS default Test Explorer. For example, VS doesn't handle tests polymorphism well (or even at all), while ReSharper does. Is it possible to install and…
shay__
  • 3,217
  • 14
  • 30
10
votes
2 answers

Getting list of tests from Test Explorer in VS

This is kind of a "high level"/simple question. I'm trying to get just a list of all the tests that are populated in my Test Explorer in VS2012. I'd like to compare it to a list of tests and I was wondering if there is any way to just get all the…
jacksonSD
  • 637
  • 2
  • 9
  • 26
9
votes
1 answer

How do you fix Specflow "" issue in Visual Studio

Background I have been working on a project and noticed that one of my Specflow Scenarios needed updating. I updated the Specflow Scenario by splitting it into two different scenarios (one for an invalid test and one for a valid test). After this I…
iGiizzmo
  • 261
  • 1
  • 6
9
votes
2 answers

I want Canopy web testing results to show in VS 2013 test explorer... and I'm SO CLOSE

I'm trying to figure out how to get the test results for Canopy to show in the VS test explorer. I can get my tests to show up and it will run them but it always shows a pass. It seems like the Run() function is "eating" the results so VS never sees…
8
votes
0 answers

Code Coverage VSMDI on Visual Studio 2012 says "There is no test with specified Id"

I have a solution that is still using VSMDI files. Running tests are still fine, but when I try to Analyze Code Coverage on the selected test, It shows "Empty results generated". Looking at the Output Log from Tests, it says "There is no test with…
Habibi
  • 595
  • 1
  • 6
  • 16
1
2 3
9 10