我面临一个奇怪的问题。当我的testng测试用例扩展AbstractTestNGSpringContextTests时,我的eclipse调试(不在断点处停止)不起作用。当我运行相同的代码而不扩展AbstractTestNGSpringContextTests时,它运行绝对正常。 普通的测试案例
package in.xxx.core.integration;
import org.testng.annotations.Test;
public class TestXXX {
@Test
public void testMe() {
System.out.println("verifyFooName: Is foo not null? ");
}
}
使用基于Spring的testng测试用例的代码 package in.xxx.core.integration;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;
@ContextConfiguration(locations = { "classpath:test-spring-application-context.xml" })
public class TestXXX extends AbstractTestNGSpringContextTests {
@Test
public void testMe() {
System.out.println("verifyFooName: Is foo not null? ");
}
}