Creating test cases

You can create a test case to describe what you are going to test, define preconditions and post-conditions, assign test steps, and record the results of running the test case.

About this task

Typically, one or more test scripts and test case execution records are associated with a test case. Test case execution records are often used to run a test.


  1. In the main menu, click Construction; then in the Create section, click Test Case.

    The new test case opens, with a table of contents on the left and an editor on the right.

  2. At the top of the new test case window, enter a name for the new test case.
  3. Select a test case template from the list, if available.
  4. If team areas are enabled for the project area, select a team area from the list.
    Note: You must explicitly enable team areas in Manage Project Properties.
  5. Select an owner and a priority for the test case.
  6. Add a description of the test case.
  7. Complete the test case Summary section or assign the Summary to another team member to complete.
  8. To complete the test case Summary yourself:
    1. Define categories.

      You can use categories to define a hierarchical organization of test plans, test cases, test suites, test scripts, and other test artifacts. You can also define subcategories and other category relationships. You can use the default categories that are provided or create your own. To define categories, click the Manage Test Case Categories icon (Manage category).

    2. Type a number to estimate the amount of time required to complete the test case and select a time interval for the estimate. For example, if you type 1.5 in the Estimate field and select days for the interval, the estimate is represented as "1 day 4 hours."

      Later on, you can open a test plan to view test execution status and see how closely the actual time spent matches the estimate.

    3. Assign a numerical value for the relative weight of the test case.

      You can use weight as a means of tracking the relative difficulty or importance of the test case It is provided as a measurement of results not a measurement of time. There is flexibility in how the weight value can be used, but for time measurements using the Estimate and Time Spent fields is recommended. When a test case is executed, the weight is calculated based on the success of the steps included in the test script. The calculated weight distribution for a result can be adjusted to more accurately record the true outcome. Weight is used later on in one of the status bars that show execution progress in the test plan.

    4. Assign values to the custom attribute fields.

      If an administrator defined any custom attributes for test cases, they display in the Attributes section of the Summary. The field values for custom attributes can be in the format of text, integer, or date. You can sort or filter your test cases using custom attributes in the same way that you use categories.

  9. To assign the Summary section, or any section of the test case, to another team member to complete, click Work Item: Create and complete the fields in the form.
  10. Optional: Click Manage Sections to add your own, customized test case sections or to remove unrequired sections.
  11. Complete the remaining test case sections as needed:
    • Provide additional detail about the test case in the Test Case Design section.
    • Set up a formal review process for the test case.
    • Associate requirements with the test case.
    • Define test case preconditions and postconditions.
    • Define the expected test case results.
    • Identify risks associated with the test cases.
    • Associate a test script to the test case or create a manual test script.
    • Generate or create test case execution records for the test case.
    • Attach related documents to the test case.
    • Add execution variables to the test case.
  12. Click Save.
  13. At any point after you create the test case, you can add it to one or more test plans.
  14. Optional: Click the Duplicate icon (Copy ) in the upper right corner of the test case to make a copy of the test case.
  15. Optional: Click the Print View icon (Print view ) in the upper right corner of the test case to display a printable version of the test case.
  16. Optional: Click the Set to Lock/Unlock icon (Change lock) in the upper right corner of the test case to lock or unlock the test case. Depending on how your project is configured, you might be required to sign this action electronically by providing your password and a comment. When the test case is locked, the editable fields are disabled for editing.
    Note: Permission to lock a test case depends on your role-based permissions.

    To reverse the locking attribute, click the icon again.

  17. Optional: Click the Print PDF icon (Export to PDF ) in the upper right corner of the test case to save the test case as a PDF.

video icon Video channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community forums library

support icon Support

IBM Support Community
Deployment wiki