예제 #1
0
        public int Execute()
        {
            try
            {
                prepareResultsFolder();

                _projects = _projectFiles.Select(file =>
                {
                    Console.WriteLine("Loading Project at " + file);
                    return(Project.LoadFromFile(file) as IProject);
                }).ToList();

                string names = _projects.Select(x => x.Name).ToArray().Join(", ");
                _summary.Start("Project(s):  " + names, DateTime.Now);


                _projects.Each(p =>
                {
                    Console.WriteLine("Running Project " + p.Name);
                    executeProject(p);
                });


                _summary.WriteFile(_resultsFile);

                return(createFinalResult());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                throw;
            }
        }
예제 #2
0
        public void RunAllTests()
        {
            _system.DeleteFolder(_setup.ResultsFolder);
            _system.CreateFolder(_setup.ResultsFolder);

            List <Test> tests = LoadAllTests();

            _summary.Start("All Tests in {0}".ToFormat(_setup.TestFolder), DateTime.Now);
            _runner.RunTests(tests, this);
            _summary.WriteFile(_setup.ResultsFile);
        }