メインコンテンツまでスキップ
バージョン: DAI 7.0

Building Test Cases

In the Test Case Builder, you can quickly create new or update existing test cases. With built-in 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

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 Add New +. 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 include any of the following characters: " \ ; : {}.

  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 have chosen Model based there will be an option to choose your model in the dropdown. If you have chosen Script based there will be an option to choose your suite in the dropdown.

  7. Click Create to begin building your test case. For Model based, The Test Case Builder appears with the initial step of the test case, and any global actions, highlighted. For Script based, The Test Case Builder appears with a dropdown to choose a first script to add to a step.
    Test Case Builder

Define Your Model based Test Case

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. To add the Initial step, as the starting point for your test case, either:

    • Click on a highlighted action on the model canvas

    • Select an action from the Steps list.

      Steps list

      A step is added to the list, and the next available actions are ready for selection.

    ノート
    • If the selected action is connected to submodel, this will appear as a step.
    • When actions are connected in a sequence within a state, the sequence controls the order in which the actions are available for selection.
  2. Keep adding actions until you either:

    • Reach the end of the sequence of states and actions that you want to test.
    • There are no actions left to select, and the following message appears: There is no valid action to add as step.

    If you add any steps in error, click on the Trash icon to remove them.

  3. To insert a step at a different position in the Test Case, as opposed to the end, click on the Add step below button. The Steps list will move below the appointed step. You may select an action to add a new step below the appointed step and add within the list.

  4. As you add steps, build errors may be highlighted at the top of the page, which are commonly due to missing parameter values. Just click on the Parameters tab to see which parameters are highlighted. You may choose to leave certain parameter values blank.

    ノート

    To give you extra control as you build a test case, you can:

    • Enter specific values for global, state, or action parameters that have generated values within the model. Or, if you leave them blank, generated values are used when you run the test case.
    • Enter different values for the same state parameter when that state is triggered multiple times within the same test case.
  5. When you're ready, click Save. Then click Run to execute your test case and view the results.

Define Your Script based Test Case

This allows you to create a Script based Test Case by choosing a suite and scripts within that suite.

  1. To add a step to the test case, choose a script from the dropdown box

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

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

ノート

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

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.