public static void AfterScenario(ITestOutcomeEvent e) { var specflowContext = SpecflowContextWrapper.Create(); var scenario = ScenarioService.GetScenario(e, specflowContext); FeatureService.RegisterScenario(scenario, specflowContext); }
internal static TestMethodInfo GetTestMethodInfo(ITestOutcomeEvent e) { RegisterTypeAndAssembly(e.TestClassFullName); var method = Types[e.TestClassFullName].GetMethod(e.TestMethodName); var parmeters = method.GetParameters().Select(p => p.Name).ToArray(); return(new TestMethodInfo { AssemblyName = Assemblies[TypeAssembly[e.TestClassFullName]].GetName().Name, NamedArgumets = GetNamedArgumets(parmeters, e.TestArguments).ToArray(), }); }
internal static SbeScenario GetScenario(ITestOutcomeEvent e, SpecflowContextWrapper specflowContext) { var testReflection = ReflectionService.GetTestMethodInfo(e); return(new SbeScenario { Title = specflowContext.ScenarioTitle, Tags = specflowContext.ScenarioTags, Outcome = e.Outcome, AssemblyName = testReflection.AssemblyName, NamedArgumets = testReflection.NamedArgumets }); }