com.netriser.xmltestsuite.testcases
Class run
java.lang.Object
|
+--junit.framework.TestSuite
|
+--com.netriser.xmltestsuite.testcases.run
- All Implemented Interfaces:
- junit.framework.Test
- 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"/>
</suite>
The run contruct can be used to run this suite.
<set name="server1.netriser.com"/>
<run suite="commonTests">
<set name="server2.netriser.com"/>
<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)
|
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 |
run
public run(java.lang.String fName)
setStepid
public void setStepid(java.lang.String s)
setSuite
public void setSuite(java.lang.String s)