Test suites can identify gaps in a testing effort where the successful completion of one test case must occur before you begin the next test case. For instance, you cannot add new products to a shopping cart before you successfully log in to the application. When you run a test suite in sequential mode, you can choose to stop the suite execution if a single test case does not pass. Stopping the execution is useful if running a test case in a test suite depends on the success of previous test cases.
Each test case is typically associated with a test script, although you can run a test with no associated test script.
A test script is a manual or automated script that contains the instructions for implementing a test case. You can write manual test scripts to be run by a human tester, or you can automate some or all of the instructions in the test script. You can also associate automated functional test scripts, performance test scripts, and security test scripts with a test case.
You can also associate more than one test script with a single test case, but you should do this only if each test script associated with the test case provides a different way to test the scenario in the test case. For example, a test case might require several scripts to test the scenario in different test environments. Or, you might have both manual and automated scripts that can be used to exercise the test case.
Do not use test cases to group test scripts that exercise different aspects of a common function or you might see incorrect information about test results and attempted points. For example, if you run a test case for a specific test plan, iteration, and test environment and specify a different functional script each time, the last result of the test case execution record only captures the results of the last script run.
In some cases, you may also want to use test suites to group related test cases. For example, you can use a suite to run a set of automated regression test cases together or to sequentially run a set of test cases that comprise an end-to-end scenario. With a test suite, you can plan, initiate, and track the execution of the related test cases that make up the larger scenario that is tested by the test suite.
Table 1 lists the default sections that are included in test cases and test suites.
| Test Case | Test Suite |
|---|---|
| Summary | Summary |
| Test Case Design | Test Suite Design |
| Formal Review | Formal Review |
| Development Items | Pre-Condition |
| Requirements Links | Post-Condition |
| Risk Assessment | Risk Assessment |
| Pre-Condition | Expected Results |
| Post-Condition | Test Cases |
| Expected Results | Test Suite Execution Records |
| Test Scripts | Attachments |
| Test Case Execution Records | Execution Variables |
| Attachments | |
| Execution Variables |
Each section includes its own editor. Some sections, consist of a rich-text editor with common formatting for features such as tables, fonts, bullets, and numbered lists.
Other test case sections provide links to these other test artifacts.
You can add your own sections and remove unneeded sections by using the Manage Sections feature.
Test case and test suite categories are used in the Summary section of a test case or test suite.
You can use test case and test suite categories to help group your test cases or test suites logically. Later, when you can browse to list all your test cases or test suites, you can sort the list by using the categories.
Four default categories are provided: category, function, iteration, and theme. You can add your own categories, functions, iterations, and themes and types of categories.
Weight is a measurement of results not a measurement of time. You can use it flexibly, but for time measurements use the estimate and time spent.
If an administrator defined custom attributes for test cases or test suites, they are listed in the summary.
Like categories, custom attributes can be used as a grouping, sorting, and filtering mechanism to organize a test project into logical hierarchies of artifacts in your test project. Categories are restricted to text format; however, using custom attributes can include text, integer, and date formats. Custom attribute values are free-form so you can use any data that you need for test artifacts.
Test cases and test suites are based on templates. When you create a test case or test suite, you base it on a template. You can use the default templates, create new templates, and designate default templates.
Templates contain a collection of sections. You create a template by adding and removing provided sections or creating new sections. If the section names do not match what you are accustomed to, create new sections and add them to a template.
Each test organization can design their own custom test templates.
Conditions provide information for the person who runs a test. Use preconditions to communicate requirements that must be met before the tester can run the test case or test suite. Use postconditions to communicate requirements that must be met after the tester runs the test case or test suite.
Test cases are integral to the test execution process. To run a test, you can do any of these things: