Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What Is JUnit TestSuite?
What Is JUnit TestSuite?
✍: FYICenter.com QA Team
JUnit TestSuite is a container class, junit.framework.TestSuite, used in JUnit 3.8 that allows you to group multiple test cases into a collection and run them together. TestSuite class is no longer supported in JUnit 4.4.
Each test runs in its own fixture so there can be no side effects among test runs. Here is an example:
import junit.framework.*;
// by FYICenter.com
public class RunTestSuite {
public static void main(String[] a) {
TestSuite suite = new TestSuite(MathTest.class);
TestResult result = new TestResult();
suite.run(result);
System.out.println("Was it successful? "
+result.wasSuccessful());
System.out.println("How many tests were there? "
+result.runCount());
}
}
2008-03-04, 6172👍, 0💬
Popular Posts:
How To Create an Add-to-Netvibes Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...
In C#, what is a weak reference? Generally, when you talk about a reference to an object in .NET (an...
How To Escape Special Characters in SQL statements? - MySQL FAQs - Introduction to SQL Basics There ...
What's the output of the following program? And why? #include main() { typedef union { int a; char b...
Rachel opened her math book and found that the sum of the facing pages was 245. What pages did she o...