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


Java RunNotifier.fireTestIgnored方法代码示例

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


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

示例1: run

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
final void run(final RunNotifier notifier) {
    RunNotifier nested = new RunNotifier();
    NestedRunListener nestedListener = new NestedRunListener(notifier);
    nested.addListener(nestedListener);

    try {
        runEnabledTests(nested);
    } finally {
        nestedListener.cleanup();
    }

    for (Description disabledTest : disabledTests) {
        nested.fireTestStarted(disabledTest);
        nested.fireTestIgnored(disabledTest);
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:17,代码来源:AbstractMultiTestRunner.java

示例2: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(Spec spec, RunNotifier notifier) {
	List<Spec> specs = spec.getSuite().getSpecs();
	boolean suiteHasNoSpecs = specs.isEmpty();
	boolean isFirstSpec = specs.indexOf(spec) == 0;
	boolean isLastSpec = specs.indexOf(spec) == specs.size() -1;

	if (suiteHasNoSpecs || isFirstSpec){
		runBeforeCallbacks(spec);
	}

	if (spec.getBlock().isPresent()) {
		runBeforeEachCallbacks(spec);
		runLeaf(spec, describeChild(spec), notifier);
		runAfterEachCallbacks(spec);
	} else {
		notifier.fireTestIgnored(describeChild(spec));
	}


	if (suiteHasNoSpecs || isLastSpec){
		runAfterCallbacks(spec);
	}
}
 
开发者ID:bangarharshit,项目名称:Oleaster,代码行数:25,代码来源:OleasterRunner.java

示例3: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
	boolean isOnlyTransactional;
	try {
		isOnlyTransactional = isOnlyTransactional();
		// System.err.println("isOnlyTransactional:" + isOnlyTransactional);
	}
	catch (IOException e) {
		isOnlyTransactional = false;
	}

	if (!isOnlyTransactional) {
		super.runChild(method, notifier);
		return;
	}

	Description description = describeChild(method);
	if (method.getAnnotation(Transactional.class) == null) {
		notifier.fireTestIgnored(description);
	}
	else {
		super.runChild(method, notifier);
	}
}
 
开发者ID:tanhaichao,项目名称:leopard,代码行数:25,代码来源:IntegrationRunner.java

示例4: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild( final FrameworkMethod method, RunNotifier notifier )
{
    Description description = describeChild( method );
    if ( method.getAnnotation( Ignore.class ) != null )
    {
        notifier.fireTestIgnored( description );
    }
    else
    {
        if ( method.getAnnotation( Repeat.class ) != null && method.getAnnotation( Ignore.class ) == null )
        {
            retryCount = method.getAnnotation( Repeat.class ).retryCount();
            sleepTime = method.getAnnotation( Repeat.class ).sleepTime();
        }
        runTestUnit( methodBlock( method ), description, notifier );
    }
}
 
开发者ID:vmware,项目名称:OHMS,代码行数:19,代码来源:RetryRunner.java

示例5: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(FrameworkMethod method, RunNotifier notifier) {
  Description description = describeChild(method);

  // check Ignore first
  if (method.getAnnotation(Ignore.class) != null) {
    notify("@Ignore", description);
    notifier.fireTestIgnored(description);

  } else if (localTestsEnabled && method.getAnnotation(RemoteOnly.class) != null) {

    // if running in local mode and @RemoteOnly annotation exists, ignore
    notify("Skip @RemoteOnly", description);
    notifier.fireTestIgnored(description);
  } else if (remoteTestsEnabled && method.getAnnotation(LocalOnly.class) != null) {

    // if running in remote mode and @LocalOnly annotation exists, ignore
    notify("Skip @LocalOnly", description);
    notifier.fireTestIgnored(description);
  } else {
    // default is run in either mode
    notify("Test[" + mode + "]", description);
    super.runChild(method, notifier);
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:jetty-runtime,代码行数:26,代码来源:LocalRemoteTestRunner.java

示例6: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
public void runChild(final FrameworkMethod method, final RunNotifier notifier) {
    final Description description = describeChild(method);
    if (this.isIgnored(method)) {
        notifier.fireTestIgnored(description);
    } else {
        EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description);
        eachNotifier.fireTestStarted();
        boolean ignored = false;
        try {
            this.methodBlock(method).evaluate();
        } catch (AssumptionViolatedException ave) {
            eachNotifier.addFailedAssumption(ave);
        } catch (Throwable e) {
            if (validateForGraphComputer(e)) {
                eachNotifier.fireTestIgnored();
                logger.info(e.getMessage());
                ignored = true;
            } else
                eachNotifier.addFailure(e);
        } finally {
            if (!ignored)
                eachNotifier.fireTestFinished();
        }
    }
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:27,代码来源:GremlinProcessRunner.java

示例7: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
 protected void runChild(TestCases.TestCase testCase, RunNotifier runNotifier) {
     Description description = this.children.get( testCase );
     try {
         runNotifier.fireTestStarted( description );
         vendorSuite.beforeTest( description, context, testCase );
         TestResult result = vendorSuite.executeTest( description, context, testCase );
         switch ( result.getResult() ) {
             case SUCCESS:
                 runNotifier.fireTestFinished( description );
                 break;
             case IGNORED:
                 runNotifier.fireTestIgnored( description );
                 break;
             case ERROR:
	    runNotifier.fireTestFailure(new Failure(description, new RuntimeException(result.toStringWithLines())));
                 break;
         }
if (resultFile != null) {
             String relativePath = relativePath(folder);
             resultFile.append( String.format( "\"%s\",\"%s\",\"%s\",\"%s\",\"%s\"\n", relativePath, description.getClassName(), description.getMethodName(),
                                           result.getResult().toString(), result.getMsg() ) );
}
     } catch ( IOException e ) {
         e.printStackTrace();
     } finally {
         vendorSuite.afterTest( description, context, testCase );
         runNotifier.fireTestFinished(description);
     }
 }
 
开发者ID:dmn-tck,项目名称:tck,代码行数:31,代码来源:DmnTckRunner.java

示例8: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(ArchTestExecution child, RunNotifier notifier) {
    if (child.ignore()) {
        notifier.fireTestIgnored(describeChild(child));
    } else {
        notifier.fireTestStarted(describeChild(child));
        JavaClasses classes = cache.get().getClassesToAnalyzeFor(getTestClass().getJavaClass());
        child.evaluateOn(classes).notify(notifier);
        notifier.fireTestFinished(describeChild(child));
    }
}
 
开发者ID:TNG,项目名称:ArchUnit,代码行数:12,代码来源:ArchUnitRunner.java

示例9: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
    Description description = describeChild(method);
    if (isIgnored(method)) {
        notifier.fireTestIgnored(description);
    } else {
        try {
            runLeaf(methodBlock(method), description, notifier);
        } catch (AssumptionViolatedException ex) {
            notifier.fireTestIgnored(description);
        }
    }
}
 
开发者ID:octabase,项目名称:fnr-java,代码行数:14,代码来源:FNRCipherTest.java

示例10: run

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
public void run(RunNotifier notifier) {
	if (failure != null) {
		reportInitializationFailure(notifier, description, failure);
		return;
	}
	
	for (Map.Entry<String, Description> entry : tests.entrySet()) {
		Description testDescription = entry.getValue();
		
		FileTester tester;
		try {
			tester = createTester(entry.getKey());
		} catch (IOException e) {
			reportInitializationFailure(notifier, testDescription, e);
			continue;
		}
		
		if (tester == null) {
			notifier.fireTestIgnored(testDescription);
			continue;
		}
		
		notifier.fireTestStarted(testDescription);
		try {
			tester.runTest();
		} catch (Throwable t) {
			notifier.fireTestFailure(new Failure(testDescription, t));
		}
		notifier.fireTestFinished(testDescription);
	}
}
 
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:33,代码来源:DirectoryRunner.java

示例11: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
    Description description = describeChild(method);

    if (ConnectionRule.shouldRun()) {
        runLeaf(methodBlock(method), description, notifier);
    } else {
        notifier.fireTestIgnored(description);
    }
}
 
开发者ID:vmware,项目名称:photon-model,代码行数:11,代码来源:AutoIgnoreRunner.java

示例12: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(FrameworkMethod method, RunNotifier notifier) {
    Description description = describeMethod(method);
    if (isIgnored(method)) {
        notifier.fireTestIgnored(description);
    } else {
        runLeaf(methodBlock(method), description, notifier);
    }
}
 
开发者ID:soundvibe,项目名称:pbt4j,代码行数:10,代码来源:ParametrizedRunner.java

示例13: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
    Description description = describeChild(method);
    if (isIgnored(method)) {
        notifier.fireTestIgnored(description);
    } else {
        //read the type of testExecutor from system property. This is sent by the gradle task. By default
        //the tests are executed locally.
        TestExecutorType executionType = TestExecutorType.valueOf(System.getProperty("execType", "LOCAL"));
        invokeTest(notifier, executionType, method);
    }
}
 
开发者ID:pravega,项目名称:pravega,代码行数:13,代码来源:SystemTestRunner.java

示例14: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
	Description description= describeChild(method);
	if (isIgnored(method)) {
		notifier.fireTestIgnored(description);
	} else if (testData.containsKey(method)) {
		runLeaf(methodBlock(method), description, notifier);
	}
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:10,代码来源:AbstractParallelScenarioRunner.java

示例15: runChild

import org.junit.runner.notification.RunNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
	Description description= describeChild(method);
	if (isIgnored(method)) {
		notifier.fireTestIgnored(description);
	} else {
		runLeaf(methodBlock(method), description, notifier);
	}
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:10,代码来源:AbstractScenarioRunner.java


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