The test method of the supplied TestContext must not be null

Samebug tips1

If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web27285

  • via Spring JIRA by Andrew Toolan, 11 months ago
    The test method of the supplied TestContext must not be null
  • via Spring JIRA by Andrew Toolan, 1 year ago
    The test method of the supplied TestContext must not be null
  • The value of property bind.address must not be null
  • Stack trace

    • java.lang.IllegalArgumentException: The test method of the supplied TestContext must not be null at org.springframework.util.Assert.notNull( at at at org.springframework.test.context.TestContextManager.beforeTestMethod( at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate( at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate( at org.springframework.test.context.junit4.statements.RunPrepareTestInstanceCallbacks.evaluate( at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate( at org.springframework.test.context.junit4.statements.SpringFailOnTimeout.evaluate( at org.springframework.test.context.junit4.statements.ProfileValueChecker.evaluate( at at at org.junit.rules.RunRules.evaluate( at org.junit.experimental.theories.Theories$TheoryAnchor$1$1.evaluate( at org.junit.experimental.theories.Theories$TheoryAnchor.runWithCompleteAssignment( at org.junit.experimental.theories.Theories$TheoryAnchor.runWithAssignment( at$ParallelTheoryAnchor.runWithAssignment( at org.junit.experimental.theories.Theories$TheoryAnchor.evaluate( at org.junit.runners.ParentRunner.runLeaf( at org.junit.runners.BlockJUnit4ClassRunner.runChild( at org.junit.runners.BlockJUnit4ClassRunner.runChild( at org.junit.runners.ParentRunner$ at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec( at java.util.concurrent.ForkJoinTask.doExec( at java.util.concurrent.ForkJoinPool$WorkQueue.runTask( at java.util.concurrent.ForkJoinPool.runWorker( at

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 month ago
    Unknown user
    Once, 1 month ago
    18 times, 1 month ago
    16 times, 1 month ago
    Once, 2 months ago
    190 more bugmates