java - Junit test error No test found -
i used junit 3 , when wrote code got error
assertionfailederror : no test found
import junit.framework.testcase; import junit.runner.*; public class teststd extends testcase { student s; public void setup() { s = new student("asjfa"); } public void testemail() { try { s.setemail("kuku"); asserttrue(false); } catch (emailisinvalid ex) { asserttrue(true); system.out.println("exception caught. email invalid"); } } public void teardown() { } }
your test method should start lowercase t
. should public void testemail()
. picked junit.
Comments
Post a Comment