Wednesday, April 27, 2005 02:56 PM
I read and heard that JUnit is used for test automation. Is that writing TestSuites with suite() at package level and application level(root level) and running those suites is what is called as automation? If yes, do someone get a chance to write scripts to execute these suites giving the test case numbers rather than testing the complete suite?
My ultimate aim is to get the full advantage of Junit to make my developers life easier. Can you point to a location where people have already used some scripts already for automation using JUnit.
Thanks in advance.
Re: Automation scripts for test Automation using JUnit
Tuesday, July 12, 2005 05:24 AM
Thursday, April 28, 2005 08:31 AM
Details at JUnit´s homepage. It is called test automatisation because there is a program (the TestRunner) which selects all testcases, executes them and gives a summary. The tests are simply java classes extending junit.framework.TestCase (or so). Usually there is one Test-class for one component. Each testcase is a method in your test class beginning with test and having no arguments and no return value. A test suite is a class for bundling several test classes/test cases. It´s a kind of composite pattern. Starting only one suite or only one test class is done via parametrization of the TestRunner.
Most of the open source projects use JUnit. E.g. Ant. I´m not sure if that is the right for you, but the tutorial Writing Tasks has a section about testing Ant tasks - and task testing is based on JUnit.