public TestExecutionResult(TestInfo test, bool success, TestCompileResult compileResult, String output) { this.Test = test; this.Success = success; this.CompileResult = compileResult; this.Output = output; }
public static TestExecutionResult ExecuteTest(TestInfo test, DotNet dotnet, TestCompileResult compileResult) { Directory.SetCurrentDirectory(compileResult.WorkingDirectory.FullName); var applicationName = compileResult.WorkingDirectory.Name; var configuration = test.Header.Configuration; var targetFramework = test.Header.TargetFramework; var result = dotnet.Exec($"bin/{configuration}/{targetFramework}/{applicationName}.dll"); var output = CreateCommandOutput(result); return(new TestExecutionResult(test, (result.ExitCode == 0), compileResult, output)); }