Example #1
0
        public static StoryResult RunScenarios(StoryResult storyResult, IRemoteClient proxy)
        {
            testScenarios = testScenarios.OrderBy(d => d.Name).ToList();

            if (storySetupScenario != null)
                storyResult.ScenarioResults.Add((storySetupScenario as Scenario).Run(proxy));

            foreach (Scenario s in testScenarios)
            {
                if (setupScenario != null)
                    storyResult.ScenarioResults.Add((setupScenario as Scenario).Run(proxy));

                if (testScenarios != null && testScenarios.Count > 0)
                    storyResult.ScenarioResults.Add(s.Run(proxy));

                if (teardownScenario != null)
                    storyResult.ScenarioResults.Add((teardownScenario as Scenario).Run(proxy));
            }

            if (storyTeardownScenario != null)
                storyResult.ScenarioResults.Add((storyTeardownScenario as Scenario).Run(proxy));

            return storyResult;
        }
Example #2
0
 public StoryReport(StoryResult storyResult)
 {
     StoryResult = storyResult;
 }
Example #3
0
        public static StoryResult RunCriteria(Story story, StoryResult storyResult, IXmlRpcClient proxy)
        {
            story.IncludeTags = Behavior.Config.IncludeTags;
            story.ExcludeTags = Behavior.Config.ExcludeTags;
            story.Repository = Behavior.Kernel.Get<IRepository>();

            foreach (Criterion s in story.TestSequence)
            {
                if (s.CriterionType.Equals("Context Reset"))
                {
                    proxy.reset_criterion_context();

                    continue;
                }

                storyResult.CriterionResults.Add(s.Run(proxy));
            }

            return storyResult;
        }