Hi all. I want to implement support for running dotnet/cli tests in ReSharper. I've got ReSharper working with DNX RC1, but hit a few bumps along the way. The current IDE integration for testing is based on what Visual Studio needs, and ReSharper is somewhat different (e.g. we do in-editor, as-you-type discovery, structure tests hierarchically, etc.). After a chat with some of the team at Build (@piotrpMSFT, @terrajobst, but sadly not @ellism), I’ve got some questions and feedback for RC2.
I’ve followed along with the design of the new model (#1376 and dotnet/cli#2069), but not the implementation, so my understanding could easily be out of date. I've split things into test discovery, execution, debugging and profiling/coverage.
ReSharper does test discovery as you type, by examining the source, but dotnet/cli requires a test ID created by the framework in a separate discovery step. This means ReSharper has to map between its discovered tests, and the dotnet/cli ID. The issue is that the ID is an opaque value, not formalised, and can’t be generated from source (for row tests, xunit returns an ID that includes the hash of the arguments).
Issues:
dnx.exe
/dotnet.exe
twice - once to discover tests on each build, and again to execute them. This is usually in the same step (build before testing) so can we reuse a single dotnet.exe
invocation? Similarly, is there a way to do an up-to-date check to avoid the cost of discovery if the build is already up-to-date? (This is where I don't know enough about RC2's handling of multi-targeting and output files)[TestCase("Hello to Jason Isaacs")]
), and xunit could, in the future. It would be great to have a way to map both sets of discovered row tests, but I don't know what that would be...dotnet.exe
- how do I find it? Do I rely on it being in the path?dotnet-test.exe
should connect to a socket opened by the IDE, rather than the IDE finding a port number and making dotnet-test.exe
open it. Based on a conversation with @piotrpMSFT, I think this is already fixed, although the issue (#1949) hasn’t been updated.What is the expected behaviour of the IDE if the version in the protocol isn’t 1?
What’s the correct GUID for debugging a CoreCLR project? I cheated when implementing this for RC1 - I messed around until I found one that worked :)
launchSettings.json
from the VS property pages, and there was a series of undocumented fallbacks and defaults. What's the RC2 process?We need to inject code into the test runner for profiling and code coverage, so that the profilers know when a test starts/ends.
WriteSymbols
. When is this called, and by whom?Apologies for this being a bit of a brain dump. I can split it into smaller issues if it makes it easier.
@citizenmatt brings us some great points here, and I don't need to tell you that Resharper support is a must have considering just how much of the community has purchased it.
Can we get any update of some of his concerns?
Any updates on this.
@citizenmatt is tracking this issue offline with the @dotnet/vstest team. Closing the CLI issue as it is inactive. @citizenmatt if I'm missunderstanding the status please comment and I will help.
Yes, we're going to pick up these issues with the @dotnet/vstest team.
Most helpful comment
Any updates on this.