예제 #1
0
        public void BeforeScenario()
        {
            string feature = featureContext.FeatureInfo.Title;
            string cenario = scenarioContext.ScenarioInfo.Title;
            var    tags    = scenarioContext.ScenarioInfo.Tags;

            DriverFactory.initDriver("Chrome").Url = "https://mark7.herokuapp.com";
            Inicializacao init = new Inicializacao(DriverFactory.GetDriver());

            init.Realizarlogin();
            ExtentTestManager.CreateScenario(feature, cenario, $@"-- Tags:{string.Join(",", tags)}");
            container.RegisterInstanceAs <RemoteWebDriver>(DriverFactory.GetDriver());
        }
예제 #2
0
        public void insertReportingSteps()

        {
            var          stepType    = scenarioContext.StepContext.StepInfo.StepDefinitionType.ToString();
            PropertyInfo pInfo       = typeof(ScenarioContext).GetProperty("ScenarioExecutionStatus", BindingFlags.Instance | BindingFlags.Public);
            MethodInfo   getter      = pInfo.GetGetMethod(nonPublic: true);
            object       TestResult  = getter.Invoke(scenarioContext, null);
            string       cenario     = scenarioContext.ScenarioInfo.Title;
            var          currentstep = scenarioContext.StepContext.StepInfo.Text;

            ExtentTestManager.CreateStep(cenario, currentstep, stepType, TestResult, scenarioContext);
            hookImg();
            ExtentTestManager.InsertPrints();
            ExtentTestManager.InsertLogs();
        }
예제 #3
0
        public static void hookImg()
        {
            var print = CorePage.capturaImagem();

            ExtentTestManager.InsertScreenCurrentStep(print);
        }
예제 #4
0
 public static void WriteLog(string strLog)
 {
     ExtentTestManager.InsertLogCurrentStep(strLog);
 }