-
Notifications
You must be signed in to change notification settings - Fork 417
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
Add ability to use custom runsettings for tests #1710
Conversation
@@ -101,18 +106,18 @@ private static void VerifyTestFramework(string testFrameworkName) | |||
} | |||
} | |||
|
|||
public override GetTestStartInfoResponse GetTestStartInfo(string methodName, string testFrameworkName, string targetFrameworkVersion) | |||
public override GetTestStartInfoResponse GetTestStartInfo(string methodName, string runSettings, string testFrameworkName, string targetFrameworkVersion) |
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.
normally we do not break the public APIs but this particular package is no published on nuget, so it's OK
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.
Even though these functions are public, TestManager and VSTestManager are actually internal classes, so there probably isn't any worry.
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.
I was more concerned about the changes to the over-the-wire interface. At least the stdio version of the server seems to treat arguments as optional, in which case I think everything remains compatible.
{ | ||
if (runSettingsPath != null) | ||
{ | ||
return File.ReadAllText(runSettingsPath); |
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.
you should check if the file exists, if not, I'd fallback to defaults to not crash?
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.
Added an error message if runsettings load fails, and it will continue with default settings.
[Fact] | ||
public async Task RunMSTestWithoutRunSettings() | ||
{ | ||
await RunDotNetTestAsync( |
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.
if this is supposed to fail, could you assert on some failure conditions to distinguish a "failure by design" from "failure because something got broken"?
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.
Added some additional assertions.
thanks a lot for the PR - looks very good, just left some small comments |
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.
LGTM thanks!
@JoeRobich @mholo65 @david-driscoll any objections on this? |
Currently, the RunSettings are sent to Omnisharp as a a path, and then loaded. Alternatively, we could load the runsettings in the extension, and then send XML with the request.
Related PR to omnisharp-vscode: dotnet/vscode-csharp#3573