Search in sources :

Example 86 with JUnitCore

use of org.junit.runner.JUnitCore in project drools by kiegroup.

the class TestServiceImpl method run.

@Override
public void run(Scenario scenario, Map<String, KieSession> ksessions, TypeResolver resolver, RunListener listener) {
    try {
        long time = System.nanoTime();
        // execute the test scenario
        ScenarioRunner4JUnit runner = new ScenarioRunner4JUnit(scenario, ksessions);
        JUnitCore junit = new JUnitCore();
        junit.addListener(listener);
        junit.run(runner);
        Result result = new Result();
        listener.testRunFinished(result);
    } catch (Exception e) {
        reportUnrecoverableError("Error running scenario " + scenario.getName(), listener, e);
    }
}
Also used : JUnitCore(org.junit.runner.JUnitCore) Result(org.junit.runner.Result)

Example 87 with JUnitCore

use of org.junit.runner.JUnitCore in project jna by java-native-access.

the class WininetTest method main.

public static void main(String[] args) {
    JUnitCore jUnitCore = new JUnitCore();
    jUnitCore.run(WininetTest.class);
}
Also used : JUnitCore(org.junit.runner.JUnitCore)

Example 88 with JUnitCore

use of org.junit.runner.JUnitCore in project jna by java-native-access.

the class WininetUtilTest method main.

public static void main(String[] args) {
    JUnitCore jUnitCore = new JUnitCore();
    jUnitCore.run(WininetUtilTest.class);
}
Also used : JUnitCore(org.junit.runner.JUnitCore)

Example 89 with JUnitCore

use of org.junit.runner.JUnitCore in project junit4 by junit-team.

the class ResultTest method testRunSuccessResultCanBeSerialised.

public void testRunSuccessResultCanBeSerialised() throws Exception {
    JUnitCore runner = new JUnitCore();
    Result result = runner.run(Success.class);
    assertResultSerializable(result);
}
Also used : JUnitCore(org.junit.runner.JUnitCore) Result(org.junit.runner.Result)

Example 90 with JUnitCore

use of org.junit.runner.JUnitCore in project junit4 by junit-team.

the class ResultTest method testRunFailureResultCanBeSerialised.

public void testRunFailureResultCanBeSerialised() throws Exception {
    JUnitCore runner = new JUnitCore();
    Result result = runner.run(AnnotationTest.FailureTest.class);
    assertResultSerializable(result);
}
Also used : JUnitCore(org.junit.runner.JUnitCore) AnnotationTest(org.junit.tests.running.methods.AnnotationTest) Result(org.junit.runner.Result)

Aggregations

JUnitCore (org.junit.runner.JUnitCore)173 Result (org.junit.runner.Result)104 Test (org.junit.Test)88 Request (org.junit.runner.Request)33 Failure (org.junit.runner.notification.Failure)24 PrintableResult.testResult (org.junit.experimental.results.PrintableResult.testResult)22 RunListener (org.junit.runner.notification.RunListener)17 Description (org.junit.runner.Description)16 ArrayList (java.util.ArrayList)14 TestResult (junit.framework.TestResult)14 TextListener (org.junit.internal.TextListener)12 Runner (org.junit.runner.Runner)9 RandomizedRunner (com.carrotsearch.randomizedtesting.RandomizedRunner)7 TestSuiteModel (com.google.testing.junit.runner.model.TestSuiteModel)6 ByteArrayOutputStream (java.io.ByteArrayOutputStream)6 OutputStream (java.io.OutputStream)5 CategoryFilter (org.junit.experimental.categories.Categories.CategoryFilter)5 File (java.io.File)4 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)4 InOrder (org.mockito.InOrder)4