当前位置: 首页>>代码示例>>Java>>正文


Java Format类代码示例

本文整理汇总了Java中org.jbehave.core.reporters.Format的典型用法代码示例。如果您正苦于以下问题:Java Format类的具体用法?Java Format怎么用?Java Format使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Format类属于org.jbehave.core.reporters包,在下文中一共展示了Format类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override
public Configuration configuration() {
    return new MostUsefulConfiguration()
            // 找和java相同路徑的Story
            .useStoryLoader(new LoadFromClasspath(this.getClass()))
            // 設定Story行為檔佮JUnit設定檔的檔名對應
            .useStoryPathResolver(new CasePreservingResolver())
            // 有Step沒定義到視同Error
            .usePendingStepStrategy(new FailingUponPendingStep())
            // CONSOLE和TXT報表
            .useStoryReporterBuilder(
                    new StoryReporterBuilder().withDefaultFormats().withFormats(
                            Format.CONSOLE,
                            Format.TXT
                    )
            );
}
 
开发者ID:sih4sing5hong5,项目名称:Android_with_JBehave,代码行数:18,代码来源:加字串長度試驗.java

示例2: getConfiguration

import org.jbehave.core.reporters.Format; //导入依赖的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

示例3: PortalStories

import org.jbehave.core.reporters.Format; //导入依赖的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

示例4: InvoiceStories

import org.jbehave.core.reporters.Format; //导入依赖的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

示例5: runStories

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
private void runStories(String... storyPaths) {
    StoryReporterBuilder storyReporterBuilder = new StoryReporterBuilder().withDefaultFormats()
            .withCodeLocation(CodeLocations.codeLocationFromClass(ReportTransformBehaviour.class))
            .withFormats(Format.XML);

    Configuration configuration = new MostUsefulConfiguration()
            .useStoryLoader(new LoadFromClasspath(this.getClass())).useStoryReporterBuilder(storyReporterBuilder)
            .useFailureStrategy(new SilentlyAbsorbingFailure())
            .useStepCollector(new MarkUnmatchedStepsAsPending(new StepFinder(new ByLevenshteinDistance())));

    Embedder embedder = new Embedder();
    embedder.useEmbedderControls(new EmbedderControls().doGenerateViewAfterStories(false));
    embedder.useConfiguration(configuration);
    embedder.useCandidateSteps(new InstanceStepsFactory(configuration, new MySteps()).createCandidateSteps());
    embedder.useMetaFilters(asList("-skip true"));

    try {
        embedder.runStoriesAsPaths(asList(storyPaths));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:vactowb,项目名称:jbehave-core,代码行数:23,代码来源:ReportTransformBehaviour.java

示例6: createConfig

import org.jbehave.core.reporters.Format; //导入依赖的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

示例7: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override
public Configuration configuration() {
    return new MostUsefulConfiguration()
        .useStoryLoader(new LoadFromClasspath(this.getClass()))
        .useStoryReporterBuilder(new StoryReporterBuilder()
            .withDefaultFormats()
            .withFormats(Format.CONSOLE, Format.TXT));
}
 
开发者ID:aalmiray,项目名称:javatrove,代码行数:9,代码来源:HelloServiceProducesDefaultGreeting.java

示例8: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override
public Configuration configuration() {
    return new MostUsefulConfiguration()
            .useStoryReporterBuilder(
                    new StoryReporterBuilder()
                            .withFormats(Format.STATS)
            );
}
 
开发者ID:BiBiServ,项目名称:jobproxy,代码行数:9,代码来源:CLIStories.java

示例9: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override 
public Configuration configuration() { 
    return new MostUsefulConfiguration().usePendingStepStrategy(new FailingUponPendingStep()).useStoryReporterBuilder(
            new StoryReporterBuilder()
            .withDefaultFormats()
            .withPathResolver(new ResolveToPackagedName())
            .withFormats(Format.HTML)
            .withFailureTrace(true)
            .withFailureTraceCompression(true));
}
 
开发者ID:wmaop,项目名称:wm-jbehave,代码行数:11,代码来源:JBehaveRunner.java

示例10: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override
public final Configuration configuration() {
    return new MostUsefulConfiguration()
            .useStoryLoader(new LoadFromClasspath(this.getClass()))
            .usePendingStepStrategy(new FailingUponPendingStep())
            .useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats()
                    .withFormats(Format.CONSOLE));
}
 
开发者ID:2gis,项目名称:cartoshka,代码行数:9,代码来源:ParserTest.java

示例11: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override 
public Configuration configuration() { 
	return new MostUsefulConfiguration()            
			.useStoryLoader(
					new LoadFromClasspath(this.getClass().getClassLoader()))
            .useStoryReporterBuilder(
                    new StoryReporterBuilder()
                        .withDefaultFormats()
                        .withFormats(Format.HTML, Format.CONSOLE)
                        .withRelativeDirectory("jbehave-report")
            );
}
 
开发者ID:davidholiday,项目名称:java-compression-experiment,代码行数:13,代码来源:JBehaveRunner_Test.java

示例12: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override
public Configuration configuration() {
    return new MostUsefulConfiguration()
            .useStoryLoader(new LoadFromClasspath(this.getClass()))
            .useStoryReporterBuilder(new StoryReporterBuilder()
                    .withCodeLocation(codeLocationFromClass(this.getClass()))
                    .withFormats(Format.CONSOLE));

}
 
开发者ID:WalterInSH,项目名称:unit-testing,代码行数:10,代码来源:CoreStoriesTest.java

示例13: configuration

import org.jbehave.core.reporters.Format; //导入依赖的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

示例14: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override
public Configuration configuration() {
	LocalizedKeywords keywords = new LocalizedKeywords(new Locale("de"));
	return new MostUsefulConfiguration()
			.useKeywords(keywords)
			.useStepCollector(new MarkUnmatchedStepsAsPending(keywords))
			.useStoryParser(new RegexStoryParser(keywords))

			.useStoryLoader(new LoadFromClasspath(this.getClass()))
			.useFailureStrategy(new RethrowingFailure())
			.useStoryReporterBuilder(
					new StoryReporterBuilder().withKeywords(keywords)
							.withFormats(Format.HTML, Format.ANSI_CONSOLE)
							.withFailureTrace(true));
}
 
开发者ID:ewolff,项目名称:user-registration-V2,代码行数:16,代码来源:UserRegistrationScenarios.java

示例15: configuration

import org.jbehave.core.reporters.Format; //导入依赖的package包/类
@Override
public final Configuration configuration() {
    return new MostUsefulConfiguration()
            // where to find the stories
            .useStoryLoader(new LoadFromClasspath(this.getClass()))
                    // Fails if Steps are not implemented
            .usePendingStepStrategy(new FailingUponPendingStep())
                    // CONSOLE and HTML reporting
            .useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats()
                    .withFormats(Format.CONSOLE, Format.HTML));
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:12,代码来源:BasicJBehaveTest.java


注:本文中的org.jbehave.core.reporters.Format类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。