blogger visitor

Techucation

A Blog by Malcolm Yoke Hean Low

 Subscribe in a reader




View Malcolm Low's profile on LinkedIn

Malcolm Low

Create Your Badge

 Subscribe in a reader


Enter your email address:

Delivered by FeedBurner

JUnit Testing

Posted on Thursday, August 10, 2006 at 7:46 PM by Malcolm

Command line tool to run test

The JUnit package has q command line based tool to run tests.

> java junit.textui.TestRunner [-wait] TestCaseClass

TestRunner expects the name of a TestCase class as argument. If this class defines a static suite method it will be invoked and the returned test is run. Otherwise all the methods starting with "test" having no arguments are run.

When the wait command line argument is given TestRunner waits until the users types RETURN.

TestRunner prints a trace as the tests are executed followed by a summary at the end.


Posted in General (RSS), Teaching (RSS)