Harbir Singh Hundal wrote:
>
> i was going through a code, which is right, but i am
> new to the things so the following code which returns
> the class is not understood by me, please can anyone
> explain me what is happeing. this is regarding the
> testing (JUNIT) framework.
> ---------------------
>
> public class Webtest1 extends TestCase {
>     
>       private static String SITENAME = "localhost";
>       private static String TESTWEBSITE = "http://"
> +SITENAME +":8080/jims";
>       private static String LOGONACTION = "/LogonEdit.do";
>     
>       public static Test suite() {
>             return new TestSuite( Webtest1.class ); // i did not
> follow Webtest1.class what is happening her and y
>       }

You don't need the suite() method to make your test work. JUnit will
automatically extract all methods like test*() and execute them as
tests. For details, find a JUnit guide on the web or pick up a copy of
_JUnit Recipes_, _JUnit in Action_ or any of the earlier TDD/JUnit books.

Good luck.
--
J. B. (Joe) Rainsberger
Diaspar Software Services
http://www.diasparsoftware.com
Author, JUnit Recipes: Practical Methods for Programmer Testing

Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to