question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Which Code Creates the Initial List in Test Explorer?

See original GitHub issue

Description

I’m working on #410 and I’m not sure which code is responsible for populating the initial values in the Test Explorer. I’ve updated src/Adapter/MSTest.CoreAdapter/Discovery/TypeEnumerator.cs and that is working when the discovery is triggered.

The problem is, apparently there is more code that populates the window. I would assume the original code before the Discovery was introduced?

When I initial add the references to MSTest.TestAdapter and MSTest.TestFramework I get:

image

After I build my test project I get:

image

Which Code Creates the Initial List in Test Explorer?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
peterwaldcommented, Jun 6, 2018

@spottedmahn @singhsarab You are correct that source-based discovery is doing the initial discovery. After the build completes, then the tests are updated (with potentially more detail) from the adapter’s discovery process.

Currently, the source-based discovery and reflection-based discovery are two different code-bases which can cause issues like you are seeing. Our plan is to merge the source-based discovery code into the adapters so that they can use a single code-base to do both kinds of discovery.

2reactions
singhsarabcommented, Jun 6, 2018

@spottedmahn Latest VS 2017 has fast discovery (also known as source based discovery) enabled. This does not rely the adapter for discovery. On build, the discovery happens via the adapter and hence your changes are reflecting.

@ManishJayaswal @peterwald @genlu This is an interesting one, how are we planning to accommodate changes like these with source based discovery.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run unit tests with Test Explorer - Visual Studio (Windows)
Learn how to run tests with Test Explorer in Visual Studio. ... view test results, group and filter the test list, create playlists, ......
Read more >
Visual Studio Test Explorer FAQ
Start testing your C# apps by using the testing tools in Visual Studio. Learn to write tests, use Test Explorer, create test suites,...
Read more >
How to Run and Interpret Unit Tests with Visual Studio ...
Test Explorer allows you to manipulate the order that unit tests are run, create custom playlists to segment out which unit tests run, ......
Read more >
Test Explorer not discoverying test methods
C onfirm Codelens green tick and test explorer shows them in the Passed Tests node. C# Create new unit tests in an exist...
Read more >
Test Explorer sorting · Issue #1425 · microsoft/vstest
This first iteration of the hierarchy organizes tests by Project, Namespace, Class, and theory/data driven tests where applicable.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found