Esempio n. 1
0
	    private void RunFolder(StoryTestSuite theSuite, bool dryRun) {
	        var executor = SelectExecutor(dryRun);

	        StoryTestPage suiteSetUp = theSuite.SuiteSetUp;
            if (suiteSetUp != null) executor.Do(suiteSetUp);
	        foreach (StoryTestPage testPage in theSuite.Pages) {
                try {
                    executor.Do(testPage);
                }
                catch (Exception e) {
	                myReporter.Write(e.ToString());
	            }
                if (executor.SuiteIsAbandoned) break;
            }

            if (!executor.SuiteIsAbandoned) {
                foreach (StoryTestSuite childSuite in theSuite.Suites) {
                    RunFolder(childSuite, dryRun);
                }
                StoryTestPage suiteTearDown = theSuite.SuiteTearDown;
                if (suiteTearDown != null) executor.Do(suiteTearDown);
            }

	        if (!dryRun) theSuite.Finish();
	    }
Esempio n. 2
0
        private void RunFolder(StoryTestSuite theSuite)
        {
            StoryTestPage suiteSetUp = theSuite.SuiteSetUp;

            if (suiteSetUp != null)
            {
                ExecuteStoryPage(suiteSetUp);
            }
            foreach (StoryTestPage testPage in theSuite.Pages)
            {
                ExecuteStoryPage(testPage);
            }

            foreach (StoryTestSuite childSuite in theSuite.Suites)
            {
                RunFolder(childSuite);
            }
            StoryTestPage suiteTearDown = theSuite.SuiteTearDown;

            if (suiteTearDown != null)
            {
                ExecuteStoryPage(suiteTearDown);
            }
            theSuite.Finish();
        }
Esempio n. 3
0
        private void RunFolder(StoryTestSuite theSuite, bool dryRun)
        {
            var executor = SelectExecutor(dryRun);

            StoryTestPage suiteSetUp = theSuite.SuiteSetUp;

            if (suiteSetUp != null)
            {
                executor.Do(suiteSetUp);
            }
            foreach (StoryTestPage testPage in theSuite.Pages)
            {
                try {
                    executor.Do(testPage);
                }
                catch (Exception e) {
                    myReporter.Write(e.ToString());
                }
            }

            foreach (StoryTestSuite childSuite in theSuite.Suites)
            {
                RunFolder(childSuite, dryRun);
            }
            StoryTestPage suiteTearDown = theSuite.SuiteTearDown;

            if (suiteTearDown != null)
            {
                executor.Do(suiteTearDown);
            }
            if (!dryRun)
            {
                theSuite.Finish();
            }
        }
Esempio n. 4
0
	    public void Run(StoryTestSuite theSuite, string theSelectedFile) {
            resultWriter = CreateResultWriter();
            if (!string.IsNullOrEmpty(theSelectedFile)) theSuite.Select(theSelectedFile);

	        RunFolder(theSuite, memory.GetItem<Settings>().DryRun);

            resultWriter.WriteFinalCount(TestCounts);
            resultWriter.Close();
	    }
Esempio n. 5
0
        public void Run(StoryTestSuite theSuite, string theSelectedFile)
        {
            resultWriter = CreateResultWriter();
            if (theSelectedFile.Length > 0) theSuite.Select(theSelectedFile);

            RunFolder(theSuite);

            resultWriter.WriteFinalCount(TestCounts);
            resultWriter.Close();
        }
Esempio n. 6
0
        public void Run(StoryTestSuite theSuite, string theSelectedFile)
        {
            resultWriter = CreateResultWriter();
            if (theSelectedFile.Length > 0)
            {
                theSuite.Select(theSelectedFile);
            }

            RunFolder(theSuite);

            resultWriter.WriteFinalCount(TestCounts);
            resultWriter.Close();
        }
Esempio n. 7
0
        public void Run(StoryTestSuite theSuite, string theSelectedFile)
        {
            resultWriter = CreateResultWriter();
            if (!string.IsNullOrEmpty(theSelectedFile))
            {
                theSuite.Select(theSelectedFile);
            }

            RunFolder(theSuite, memory.GetItem <Settings>().DryRun);

            resultWriter.WriteFinalCount(TestCounts);
            resultWriter.Close();
        }
Esempio n. 8
0
        public void Run(StoryTestSuite theSuite, string theSelectedFile)
        {
            var now = DateTime.Now;
            resultWriter = CreateResultWriter();
            if (!string.IsNullOrEmpty(theSelectedFile)) theSuite.Select(theSelectedFile);

            RunFolder(theSuite, memory.GetItem<Settings>().DryRun);

            resultWriter.WriteFinalCount(TestCounts);
            resultWriter.Close();

            if (!memory.GetItem<Settings>().DryRun)
                myReporter.Write(string.Format("\n{0}, time: {1}\n", TestCounts.Description, DateTime.Now - now));
        }
Esempio n. 9
0
        public void Run(StoryTestSuite theSuite, string theSelectedFile)
        {
            var now = DateTime.Now;

            resultWriter = CreateResultWriter();

            RunFolder(theSuite, memory.GetItem <Settings>().DryRun);

            resultWriter.WriteFinalCount(TestCounts);
            resultWriter.Close();

            if (!memory.GetItem <Settings>().DryRun)
            {
                myReporter.Write($"\n{TestCounts.Description}, time: {DateTime.Now - now}\n");
            }
        }
        private void RunFolder(StoryTestSuite theSuite, bool dryRun)
        {
            var executor = SelectExecutor(dryRun);

            StoryTestPage suiteSetUp = theSuite.SuiteSetUp;

            if (suiteSetUp != null)
            {
                executor.Do(suiteSetUp);
            }
            foreach (StoryTestPage testPage in theSuite.Pages)
            {
                try {
                    TestStarted(testPage.Name.Name);
                    executor.Do(testPage);
                    TestEnded(testPage.Name.Name);
                }
                catch (System.Exception e) {
                    myReporter.Write(e.ToString());
                }
                if (executor.SuiteIsAbandoned)
                {
                    break;
                }
            }

            if (!executor.SuiteIsAbandoned)
            {
                foreach (StoryTestSuite childSuite in theSuite.Suites)
                {
                    RunFolder(childSuite, dryRun);
                }
                StoryTestPage suiteTearDown = theSuite.SuiteTearDown;
                if (suiteTearDown != null)
                {
                    executor.Do(suiteTearDown);
                }
            }

            if (!dryRun)
            {
                theSuite.Finish();
            }
        }
        public void Run(StoryTestSuite theSuite, string theSelectedFile)
        {
            var now = DateTime.Now;

            resultWriter = CreateResultWriter();
            if (!string.IsNullOrEmpty(theSelectedFile))
            {
                theSuite.Select(theSelectedFile);
            }

            RunFolder(theSuite, memory.GetItem <Settings>().DryRun);

            resultWriter.WriteFinalCount(TestCounts);
            resultWriter.Close();

            if (!memory.GetItem <Settings>().DryRun)
            {
                myReporter.Write(string.Format("\n{0}, time: {1}\n", TestCounts.Description, DateTime.Now - now));
            }
        }
Esempio n. 12
0
        void RunFolder(StoryTestSuite theSuite, bool dryRun)
        {
            var executor = SelectExecutor(dryRun);

            foreach (var testPage in theSuite.AllPages)
            {
                if (!executor.SuiteIsAbandoned)
                {
                    try {
                        TestStarted(testPage.Name.Name);
                        executor.Do(testPage);
                        TestEnded(testPage.Name.Name);
                    }
                    catch (System.Exception e) {
                        myReporter.Write(e.ToString());
                    }
                }
            }
            if (!dryRun)
            {
                myReport.Finish(folderModel);
            }
        }
Esempio n. 13
0
        private void RunFolder(StoryTestSuite theSuite)
        {
            StoryTestPage suiteSetUp = theSuite.SuiteSetUp;
            if (suiteSetUp != null) ExecuteStoryPage(suiteSetUp);
            foreach (StoryTestPage testPage in theSuite.Pages) {
                ExecuteStoryPage(testPage);
            }

            foreach (StoryTestSuite childSuite in theSuite.Suites) {
                RunFolder(childSuite);
            }
            StoryTestPage suiteTearDown = theSuite.SuiteTearDown;
            if (suiteTearDown != null) ExecuteStoryPage(suiteTearDown);
            theSuite.Finish();
        }
Esempio n. 14
0
 public bool Matches(StoryTestSuite suite)
 {
     return(!fileExclusions.IsExcluded(Path.GetFileName(suite.FullName)));
 }
Esempio n. 15
0
        private void RunFolder(StoryTestSuite theSuite, bool dryRun)
        {
            var pageAction = SelectPageAction(dryRun);
            StoryTestPage suiteSetUp = theSuite.SuiteSetUp;
            if (suiteSetUp != null) pageAction(suiteSetUp);
            foreach (StoryTestPage testPage in theSuite.Pages) {
                pageAction(testPage);
            }

            foreach (StoryTestSuite childSuite in theSuite.Suites) {
                RunFolder(childSuite, dryRun);
            }
            StoryTestPage suiteTearDown = theSuite.SuiteTearDown;
            if (suiteTearDown != null) pageAction(suiteTearDown);
            if (!dryRun) theSuite.Finish();
        }
Esempio n. 16
0
 public TestFiles(Folder testRootFolder, Folder resultRootFolder, StoryTestSuite suite)
 {
     this.testRootFolder = testRootFolder;
     this.resultRootFolder = resultRootFolder;
     this.suite = suite;
 }