コード例 #1
0
        public CoreTest()
        {
            Inicializacao init = new Inicializacao();

            DriverFactory.GetDriver().Url = "https://mark7.herokuapp.com";

            init.Realizarlogin();
        }
コード例 #2
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());
        }
コード例 #3
0
        public static void Main(string[] args)
        {
            var host = CreateWebHostBuilder(args).Build();

            using (var scope = host.Services.CreateScope())
            {
                var services = scope.ServiceProvider;

                try
                {
                    Inicializacao.Inicializar(services);
                }
                catch (Exception ex)
                {
                    var logger = services.GetRequiredService <ILogger <Program> >();
                    logger.LogError(ex, "An error occurred seeding the DB.");
                }
            }

            host.Run();
        }