2

I have my solution setup whereby there is one xUnit test project/assembly configured within that solution that has an xUnit desktop runner.

When I run the tests of this solution by running "Run All" in the Test Explorer window, I see the following output:

------ Discover test started ------
[xUnit.net 00:00:00.6641444]   Discovering: Namespace.Testing
[xUnit.net 00:00:01.7346388]   Discovered:  Namespace.Testing
========== Discover test finished: 255 found (0:00:02.2705091) ==========
------ Run test started ------
[xUnit.net 00:00:00.7718801]   Discovering: Namespace.Testing
[xUnit.net 00:00:01.9540699]   Discovered:  Namespace.Testing
[xUnit.net 00:00:02.6006763]   Starting:    Namespace.Testing
[xUnit.net 00:00:13.1270643]   Finished:    Namespace.Testing
========== Run test finished: 255 run (0:00:17.5635971) ==========

There appears to be a "Discover test" step and a "Run test" step being executed, where the "Discovering" and "Discovered" steps are being executed for each step, making it appear that they run twice.

I am curious if this is being run by design or if I have an errant setting somewhere that is causing this behavior. It seems to me (or would be expected) that the "Discovering/Discovered" would only occur once per run. As you can see, it is adding an additional 2 seconds to each run and I would like to avoid that if possible.

Mike-E
  • 2,477
  • 3
  • 22
  • 34
  • Have you ever figure out what happen with it? – daniel Jun 14 '16 at 09:08
  • Not yet, @daniel. :( – Mike-E Jun 14 '16 at 09:44
  • It looks like the first discovery things is when the "Test Explorer" window is trying to discover the tests, and the second one is from the "XUnit visual studio runner" – daniel Jun 15 '16 at 04:11
  • Nice @daniel! That is as good as any suggestion/idea/observation that I have accrued in the six months that this question has been hanging out there. Add an answer and I will mark it as such. :) – Mike-E Jun 15 '16 at 13:28

1 Answers1

1

First "Discovering" comes from the "Test Explorer" trying to discover tests.

And the second one is from the "XUnit Visual Studio Runner".

When running test on e.g. TFS Server, it will only run "Discovery" once.

daniel
  • 320
  • 4
  • 14