Questions tagged [spring-junit]
67 questions
0
votes
1 answer
SpringJUnit4ClassRunner - Reloads Context for every test even though same context used
This is the base class of our unit tests:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/spring/test-context.xml")
public abstract class BaseUnitTest {}
All unit tests extend this class.
When I run the tests locally in eclipse…

Punit Agrawal
- 577
- 3
- 7
- 14
0
votes
1 answer
Junit test cases not running because of Two Jaxb context
I am using spring mvc.I have two jaxb context configured in my App-config.xml as follows.
Because of this i had issues running my project in Tomcat server.So we migrated to Liberty Was(8.0) server.Then it started working fine.

Renganathan V
- 413
- 1
- 9
- 27
0
votes
1 answer
Failed to load ApplicationContext in JUnit with JNDI datasource
I have some troubles testing my application, whereas it works well in normal execution.
I think it comes from JNDI resources which are not found, but I don't understand why and how to fix it.
When I start my Junit test, I got this…

thibon
- 360
- 2
- 7
- 19
0
votes
1 answer
Spring Bean Container
I wanted to write test cased for testing my service using springjunit runner.
My service will call another service and transform its out put and send the response.
I thouhgt that server need to be up and running for calling the other service while…

Renganathan V
- 413
- 1
- 9
- 27
0
votes
1 answer
The order of the test methods in a Test Suite by JUnit4Spring
Is the order of the test methods in a Test Suite by JUnit4Spring reliable?
Otherwise, is there anyway to enforce the order?
Thank you a lot.

user3169231
- 257
- 3
- 13
0
votes
1 answer
Spring Dao-Test defaultRollback not working
I got a problem with my Dao-Test:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/cmn-dao-spring.xml"})
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true)
public class ScoreDaoTest…

nano_nano
- 12,351
- 8
- 55
- 83
0
votes
1 answer
Spring CrudRepository save doesn't throw until call to find?
I'm new to Spring JPA and Hibernate and I ran in the following behavior. I successfully created CrudRepositorys for my JPA-annotated entity in org.mypackage.repository and annotation-based transactional service in org.mypackage.service.jpa which in…

Giovanni Botta
- 9,626
- 5
- 51
- 94