spring-test
NoSuchFieldError when trying to run a jUnit test with Spring
So far I have two tests. One uses only jUnit framework and works fine. The other one uses spring-test library and creates this exception every time I try to run it. Any ideas what may cause the proble[详细]
2023-04-11 16:55 分类:问答Spring-Autowiring happens after @BeforeClass when running test with maven-surefire
I have some problems with dependency injection (Spring autowiring) and maven-surefire. The following test works without problems when run in eclipse with TestNG:[详细]
2023-02-14 15:19 分类:问答Transaction not rolling back in Spring Test for delete operation
Somehow my test is not rolling back the delete transaction when doing a Spring Test. The data is deleted permanently.[详细]
2023-02-13 11:53 分类:问答Poor JUnit test using springframework has fragile Thread.sleep() calls. How to fix?
I have recently joined a group with some severe JUnit testing issues. One problem is an 8 minute long test! The test has several sections; each makes calls to org.springframework.context.ApplicationEv[详细]
2023-01-30 14:57 分类:问答JUnit tests pass in Eclipse but fail in Maven Surefire
I have written some JUnit tests using JUnit 4 and spring-test libraries. When I run the tests inside Eclipse then run fine and pass. But when I run them using Maven (during the build process), they fa[详细]
2023-01-09 05:25 分类:问答Spring Test Framework and annotation-based autowiring Problem
I would like to use two different implementations for a DAO with Spring\'s testframework. src.main.java[详细]
2023-01-06 14:21 分类:问答How to load DBUnit test data once per case with Spring Test
Spring Test helpfully rolls back any changes made to the database within a test method.This means that it is not necessary to take the time to delete/reload the test data before each test method.[详细]
2023-01-02 17:16 分类:问答How to access Spring context in jUnit tests annotated with @RunWith and @ContextConfiguration?
I have following test class @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {\"/services-test-config.xml\"})[详细]
2022-12-22 19:54 分类:问答Spring Tests : transaction not rolling back after test method executed
I\'m trying to create integration tests for a legacy application deployed on Weblogic 8.1 using a subclass of AbstractTransactionalJUnit4SpringContextTests.[详细]
2022-12-16 14:36 分类:问答SpringJUnit4ClassRunner initialize beans for each test?
The following test illustrates that this test bean is initialized twice by Spring.I\'m hoping someone can tell me why this is so, since it should only be once.Here\'s the test:[详细]
2022-12-09 00:17 分类:问答