Enable Vstest test
This commit is contained in:
parent
1b5497afda
commit
b13a7cee50
1 changed files with 16 additions and 16 deletions
|
@ -30,25 +30,25 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests
|
||||||
.Pass();
|
.Pass();
|
||||||
|
|
||||||
// Build project VSTestDotNetCoreProject
|
// Build project VSTestDotNetCoreProject
|
||||||
//new BuildCommand()
|
new BuildCommand()
|
||||||
// .WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
// .Execute()
|
.Execute()
|
||||||
// .Should()
|
.Should()
|
||||||
// .Pass();
|
.Pass();
|
||||||
|
|
||||||
//// Prepare args to send vstest
|
// Prepare args to send vstest
|
||||||
//string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||||
//string testAdapterPath = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.0");
|
string testAdapterPath = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.0");
|
||||||
//string outputDll = Path.Combine(testAdapterPath, $"{testAppName}.dll");
|
string outputDll = Path.Combine(testAdapterPath, $"{testAppName}.dll");
|
||||||
//string argsForVstest = string.Concat("\"", outputDll, "\"");
|
string argsForVstest = string.Concat("\"", outputDll, "\"");
|
||||||
|
|
||||||
//// Call vstest
|
// Call vstest
|
||||||
//CommandResult result = new VSTestCommand().ExecuteWithCapturedOutput(argsForVstest);
|
CommandResult result = new VSTestCommand().ExecuteWithCapturedOutput(argsForVstest);
|
||||||
|
|
||||||
//// Verify
|
// Verify
|
||||||
//result.StdOut.Should().Contain("Total tests: 2. Passed: 1. Failed: 1. Skipped: 0.");
|
result.StdOut.Should().Contain("Total tests: 2. Passed: 1. Failed: 1. Skipped: 0.");
|
||||||
//result.StdOut.Should().Contain("Passed TestNamespace.VSTestTests.VSTestPassTest");
|
result.StdOut.Should().Contain("Passed TestNamespace.VSTestTests.VSTestPassTest");
|
||||||
//result.StdOut.Should().Contain("Failed TestNamespace.VSTestTests.VSTestFailTest");
|
result.StdOut.Should().Contain("Failed TestNamespace.VSTestTests.VSTestFailTest");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue