Skip to main content
Version: DAI 7.5

Building Test Cases With Requirements

Important

Please note that building test cases with requirements in DAI requires a license for the Requirements Traceability feature. Please contact our Customer Support to request a Requirements Traceability license. When you have the license, add it on the Adding Licenses on the DAI License page.

In the Test Case Builder, you can quickly create new or update existing test cases. With built-in requirements validation, this no-code, guided process allows any team member to develop test cases from scratch. To save time, you can duplicate an existing test case, and use this as a template.

You can create Model-based test cases and Script-based test cases.

Build a New Test Case With Requirements

Add a Test Case

Start by adding the details of your test case.

  1. Either go to Designer > Test Cases or if you're editing a model, in the top menu, select Test cases.
  2. Click + New Test Case. Create new test case
  3. Select the type of test case you would like to create - either Model based or Script based.
  4. In the Test Case box, enter a name for your new test case. Do not use any of the following characters in the name: " \ ; : {}.
  5. (Optional) Enter the following details to more easily identify and audit your test case:
    • Description: A brief description of the test case.
    • Origin: The source of the test case. For example, another test application or auditing system.
    • External ID: The unique identifier for the test case in the external system.
    • Tags: Add a tag to easily identify a test case, and associated test results, as belonging to a particular category or feature. You can either select an existing tag from the list or type in a new tag name and press Enter.
  6. If you chose to create a Model-based test case, you will see an option to select your model in the drop-down list. If you chose to create a Script-based test case, you will see an option to choose your test suite in the drop-down list.
  7. Click Create to begin building your test case. For Model-based test cases, the Test Builder opens with the initial step of the test case, and any global actions are highlighted. For Script-based test cases, the Test Case Builder opens with a drop-down list for you to choose the first script to add to a step. Test Case Builder

Define Your Model-based Test Case with Requirements Traceability Feature

Capture the specific path through your model that you want to test. To make sure that you create a valid test case, the Test Case Builder only allows you to select a sequence of states and actions that adhere to the rules built into the model.

  1. Select the requirement group you imported for the test case from the Requirement group drop-down list at the top of the section. Requirememt group

  2. After selecting the requirement group, you see the requirement drop-down list icon in any new step you add or existing steps (if there are any). Requirememt dropdown icon

  3. Proceed to add any requirement to any step required (up to a maximum of 20 requirements for each step). You can refer to the bottom of the requirement drop-down list, or superscript on the icon itself, to know exactly how many requirements are currently assigned to the test step. Requirememt counter

  4. After closing the drop-down list, you see the requirements updated with chips for the assigned requirements below the step. Requirememt chip

    note

    To give you extra control over your requirements, you can perform the following actions from the requirement's chip:

    • Click the x button on a requirement chip to remove that requirement from the step.
    • Click the requirement chip itself to see a pop-up window with more details about the requirement, including the requirement group name (which you can click and link to the requirement page with the requirement group selected) and descriptions.
    • There are 2 buttons within the pop-up window, Remove and Open in Requirements. The Remove option removes a requirement from the current step. The Open in Requirements option opens a new tab that links the Requirement page with the Requirement group and expands the requirement ID in the table.
  5. There is a requirement actions button located in the top-right corner of the Step tab. It is only available when the Step tab is active. The actions button is hidden when the Details/Parameters tab is active. Requirememt action button

    note

    There will be 2 actions available in requirement actions, you can:

    • Hide/Show requirement rows: this option is a toggle that shows or hides the Requirements below each step when there are any requirements assigned to the step.
    • Clear all requirements: this option clears all the requirements assigned to all the steps in the current test case. When you click this button, you see a confirmation pop-up window prompting you to proceed to clear all the requirements or cancel the clear action.
  6. When you're ready, click Save. Then click Run to execute your test case and view the results.

Define Your Script-based Test Case with Requirements Traceability Feature

You can create a Script-based test case with requirements by choosing a suite and scripts within that suite.

  1. Select the requirement group you imported for the test case from the Requirement group drop-down list, which is at the same level as the Scripts label. Requirememt group

  2. To add a step to the test case, click a script from the list in the left panel.

  3. Keep adding steps until you have completed your test case.

  4. You can also add all scripts from the list into your test case by clicking the Add all button.

  5. If you are looking to add specific scripts, but the list in the left panel is too long, you can filter it by typing in the names of the scripts that you would like to add.

  6. Likewise, you can click the Add all button to add all scripts from the filtered list.

  7. Proceed to add any requirement to any step required (up to a maximum of 20 requirements for each step). You can refer to the bottom of the requirements drop-down list or superscript on the icon itself to know exactly how many requirements are currently assigned to the test step. Requirememt counter

  8. After closing the drop-down list, you see the requirements updated with chips for the assigned requirements below the step. Requirememt chip

    note

    To give you extra control over your requirements, you can perform the following actions from the requirement's chip:

    • Click the x button on a requirement chip to remove that requirement from the step.
    • Click the requirement chip itself to see a pop-up window with more details about the requirement, including the requirement group name (which you can click and link to the requirement page with the requirement group selected) and descriptions.
    • There are 2 buttons within the pop-up window, Remove and Open in Requirements. The Remove option removes a requirement from the current step. The Open in Requirements option opens a new tab that links the Requirement page with the Requirement group and expands the requirement ID in the table.
  9. There is a requirement actions button located beside the Requirement group drop-down list. Requirememt actions

    note

    There will be 2 actions available in requirement actions, you can:

    • Hide/Show requirement rows: this option is a toggle that shows or hides the requirements below each step when any are assigned to the step.
    • Clear all requirements: this option clears all the requirements assigned to all the steps in the current test case. When you click this button, you see a confirmation pop-up window prompting you to proceed to clear all the requirements or cancel the clear action.
  10. Once all scripts are added, you can remove any script individually from the script list in the right panel by clicking on the trash button.

  11. You can also remove multiple scripts by checking their checkboxes and clicking the Remove button.

  12. The Remove button becomes Remove all if none of the checkboxes are checked and allows you to quickly remove all added scripts.

  13. When you're ready, click Save. Then click Run to execute your test case and view the results.

note

We now support script selection from helper suites that are defined in Eggplant Functional Helper suite support

The maximum number of scripts/steps that DAI allows in a script-based test case is 1,000. You cannot add more than 1,000 scripts/steps to a script-based test case.

Edit an Existing Test Case

Important

It's important to maintain your test cases. A test case can become invalid if you change the name of a state or action in a model, or related parameters, and don't update the affected steps.

To update a test case:

  1. Go to Designer > Test Cases. Search or filter the list to find the test case you're interested in.
  2. From the actions menu, select Edit. The test case appears ready for editing. If the test case is already out-of-step with recent model changes, an error appears. In this case, click Edit and follow the on-screen text to resolve the error.
  3. You can now do the same editing tasks as when you create a new test case, including removing and adding steps, updating parameter values, and changing the Test Case name.
  4. When you have made all changes, click Save.
  • To learn more about viewing, managing, and analyzing existing test cases, see Managing Test Cases.
  • To understand more about test cases in Eggplant DAI, and how they influence your test results, see About Test Cases.