I have a
Junit Test file which has more number of methods. usually i perform testing for all the methods using @Test annotation. Now, i don't wish to give @Test annotation in all the methids without using annotation how to perform Junit Testing.
Please Note: I'm trying in Test Case not in Test suite.
I have attached my example below without @test annotation can anyone suggest me to write the junit test file without @Test annotation ?
public void Test() throws Exception {
try {
Long autoId = 8435L;
List<MySample> Test = MySampleDao.Test(autoId);
log.info("Test:"+ Test.size());
assertEquals(1, Test.size());
} catch (Exception e) {
log.error("Error in Test", e);
}
public void Sample() throws Exception {
try {
Long autoId = 8435L;
List<MySample> Sample = MySampleDao.Sample(autoId);
log.info("Sample:"+ Sample.size());
assertEquals(1, Sample.size());
} catch (Exception e) {
log.error("Error in Sample", e);
}
}
Note: If i run it shows no methods to test.
*Skip:*I'm trying this concept because i'm going for automation testing