Ejemplo n.º 1
0
 public IOutputExecutor Create(Settings settings)
 {
     Executor = Executor.WithForsetiConfigurationFile(settings.ForsetiConfigurationFile, verbose: settings.VerboseOutput);
     Executor.ReportWith<Forseti.AppVeyor.Reporter>();
     Executor.RegisterWatcher<Forseti.ConsoleReporter.ConsoleHarnessWatcher>();
     return this;
 }
Ejemplo n.º 2
0
        public static int Main(string[] args)
        {
         

			System.Console.WriteLine("Keys : \n  R : Rerun\n  B : Run in browser\n  Any other key : Exit\n\n");

            var currentConfigurationFile = Path.Combine(Directory.GetCurrentDirectory(), "forseti.yaml");
            
            _executor = Executor.WithForsetiConfigurationFile(currentConfigurationFile);
            _executor.ReportWith<Reporter>();
            _executor.RegisterWatcher<Windows.Growl.GrowlHarnessWatcher>();
            _executor.RegisterWatcher<ConsoleHarnessWatcher>();

            _reporter = new Reporter(_executor.GetReportingOptions());
            
            _reporter.ReportSummary(_executor.ExecuteTests());

			for( ;; ) 
			{
				var key = System.Console.ReadKey();
				if( key.KeyChar != 0x0 ) 
				{
                    switch (key.Key)
                    {
                        case ConsoleKey.R:
						    
                            _reporter.ReportOn(_executor.ExecuteTests());
                            break;
                        case ConsoleKey.B:
                            var target = Path.GetTempPath() + @"Forseti/runner.html";
                            System.Diagnostics.Process.Start(target);
                            break;
                        default:
						    System.Diagnostics.Process.GetCurrentProcess().Kill ();
						    break;
                    }
				}
				
				Thread.Sleep(20);
			}
			

            return 0;
        }