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


Java Reporter类代码示例

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


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

示例1: afterStep

import gherkin.formatter.Reporter; //导入依赖的package包/类
private static StepResult afterStep(Reporter reporter, Step step, Match match, Result result, String feature, KarateBackend backend) {
    boolean isKarateReporter = reporter instanceof KarateReporter;
    CallContext callContext = backend.getCallContext();
    if (isKarateReporter) { // report all the things !           
        KarateReporter karateReporter = (KarateReporter) reporter;
        karateReporter.karateStep(step, match, result, callContext);
    } else if (!backend.isCalled() && reporter != null) { // can be null for server
        reporter.match(match);
        reporter.result(result);
    }
    StepResult stepResult = new StepResult(step, result);
    backend.afterStep(feature, stepResult);
    return stepResult;
}
 
开发者ID:intuit,项目名称:karate,代码行数:15,代码来源:CucumberUtils.java

示例2: buildBackendWorlds

import gherkin.formatter.Reporter; //导入依赖的package包/类
@Override
public void buildBackendWorlds(Reporter reporter, Set<Tag> tags, Scenario scenario) {
    backend.buildWorld();
    // tags only work at top-level, this does not apply to 'called' features
    CucumberUtils.resolveTagsAndTagValues(backend, tags);
    // 'karate.info' also does not apply to 'called' features
    CucumberUtils.initScenarioInfo(scenario, backend);
    scenarioResult = new CucumberScenarioImpl(reporter, tags, scenario);
}
 
开发者ID:intuit,项目名称:karate,代码行数:10,代码来源:KarateRuntime.java

示例3: createSingleRerunFile

import gherkin.formatter.Reporter; //导入依赖的package包/类
private Path createSingleRerunFile(List<CucumberFeature> rerunFeatures) throws IOException {
	Path rerunPath = Files.createTempFile("parallelCukes", ".rerun");
	rerunPath.toFile().deleteOnExit();
	PluginFactory pluginFactory = new PluginFactory();
	Object rerunFormatter = pluginFactory.create("rerun:" + rerunPath);
	RerunFileBuilder rerunFileBuilder = new RerunFileBuilder((Formatter) rerunFormatter, (Reporter) rerunFormatter);
	for (CucumberFeature feature : rerunFeatures)
		rerunFileBuilder.addFeature(feature);
	rerunFileBuilder.close();
	return rerunPath;
}
 
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:12,代码来源:FeatureSplitter.java

示例4: RerunFileBuilder

import gherkin.formatter.Reporter; //导入依赖的package包/类
public RerunFileBuilder(Formatter formatter, Reporter reporter) {
	/*
	 * Both of these should point to a single concrete formatter instance
	 * This is passed twice so we can access both of its interfaces methods
	 * All the cucumber concrete formatters are non-public so can't be used
	 * directly
	 */
	this.formatter = formatter;
	this.reporter = reporter;
}
 
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:11,代码来源:RerunFileBuilder.java

示例5: RestJUnitReporter

import gherkin.formatter.Reporter; //导入依赖的package包/类
public RestJUnitReporter(Reporter reporter, Formatter formatter, boolean strict,
   RestRuntime runtime) {
   super(reporter, formatter, strict);
   this.runtime = runtime;
   results = new HashMap<String, String>();
   features = new HashMap<String, CucumberFeature>();
}
 
开发者ID:LiamHayes1,项目名称:rest-cucumber,代码行数:8,代码来源:RestJUnitReporter.java

示例6: aroundAddIgnoreTagPointcut

import gherkin.formatter.Reporter; //导入依赖的package包/类
/**
 * @param pjp ProceedingJoinPoint
 * @param formatter formatter
 * @param reporter reporter
 * @param runtime runtime
 * @throws Throwable exception
 */
@Around(value = "addIgnoreTagPointcutScenario(formatter, reporter, runtime)")
public void aroundAddIgnoreTagPointcut(ProceedingJoinPoint pjp, Formatter formatter, Reporter reporter,
                                       Runtime runtime) throws Throwable {

    CucumberScenario scen = (CucumberScenario) pjp.getThis();
    Scenario scenario = (Scenario) scen.getGherkinModel();

    Class<?> sc = scen.getClass();
    Method tt = sc.getSuperclass().getDeclaredMethod("tagsAndInheritedTags");
    tt.setAccessible(true);
    Set<Tag> tags = (Set<Tag>) tt.invoke(scen);

    List<String> tagList = new ArrayList<>();
    String scenarioName = scenario.getName();
    tagList = tags.stream().map(Tag::getName).collect(Collectors.toList());

    ignoreReasons exitReason = manageTags(tagList, scenarioName);
    if (exitReason.equals(NOREASON)) {
        logger.error("Scenario '" + scenario.getName() + "' failed due to wrong use of the @ignore tag. ");
    }

    if ((!(exitReason.equals(NOTIGNORED))) && (!(exitReason.equals(NOREASON)))) {
        runtime.buildBackendWorlds(reporter, tags, scenario.getName());
        formatter.startOfScenarioLifeCycle(scenario);
        formatter.endOfScenarioLifeCycle(scenario);
        runtime.disposeBackendWorlds();
    } else {
        pjp.proceed();
    }
}
 
开发者ID:Stratio,项目名称:bdt,代码行数:38,代码来源:IgnoreTagAspect.java

示例7: execute

import gherkin.formatter.Reporter; //导入依赖的package包/类
public void execute(ClassLoader classLoader, ResultCollector rc) {
    ResourceLoader resourceLoader = new MultiLoader(classLoader);

    // TODO threadlocal runtime cache using junitTestClass as a key
    ClassFinder classFinder = new ResourceLoaderClassFinder(resourceLoader, classLoader);
    RuntimeOptionsFactory runtimeOptionsFactory = new RuntimeOptionsFactory(junitTestClass);
    RuntimeOptions runtimeOptions = runtimeOptionsFactory.create();
    Runtime runtime = new Runtime(resourceLoader, classFinder, classLoader, runtimeOptions);
    Reporter reporter = new ReporterAdapter(rc, getDescription());
    LOGGER.fine("Executing cucumber \"" + scenario.getVisualName() + "\"");
    scenario.run(nullFormatter(), reporter, runtime);
}
 
开发者ID:alexvictoor,项目名称:pitest-cucumber-plugin,代码行数:13,代码来源:ScenarioTestUnit.java

示例8: should_run_scenario_and_call_collector_when_ran

import gherkin.formatter.Reporter; //导入依赖的package包/类
@Test
public void should_run_scenario_and_call_collector_when_ran() {
    // given
    ScenarioTestUnit testUnit = new ScenarioTestUnit(HideFromJUnit.Concombre.class, scenario);

    // when
    testUnit.execute(getClass().getClassLoader(), resultCollector);

    // then
    verify(scenario, times(1)).run(any(Formatter.class), any(Reporter.class), any(Runtime.class));
}
 
开发者ID:alexvictoor,项目名称:pitest-cucumber-plugin,代码行数:12,代码来源:ScenarioTestUnitTest.java

示例9: ThreadAwareReporter

import gherkin.formatter.Reporter; //导入依赖的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

示例10: after

import gherkin.formatter.Reporter; //导入依赖的package包/类
@Override
public void after(Match arg0, Result arg1) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.after(arg0, arg1);
	}
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:8,代码来源:ParameterizedCucumber.java

示例11: before

import gherkin.formatter.Reporter; //导入依赖的package包/类
@Override
public void before(Match arg0, Result arg1) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.before(arg0, arg1);
	}
	
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:9,代码来源:ParameterizedCucumber.java

示例12: embedding

import gherkin.formatter.Reporter; //导入依赖的package包/类
@Override
public void embedding(String arg0, byte[] arg1) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.embedding(arg0, arg1);
	}
	
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:9,代码来源:ParameterizedCucumber.java

示例13: match

import gherkin.formatter.Reporter; //导入依赖的package包/类
@Override
public void match(Match arg0) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.match(arg0);
	}
	
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:9,代码来源:ParameterizedCucumber.java

示例14: result

import gherkin.formatter.Reporter; //导入依赖的package包/类
@Override
public void result(Result arg0) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.result(arg0);
	}
	
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:9,代码来源:ParameterizedCucumber.java

示例15: write

import gherkin.formatter.Reporter; //导入依赖的package包/类
@Override
public void write(String arg0) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.write(arg0);
	}
	
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:9,代码来源:ParameterizedCucumber.java


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