Exemple #1
0
        public void RunNow()
        {
            if (Pause || !buildRunner.Run())
            {
                return;
            }

            var listener = GetListener.Invoke(config);

            var manager = new GilesAppDomainManager();

            var runResults = new List <SessionResults>();

            var testAssembliesToRun = config.TestAssemblies.ToList();

            foreach (var filter in config.Filters.Where(f => f.Type == FilterType.Exclusive))
            {
                testAssembliesToRun.RemoveAll(a => a.Contains(filter.NameDll));
            }

            var watch = new Stopwatch();

            watch.Start();

            testAssembliesToRun.Each(assm => runResults.AddRange(manager.Run(assm, config.Filters.Where(f => f.Type != FilterType.Exclusive).Select(f => f.Name).ToList())));

            watch.Stop();

            Console.WriteLine("Test run completed in {0} seconds", watch.Elapsed.TotalSeconds);

            runResults.Each(result =>
            {
                result.Messages.Each(m => listener.WriteLine(m, "Output"));
                result.TestResults.Each(listener.AddTestSummary);
            });

            listener.DisplayResults();

            LastRunResults.GilesTestListener = listener;
        }
Exemple #2
0
        public void RunNow()
        {
            if (!buildRunner.Run())
            {
                return;
            }

            var listener = GetListener.Invoke(config);

            var manager   = new GilesAppDomainManager();
            var runResult = manager.Run(config.TestAssemblyPath);

            runResult.Each(result =>
            {
                result.Messages.Each(m => listener.WriteLine(m, "Output"));
                result.TestResults.Each(listener.AddTestSummary);
            });

            listener.DisplayResults();

            LastRunResults.GilesTestListener = listener;
        }