Class run

All Implemented Interfaces:

public class run
extends junit.framework.TestSuite

TestCase that provides a way to parameterise tests.

Often there is a need to run a set of tests multiple times, but each time with slight differences.

A set of xml test cases can be encapsulated within a suite:

	<suite stepid="commonTests">
 		<fetch url="http://#{server}/file.html"/>
 		<verify page="aPageSpec"/>
The run contruct can be used to run this suite.
	<set name=""/>
 	<run suite="commonTests">
 	<set name=""/>
 	<run suite="commonTests">

Implementation note:

In Junit, the test runners assume that a test can only be run once. In order that these test comply with this junit framework restriction the test objects in a suite will be instantiated multiple, once for each time they are referenced by a run statement.

This implies that the number of times a suite is run needs to be known at the time of initialisation, which prevents us from creating a loop contruct with a dynamic number of iterations (e.g. based on the number of entries in a database.

Constructor Summary
run(java.lang.String fName)
Method Summary
 void setStepid(java.lang.String s)
 void setSuite(java.lang.String s)
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public run(java.lang.String fName)
Method Detail


public void setStepid(java.lang.String s)


public void setSuite(java.lang.String s)