public void FinishedTest(Test test) { Console.WriteLine("Finished with {0}", test.LastResult.Counts); string resultFile = Path.Combine(_setup.ResultsFolder, test.SuiteName); if (!Directory.Exists(resultFile)) { Directory.CreateDirectory(resultFile); } resultFile = Path.Combine(resultFile, test.Name + "-results.htm"); test.WriteResultsToFile(resultFile); _summary.AddTest(test, resultFile); }
private void executeProject(IProject project) { var runner = new ProjectTestRunner(project); string projectHistoryFolder = Path.Combine(_historyFolder, project.Name); Directory.CreateDirectory(projectHistoryFolder); try { runner.RunAll(test => { try { _counts[test.Lifecycle].Tally(test); string filename = Path.GetFileNameWithoutExtension(test.FileName) + DateTime.Now.ToString("hhmmss") + "-results.htm"; string resultFile = Path.Combine(_resultsFolder, filename); test.WriteResultsToFile(resultFile); _summary.AddTest(test, "results/" + filename); ResultPersistor.SaveResult(test.LastResult, test, projectHistoryFolder); } catch (Exception ex) { Console.WriteLine(ex); } }); } catch (Exception e) { Console.WriteLine(e); } finally { runner.Dispose(); } }