vstest
vstest copied to clipboard
Newly dsicovered tests does not run
Description
Specifically find issue in F#, but maybe with other languages or adapters that would be the case too. I have test project, and when I type new test and run assembly it in TestExplorer newly created test discovered but does not run and I have to run tests again.
Steps to reproduce
- Create test project in F#
- Add new test
- Run Assembly in Test Explorere
Expected behavior
All previous tests + new test are run
Actual behavior
All previously existing tests run, but new test just marked as discovered and did not run.
Diagnostic logs
Environment
Version 17.7.0 Preview 6.0
@drognanar arthur please have a look if this is a new issue.
this is to be expected given the current implementation
when you right click a project or a namespace or a class in test explorer, you're running the selected tests underneath. any newly discovered tests will not be run currently, as we're computing the selection at the time you click the run button.
on the other hand, right-clicking a test project in solution explorer, or right clicking a method in the editor is expected to run new tests
I can understand why it happens when I run namespace or test class. But from what I know if you run assembly no need to specify individual tests and test explorer have
- test container (assembly basically)
- Namespace
- Class
- Method/test
Would be great if at least when I run tests in test container/assembly it will run all tests in that assembly.
Also if right click in F# was available that wout be great. Right now current design works only for Roslyn which discover tests on the fly somehow.
As described above this is by-design, if you don't agree please file an issue on VS, where Test Explorer resides, thank you. https://learn.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022