Creating manual test scripts

The Manual Test editor is a rich-text editor for constructing test scripts.

About this task

You can create a test script on the Construction page or create a script from within a test case.

Procedure

  1. Use one of these procedures to create a test script.
    • To create a test script from the Construction page:
      1. In the main menu, click Construction > Create > Test Script.
      2. At the top of the new test script window, type a descriptive name that identifies the purpose of the script.
      3. 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.
      4. Select an owner for the test script.
      5. For a manual test script, make sure the script type is Manual.
      6. Type a description.
      7. To assign the task of completing the test script to another team member, save the test script, and then click Work Item: Create.
        Note: Creating a work item to complete the test script does not change the owner of the test script.
    • To create a test script from within a test case:
      1. Open the test case to which to add a test script.
      2. From the Test Scripts section of a test case, click the Add New Test Script icon (Add new test script). The New Test Script dialog box opens.
      3. In the Name field, type a descriptive name that identifies the purpose of the script.
      4. Type a description.
      5. The type is Manual by default.
      6. Click OK.
      7. Save the test case. This creates the test script shell.
      8. Click the test script name to open it in the Manual Test editor.
      9. Select an owner for the test script.
      10. To assign the task of completing the test script to another team member, click Work Item: Create.
        Note: Creating a work item to complete the test script does not change the owner of the test script.
  2. Optional: Add test data.

    You can use test data to supply realistic values to the variables in a manual test script. Test data is a collection of related data records. During execution, the variables in the manual test script are replaced with data from the test data. As a result, you can use a single script to test multiple data records.

    1. Next to the Test Data field, click the Change Associated Test Data icon (Edit).
    2. Select a test data artifact; then click OK.
    3. Optional: To filter data records so that a subset are used when the test script is executed, complete the following steps:
      1. Next to the Test Data Usage field, click the Select Records from Test Data icon (Edit).
      2. Under Record Selection Criteria, select a column name; then set a filter value.
      3. To verify the selection, click the Show button.
        The data records are filtered according to the filter settings.
        Tip: You can click the Clear icon to reset the selection criteria.
      4. Click OK.
  3. Define categories.

    You can use categories to define a hierarchical organization of test plans, test cases, 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 Plan Categories icon (Manage category).

  4. Assign values to the custom attribute fields.

    If an administrator defined any custom attributes for test scripts, 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 scripts using custom attributes in the same way that you use categories.

  5. To begin typing your statements, click Click to add step in the text editor. A new step is added with the default step type as Execution Step. A step is composed of three fields: Description, Expected Results, and Validates.
    Note: To change the step type to a reporting step, click the arrow next to the Execution Step (Step) icon, and then click Reporting Step (Reporting step).
  6. In the Description field, describe the action to take. Each step is an individual action.
  7. In the Expected Results field, specify the conditions that must be met for a step to be considered successful.
    Tip: Use Shift+Enter to increase the height of the editor so that you can enter multi-line text.
  8. To continue adding steps, press Enter to move to the next line.
    Note: You can insert a step before or after the current step by using the Action Menu, and then clicking Insert New Step Above or Insert New Step Below. You can also use shortcut keys: Use Ctrl+Shift+Enter to insert a new step before the current step and Ctrl+Enter to insert a step after the current step.
  9. The Validates column displays requirements that are associated with test script steps. You can add requirements traceability to individual steps by either of the following methods:
    • To link steps to requirements that are associated with the test case, at the far right, in the Requirement View, scroll down to view associated requirements; then drag individual requirements to test script steps.
    • To link steps to any requirements associated with the project, in the Action Menu, click Link to any requirement.
    Note: For the Validates column to be available, the project administrator must have enabled linkage between requirements and test script steps via Manage Project Properties > Test Script Preferences.
  10. Optional: To cut, copy, and paste test script steps, select the steps and use the Cut, Copy, and Paste options in the Action Menu. There is no "Delete" or "Remove" control for steps. Cut steps to remove them from a script.
  11. Optional: To toggle between normal and compact views, click the Compact View (Compact View) icon. Only a portion of the steps are displayed when you compact the view, making it easier to view the entire script.
  12. Optional: To change the width of each column, drag the column dividers.
  13. Optional: To add comments in your steps, click the Show/Hide Comments Column icon (Show/Hide comments column) and select Show Comments Column.
  14. When you have finished adding steps, click Save at the top of the page to save the test script.
    Tip: To quickly save a script, press Ctrl+S.
  15. Optional: To make a copy of the test script, in the upper right corner of the test case, click the Duplicate icon (Copy ).
  16. Optional: Click the Print View icon (Print view) in the upper, right corner of the test script to display a printable version of the test script.
  17. Optional: Click the Set to Lock/Unlock icon (Change lock) in the upper right corner of the test script to lock or unlock the test script. 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 script is locked, the editable fields are disabled for editing.
    Note: Permission to lock a test script depends on your role-based permissions.

    To reverse the locking attribute, click the icon again.

  18. Optional: Click the PDF icon (Export to PDF) to export the test script details to a PDF.

What to do next

If your organization requires a review of the test script, you can use the Formal Review section of the test script to assign reviewers and approvers.


Have a problem or a question? Post it in the Jazz.net forum.