JUnit errors

A unit testing framework for Java

http://junit.org
Solution coverage:
Summary coverage:

Top patterns

  1. JUnit test assertion failed

    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

JUnit test assertion failed

java.lang.AssertionError
org.junit.Assert.fail
4422Web pages
1Solution
AssertionErrorAssert.fail4422

Assert.failNotEquals() has thrown an AssertionError

java.lang.AssertionError
1 frames hidden
org.junit.Assert.failNotEquals
2040Web pages
AssertionErrorAssert.failNotEquals2040

Assert.assertTrue() has thrown an AssertionError

java.lang.AssertionError
1 frames hidden
org.junit.Assert.assertTrue
1974Web pages
1Solution
AssertionErrorAssert.assertTrue1974

Assert.assertEquals() has thrown an AssertionError

java.lang.AssertionError
2 frames hidden
org.junit.Assert.assertEquals
1878Web pages
AssertionErrorAssert.assertEquals1878

Assert.assertEquals() has thrown an AssertionError

java.lang.AssertionError
3 frames hidden
org.junit.Assert.assertEquals
1650Web pages
AssertionErrorAssert.assertEquals1650

Assert.fail() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
junit.framework.Assert.fail
1001Web pages
AssertionFailedErrorAssert.fail1001

JUnit test assertion failed

java.lang.AssertionError
2 frames hidden
org.junit.Assert.assertTrue
741Web pages
1Solution
AssertionErrorAssert.assertTrue741

Assert.assertEquals() has thrown a ComparisonFailure

org.junit.ComparisonFailure
org.junit.Assert.assertEquals
732Web pages
ComparisonFailureAssert.assertEquals732

Assert.assertEquals() has thrown a ComparisonFailure

org.junit.ComparisonFailure
1 frames hidden
org.junit.Assert.assertEquals
617Web pages
ComparisonFailureAssert.assertEquals617

Assert.assertEquals() has thrown an AssertionError

java.lang.AssertionError
4 frames hidden
org.junit.Assert.assertEquals
599Web pages
AssertionErrorAssert.assertEquals599

Assert.failNotEquals() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
1 frames hidden
junit.framework.Assert.failNotEquals
369Web pages
AssertionFailedErrorAssert.failNotEquals369

Assert.assertEquals() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
2 frames hidden
junit.framework.Assert.assertEquals
362Web pages
AssertionFailedErrorAssert.assertEquals362

Assert.assertTrue() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
1 frames hidden
junit.framework.Assert.assertTrue
351Web pages
AssertionFailedErrorAssert.assertTrue351

Assert.assertEquals() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
3 frames hidden
junit.framework.Assert.assertEquals
325Web pages
AssertionFailedErrorAssert.assertEquals325

Assert.assertEquals() has thrown a ComparisonFailure

junit.framework.ComparisonFailure
junit.framework.Assert.assertEquals
226Web pages
ComparisonFailureAssert.assertEquals226

Assert.assertThat() has thrown an AssertionError

java.lang.AssertionError
1 frames hidden
org.junit.Assert.assertThat
226Web pages
AssertionErrorAssert.assertThat226

Assert.assertNotNull() has thrown an AssertionError

java.lang.AssertionError
2 frames hidden
org.junit.Assert.assertNotNull
213Web pages
AssertionErrorAssert.assertNotNull213

Assert.assertEquals() has thrown a ComparisonFailure

junit.framework.ComparisonFailure
1 frames hidden
junit.framework.Assert.assertEquals
190Web pages
ComparisonFailureAssert.assertEquals190

Assert.assertFalse() has thrown an AssertionError

java.lang.AssertionError
2 frames hidden
org.junit.Assert.assertFalse
188Web pages
AssertionErrorAssert.assertFalse188

Assert.assertEquals() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
4 frames hidden
junit.framework.Assert.assertEquals
178Web pages
AssertionFailedErrorAssert.assertEquals178

Assert.assertThat() has thrown an AssertionError

java.lang.AssertionError
2 frames hidden
org.junit.Assert.assertThat
163Web pages
AssertionErrorAssert.assertThat163

Assert.assertNotNull() has thrown an AssertionError

java.lang.AssertionError
3 frames hidden
org.junit.Assert.assertNotNull
153Web pages
AssertionErrorAssert.assertNotNull153

Assert.assertFalse() has thrown an AssertionError

java.lang.AssertionError
3 frames hidden
org.junit.Assert.assertFalse
135Web pages
AssertionErrorAssert.assertFalse135

Assert.assertTrue() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
2 frames hidden
junit.framework.Assert.assertTrue
115Web pages
AssertionFailedErrorAssert.assertTrue115

Assert.failNotNull() has thrown an AssertionError

java.lang.AssertionError
1 frames hidden
org.junit.Assert.failNotNull
80Web pages
AssertionErrorAssert.failNotNull80

Assert.assertNull() has thrown an AssertionError

java.lang.AssertionError
2 frames hidden
org.junit.Assert.assertNull
80Web pages
AssertionErrorAssert.assertNull80

Assert.assertNotNull() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
2 frames hidden
junit.framework.Assert.assertNotNull
79Web pages
AssertionFailedErrorAssert.assertNotNull79

ExpectException.evaluate() has thrown an Exception

java.lang.Exception
org.junit.internal.runners.statements.ExpectException.evaluate
73Web pages
ExceptionExpectException.evaluate73

BlockJUnit4ClassRunner.validateInstanceMethods() has thrown an Exception

java.lang.Exception
org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods
73Web pages
ExceptionBlockJUnit4ClassRunner.validateInstanceMethods73

ParentRunner.validate() has thrown an Exception

java.lang.Exception
2 frames hidden
org.junit.runners.ParentRunner.validate
72Web pages
ExceptionParentRunner.validate72

ParentRunner.<init>() has thrown an Exception

java.lang.Exception
3 frames hidden
org.junit.runners.ParentRunner.<init>
69Web pages
ExceptionParentRunner.<init>69

BlockJUnit4ClassRunner.<init>() has thrown an Exception

java.lang.Exception
4 frames hidden
org.junit.runners.BlockJUnit4ClassRunner.<init>
64Web pages
ExceptionBlockJUnit4ClassRunner.<init>64

TestCase.assertEquals() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
5 frames hidden
junit.framework.TestCase.assertEquals
61Web pages
AssertionFailedErrorTestCase.assertEquals61

TestCase.assertEquals() has thrown a ComparisonFailure

junit.framework.ComparisonFailure
2 frames hidden
junit.framework.TestCase.assertEquals
60Web pages
ComparisonFailureTestCase.assertEquals60

ExpectException.evaluate() has thrown an AssertionError

java.lang.AssertionError
org.junit.internal.runners.statements.ExpectException.evaluate
60Web pages
AssertionErrorExpectException.evaluate60

Assert.assertNotNull() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
3 frames hidden
junit.framework.Assert.assertNotNull
57Web pages
AssertionFailedErrorAssert.assertNotNull57

FilterRequest.getRunner() has thrown an Exception

java.lang.Exception
org.junit.internal.requests.FilterRequest.getRunner
52Web pages
ExceptionFilterRequest.getRunner52

Assert.assertThat() has thrown an AssertionError

java.lang.AssertionError
org.junit.Assert.assertThat
51Web pages
AssertionErrorAssert.assertThat51

Assert.assertNull() has thrown an AssertionError

java.lang.AssertionError
3 frames hidden
org.junit.Assert.assertNull
49Web pages
AssertionErrorAssert.assertNull49

BlockJUnit4ClassRunner.methodBlock() has thrown a ServiceLookupException

org.ops4j.pax.swissbox.tracker.ServiceLookupException
8 frames hidden
org.junit.runners.BlockJUnit4ClassRunner.methodBlock
44Web pages
ServiceLookupExceptionBlockJUnit4ClassRunner.methodBlock44

RunnerBuilder.safeRunnerForClass() has thrown an Exception

java.lang.Exception
6 frames hidden
org.junit.runners.model.RunnerBuilder.safeRunnerForClass
44Web pages
ExceptionRunnerBuilder.safeRunnerForClass44

AllDefaultPossibilitiesBuilder.runnerForClass() has thrown an Exception

java.lang.Exception
7 frames hidden
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass
43Web pages
ExceptionAllDefaultPossibilitiesBuilder.runnerForClass43

Assert.assertThat() has thrown an AssertionError

java.lang.AssertionError
1 frames hidden
org.junit.Assert.assertThat
42Web pages
AssertionErrorAssert.assertThat42

Assert.fail() has thrown an AssertionError

java.lang.AssertionError
1 frames hidden
org.junit.Assert.fail
42Web pages
AssertionErrorAssert.fail42

TestCase.runBare() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
2 frames hidden
junit.framework.TestCase.runBare
40Web pages
AssertionFailedErrorTestCase.runBare40

TestResult$1.protect() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
3 frames hidden
junit.framework.TestResult$1.protect
40Web pages
AssertionFailedErrorTestResult$1.protect40

TestResult.runProtected() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
4 frames hidden
junit.framework.TestResult.runProtected
39Web pages
AssertionFailedErrorTestResult.runProtected39

TestCase.assertEquals() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
4 frames hidden
junit.framework.TestCase.assertEquals
38Web pages
AssertionFailedErrorTestCase.assertEquals38

TestCase.run() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
6 frames hidden
junit.framework.TestCase.run
38Web pages
AssertionFailedErrorTestCase.run38

TestSuite.run() has thrown an AssertionFailedError

junit.framework.AssertionFailedError
8 frames hidden
junit.framework.TestSuite.run
36Web pages
AssertionFailedErrorTestSuite.run36
Package namePatterns foundSolution coverageSummary coverage
org.junit.runners1404
junit.framework225
org.junit.internal.requests157
org.junit.internal.runners.statements155
org.junit.runners.model89
org.junit70
org.junit.internal.runners61
org.junit.runner50
org.junit.rules33
org.junit.internal.builders23
org.junit.internal.runners.model22
org.junit.runner.notification12
junit.extensions7
junit.runner4
org.junit.internal.runners.rules3
org.junit.runner.manipulation3
org.junit.experimental.categories3
org.junit.experimental.theories2
org.junit.internal2
junit.swingui1
junit.textui1
Package nameClass namePatterns foundSolution coverageSummary coverage
org.junit.runnersParentRunner1181
org.junit.internal.requestsClassRequest148
junit.frameworkTestSuite142
org.junit.internal.runners.statementsInvokeMethod130
org.junit.runnersParentRunner$2117
org.junitAssert63
org.junit.runnersBlockJUnit4ClassRunner61
org.junit.runners.modelFrameworkMethod51
org.junit.runnerJUnitCore40
junit.frameworkTestCase40
org.junit.runners.modelRunnerBuilder28
junit.frameworkAssert26
org.junit.internal.runners.modelReflectiveCallable19
org.junit.internal.runnersJUnit38ClassRunner18
org.junit.runnersParentRunner$316
org.junit.internal.runnersJUnit4ClassRunner15
org.junit.internal.buildersAllDefaultPossibilitiesBuilder13
org.junit.runnersParentRunner$111
org.junit.runnersSuite11
org.junit.rulesRunRules10
org.junit.runner.notificationRunNotifier10
org.junit.internal.runners.statementsExpectException10
org.junit.internal.requestsFilterRequest9
junit.frameworkTestResult9
org.junit.rulesExternalResource$18
org.junit.internal.runners.statementsRunBefores8
org.junitAssume7
org.junit.runnersParameterized6
org.junit.internal.runners.statementsRunAfters6
org.junit.internal.runnersMethodRoadie6
org.junit.internal.buildersAnnotatedBuilder6
org.junit.runners.modelFrameworkMethod$16
org.junit.internal.runnersMethodValidator5
junit.frameworkJUnit4TestAdapter5
junit.extensionsTestSetup5
org.junit.rulesTemporaryFolder4
org.junit.internal.runnersErrorReportingRunner4
org.junit.internal.buildersSuiteMethodBuilder4
org.junit.runnerRunner4
junit.frameworkTestResult$13
org.junit.runnerRequest3
org.junit.runners.modelTestClass3
org.junit.internal.runnersClassRoadie3
org.junit.experimental.categoriesCategories3
org.junit.rulesTestWatcher$13
org.junit.rulesExpectedException3
org.junit.runner.manipulationFilter3
org.junit.internal.runnersTestClassMethodsRunner2
org.junit.internal.runners.modelEachTestNotifier2
org.junit.rulesExpectedException$ExpectedExceptionStatement2
Package nameClass nameMethod namePatterns foundSolution coverage
org.junit.runnersParentRunnerrun1123
org.junit.internal.requestsClassRequestgetRunner148
junit.frameworkTestSuiterun135
org.junit.internal.runners.statementsInvokeMethodevaluate130
org.junit.runnersParentRunner$2evaluate117
org.junit.runners.modelFrameworkMethodinvokeExplosively49
org.junit.runnerJUnitCorerun35
org.junit.runnersBlockJUnit4ClassRunnerrunChild26
org.junit.runners.modelRunnerBuildersafeRunnerForClass25
org.junit.runnersBlockJUnit4ClassRunner<init>23
org.junit.internal.runners.modelReflectiveCallablerun19
org.junitAssertassertEquals19
org.junit.internal.runnersJUnit38ClassRunnerrun18
org.junit.runnersParentRunner$3run16
junit.frameworkTestCaserun14
org.junit.runnersParentRunnerrunChildren14
org.junit.internal.buildersAllDefaultPossibilitiesBuilderrunnerForClass13
junit.frameworkTestCaserunBare11
org.junit.runnersParentRunner$1schedule11
org.junit.rulesRunRulesevaluate10
org.junit.internal.runners.statementsExpectExceptionevaluate10
org.junit.runnersParentRunneraccess$00010
org.junitAssertfail9
junit.frameworkAssertassertEquals9
org.junit.runnersParentRunnervalidate9
org.junit.internal.requestsFilterRequestgetRunner9
org.junit.runnersParentRunnerrunLeaf8
org.junit.rulesExternalResource$1evaluate8
org.junit.internal.runners.statementsRunBeforesevaluate8
org.junitAssertassertThat7
org.junit.internal.runnersJUnit4ClassRunnerrun7
org.junit.runnersParentRunner<init>7
org.junit.runnersSuiterunChild6
org.junit.runners.modelFrameworkMethod$1runReflectiveCall6
org.junitAssertassertTrue6
junit.frameworkAssertfail6
org.junit.internal.runners.statementsRunAftersevaluate6
org.junit.internal.buildersAnnotatedBuilderbuildRunner5
org.junit.runnersSuite<init>5
org.junit.runner.notificationRunNotifierfireTestStarted5
junit.frameworkTestCaseassertEquals5
junit.extensionsTestSetuprun5
org.junit.runnersBlockJUnit4ClassRunnercollectInitializationErrors4
junit.frameworkJUnit4TestAdapterrun4
org.junitAssertassertNull4
org.junitAssertassertArrayEquals4
org.junit.internal.buildersSuiteMethodBuilderhasSuiteMethod4
org.junit.internal.runnersErrorReportingRunnergetDescription4
junit.frameworkAssertassertTrue4
junit.frameworkTestResultrun4
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
org.junit.runnersParentRunnerrunAssertionError286
org.junit.runnersParentRunnerrunNullPointerException93
org.junit.runnersParentRunnerrunClassNotFoundException92
org.junit.runnersParentRunnerrunSSLHandshakeException71
org.junit.runnersParentRunnerrunSSLException69
junit.frameworkTestSuiterunAssertionFailedError59
org.junit.internal.runners.statementsInvokeMethodevaluateAssertionError48
org.junit.runnersParentRunnerrunIllegalArgumentException44
org.junit.runnersParentRunnerrunRecordNotFoundException39
org.junit.runnersParentRunnerrunComparisonFailure38
org.junit.runnersParentRunnerrunMalformedURLException36
org.junit.runners.modelFrameworkMethodinvokeExplosivelyUnsupportedCallbackException30
org.junit.internal.requestsClassRequestgetRunnerException29
org.junit.runnersParentRunnerrunJSONException29
org.junit.internal.requestsClassRequestgetRunnerIllegalStateException26
org.junit.internal.requestsClassRequestgetRunnerNoClassDefFoundError26
org.junit.runnersParentRunner$2evaluateIllegalStateException26
org.junit.runnersParentRunnerrunRuntimeException25
org.junit.internal.runners.statementsInvokeMethodevaluateNullPointerException25
org.junit.runnersParentRunnerrunIllegalStateException23
org.junit.internal.requestsClassRequestgetRunnerCucumberException19
org.junit.runnersParentRunnerrunArrayIndexOutOfBoundsException17
org.junit.runnersParentRunnerrunFileNotFoundException17
org.junit.runnersParentRunnerrunClientHandlerException16
org.junit.runnersParentRunnerrunWebServiceException16
org.junit.internal.requestsClassRequestgetRunnerNoSuchMethodError12
org.junit.runnersBlockJUnit4ClassRunner<init>Exception12
org.junit.runnersParentRunnerrunSQLException12
org.junit.runnersParentRunnerrunNoClassDefFoundError11
org.junit.runnersParentRunner$2evaluateSQLException10
org.junit.runnersParentRunnervalidateException8
org.junit.runners.modelRunnerBuildersafeRunnerForClassException8
org.junit.runnersParentRunner$2evaluateNoClassDefFoundError8
org.junit.internal.runners.statementsInvokeMethodevaluateComparisonFailure8
org.junit.runnersParentRunnerrunNoSuchMethodError7
junit.frameworkAssertassertEqualsAssertionFailedError7
org.junitAssertassertEqualsAssertionError7
org.junit.runnersParentRunner$2evaluateBeanCreationException7
org.junit.runnersParentRunnerrunException7
junit.frameworkTestSuiterunIOException7
org.junit.runnersParentRunnerrunMySQLSyntaxErrorException7
org.junit.rulesExternalResource$1evaluateAssertionError7
org.junit.internal.runners.modelReflectiveCallablerunIllegalStateException6
org.junit.runnersBlockJUnit4ClassRunnerrunChildAssertionError6
org.junit.runnerJUnitCorerunIllegalStateException6
org.junit.runnersParentRunnerrunIOException6
org.junit.runnersParentRunner$2evaluateMySQLSyntaxErrorException6
org.junitAssertassertEqualsArrayIndexOutOfBoundsException6
org.junit.runnersParentRunner$2evaluateAssertionError5
org.junit.internal.buildersAllDefaultPossibilitiesBuilderrunnerForClassException5