Design tests

After adding tests to the test plan tree, you define test steps for each test and decide whether to perform a test manually or to automate it.

Design test steps

Describe the detailed, step-by-step instructions the tester should perform to complete a test.

Prerequisite:

Create tests and basic test information in the test plan tree. For details, see Create tests.

To design test steps:

  1. In the Test Plan module, select View > Test Plan Tree, and select a test.

  2. Click the Design Steps tab.

    UI elements in the Design Steps tab are described in the following table:

    UI Element (A - Z)

    Description

    New Step. Creates a new design step in the Design Step Details dialog box.

    The new step is added below the selected step.

    Edit Step. Opens the selected design step in the Design Step Editor dialog box.

    Renumber Steps. Renumbers the design steps sequentially. Use this command after you rearrange steps.

    Delete Selected. Deletes the selected design steps.

    Copy/Paste Steps. Copies the selected design steps and pastes them to another test in the same project or in another project. For details, see Copy and paste design steps.

    Attachments. Opens the Attachments page, enabling you to add attachments to the selected design step. For details, see Work with attachments.

    After you add an attachment, the icon is displayed in the Design Steps grid, next to the appropriate design step.

    Note: If you add an attachment to a design step, a copy of the attachment is made every time the test is run.

    Call to Test. Opens the Select Test dialog box, enabling you to call another manual test. For details, see Call a test.

    Generate Script. Enables you to convert the test to an automated test type that is run by the applicable automatic testing tool.

    For details, see Generate script for automated tests.

    Insert Parameter. Opens the Parameters dialog box, enabling you to insert a test parameter in the Description or Expected Result field. The parameter is inserted at the cursor position. For details, see Test parameters.

    Find Text. In the Design Steps tab, opens the Find dialog box, enabling you to find text in specific fields. For details, see Search, replace, and update ALM data.

    Find/Replace Text. In the Design Step Details dialog box, opens the Find & Replace dialog box, enabling you to find or replace a specified string in the selected field.

    Select Columns. Opens the Select Columns dialog box, enabling you to define which columns appear in the grid, and the order in which they appear.

    Adjust Rows Height. Adjusts the row size of the steps in a test. This enables you to view all the text in the Description or Expected Result columns if the text is long.

    Tip: To resize a single step, position the mouse in the gray sidebar on the gridline below the step. The cursor changes to a vertical arrow. Drag the gridline up or down.

    Save Steps. Saves the design steps in the project. If you are typing long text, use the Save Steps button to prevent data loss.

    Move Down/Move Up. Moves the selected design step up or down in the design steps grid.

    Tip: Alternatively, select a design step and drag it to a new position.

    Description

    Instructions for the tester to perform.

    Note:  

    • Test parameters included in the Description field are surrounded by <<< >>> brackets.

    • If a step is a call to another test, the Description field displays a link to the called test, and actual values of the parameters included in the called test. To edit actual values of the called test parameters, right-click the link, and choose Called Test Parameters.

    Expected Result

    The expected state after the step instructions are performed.

    Step Name

    The name of the step.

    Default value: The sequential number of the design step. For example, step 1, if you are adding a step to a test for the first time.

    Note: If a step is a call to another test, the Step Name field displays a link to the called test, and actual values of the parameters included in the called test. To edit actual values of the called test parameters, right-click the link, and choose Called Test Parameters.

  3. If there are existing design steps, select the step below which you want to add a new step.

  4. Click New Step  . Fill in the fields in the Design Step Details dialog box.

    The design steps that you add appear in the Design Steps tab. The first time you add design steps to a test, a footprint appears in the test plan tree next to the test icon, indicating that steps were defined for the test.

    UI elements in the Design Step Details dialog box are described in the following table:

    UI Element (A - Z)

    Description

    Allows you to browse through design steps.

    Check Spelling. Checks the spelling for the selected word or text box.

    Spelling Options. Enables you to configure the way ALM checks spelling.

    Thesaurus. Displays a synonym, antonym, or related word for the selected word.

    Delete Selected. Deletes the selected design steps.

    Attachments. Opens the Attachments page, enabling you to add attachments to the selected design step. For details, see Work with attachments.

    After you add an attachment, the icon displays in the Design Steps grid, next to the appropriate design step.

    Note: If you add an attachment to a design step, a copy of the attachment is made every time the test is run.

    Insert Parameter. Opens the Parameters dialog box, enabling you to insert a test parameter in the Description or Expected Result field. The parameter is inserted at the cursor position. For details, see Test parameters.

    Save Step. Saves the design step.

    Attachments

    Enables you to add attachments that provide additional information about the design step. For details, see Work with attachments.

    Description

    Instructions for the tester to perform.

    Note:  

    • Test parameters included in the Description field are surrounded by <<< >>> brackets.

    • Clicking in this field displays a toolbar for formatting and spell checking the text.

    • Specifying less than 2,500 characters in this field can improve performance.

    Expected Result

    The expected state after the step instructions are performed.

    Note:  

    • Clicking in this field displays a toolbar for formatting and spell checking the text.

    • Test parameters included in the Expected Result field are surrounded by <<< >>> brackets.

    • Specifying less than 2,500 characters in this field can improve performance.

    Step Name

    The name of the step.

    Default value: The sequential number of the design step. For example, step 1, if you are adding a step to a test for the first time.

Back to top

Call a test

You can call a test from within your test that to include the instructions of the called test in your test.

To call a test:

  1. Select the test in which you want to call a test.

  2. Click the Design Steps tab.

  3. If there are existing design steps, select the step below which you want to call a template test.

  4. Click Call to Test  .

  5. In the Select Test dialog box, select the test that you want to call.

    UI Element

    Description

    Show Entity Details. Opens the Details dialog box for the selected entity in read-only mode.

    Refresh. Refreshes the test tree so that it displays the most up-to-date tests.

    Filter/Sort. Opens the Filter Tests dialog box, enabling you to filter and sort the tests in the test plan tree. For details, see Filter dialog box.

    Find. Searches for a specific test in the test plan tree.

    Type the name of the test in the Find box and click the Find button. If the search is successful, the test is highlighted in the tree. Click the Find button again to highlight the next match.

    Go To Test By ID. Opens the Go To Test dialog box, enabling you to select a test by its ID.

    <test plan tree>

    Displays folders in the test plan tree that contain manual tests. If the Show only Template Tests check box is selected, only folders that contain template tests are displayed.

    Expand the tree to locate the test that you want to call.

    Show Only Template Tests

    Instructs ALM to display only template tests. To choose a test that is not a template test, clear the check box.

    A call to the selected template test is inserted below the selected step. When you run the test, the template test's design steps are listed accordingly.

    Tip: To return to the calling test, click in the upper left corner of the design step grid.

  6. If the called test contains parameters, the Called Test Parameters dialog box opens, enabling you to set actual parameter values.

    The actual values are used by default in test instances created from the current test. For details, see Test parameters.

Back to top

Copy and paste design steps

You can copy a design step and pastes it to another test in the same project or in another project. Parameters included in the design step are also copied to the target test.

Copy and paste design steps in the same project

To copy and paste a design step in the same project:

  1. Select the test in which the design step is included, and click Copy Steps.

  2. Select the target test to which the design step is copied, and click Paste Steps.

    The copied design step is inserted above the selected step.

Copy a design step and paste it in another project

To copy a design step and paste it in another project:

  1. Select the test in which the design step is included, and click Copy Steps.

  2. Open the target project, select the target test to which the design step is copied, and click Paste Steps.

    Note: The source and target projects must use the same ALM version and patch level.

  3. In the Paste Design Steps to Target Project dialog box, select one of the following options:

    • Copy design steps and link to existing related entities. ALM copies the design steps and pastes them into the target project. The copied design steps are linked to existing tests with the same name. If a called test does not exist in the target project, ALM copies it to the target project.

    • Copy design steps and related entities. ALM copies the design steps and called tests and pastes them into the target project. If a called test name already exists in the target project, the copied called test is renamed to resolve the duplicate test name.

    • Copy design steps without copying related entities. ALM copies the design steps without copying the called tests, and pastes them into the target project. The copied design steps are not linked to any called tests.

Back to top

Decide which tests to automate

Test designing involves deciding which tests to automate. If you choose to automate a test, you can generate a test script and run the test using UFT One, LoadRunner, or VAPI-XP.

Automating a test allows unattended execution of the test at high speed. It also makes the test reusable and repeatable. For example, you automate functional, benchmark, unit, stress and load tests, as well as tests requiring detailed information about applications.

Consider the following issues when deciding whether to automate a test:

Frequency of execution

The following tests are good candidates for automation:

  • Tests that run with each new version of your application

    These include sanity tests that check basic functionality across an entire application. Each time there is a new version of the application, you run these tests to check the stability of the new version, before proceeding to more in-depth testing.

  • Tests that use multiple data values for the same operation (data-driven tests)

    Running the same test manually — each time with a different set of input data—can be tedious and ineffective. By creating an automated data-driven test, you can run a single test with multiple sets of data.

Stress/load testing

It is also recommended that you automate tests that are run many times (stress tests) and tests that check a multi-user client/server system (load tests).

For example, suppose a test must be repeated a thousand times. Running the test manually would be extremely impractical. In this case, you can create a test that runs a thousand iterations.

When Not to Automate Tests

Generally, the more user involvement a test requires, the less appropriate it is to automate.

The following describes test cases that should not be automated:

  • Usability tests — tests providing usage models that check how easy the application is to use.

  • Tests that you only have to run once.

  • Tests that you need to run immediately.

  • Tests based on user intuition and knowledge of the application.

  • Tests with no predictable results.

Back to top

Generate script for automated tests

After you have created steps for a manual test, you can run the test as an automated test by generating a test script skeleton in which you can write scripts.

Note: You can also generate an automated test before designing test steps, or by selecting an automated test type when you create the test. For details, see Create tests.

To generate an automated test:

In the Design Steps tab, click Generate Script   and choose an automated test type to which to convert. For a list of automated test types, see Test types.

Any text that appeared in the steps of the manual test is listed as comments in the generated test script. If the manual test has parameters, they are also listed as comment text.

Note: After automating a test, you cannot convert it back to the MANUAL test type.

Back to top

See also: