Spring TestContext Framework errors

Spring TestContext Framework

https://github.com/spring-projects/spring-framework
Solution coverage:
Summary coverage:

Top patterns

  1. NPE when use @SpringBootTest and @WebAppConfiguration

    You don't need @WebAppConfiguration with @SpringBootTest support.

    So just delete @WebAppConfiguration, and then...

    • if you want a mocked WebApplicationContext -- for example, to use MockMvc -- use @SpringBootTest with the default webEnvironment (which is WebEnvironment.MOCK).
    • if you want your web application to actually be deployed in an embedded Servlet container -- for example, to test with TestRestTemplate -- use @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) or @SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
  2. SpringJUnit4ClassRunner.run() has thrown an IllegalStateException
    No solution
  3. SpringJUnit4ClassRunner.run() has thrown an IllegalStateException
    No solution

DescriptionException TypeEntry MethodWeb pages

NPE when use @SpringBootTest and @WebAppConfiguration

java.lang.NullPointerException
27 frames hidden
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run
3Web pages
1Solution
IllegalStateExceptionSpringJUnit4ClassRunner.run3

SpringJUnit4ClassRunner.run() has thrown an IllegalStateException

java.lang.IllegalStateException
47 frames hidden
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run
0Web pages
IllegalStateExceptionSpringJUnit4ClassRunner.run0

SpringJUnit4ClassRunner.run() has thrown an IllegalStateException

java.lang.IllegalStateException
48 frames hidden
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run
0Web pages
IllegalStateExceptionSpringJUnit4ClassRunner.run0

SpringJUnit4ClassRunner.run() has thrown an IllegalStateException

java.lang.IllegalStateException
47 frames hidden
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run
0Web pages
IllegalStateExceptionSpringJUnit4ClassRunner.run0
Package nameClass namePatterns foundSolution coverageSummary coverage
org.springframework.test.context.junit4SpringJUnit4ClassRunner899
org.springframework.test.context.junit4SpringJUnit4ClassRunner$16
org.springframework.test.context.junit4AbstractTransactionalJUnit4SpringContextTests3
org.springframework.test.context.junit4SpringMethodRoadie1
Package nameClass nameMethod namePatterns foundSolution coverage
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrun847
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunChild18
org.springframework.test.context.junit4SpringJUnit4ClassRunnercreateTest14
org.springframework.test.context.junit4SpringJUnit4ClassRunner<init>14
org.springframework.test.context.junit4SpringJUnit4ClassRunnermethodBlock4
org.springframework.test.context.junit4SpringJUnit4ClassRunnerinvokeTestMethod1
org.springframework.test.context.junit4SpringJUnit4ClassRunnercreateTestContextManager1
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunIllegalStateException294
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunAssertionError127
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunBeanCreationException51
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunNullPointerException38
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunOperationFailedException34
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunIllegalArgumentException27
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunComparisonFailure26
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunUnsatisfiedDependencyException23
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunBadSqlGrammarException16
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunException8
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunIllegalIAMSubjectException8
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunSQLException8
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunIllegalZegelLengthException7
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunBeanDefinitionStoreException7
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunDataIntegrityViolationException7
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunNoClassDefFoundError7
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunGenericJDBCException7
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunInvalidReferenceException7
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunIndexOutOfBoundsException6
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunSkipLimitExceededException6
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunCommandAcceptanceException6
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunDatabaseUnitException5
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunServiceException5
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunNoSuchMethodError5
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunCannotLoadBeanClassException4
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunKeysNotLoadedException4
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunCannotCreateTransactionException4
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunTransactionSystemException4
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunRestClientException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunOperationException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunApplicationContextException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunNoSuchTableException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunMessageDeliveryException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunClassCastException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunExecutionException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunFileNotFoundException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunScriptStatementFailedException3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunIllegalAccessError3
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunJsonParseException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunMailConnectException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunNoSuchBeanDefinitionException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunUnsupportedOperationException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunUncategorizedSQLException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunBadRequestException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunJdbcSQLException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunDmsRuntimeException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunHttpMessageNotReadableException2
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunComparisonFailure1
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunStringIndexOutOfBoundsException1
org.springframework.test.context.junit4SpringJUnit4ClassRunnerrunExhaustedRetryException1