118 lines
3.6 KiB
HTML
118 lines
3.6 KiB
HTML
<html>
|
|
<head>
|
|
<title>COMUnit Reference Manual: TestSuite</title>
|
|
</head>
|
|
<body>
|
|
|
|
<h1>Class TestSuite</h1>
|
|
|
|
<h2>Description:</h2>
|
|
<p>
|
|
The TestSuite class represents a suite of different tests to be run. The TestSuite contains
|
|
a part-whole hierarchy of objects that implement the <a href="itest.html">ITest</a> interface --
|
|
including TestCase objects and other TestSuite objects. Executing the Run method for the
|
|
TestSuite will execute all test cases that it contains. The TestSuite class also provides
|
|
methods for add all test cases contained in a test container object into the suite.
|
|
</p>
|
|
|
|
<h2>Interface Implementation:</h2>
|
|
<ul>
|
|
<li><a href="itest.html">ITest</a></li>
|
|
</ul>
|
|
|
|
<h2>Known Subclasses:</h2>
|
|
<ul>
|
|
<li>None</li>
|
|
</ul>
|
|
|
|
<h2>Method Summary:</h2>
|
|
<table border="1" cellpadding="2" cellspacing="2">
|
|
<tr><th>Method:</th><th>Definition:</th></tr>
|
|
<tr>
|
|
<td><a href="#AddAllTestCases">AddAllTestCases</a></td>
|
|
<td>Public Function AddAllTestCases(oTestContainer As ITestContainer)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#AddNewTestCase">AddNewTestCase</a></td>
|
|
<td>Public Function AddNewTestCase(sName As String, oTestContainer As ITestContainer) As ITestCase</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#AddTest">AddTest</a></td>
|
|
<td>Public Sub AddTest(oTest As ITest)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#AddTestCase">AddTestCase</a></td>
|
|
<td>Public Sub AddTestCase(oTestCase As ITestCase)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#CountTestCases">CountTestCases</a></td>
|
|
<td>Public Function CountTestCases() As Integer</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#NewTestCase">NewTestCase</a></td>
|
|
<td>Public Function NewTestCase(sName As String, oTestContainer As ITestContainer) As ITestCase</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="#Run">Run</a></td>
|
|
<td>Public Sub Run(ByRef oTestResult As TestResult)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Methods:</h2>
|
|
|
|
<h3><a name="Run">Run</a></h3>
|
|
<dl>
|
|
<dt>Definition:</dt><dd>Public Sub Run(ByRef oTestResult As TestResult)</dd>
|
|
<dt>Description:</dt><dd>Runs the test and collects the results in the TestResult parameter</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h3><a name="CountTestCases">CountTestCases</a></h3>
|
|
<dl>
|
|
<dt>Definition:</dt><dd>Public Function CountTestCases() As Integer</dd>
|
|
<dt>Description:</dt><dd>Number of test cases contained in the suite</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h3><a name="NewTestCase">NewTestCase</a></h3>
|
|
<dl>
|
|
<dt>Definition:</dt><dd>Public Function NewTestCase(sName As String, oTestContainer As ITestContainer) As ITestCase</dd>
|
|
<dt>Description:</dt><dd>Create a new test case and return it.</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h3><a name="AddTest">AddTest</a></h3>
|
|
<dl>
|
|
<dt>Definition:</dt><dd>Public Sub AddTest(oTest As ITest)</dd>
|
|
<dt>Description:</dt><dd>Add a object implementing ITest (either a TestCase or TestSuite) to the suite.</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h3><a name="AddTestCase">AddTestCase</a></h3>
|
|
<dl>
|
|
<dt>Definition:</dt><dd>Public Sub AddTestCase(oTestCase As ITestCase)</dd>
|
|
<dt>Description:</dt><dd>Add a TestCase to the suite.</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h3><a name="AddNewTestCase">AddNewTestCase</a></h3>
|
|
<dl>
|
|
<dt>Definition:</dt><dd>Public Function AddNewTestCase(sName As String, oTestContainer As ITestContainer) As ITestCase</dd>
|
|
<dt>Description:</dt><dd>Create a new test case and add it to the suite.</dd>
|
|
</dl>
|
|
|
|
<hr />
|
|
|
|
<h3><a name="AddAllTestCases">AddAllTestCases</a></h3>
|
|
<dl>
|
|
<dt>Definition:</dt><dd>Public Function AddAllTestCases(oTestContainer As ITestContainer)</dd>
|
|
<dt>Description:</dt><dd>Create all test cases that are contained in the specified TestContainer and add them to the suite.</dd>
|
|
</dl>
|
|
|
|
</body>
|
|
</html>
|