public VSTestResult VSTest(IEnumerable <string> testAssemblyPaths) { using (var tempTrxFile = new TempFile()) { ConfigureRun(toolResolver.VSTest) .AddRange(testAssemblyPaths) .Add("/logger:trx;LogFileName=" + tempTrxFile) .Run(throwOnError: false); return(VSTestResult.Load(tempTrxFile)); } }
public VSTestResult VSTest(IEnumerable <string> testAssemblyPaths) { using var tempTrxFile = new TempFile(); var result = ConfigureRun(toolResolver.VSTest) .AddRange(testAssemblyPaths) .Add("/logger:trx;LogFileName=" + tempTrxFile) .Run(throwOnError: false); if (new FileInfo(tempTrxFile).Length == 0) { result.ThrowIfError(); } return(VSTestResult.Load(tempTrxFile)); }
public VSTestResult DotNetTest(bool noBuild = false) { using var tempTrxFile = new TempFile(); var result = ConfigureRun("dotnet") .Add("test") .AddIf(noBuild, "--no-build") .Add("--logger").Add("trx;LogFileName=" + tempTrxFile) .Run(throwOnError: false); if (new FileInfo(tempTrxFile).Length == 0) { result.ThrowIfError(); } return(VSTestResult.Load(tempTrxFile)); }