/// <summary> /// Replays an execution that is specified in the configuration. /// </summary> private static ExitCode ReplayTest(Configuration configuration) { try { // Set some replay specific options. configuration.SchedulingStrategy = "replay"; // Load the configuration of the assembly to be replayed. LoadAssemblyConfiguration(configuration.AssemblyToBeAnalyzed); Console.WriteLine($". Testing {configuration.AssemblyToBeAnalyzed}."); using TestingEngine engine = TestingEngine.Create(configuration); engine.Run(); // Emit the report. if (engine.TestReport.NumOfFoundBugs > 0) { Console.WriteLine(engine.GetReport()); } Console.WriteLine($"... Elapsed {engine.Profiler.Results()} sec."); return(GetExitCodeFromTestReport(engine.TestReport)); } catch (Exception ex) { IO.Debug.WriteLine(ex.Message); IO.Debug.WriteLine(ex.StackTrace); return(ExitCode.Error); } }
private static void ReplayTest() { TelemetryClient = new CoyoteTelemetryClient(Configuration); TelemetryClient.TrackEventAsync("replay").Wait(); if (Debugger.IsAttached) { TelemetryClient.TrackEventAsync("replay-debug").Wait(); } Stopwatch watch = new Stopwatch(); watch.Start(); // Set some replay specific options. Configuration.SchedulingStrategy = "replay"; Configuration.EnableColoredConsoleOutput = true; Configuration.DisableEnvironmentExit = false; // Load the configuration of the assembly to be replayed. LoadAssemblyConfiguration(Configuration.AssemblyToBeAnalyzed); Console.WriteLine($". Replaying {Configuration.ScheduleFile}"); TestingEngine engine = TestingEngine.Create(Configuration); engine.Run(); Console.WriteLine(engine.GetReport()); watch.Stop(); if (!Debugger.IsAttached) { TelemetryClient.TrackMetricAsync("replay-time", watch.Elapsed.TotalSeconds).Wait(); } }
private static void ReplayTest() { // Set some replay specific options. Configuration.SchedulingStrategy = "replay"; Configuration.EnableColoredConsoleOutput = true; Configuration.DisableEnvironmentExit = false; Console.WriteLine($". Replaying {Configuration.ScheduleFile}"); TestingEngine engine = TestingEngine.Create(Configuration); engine.Run(); Console.WriteLine(engine.GetReport()); }
/// <summary> /// Replays an execution that is specified in the configuration. /// </summary> private static void ReplayTest() { // Set some replay specific options. Configuration.SchedulingStrategy = "replay"; Configuration.EnableColoredConsoleOutput = true; Configuration.DisableEnvironmentExit = false; // Load the configuration of the assembly to be replayed. LoadAssemblyConfiguration(Configuration.AssemblyToBeAnalyzed); Console.WriteLine($". Replaying {Configuration.ScheduleFile}"); TestingEngine engine = TestingEngine.Create(Configuration); engine.Run(); Console.WriteLine(engine.GetReport()); }