Fast source-based test discovery with OmniSharp
See original GitHub issueGuys, kudos for taking on the challenge! If you’re aimed at creating an excellent testing experience in VS Code, I’d like to join.
After passing through the code, here is my two cents. Running dotnet test
for test discovery will be slow for seriously-sized projects. The UX will be identical to that of Visual Studio test runner, which is not that wonderful compared to ReSharper, IMHO.
According to a research I did earlier, OmniSharp server is capable of scanning source file contents, and providing a list of features on each method. Specifically, we’re going to look for XunitTestMethod
, and maybe NUnitTestMethod
in the future. (See this PR).
We can spin up background discovery for entire project/solution, as soon as we detect that .NET Core project/solution is loaded. We can re-scan the active file as it is being edited.
Discovery based on source code can also bring me the tests even if my code doesn’t compile - at least it will allow exploring and navigating the code. In Visual Studio test runner, the entire solution must be compiled before test discovery can start, so that it sometimes takes more than a minute to see my tests - this one is definitely a UX killer.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:9 (3 by maintainers)
Top GitHub Comments
Not got to that yet. Curious why you picked 10,100 as a number 😃. Definitely something to test out though.
Even if it’s the perf is the same as the cli approach, at present I feel depending on a versioned API/protocol is a more solid than a cli + reporting format that aren’t strictly versioned from what I understand. Might be wrong on that though.
Do we have any hard data on how much faster a discovery of say 10,100 and a 1000 tests would be with the approach in #83?