Ejemplo n.º 1
0
        /// <summary>
        /// The entry point of the application.
        /// </summary>
        /// <param name="args">The list of command line arguments.</param>
        public static int Main(string[] args)
        {
            try
            {
                string configFile;
                if (args.Length > 0)
                {
                    configFile = args[0];
                }
                else
                {
                    configFile = DefaultConfigFile;
                    Console.WriteLine($"Using default config file {configFile}");
                }

                RegisterTestRunHandlers();

                EvaluatorConfiguration configuration = EvaluatorConfiguration.LoadFromFile(configFile);

                foreach (var runConfiguration in configuration.Runs)
                {
                    var testRun = runConfiguration.Create();
                    SubscribeTestRunHandlers(testRun);
                    testRun.Execute();
                }
            }
            catch (Exception e)
            {
                HasFailed = true;
                PrintErrorMessage(e);
            }
            int exitCode = HasFailed ? 1 : 0;

            return(exitCode);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// The entry point of the application.
        /// </summary>
        /// <param name="args">The list of command line arguments.</param>
        public static void Main(string[] args)
        {
            try
            {
                string configFile = DefaultConfigFile;
                if (args.Length > 0)
                {
                    configFile = args[0];
                }

                RegisterTestRunHandlers();

                EvaluatorConfiguration configuration = EvaluatorConfiguration.LoadFromFile(configFile);

                foreach (var runConfiguration in configuration.Runs)
                {
                    var testRun = runConfiguration.Create();
                    SubscribeTestRunHandlers(testRun);
                    testRun.Execute();
                }
            }
            catch (Exception e)
            {
                PrintErrorMessage(e);
            }
        }