I am trying to install the Junit test suite with Spring for the first time and tried with a couple of changes in my classes, but no luck and ended up with this error: "junit.framework.AssertionFailedError: no tests found in Myclass"
In short, I have two test classes, both from the same base class, which loads the Spring context below
@RunWith( SpringJUnit4ClassRunner.class )
@ContextConfiguration( locations =
{
"classpath:ApplicationContext.xml"
})
I tried adding these 2 test classes to the set as shown below
@RunWith( SpringJUnit4ClassRunner.class )
@SuiteClasses({ OneTest.class, TwoTest.class })
public class MyTestSuite extends TestCase {
}
I run this test suite from ant. But, it gives me an error saying: โNo tests foundโ However, if I run the separate 2 test cases from ant, they work correctly. Not sure why this behavior, I'm sure something is missing here. Please advice.
source
share