JUnit errors

http://junit.org

A unit testing framework for Java

Documented:

Top patterns

  1. Assert.fail() has thrown an AssertionError

    My guess is there is some kind of static state in the code being tested or in the test itself, so the tests aren't isolated. Adding the test changes the test order. In any case, your best course of action is to use the debugger to see why the tests fail.

  2. Assert.failNotEquals() has thrown an AssertionError
    No solution
  3. Assert.assertTrue() has thrown an AssertionError

    Check your pattern declaration or check your assert declaration.


DescriptionException TypeEntry MethodWeb pages
AssertionErrorAssert.fail4343
AssertionErrorAssert.failNotEquals1992
AssertionErrorAssert.assertTrue1936
AssertionErrorAssert.assertEquals1848
AssertionErrorAssert.assertEquals1618
AssertionFailedErrorAssert.fail999
AssertionErrorAssert.assertTrue716
ComparisonFailureAssert.assertEquals716
AssertionErrorAssert.assertEquals617
ComparisonFailureAssert.assertEquals610
AssertionFailedErrorAssert.failNotEquals359
AssertionFailedErrorAssert.assertEquals351
AssertionFailedErrorAssert.assertTrue350
AssertionFailedErrorAssert.assertEquals315
AssertionErrorAssert.assertThat225
ComparisonFailureAssert.assertEquals219
AssertionErrorAssert.assertNotNull201
AssertionErrorAssert.assertFalse183
ComparisonFailureAssert.assertEquals181
AssertionFailedErrorAssert.assertEquals166
AssertionErrorAssert.assertThat163
AssertionErrorAssert.assertNotNull140
AssertionErrorAssert.assertFalse130
AssertionFailedErrorAssert.assertTrue115
AssertionErrorAssert.assertNull79
AssertionErrorAssert.failNotNull79
AssertionFailedErrorAssert.assertNotNull77
ExceptionParentRunner.validate72
ExceptionExpectException.evaluate72
ExceptionParentRunner.<init>68
ExceptionBlockJUnit4ClassRunner.<init>63
AssertionErrorExpectException.evaluate62
AssertionFailedErrorAssert.assertNotNull56
ComparisonFailureTestCase.assertEquals54
ExceptionFilterRequest.getRunner53
AssertionErrorAssert.assertThat51
AssertionErrorAssert.assertNull48
AssertionErrorAssert.fail46
AssertionFailedErrorTestCase.assertEquals45
ServiceLookupExceptionBlockJUnit4ClassRunner.methodBlock44
ExceptionRunnerBuilder.safeRunnerForClass44
ExceptionAllDefaultPossibilitiesBuilder.runnerForClass43
AssertionErrorAssert.assertThat42
AssertionFailedErrorTestResult$1.protect40
AssertionFailedErrorTestCase.runBare40
AssertionFailedErrorTestResult.runProtected39
AssertionFailedErrorTestCase.run38
AssertionFailedErrorTestCase.assertEquals38
AssertionFailedErrorTestSuite.run36
ExceptionRunnerBuilder.safeRunnerForClass35
Package nameClass namePatterns foundSolution coverageDescription coverage
org.junit.runnersParentRunner444
junit.frameworkTestSuite129
org.junit.internal.requestsClassRequest116
org.junitAssert53
org.junit.runnersBlockJUnit4ClassRunner43
org.junit.runnersParentRunner$242
junit.frameworkTestCase41
org.junit.runnerJUnitCore30
org.junit.runners.modelRunnerBuilder28
junit.frameworkAssert25
org.junit.internal.runners.statementsInvokeMethod21
org.junit.internal.runnersJUnit4ClassRunner12
org.junit.internal.runnersJUnit38ClassRunner12
org.junit.internal.runners.modelReflectiveCallable11
org.junit.rulesRunRules10
org.junit.internal.buildersAllDefaultPossibilitiesBuilder10
org.junit.runners.modelFrameworkMethod10
org.junit.runnersParentRunner$39
org.junit.internal.requestsFilterRequest9
org.junit.internal.runners.statementsRunBefores9
org.junit.runnersSuite8
org.junit.runner.notificationRunNotifier8
junit.frameworkTestResult8
org.junitAssume7
org.junit.runners.modelFrameworkMethod$17
org.junit.runnersParentRunner$16
org.junit.runnersParameterized6
org.junit.internal.runners.statementsRunAfters6
junit.extensionsTestSetup6
junit.frameworkJUnit4TestAdapter5
org.junit.internal.runnersMethodValidator5
org.junit.internal.runners.statementsExpectException5
org.junit.runnerRunner5
org.junit.internal.runnersMethodRoadie4
org.junit.rulesTemporaryFolder4
org.junit.internal.buildersAnnotatedBuilder4
org.junit.internal.buildersSuiteMethodBuilder4
org.junit.runnerRequest3
org.junit.experimental.categoriesCategories3
org.junit.rulesTestWatcher$13
org.junit.internal.runnersErrorReportingRunner3
org.junit.rulesExpectedException3
org.junit.runner.manipulationFilter3
junit.frameworkTestResult$12
org.junit.internal.runnersTestClassMethodsRunner2
org.junit.rulesExpectedException$ExpectedExceptionStatement2
org.junit.internal.runnersTestMethodRunner2
org.junit.runners.modelTestClass2
org.junit.rulesVerifier$12
org.junit.internal.runnersClassRoadie2
Package nameClass nameMethod namePatterns foundSolution coverage
org.junit.runnersParentRunnerrun412
junit.frameworkTestSuiterun121
org.junit.internal.requestsClassRequestgetRunner116
org.junit.runnersParentRunner$2evaluate42
org.junit.runnerJUnitCorerun26
org.junit.runners.modelRunnerBuildersafeRunnerForClass25
org.junit.runnersBlockJUnit4ClassRunner<init>22
org.junit.internal.runners.statementsInvokeMethodevaluate21
junit.frameworkTestCaserunBare14
org.junit.runnersBlockJUnit4ClassRunnerrunChild13
junit.frameworkTestCaserun12
org.junit.internal.runnersJUnit38ClassRunnerrun12
org.junit.internal.runners.modelReflectiveCallablerun11
org.junitAssertassertEquals11
org.junit.rulesRunRulesevaluate10
org.junit.internal.buildersAllDefaultPossibilitiesBuilderrunnerForClass10
org.junit.runnersParentRunnervalidate9
junit.frameworkAssertassertEquals9
org.junit.internal.runners.statementsRunBeforesevaluate9
org.junit.internal.requestsFilterRequestgetRunner9
org.junit.runnersParentRunner$3run9
org.junitAssertfail8
org.junit.runners.modelFrameworkMethodinvokeExplosively8
org.junit.runnersParentRunner<init>7
org.junitAssertassertThat7
org.junit.runners.modelFrameworkMethod$1runReflectiveCall7
org.junit.runnersParentRunner$1schedule6
org.junit.internal.runners.statementsRunAftersevaluate6
junit.extensionsTestSetuprun6
org.junitAssertassertTrue5
org.junit.runnersSuite<init>5
org.junit.runner.notificationRunNotifierfireTestStarted5
junit.frameworkTestCaseassertEquals5
org.junit.internal.runnersJUnit4ClassRunnerrun5
org.junit.internal.runners.statementsExpectExceptionevaluate5
junit.frameworkAssertfail5
org.junit.runnersParentRunnerrunLeaf4
junit.frameworkJUnit4TestAdapterrun4
org.junit.internal.buildersAnnotatedBuilderbuildRunner4
org.junitAssertassertNull4
junit.frameworkAssertassertTrue4
junit.frameworkTestResultrun4
org.junitAssertassertArrayEquals4
org.junit.internal.buildersSuiteMethodBuilderhasSuiteMethod4
org.junit.internal.runnersErrorReportingRunnergetDescription3
org.junitAssertassertNotEquals3
junit.frameworkTestCaserunTest3
org.junit.runnersSuiterunChild3
org.junit.runnersParentRunnerrunChildren3
org.junit.runners.modelRunnerBuilderrunners3
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
org.junit.runnersParentRunnerrunAssertionError197
junit.frameworkTestSuiterunAssertionFailedError60
org.junit.runnersParentRunnerrunNullPointerException37
org.junit.runnersParentRunnerrunIllegalArgumentException31
org.junit.runnersParentRunnerrunJSONException29
org.junit.internal.requestsClassRequestgetRunnerNoClassDefFoundError24
org.junit.internal.requestsClassRequestgetRunnerIllegalStateException19
org.junit.internal.requestsClassRequestgetRunnerException18
org.junit.internal.requestsClassRequestgetRunnerCucumberException17
org.junit.runnersParentRunner$2evaluateIllegalStateException16
org.junit.runnersParentRunnerrunClientHandlerException16
org.junit.runnersParentRunnerrunWebServiceException16
org.junit.runnersParentRunnerrunRuntimeException15
org.junit.internal.requestsClassRequestgetRunnerNoSuchMethodError12
org.junit.runnersBlockJUnit4ClassRunner<init>Exception12
org.junit.runnersParentRunnerrunIllegalStateException11
org.junit.runnersParentRunnervalidateException8
org.junit.runners.modelRunnerBuildersafeRunnerForClassException8
org.junit.runnersParentRunnerrunNoSuchMethodError7
junit.frameworkAssertassertEqualsAssertionFailedError7
org.junitAssertassertEqualsAssertionError7
org.junit.runnerJUnitCorerunIllegalStateException7
org.junit.internal.runners.modelReflectiveCallablerunIllegalStateException6
org.junit.runnersBlockJUnit4ClassRunnerrunChildAssertionError6
org.junit.runnersParentRunnerrunNoClassDefFoundError6
org.junit.internal.buildersAllDefaultPossibilitiesBuilderrunnerForClassException5
org.junit.internal.requestsFilterRequestgetRunnerException5
junit.frameworkTestSuiterunJUnitFatalLaunchException5
org.junit.runners.modelRunnerBuildersafeRunnerForClassNoClassDefFoundError5
org.junit.internal.requestsClassRequestgetRunnerVerifyError5
org.junit.runnerJUnitCorerunException4
org.junit.rulesRunRulesevaluateAssertionError4
org.junit.internal.runners.statementsInvokeMethodevaluateAssertionError4
org.junit.runners.modelRunnerBuildersafeRunnerForClassIllegalArgumentException4
junit.frameworkTestSuiterunUnableToCompleteException4
org.junitAssertassertNullAssertionError4
org.junit.runnersParentRunner<init>Exception4
org.junitAssertassertThatAssertionError4
org.junit.runnersBlockJUnit4ClassRunner<init>NoClassDefFoundError4
org.junit.runnersParentRunner$2evaluateAssertionError3
org.junit.internal.buildersAllDefaultPossibilitiesBuilderrunnerForClassCucumberException3
org.junit.runnersParentRunnerrunArrayIndexOutOfBoundsException3
junit.frameworkTestSuiterunIllegalArgumentException3
junit.frameworkTestSuiterunNullPointerException3
org.junit.runnerJUnitCorerunNoClassDefFoundError3
org.junitAssertassertNotEqualsAssertionError3
junit.frameworkTestCaseassertEqualsAssertionFailedError3
org.junitAssertassertThatNoSuchMethodError3
junit.extensionsTestSetuprunAssertionFailedError3
org.junit.runnersParentRunner$2evaluateCucumberException3