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(); }
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(); }
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(); } }
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(); }
public void Run(StoryTestSuite theSuite, string theSelectedFile) { resultWriter = CreateResultWriter(); if (theSelectedFile.Length > 0) theSuite.Select(theSelectedFile); RunFolder(theSuite); resultWriter.WriteFinalCount(TestCounts); resultWriter.Close(); }
public void Run(StoryTestSuite theSuite, string theSelectedFile) { resultWriter = CreateResultWriter(); if (theSelectedFile.Length > 0) { theSuite.Select(theSelectedFile); } RunFolder(theSuite); resultWriter.WriteFinalCount(TestCounts); resultWriter.Close(); }
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(); }
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)); }
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)); } }
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); } }
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(); }
public bool Matches(StoryTestSuite suite) { return(!fileExclusions.IsExcluded(Path.GetFileName(suite.FullName))); }
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(); }
public TestFiles(Folder testRootFolder, Folder resultRootFolder, StoryTestSuite suite) { this.testRootFolder = testRootFolder; this.resultRootFolder = resultRootFolder; this.suite = suite; }