Esempio n. 1
0
 public TestResult GetScenarioResult(Scenario scenario)
 {
     CucumberObjects.Element cucumberScenario = null;
     CucumberObjects.Feature cucumberFeature  = this.GetFeatureElement(scenario.Feature);
     if (cucumberFeature != null)
     {
         cucumberScenario = cucumberFeature.elements.FirstOrDefault(x => x.name == scenario.Name);
     }
     return(this.GetResultFromScenario(cucumberScenario));
 }
Esempio n. 2
0
        private TestResult GetResultFromScenario(CucumberObjects.Element cucumberScenario)
        {
            if (cucumberScenario == null)
            {
                return(TestResult.Inconclusive);
            }

            bool wasSuccessful = CheckScenarioStatus(cucumberScenario);

            return(wasSuccessful ? TestResult.Passed : TestResult.Failed);
        }
Esempio n. 3
0
 private static bool CheckScenarioStatus(CucumberObjects.Element cucumberScenario)
 {
     return(cucumberScenario.steps.All(x => x.result.status == "passed"));
 }