-
Notifications
You must be signed in to change notification settings - Fork 29
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
vstest integration #124
base: main
Are you sure you want to change the base?
vstest integration #124
Conversation
643e37d
to
ea8750e
Compare
Hi @Nsidorenco - Great work on this so far! I'm very limited on free time at the moment (essentially I have none!) so this is a big help towards improving this adapter. When I get chance, I'll take a good look at the changes, but at first glance, it looks like it's going in the right direction. |
@Issafalcon just take your time 😄 Outside of testing it is relatively feature complete now and should be ready for a review |
e6cb2fb
to
d619ab1
Compare
I'm willing to help out with this. I went down a similar rabbit hole with my test project being too large causing me to create this PR #120 I swapped over to your branch and I'm getting the following error. Seems to be due to this line here. https://github.com/Nsidorenco/neotest-dotnet/blob/6a1329bf0f5bdcb2b897645c5c804448a94817e2/lua/neotest-dotnet/vstest_wrapper.lua#L84C5-L84C70 When I get rid of some of those debug lines on my end, the test seem to attempt to load based on the debug messages. It seems like it's failing to parse and keeps retrying? It's a little unclear. I'm using C# on Windows 11 |
wip allow nested tests misc improvements improve test filtering improve error handling vsconsole test runner
* improve position detection * add tests * update workflow * add treesitter cli to workflow * bump lower bound nvim version * test on all os * set dotnet version
0f57e4f
to
543ac69
Compare
Hi @waynebowie99, The first step of the adapter is that it tries to locate the I have just pushed a commit to better handle file separators on windows, maybe this fixes it for you? Curiously, the CI for windows does not seem to have an issue detecting the file |
Could you try to run If so, can you also check what |
@waynebowie99 could you try the latest commit again? |
That's progress! Can you check the |
Alternatively, try the latest commit again - |
This is my dotnet sdk path that contains |
Seems like something goes wrong when it tries to read the content of the file containing the discovered tests. I just pushed a commit that changes the code a little. If that does not work look for the following lines in the log:
|
649c7a9
to
827a21f
Compare
Hi @Nsidorenco - I'm just catching up with PR's on this plugin and took the liberty to run the checks before and after resolving merge conflicts on this branch. I also tried your branch to see the feature parity with how the current plugin adapter works and noticed that a few things are missing. Take this single sample file for parameterized tests in C#: Then compare with how parameterized tests used to look on Just to point a few things out:
I'm going to run checks on a few other test case files with different variations to check other functionality later, but for now, it's something to look into maybe? Also, not to step on toes, but I have managed to implement a quick POC of https://github.com/microsoft/vstest/blob/main/docs/RFCs/0007-Editors-API-Specification.md, using vim.uv to allow the vstest process to communicate over sockets with the neovim process, and send JSON messages over the same socket connection to the test runner, with a good degree of success. I'm planning on creating a new plugin as a sort of API / interface to the vstest platform for general consumtption. While I don't expect this to be anywhere near finished any time soon, I forsee that it could be a very useful interface for this adapter and any other plugins that want to make use of it, so I'll keep creating this editor interface for it, which will allow tighter control of the test flow than the single TestPlatformWrapper scripts. However, it shouldn't change what yoiu're doing currently. I would just replace the scripts with calls to that API in the future. |
9293f09
to
35eca07
Compare
35eca07
to
a43e352
Compare
Hi @Issafalcon, Thanks for giving this a look!
Good point, having the parameterized test cases un-nested is probably the more intuitive way to represent them.
I think file waiting logic using
I think this sounds like a great idea! I believe it should fit pretty well into the existing implementation, where we can just replace the file-based communication with the socket-based one! |
Implementing the queries for F# hit so many edge-cases with the different test running and their naming of test that it became easier to just implement the ideas of #90.
Rough draft of a vsconsole-based implementation, where a vstest instance is responsible for test discovery and running tests. Seems to work pretty well and reasonably snappy.
The test discovery logic should probably be cached in some way to avoid discovering test cases for the same dll for every source file.Still a bit of work to be done as well; for now, the path to both the vstest dll and the test project dlls are (relatively) hard coded and overall test are entirely missing.Will eventually close #90 and close #82