public void BeginRun (TestRun run) { this.run = run; document = new XmlDocument (); runs_node = document.CreateElement ("TestRun", null); document.AppendChild (runs_node); SetupRunsNode (); CreateTestRunPathNames (run); }
public void BeginRun (TestRun run) { this_run = run; run_directories = Directory.GetDirectories (XmlReport.TestRunDirectoryName); Array.Sort (run_directories, new DirectoryNamesByDateComparer ()); test_runs = new List<TestRunData> (); foreach (string dir in run_directories) LoadRunData (dir); }
public void BeginRun (TestRun run) { this.run = run; doc = new StringBuilder (); // So people don't get confused with the old reports if (File.Exists ("html_report.html")) File.Delete ("html_report.html"); Directory.CreateDirectory ("html_report"); foreach (string file in Directory.GetFiles (ReportDirectory)) { File.Delete (file); } GeneratePageHeader (); summary_pt = doc.Length; UpdateSummaryTable(); GenerateTableHeader ("red", "Failing Tests"); fail_pt = doc.Length; GenerateTableFooter (); GenerateTableHeader ("orange", "Known Failures"); knfl_pt = doc.Length; GenerateTableFooter (); GenerateTableHeader ("green", "Passing Tests"); pass_pt = doc.Length; GenerateTableFooter (); GenerateTableHeader ("white", "Ignored"); ignore_pt = doc.Length; GenerateTableFooter (); GeneratePageFooter (); }
private void ReportsBeginRun (TestRun run) { if (reports != null) { foreach (IReport report in reports) report.BeginRun (run); } }
/* public int Run (string drtlist) { int return_code = 0; LoggingServer logging_server = new LoggingServer (); logging_server.Start (); Agviewer.SetLoggingServer (logging_server); test_run = new TestRun (Path.GetDirectoryName (drtlist), verbose_level, logging_server); LoadTests (drtlist); Screensaver.Inhibit (); foreach (Test test in tests) { if (categories != null && !test.IsInCategoryList (categories)) continue; if (fixtures != null && !TestIsInFixtureList (test)) continue; if (test.IsKnownFailure && !run_known_failures) { ReportsExecuting (test); RecordResult (test, TestResult.KnownFailure, false); ReportsAddResult (test, TestResult.KnownFailure); continue; } ReportsExecuting (test); TestResult result = test.Execute (compare_to_moon); if (logging_server.IsTestResultSet (test.InputFileName)) { result = logging_server.GetTestResult (test.InputFileName); if (result == TestResult.Fail) test.SetFailedReason ("Test LogResult set to FAIL"); } if (!logging_server.IsTestComplete (test.InputFileName)) { result = TestResult.Fail; test.SetFailedReason ("Test did not shut down cleanly."); } RecordResult (test, result, true); ReportsAddResult (test, test.IsKnownFailure ? TestResult.KnownFailure : result); if (logging_server.HasShutdownBeenRequested ()) break; } logging_server.Stop (); ReportsEndRun (); return return_code; } */ public int Run (string drtlist) { string drtdir = Path.GetDirectoryName (drtlist); if (drtdir == string.Empty || drtdir == null) drtdir = Path.GetFullPath ("."); else drtdir = Path.GetFullPath (drtdir); LoadTests (drtlist); Screensaver.Inhibit (); LoggingServer logging_server = new LoggingServer (); TestRunner runner = new TestRunner (tests, drtdir, this); DbusServices.Register (logging_server); DbusServices.Register (runner); DbusServices.Start (); TestRun run = new TestRun (Path.GetDirectoryName (drtlist), verbose_level, tests, reports, logging_server, runner); run.IgnoredTests.AddRange (ignored_tests); Log.WriteLine ("Driver.Run (): starting."); int res = run.Run (); Log.WriteLine ("Driver.Run (): finished."); DbusServices.Stop (); return res; }
private void CreateTestRunPathNames (TestRun run) { test_run_dir = Path.Combine (TestRunDirectoryName, run.StartTime.ToString ("yyyy-MM-dd-HH-mm-ss")); test_run_path = Path.Combine (test_run_dir, TestRunFileName); if (!Directory.Exists (test_run_dir)) Directory.CreateDirectory (test_run_dir); }
public void BeginRun (TestRun run) { this.run = run; Console.WriteLine ("Running tests..."); }
public void BeginRun(TestRun run) { this.run = run; Console.WriteLine("Running tests..."); }
public void BeginRun(TestRun run) { if (!HasConnection) { return; } string dir = "test-run-data"; string filename = "moonTestSuite.db"; runtime = run.StartTime.ToString("yyyy-MM-dd HH:mm");//Postgres timestamp format test_run_dir = Path.Combine(dir,runtime); if (!Directory.Exists(test_run_dir)) { Directory.CreateDirectory(test_run_dir); } if (!Directory.Exists(Path.Combine(dir,masters))) { Directory.CreateDirectory(Path.Combine(dir,masters)); } Log(string.Format("Runtime: {0}", runtime)); AddBuild(runtime); }