I am working on integration test with JUnit. I have a some services ( Spring Services @Service) to test. So i create a test class to test services.
I have : MyTestClass => ServicesToTest
When i execute my test, i cannot set a breakpoint and see what's happening in service classe. I know that when using Spring Service, Spring create some proxy to provide access to service. I don't know really if it is related to Spring. How i can debug my Test class. For information my test classes is configured as below :
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:test-context.xml")
@Transactional
public class MyTestClass(){
//Injection of dao and services + test method.
}
What's wrong, please ?
In case you are using Eclipse ensure that Add line number attributes to generated class files
is checked.
You will find this under Window -> Preference -> Java -> Compiler as shown below.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.