-
Notifications
You must be signed in to change notification settings - Fork 676
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
Discover and execute (both run and debug) xunit test in VS Code #382
Conversation
Woohoo! Question: Is this stuff about ready to ship? Or do you need to more work first? The stuff currently in 'dev' is almost ready to ship. So if this will not be ready within the next week, I think we need another branch. |
@gregg-miskelly besides the open question the PR surely needs more testing. Baring a major issue the main structure is in place. If new features are provisioned during the code review, they can be added incrementally afterwards. There are small changes I'll make additionally. Specifically:
The only open question is how we report the test result. The current behavior is to report in the message box which is not idea. I'm confident it is good enough for next week's ship. I'm not chasing a timeline here, but base on the exciting feedback I got from my demo, I really hope this can get to users early. Of course I'd like to have C# extension crew to take a look at the changes and give me more feedback. |
|
||
export function registerDotNetTestRunCommand(server: OmnisharpServer): vscode.Disposable { | ||
return vscode.commands.registerCommand( | ||
'dotnet.test.run', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be listed in our package.json?
Thanks, I'll adjust the test message a bit and address the comments. Afterward this PR should be done. But I won't merge until the corresponding PR on OmniSharp side is merged (that shouldn't be blocked for too long). |
@gregg-miskelly @DustinCampbell |
@troydai LGTM. Dustin would need to comment on how to put the OmniSharp release on Azure blob storage, and if we want to do that now, or wait till we get closer to release. |
return vscode.Disposable.from(d1, d2, d3, d4, d5); | ||
|
||
return vscode.Disposable.from(d1, d2, d3, d4, d5, | ||
dotnetTest.registerDotNetTestRunCommand(server), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe follow the same pattern as the rest of the disposables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do.
LGTM I'll work on updating to a newer release of OmniSharp. It looks like 1.9-beta4 has all of the releases we'll need. |
All set. Can somebody merge this for me? |
|
||
// dotnet-test endpoints | ||
|
||
export interface GetTestStartInfoRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @troydai -- are these new v2 endpoints? If so, could you include them in the V2 namespace above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right. i'll send another PR to fix this.
I am looking forward to use this new feature! |
There is a release preview with this support:
|
Thanks Greg, but after I installed the latest C# extension and then installed the debuger successfully, the omnisharp always show "starting" status. There might be something wrong. Thank you all the same! |
@kerryjiang, if you select View->Toggle Output from the menu and change the selector to "OmniSharp Log" what do you see? |
The last log always be downloading... [INFO] Starting OmniSharp at '/Users/kerryjiang/WorkShop/NRack/master/src/NRack.Base'... |
Are you behind a proxy? Have you configured it in VS Code? |
Not a proxy. |
@kerryjiang did this ever wind up working for you? |
@gregg-miskelly @DustinCampbell Thanks guys, it works now. |
@andschwa and I have VS Code insiders edition, 1.3.0-1465425900, with C# extension 1.1.5, on Ubuntu 14.04. We have a .NET Core xUnit test file opened, but we do not have the link to run the test in the debugger that we see here. Is this simply a Windows only feature, or not available in .NET Core? We cannot currently find a way to attach to |
FWIW we don't have a "Toggle OmniSharp log", are we missing something simple? |
@BingyuLiu, @andschwa: could you file an issue rather starting a conversation on PR that has already been merged? |
@BingyuLiu please attack your test project while open the issue. It will be very helpful for us to investigate this issue. It is not Windows only feature. |
Demo
it's a gif, may take time to load
Brief
The change relies on a change in OmniSharp which supports test discovery and execution.
It also relies on
startDebug
command from VS Code to start debugger. For earlier version of VS Code, thedebug test
link won't show up on Code Lens.Open question
How and where to show test result. Currently, the test result is shown in message box. Could there be a better way to organize and show test results?