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


Java RuntimeOptions.reporter方法代码示例

本文整理汇总了Java中cucumber.runtime.RuntimeOptions.reporter方法的典型用法代码示例。如果您正苦于以下问题:Java RuntimeOptions.reporter方法的具体用法?Java RuntimeOptions.reporter怎么用?Java RuntimeOptions.reporter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cucumber.runtime.RuntimeOptions的用法示例。


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

示例1: CucumberLoadRunner

import cucumber.runtime.RuntimeOptions; //导入方法依赖的package包/类
/**
 * Constructor called by JUnit.
 *
 * @param clazz the class with the @RunWith annotation.
 * @throws java.io.IOException                         if there is a problem
 * @throws org.junit.runners.model.InitializationError if there is another problem
 */
public CucumberLoadRunner(Class clazz) throws InitializationError, IOException {
    super(clazz);

    System.setProperty(cukesProperty(CONTEXT_INFLATING_ENABLED), "false");
    System.setProperty(cukesProperty(ASSERTIONS_DISABLED), "true");
    System.setProperty(cukesProperty(LOADRUNNER_FILTER_BLOCKS_REQUESTS), "true");

    filter = SingletonObjectFactory.instance().getInstance(LoadRunnerFilter.class);

    ClassLoader classLoader = clazz.getClassLoader();
    Assertions.assertNoCucumberAnnotatedMethods(clazz);

    RuntimeOptionsFactory runtimeOptionsFactory = new RuntimeOptionsFactory(clazz);
    RuntimeOptions runtimeOptions = runtimeOptionsFactory.create();

    ResourceLoader resourceLoader = new MultiLoader(classLoader);
    runtime = createRuntime(resourceLoader, classLoader, runtimeOptions);

    final List<CucumberFeature> cucumberFeatures = runtimeOptions.cucumberFeatures(resourceLoader);
    jUnitReporter = new JUnitReporter(runtimeOptions.reporter(classLoader),
        runtimeOptions.formatter(classLoader), runtimeOptions.isStrict(), new JUnitOptions(runtimeOptions.getJunitOptions()));
    addChildren(cucumberFeatures);
}
 
开发者ID:ctco,项目名称:cukes,代码行数:31,代码来源:CucumberLoadRunner.java

示例2: setUpClass

import cucumber.runtime.RuntimeOptions; //导入方法依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setUpClass() throws Exception {
    runtimeOptions = new KarateRuntimeOptions(getClass());
    TestNgReporter reporter = new TestNgReporter(System.out);
    RuntimeOptions ro = runtimeOptions.getRuntimeOptions();
    resultListener = new FeatureResultListener(ro.reporter(runtimeOptions.getClassLoader()), ro.isStrict());
}
 
开发者ID:intuit,项目名称:karate,代码行数:8,代码来源:KarateRunner.java

示例3: EscCucumber

import cucumber.runtime.RuntimeOptions; //导入方法依赖的package包/类
/**
 * Constructor called by JUnit.
 *
 * @param clazz
 *            the class with the @RunWith annotation.
 * @throws java.io.IOException
 *             if there is a problem
 * @throws org.junit.runners.model.InitializationError
 *             if there is another problem
 */
public EscCucumber(Class<?> clazz) throws InitializationError, IOException {
    super(clazz);
    ClassLoader classLoader = clazz.getClassLoader();
    Assertions.assertNoCucumberAnnotatedMethods(clazz);

    final List<String> argList = new ArrayList<String>();
    final EscCucumberArgs args = clazz.getAnnotation(EscCucumberArgs.class);
    if (args == null) {
        argList.add("NONE");
    } else {
        argList.addAll(EscSpiUtils.asList(args.value()));
    }

    RuntimeOptionsFactory runtimeOptionsFactory = new RuntimeOptionsFactory(
            clazz);
    RuntimeOptions runtimeOptions = runtimeOptionsFactory.create();
    ResourceLoader resourceLoader = new MultiLoader(classLoader);
    ClassFinder classFinder = new ResourceLoaderClassFinder(resourceLoader,
            classLoader);
    runtime = new Runtime(resourceLoader, classFinder, classLoader,
            runtimeOptions);
    jUnitReporter = new JUnitReporter(runtimeOptions.reporter(classLoader),
            runtimeOptions.formatter(classLoader),
            runtimeOptions.isStrict());

    for (final String arg : argList) {
        addChildren(runtimeOptions.cucumberFeatures(resourceLoader), arg);

    }

}
 
开发者ID:fuinorg,项目名称:event-store-commons,代码行数:42,代码来源:EscCucumber.java

示例4: ThreadAwareReporter

import cucumber.runtime.RuntimeOptions; //导入方法依赖的package包/类
private ThreadAwareReporter(ThreadAwareFormatter threadAwareWrappedFormatter, 
		final ClassLoader classLoader,
		final RuntimeOptions runtimeOptions) {
	this.threadAwareWrappedFormatter = threadAwareWrappedFormatter;
	this.classLoader = classLoader;
	this.runtimeOptions = runtimeOptions;
	threadLocal = new ThreadLocal<Reporter>() {
      		@Override
      		protected Reporter initialValue() {
      			return runtimeOptions.reporter(classLoader);
      		}
      	};
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:14,代码来源:ParameterizedCucumber.java


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