Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which Code Creates the Initial List in Test Explorer? #441

Closed
spottedmahn opened this issue Jun 6, 2018 · 5 comments
Closed

Which Code Creates the Initial List in Test Explorer? #441

spottedmahn opened this issue Jun 6, 2018 · 5 comments

Comments

@spottedmahn
Copy link
Contributor

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?

@singhsarab
Copy link
Contributor

@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.

@peterwald
Copy link
Member

@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.

@spottedmahn
Copy link
Contributor Author

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.

Great! 👍

Where is the source-based discovery code/class?

@peterwald
Copy link
Member

It's currently shipped with VS as part of the Test Explorer (not open source), but we are working with the test adapter owners to migrate that functionality.

@spottedmahn
Copy link
Contributor Author

Oh, I see, thanks!

No wonder I couldn't find it 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants