Add ability to use custom runsettings for tests#1710
Add ability to use custom runsettings for tests#1710filipw merged 5 commits intoOmniSharp:masterfrom
Conversation
| } | ||
|
|
||
| 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.
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.
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.
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.
you should check if the file exists, if not, I'd fallback to defaults to not crash?
There was a problem hiding this comment.
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.
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.
Added some additional assertions.
|
thanks a lot for the PR - looks very good, just left some small comments |
|
@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