-
Notifications
You must be signed in to change notification settings - Fork 168
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
WIP: Test runner #789
base: master
Are you sure you want to change the base?
WIP: Test runner #789
Conversation
This is great! Thank you for your efforts :) |
You can now run the test under the cursor, or the tests in the file under the cursor, or all tests in all listed test files for the project/solution under the cursor with |
I've added a mapping (default There are also a couple of refactors that I need to do:
|
28c1540
to
fe8658e
Compare
I have tried this using NUnit, using test data from another class' property. Repository for reproduction: https://github.com/Melandel/Zuc.OmnisharpVimBugRepro |
@Melandel give it a try now. The issue had to do with how these
So I have simply stripped the Let me know if you run across any other bugs like this. I don't use these kinds of tests at all so it's great to see some different structures. |
@Melandel The test runner now detects multiple NUnit TestCaseSource tests and runs them all, with correct outputs. The downsides to the current approach are that test discovery takes longer (it takes a couple of seconds for tests to start, as the discovery request runs) and it is still only possible to run all source tests, you can't run e.g. I have some more ideas for improvement for these downsides but I think some pretty hefty refactoring is needed. The real trouble is that the OmniSharp-roslyn responses aren't particularly consistent between the test discovery and the code structure requests - probably because the test discovery is coming directly from |
@nickspoons After updating the branch, I observe that running |
Urgh, you're right. They work correctly when running them individually though. |
I have observed other unexpected behaviors for this branch. Where would it be fit to report them? |
You're welcome to list them here but it's not "finished" at the moment so there will be changes anyway. |
Aye. I would find it interesting to see the workflow you had in mind when implementing the test runner, because I like using Also, I think I'll try to fork that branch and take some time to provide some code, it's time I give a bit of love to omnisharp-vim |
The motivations for the test runner were:
The original behaviour all still works as before, including the quickfix output. You just have to configure it. Edit: I also mostly only use |
Right, I agree, however whenever I re-run a
Which is why I wondered if my workflow was off |
0e8f28c
to
a4401d3
Compare
dbabeb6
to
041384d
Compare
3720976
to
aa41740
Compare
7ba12ac
to
aa505c6
Compare
aa505c6
to
66a2d62
Compare
This PR introduces a new test runner window. It displays the tests and their state ("not run", "running", "passed" and "failed") using syntax highlighting, leaving previously run tests in the test runner window for reference, and to easily re-run tests or test files.
Under each test, any error and stacktrace information is displayed, as well as any console output. Each of these sections is enclosed in a fold.
Any new tests run are added to the test runner, which groups tests by project/solution, then file.
Partially complete feature list:
There are already some customisation options, including whether to display a "running" spinner and what characters to use for the spinner, whether to display the intro banner, whether to display build output (or only build error output), whether the quickfix list should still be used as well. These will be documented but have not been yet.