本文整理汇总了Java中org.jbehave.core.embedder.StoryControls类的典型用法代码示例。如果您正苦于以下问题:Java StoryControls类的具体用法?Java StoryControls怎么用?Java StoryControls使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StoryControls类属于org.jbehave.core.embedder包,在下文中一共展示了StoryControls类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getConfiguration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Produces
@Singleton
@ConfigurationAlternative
@WeldConfiguration
public Configuration getConfiguration()
{
LOG.info("ConfigurationProducer.getConfiguration()");
Keywords keywords = new LocalizedKeywords();
ParameterConverters converters = new ParameterConverters().addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")), new StoryParameterEnumConverter());
return new MostUsefulConfiguration().useStoryControls(new StoryControls().doDryRun(runConfig.doDryRun()).doSkipScenariosAfterFailure(false))
.useStepPatternParser(new RegexPrefixCapturingPatternParser()).useStoryLoader(new LoadFromClasspath(this.getClass().getClassLoader()))
.useKeywords(keywords).useStepCollector(new MarkUnmatchedStepsAsPending(keywords)).useStoryParser(new RegexStoryParser(keywords, new ExamplesTableFactory(keywords, new LoadFromClasspath(this.getClass()), converters))).useDefaultStoryReporter(new ConsoleOutput(keywords))
.useStoryReporterBuilder(new StoryReporterBuilder().withFormats(Format.CONSOLE, Format.TXT, Format.STATS, WebDriverHtmlOutputWithImg.WEB_DRIVER_HTML_WITH_IMG).withFailureTrace(true).withReporters(new LoggingStoryReporter()).withKeywords(keywords)).useParameterConverters(converters);
}
开发者ID:partnet,项目名称:seauto,代码行数:21,代码来源:DefaultConfigurationProducer.java
示例2: PortalStories
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
protected PortalStories() {
CrossReference crossReference = new CrossReference().withJsonOnly().withOutputAfterEachStory(true)
.excludingStoriesWithNoExecutedScenarios(true);
ContextView contextView = new LocalFrameContextView().sized(640, 120);
SeleniumContext seleniumContext = new SeleniumContext();
SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView, seleniumContext,
crossReference.getStepMonitor());
Format[] formats = new Format[]{new SeleniumContextOutput(seleniumContext), CONSOLE, WEB_DRIVER_HTML};
StoryReporterBuilder reporterBuilder = new StoryReporterBuilder()
.withCodeLocation(codeLocationFromClass(this.getClass())).withFailureTrace(true)
.withFailureTraceCompression(true).withDefaultFormats().withFormats(formats)
.withCrossReference(crossReference);
Configuration configuration = new SeleniumConfiguration().useSeleniumContext(seleniumContext)
.useFailureStrategy(new FailingUponPendingStep())
.useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor)
.useStoryLoader(new LoadFromClasspath(this.getClass()))
.useStoryReporterBuilder(reporterBuilder);
useConfiguration(configuration);
ApplicationContext context = new SpringApplicationContextFactory("applicationContext-tests.xml").createApplicationContext();
useStepsFactory(new SpringStepsFactory(configuration, context));
}
开发者ID:apache,项目名称:rave,代码行数:24,代码来源:PortalStories.java
示例3: InvoiceStories
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
public InvoiceStories() {
CrossReference crossReference = new CrossReference().withJsonOnly().withOutputAfterEachStory(true)
.excludingStoriesWithNoExecutedScenarios(true);
ContextView contextView = new LocalFrameContextView().sized(640, 120);
SeleniumContext seleniumContext = new SeleniumContext();
SeleniumStepMonitor stepMonitor = new SeleniumStepMonitor(contextView, seleniumContext,
crossReference.getStepMonitor());
Format[] formats = new Format[] { new SeleniumContextOutput(seleniumContext), CONSOLE, WEB_DRIVER_HTML };
StoryReporterBuilder reporterBuilder = new StoryReporterBuilder()
.withCodeLocation(codeLocationFromClass(InvoiceStories.class)).withFailureTrace(true)
.withFailureTraceCompression(true).withDefaultFormats().withFormats(formats)
.withCrossReference(crossReference);
Configuration configuration = new SeleniumConfiguration().useSeleniumContext(seleniumContext)
.useFailureStrategy(new FailingUponPendingStep())
.useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor)
.useStoryLoader(new LoadFromClasspath(InvoiceStories.class))
.useStoryReporterBuilder(reporterBuilder);
useConfiguration(configuration);
ApplicationContext context = new SpringApplicationContextFactory("invoice-steps.xml").createApplicationContext();
useStepsFactory(new SpringStepsFactory(configuration, context));
}
开发者ID:bartgeluykens,项目名称:Invoice-Keeper,代码行数:26,代码来源:InvoiceStories.java
示例4: configure
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
protected void configure() {
bind(StoryControls.class).toInstance(new StoryControls().doDryRun(true).doSkipScenariosAfterFailure(true));
bind(FailureStrategy.class).to(SilentlyAbsorbingFailure.class);
bind(StepPatternParser.class).toInstance(new RegexPrefixCapturingPatternParser("MyPrefix"));
bind(StoryLoader.class).toInstance(new LoadFromURL());
Properties viewResources = new Properties();
viewResources.setProperty("index", "my-reports-index.ftl");
viewResources.setProperty("decorateNonHtml", "true");
bind(StoryReporterBuilder.class).toInstance(
new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, HTML, TXT, XML).withKeywords(
new LocalizedKeywords(Locale.ITALIAN)).withRelativeDirectory("my-output-directory")
.withViewResources(viewResources).withFailureTrace(true));
Multibinder<ParameterConverter> multiBinder = Multibinder.newSetBinder(binder(), ParameterConverter.class);
multiBinder.addBinding().toInstance(new CustomConverter());
multiBinder.addBinding().toInstance(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:18,代码来源:GuiceAnnotationBuilderBehaviour.java
示例5: MostUsefulConfiguration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
public MostUsefulConfiguration() {
useKeywords(new LocalizedKeywords());
useStoryControls(new StoryControls());
useStoryLoader(new LoadFromClasspath());
useStoryParser(new RegexStoryParser(keywords()));
useFailureStrategy(new RethrowingFailure());
usePendingStepStrategy(new PassingUponPendingStep());
useStepCollector(new MarkUnmatchedStepsAsPending());
useStepFinder(new StepFinder());
useStepPatternParser(new RegexPrefixCapturingPatternParser());
useStepMonitor(new SilentStepMonitor());
useStepdocReporter(new PrintStreamStepdocReporter());
useParanamer(new NullParanamer());
useParameterControls(new ParameterControls());
useViewGenerator(new FreemarkerViewGenerator());
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:17,代码来源:MostUsefulConfiguration.java
示例6: shouldNotAllowModificationOfConfigurationElements
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Test
public void shouldNotAllowModificationOfConfigurationElements() throws NoSuchMethodException,
IllegalAccessException {
Configuration delegate = new MostUsefulConfiguration();
Configuration unmodifiable = new UnmodifiableConfiguration(delegate);
assertThatNotAllowed(unmodifiable, "useKeywords", Keywords.class);
assertThatNotAllowed(unmodifiable, "doDryRun", Boolean.class);
assertThatNotAllowed(unmodifiable, "useStoryControls", StoryControls.class);
assertThatNotAllowed(unmodifiable, "useStoryLoader", StoryLoader.class);
assertThatNotAllowed(unmodifiable, "useStoryParser", StoryParser.class);
assertThatNotAllowed(unmodifiable, "useDefaultStoryReporter", StoryReporter.class);
assertThatNotAllowed(unmodifiable, "useStoryReporterBuilder", StoryReporterBuilder.class);
assertThatNotAllowed(unmodifiable, "useStoryPathResolver", StoryPathResolver.class);
assertThatNotAllowed(unmodifiable, "useFailureStrategy", FailureStrategy.class);
assertThatNotAllowed(unmodifiable, "usePendingStepStrategy", PendingStepStrategy.class);
assertThatNotAllowed(unmodifiable, "useParanamer", Paranamer.class);
assertThatNotAllowed(unmodifiable, "useParameterConverters", ParameterConverters.class);
assertThatNotAllowed(unmodifiable, "useParameterControls", ParameterControls.class);
assertThatNotAllowed(unmodifiable, "useStepCollector", StepCollector.class);
assertThatNotAllowed(unmodifiable, "useStepMonitor", StepMonitor.class);
assertThatNotAllowed(unmodifiable, "useStepPatternParser", StepPatternParser.class);
assertThatNotAllowed(unmodifiable, "useViewGenerator", ViewGenerator.class);
assertThatNotAllowed(unmodifiable, "useStoryPathResolver", StoryPathResolver.class);
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:25,代码来源:UnmodifiableConfigurationBehaviour.java
示例7: getConfiguration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Produces @WeldConfiguration
Configuration getConfiguration() {
Properties viewResources = new Properties();
viewResources.setProperty("index", "my-reports-index.ftl");
viewResources.setProperty("decorateNonHtml", "true");
return new MostUsefulConfiguration()
.useStoryControls(new StoryControls()
.doDryRun(true)
.doSkipScenariosAfterFailure(true))
.useFailureStrategy(new SilentlyAbsorbingFailure())
.useStoryLoader(new LoadFromURL())
.useStepPatternParser(new RegexPrefixCapturingPatternParser("MyPrefix"))
.useStoryReporterBuilder(new StoryReporterBuilder()
.withDefaultFormats()
.withFormats(CONSOLE, HTML, TXT, XML)
.withKeywords(new LocalizedKeywords(Locale.ITALIAN))
.withRelativeDirectory("my-output-directory")
.withViewResources(viewResources).withFailureTrace(true))
.useParameterConverters(new ParameterConverters()
.addConverters(new CustomConverter(),new MyDateConverter()));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:26,代码来源:ConfigurationProducer.java
示例8: createConfig
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
public Configuration createConfig() {
Configuration configuration = new Configuration() {
};
configuration.useStoryReporterBuilder(
new StoryReporterBuilder()
.withDefaultFormats()
.withFormats(Format.CONSOLE)
.withReporters(allureReporter));
configuration.useStoryControls(new StoryControls().doResetStateBeforeScenario(true));
configuration.parameterConverters().addConverters(new ParameterConverters.EnumConverter());
return configuration;
}
开发者ID:alfa-laboratory,项目名称:colibri-ui,代码行数:14,代码来源:JBConfiguratorImpl.java
示例9: configuration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
public Configuration configuration() {
return new SeleniumConfiguration()
.useSeleniumContext(seleniumContext)
.useWebDriverProvider(driverProvider)
.usePendingStepStrategy(pendingStepStrategy)
.useStoryControls(new StoryControls().doResetStateBeforeScenario(false))
.useStepMonitor(stepMonitor)
.useStoryLoader(new LoadFromClasspath(this.getClass()))
.useStoryReporterBuilder(reporterBuilder);
}
开发者ID:deniskiriusin,项目名称:combinatorius,代码行数:12,代码来源:CombinatoriusStories.java
示例10: configuration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
public Configuration configuration() {
return new MostUsefulConfiguration()
.usePendingStepStrategy(new FailingUponPendingStep())
.useStoryControls(new StoryControls().doSkipBeforeAndAfterScenarioStepsIfGivenStory(false))
.useStoryLoader(new LoadFromClasspath(getClass()))
.useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats().withFormats(Format.CONSOLE, Format.TXT));
}
开发者ID:raqet,项目名称:acquisition-server,代码行数:9,代码来源:RaqetStories.java
示例11: configure
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
public void configure(MutablePicoContainer container) {
container.addComponent(StoryControls.class, new StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false));
container.addComponent(StoryLoader.class, new LoadFromClasspath(this.getClass().getClassLoader()));
container.addComponent(StepPatternParser.class, new RegexPrefixCapturingPatternParser("%"));
container.addComponent(ParameterConverter.class, new DateConverter(new SimpleDateFormat("yyyy-MM-dd")));
container.addComponent(new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, HTML, TXT, XML)
.withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass())).withFailureTrace(true));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:9,代码来源:AnnotatedPathRunnerUsingPico.java
示例12: configuration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
public Configuration configuration() {
Class<? extends Embeddable> embeddableClass = this.getClass();
Properties viewResources = new Properties();
viewResources.put("decorateNonHtml", "true");
// Start from default ParameterConverters instance
ParameterConverters parameterConverters = new ParameterConverters();
// factory to allow parameter conversion and loading from external
// resources (used by StoryParser too)
ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory(new LocalizedKeywords(),
new LoadFromClasspath(embeddableClass), parameterConverters, new TableTransformers());
// add custom converters
parameterConverters.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")),
new ExamplesTableConverter(examplesTableFactory));
return new MostUsefulConfiguration()
.useStoryControls(new StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false))
.useStoryLoader(new LoadFromClasspath(embeddableClass))
.useStoryParser(new RegexStoryParser(examplesTableFactory))
.useStoryPathResolver(new UnderscoredCamelCaseResolver())
.useStoryReporterBuilder(
new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withDefaultFormats().withPathResolver(new ResolveToPackagedName())
.withViewResources(viewResources).withFormats(CONSOLE, TXT, HTML, XML)
.withFailureTrace(true).withFailureTraceCompression(true).withCrossReference(xref))
.useParameterConverters(parameterConverters)
// use '%' instead of '$' to identify parameters
.useStepPatternParser(new RegexPrefixCapturingPatternParser("%")).useStepMonitor(xref.getStepMonitor());
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:31,代码来源:TraderStory.java
示例13: configure
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
protected void configure() {
bind(StoryControls.class)
.toInstance(new StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false));
bind(StepPatternParser.class).toInstance(new RegexPrefixCapturingPatternParser("%"));
bind(StoryLoader.class).toInstance(new LoadFromClasspath(this.getClass().getClassLoader()));
bind(ParameterConverter.class).toInstance(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")));
bind(StoryReporterBuilder.class).toInstance(
new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, HTML, TXT, XML)
.withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass()))
.withFailureTrace(true));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:13,代码来源:AnnotatedPathRunnerUsingGuice.java
示例14: configure
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
protected void configure() {
bind(StoryControls.class).toInstance(new StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false));
bind(StepPatternParser.class).toInstance(new RegexPrefixCapturingPatternParser("%"));
bind(StoryLoader.class).toInstance(new LoadFromClasspath(this.getClass().getClassLoader()));
bind(ParameterConverter.class).toInstance(new DateConverter(new SimpleDateFormat("yyyy-MM-dd")));
bind(StoryReporterBuilder.class).toInstance(
new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, HTML, TXT, XML)
.withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass())).withFailureTrace(
true));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:12,代码来源:AnnotatedEmbedderUsingGuice.java
示例15: getConfiguration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Produces @WeldConfiguration
public Configuration getConfiguration() {
return new MostUsefulConfiguration()
.useStoryControls(new StoryControls()
.doDryRun(false)
.doSkipScenariosAfterFailure(false))
.useStepPatternParser(new RegexPrefixCapturingPatternParser("%"))
.useStoryLoader(new LoadFromClasspath(getClass().getClassLoader()))
.useStoryReporterBuilder(new StoryReporterBuilder()
.withDefaultFormats()
.withFormats(CONSOLE, HTML, TXT, XML))
.useParameterConverters(new ParameterConverters()
.addConverters(new DateConverter(new SimpleDateFormat("yyyy-MM-dd"))));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:15,代码来源:ConfigurationProducer.java
示例16: configuration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
public Configuration configuration() {
Class<? extends Embeddable> embeddableClass = this.getClass();
return new MostUsefulConfiguration().useStoryLoader(new LoadFromClasspath(embeddableClass))
.useStoryControls(new StoryControls().useStoryMetaPrefix("story_").useScenarioMetaPrefix("scenario_")) // optional prefixes
.useStoryReporterBuilder(
new StoryReporterBuilder()
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withDefaultFormats().withFormats(CONSOLE, HTML).withFailureTrace(true)
.withFailureTraceCompression(true));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:12,代码来源:ThreadsStories.java
示例17: configure
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
public void configure(MutablePicoContainer container) {
container.addComponent(StoryControls.class, new StoryControls().doDryRun(true).doSkipScenariosAfterFailure(true));
container.addComponent(FailureStrategy.class, SilentlyAbsorbingFailure.class);
container.addComponent(StepPatternParser.class, new RegexPrefixCapturingPatternParser("MyPrefix"));
container.addComponent(StoryLoader.class, new LoadFromURL());
container.addComponent(ParameterConverter.class, new DateConverter(new SimpleDateFormat("yyyy-MM-dd")));
Properties viewResources = new Properties();
viewResources.setProperty("index", "my-reports-index.ftl");
viewResources.setProperty("decorateNonHtml", "true");
container.addComponent(new StoryReporterBuilder().withDefaultFormats().withFormats(CONSOLE, HTML, TXT, XML)
.withKeywords(new LocalizedKeywords(Locale.ITALIAN)).withRelativeDirectory("my-output-directory")
.withViewResources(viewResources).withFailureTrace(true));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:14,代码来源:PicoAnnotationBuilderBehaviour.java
示例18: buildConfiguration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
/**
* Builds a Configuration instance based on annotation {@link Configure}
* found in the annotated object instance
*
* @return A Configuration instance
*/
public Configuration buildConfiguration() throws AnnotationRequired {
if (!finder.isAnnotationPresent(Configure.class)) {
// not using annotation configuration, default to most useful
// configuration
return new MostUsefulConfiguration();
}
Configuration configuration = configurationElement(finder, "using", Configuration.class);
configuration.useKeywords(configurationElement(finder, "keywords", Keywords.class));
configuration.useFailureStrategy(configurationElement(finder, "failureStrategy", FailureStrategy.class));
configuration.usePendingStepStrategy(configurationElement(finder, "pendingStepStrategy",
PendingStepStrategy.class));
configuration.useParanamer(configurationElement(finder, "paranamer", Paranamer.class));
configuration.useStoryControls(configurationElement(finder, "storyControls", StoryControls.class));
configuration.useStepCollector(configurationElement(finder, "stepCollector", StepCollector.class));
configuration.useStepdocReporter(configurationElement(finder, "stepdocReporter", StepdocReporter.class));
configuration.useStepFinder(configurationElement(finder, "stepFinder", StepFinder.class));
configuration.useStepMonitor(configurationElement(finder, "stepMonitor", StepMonitor.class));
configuration.useStepPatternParser(configurationElement(finder, "stepPatternParser", StepPatternParser.class));
configuration.useStoryLoader(configurationElement(finder, "storyLoader", StoryLoader.class));
configuration.useStoryParser(configurationElement(finder, "storyParser", StoryParser.class));
configuration.useStoryPathResolver(configurationElement(finder, "storyPathResolver", StoryPathResolver.class));
configuration
.useDefaultStoryReporter(configurationElement(finder, "defaultStoryReporter", StoryReporter.class));
configuration.useStoryReporterBuilder(configurationElement(finder, "storyReporterBuilder",
StoryReporterBuilder.class));
configuration.useViewGenerator(configurationElement(finder, "viewGenerator", ViewGenerator.class));
configuration.useParameterConverters(parameterConverters(finder));
configuration.useParameterControls(configurationElement(finder, "parameterControls", ParameterControls.class));
configuration.usePathCalculator(configurationElement(finder, "pathCalculator", PathCalculator.class));
return configuration;
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:40,代码来源:AnnotationBuilder.java
示例19: configuration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
public Configuration configuration() {
return super.configuration().useStoryControls(new StoryControls().doSkipBeforeAndAfterScenarioStepsIfGivenStory(true));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:5,代码来源:SkipBeforeAndAfterScenarioStepsIfGivenStory.java
示例20: configuration
import org.jbehave.core.embedder.StoryControls; //导入依赖的package包/类
@Override
public Configuration configuration() {
return super.configuration().useStoryControls(new StoryControls().doSkipScenariosAfterFailure(true).doSkipBeforeAndAfterScenarioStepsIfGivenStory(true));
}
开发者ID:vactowb,项目名称:jbehave-core,代码行数:5,代码来源:SkipScenariosAfterFailure.java
注:本文中的org.jbehave.core.embedder.StoryControls类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论