Jbehave讲故事

时间:2016-01-19 20:07:19

标签: selenium jbehave

我正在使用jbehave使用selenium。每当故事发生故障时,故事就会被挂起,即使步骤失败,浏览器也不会关闭。

请找到我的配置:

return new SeleniumConfiguration()
            .useWebDriverProvider(driverProvider)
            .useSeleniumContext(seleniumContext).useFailureStrategy(new FailingUponPendingStep())
            .useStoryControls(new StoryControls().doResetStateBeforeScenario(false).doIgnoreMetaFiltersIfGivenStory(true))
            //.useStepMonitor(new SeleniumStepMonitor(contextView, seleniumContext, xref.getStepMonitor())) //?
            .useStoryLoader(new LoadFromClasspath(this.getClass().getClassLoader()))
            .useStoryReporterBuilder(new MyStoryReporterBuilder(config, storyData, props, dbConnection)
                    .withCodeLocation(CodeLocations.codeLocationFromPath(getClassPath()))
                    .withDefaultFormats()
                    .withCrossReference(xref)
                    .withFormats(Format.CONSOLE, Format.HTML, Format.XML))
            ;
}

0 个答案:

没有答案