Exemple #1
0
        /// <summary>
        /// The entry point of the program, where the program control starts and ends.
        /// </summary>
        /// <param name='args'>
        /// The command-line arguments.
        /// </param>
        public static int Main(string[] args)
        {
            var autoRun = new AutoRun(typeof(MainClass).GetTypeInfo().Assembly);

            #if DNX451
            autoRun.Execute(args);
            #else
            autoRun.Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
            #endif

            return(0);
        }
        public static int Main(string[] args)
        {
            var autorun = new AutoRun(typeof(Program).GetTypeInfo().Assembly);

            autorun.Execute(args);
            return(0);
        }
Exemple #3
0
        public static int Main(string[] args)
        {
            var autorun   = new AutoRun(typeof(Program).GetTypeInfo().Assembly);
            var arguments = Sync.SyncTestHelpers.ExtractRosSettings(args);

            autorun.Execute(arguments);
            return(0);
        }
Exemple #4
0
        static void Main(string[] args)
        {
            //TODO: get strings args by keys instead array index
            Console.WriteLine("Start working...");
            EnvironmentSettings.CurrentBrowser       = args[0];
            EnvironmentSettings.CurrentConfiguration = args[1];
            var testRunner = new AutoRun(Assembly.GetExecutingAssembly());

            //TODO: expire with docs https://github.com/nunit/docs/wiki/Console-Command-Line
            string[] test = new string[] { $"--testlist:{Directory.GetCurrentDirectory()}//tests_sample.txt" };
            testRunner.Execute(test);
        }
        public ActionResult RunAllTests()
        {
            foreach (var testName in TestNames)
            {
                var assemblyName = Assembly.GetAssembly(typeof(Login));

                var autorun = new AutoRun(assemblyName);

                var result = autorun.Execute(new String[] { "/test:Alpha.SampleTest." + testName });
            }

            return(View("TestResult"));
        }
Exemple #6
0
        static void Main(string[] args)
        {
            var cmdArgs = args
                          .Select(s => new Regex(@"/(?<name>.+?)=(?<val>.+)")
                                  .Match(s))
                          .Where(m => m.Success)
                          .ToDictionary(m => m.Groups[1].Value, m => m.Groups[2].Value);

            Settings.Env     = cmdArgs["env"] ?? "dev";
            Settings.Browser = cmdArgs["browser"] ?? "chrome";
            var testRunner = new AutoRun(Assembly.GetExecutingAssembly());
            var tests      = new string[] { $"--testlist:{Directory.GetCurrentDirectory()}\\tests.txt" };

            testRunner.Execute(tests);
        }
Exemple #7
0
        public static int Main(string[] args)
        {
            var autorun   = new AutoRun(typeof(Program).GetTypeInfo().Assembly);
            var arguments = Sync.SyncTestHelpers.ExtractRosSettings(args);

            autorun.Execute(arguments);

            var resultPath = args.FirstOrDefault(a => a.StartsWith("--result="))?.Replace("--result=", string.Empty);

            if (!string.IsNullOrEmpty(resultPath))
            {
                TestHelpers.TransformTestResults(resultPath);
            }

            return(0);
        }
Exemple #8
0
        static void Main(string[] args)
        {
            var cmdArgs = args
                          .Select(s => new Regex(@"/(?<name>.+?)=(?<val>.+)")
                                  .Match(s))
                          .Where(m => m.Success)
                          .ToDictionary(m => m.Groups[1].Value, m => m.Groups[2].Value);

            Settings.Env     = cmdArgs["env"] ?? "dev";
            Settings.Browser = cmdArgs["browser"] ?? "chrome";
            string nameTestSet = cmdArgs["set"] ?? "testSet0";


            var testRunner = new AutoRun(Assembly.GetExecutingAssembly());
            var tests      = new string[] { $"--testlist:{Directory.GetCurrentDirectory()}\\..\\..\\..\\" + nameTestSet + ".txt" };
            int a          = testRunner.Execute(tests);

            if (a == 1)
            {
                throw new System.Exception("FAIL");
            }
        }
Exemple #9
0
        static void Main(string[] args)
        {
            Console.WriteLine("Start working...");
            EnvironmentSettings.CurrentBrowser       = args[0];
            EnvironmentSettings.CurrentConfiguration = args[1];
            var testRunner        = new AutoRun(Assembly.GetExecutingAssembly());
            var serviceCollection = new ServiceCollection();

            ConfigureServices(serviceCollection);
            var serviceProvider = serviceCollection.BuildServiceProvider();

            string[] test;
            try
            {
                var currentDirectory = Directory.GetCurrentDirectory();
                var file             = args[2];
                test = new string[] { "--testlist:" + currentDirectory + "\\" + file };
            }
            catch (Exception ex)
            {
                test = new string[] { $"--testlist:{Directory.GetCurrentDirectory()}//{args[2]}" };
            }
            testRunner.Execute(test);
        }
Exemple #10
0
        /// <summary>The entry point of the program.</summary>
        /// <param name="args">The arguments that should be used when running the program.</param>
        /// <returns>The exit code of the program.</returns>
        public static int Main(string[] args)
        {
            var autoRun = new AutoRun(Assembly.GetEntryAssembly());

            return(autoRun.Execute(args));
        }