Skip to main content

Generate Test Cases for Each Requirement Model

Overview

This sample takes a software requirements model in Next Design and a JSON file defining test viewpoints as inputs, and designs test cases for conformity verification.

  • In this sample, for the selected top element, the leaf requirements under it are targeted.
    For each requirement, test viewpoints are applied in order and AI agents are used to design test cases.
  • During generation, the workflow creates, in a hierarchical manner, "Test Case Design", "Test Case Design Layer", and "Design Test Cases",
    and sets traceability to the original requirements.
    This allows you to validate the process of organizing test cases by viewpoint while designing them to correspond to requirement contents.

The objective is to create test case design models based on the content of the requirement model and to confirm the flow of using AI to streamline the derivation from requirements to test design.

Capabilities of this sample

  • Extract leaf requirements from the requirement model selected within Next Design
  • Create models in Next Design following the metamodel structure
  • Read test viewpoints from a JSON file and use them within the workflow
  • Apply each test viewpoint to each requirement and process combinations iteratively
  • Set traceability between the generated models and the originating requirements
  • Pass Next Design model information to AI agents for utilization

Intended users

This sample is intended mainly for:

  • Designers and test engineers who want to efficiently design test cases from Next Design requirement models
  • Personnel who want to see an example of model generation that integrates Next Design with AI agents

Included items

This sample includes the following example data.

tip

After running this sample to confirm its operation, you can replace the input/output files with your own artifacts to try it in a context closer to your actual work.
When replacing files, follow the steps described in "Steps to replace with your own artifacts" and then perform the "Procedure" accordingly.

TypeContentsSteps to replace with your own artifacts
Workflow definitionNDSW要求からND適格性確認テスト生成不可変更
Agent definitionNDSW要求モデルからND適格性確認テストモデル生成不可変更
Input: test viewpoints fileinputData/適格性確認テスト観点.json1. Place your own test viewpoint file in JSON format into the inputData folder.
2. Specify the path in step 4 of the Procedure.
Input/Output: Next Design projectinputData/先進運転システムソフト開発(デモ).nproj不可変更
DocumentationThis README不可変更

Using the sample data

Prerequisites

  • The target Next Design project is open
  • A software requirements model that serves as the input exists in the Next Design project
  • A destination for created output models exists in the Next Design project (e.g., 先進運転システムソフト開発/テスト設計)
  • The following data structures match the inputs expected by this sample:
    • Next Design metamodel
    • Test viewpoints file (JSON)

Inputs and outputs

  • Input: leaf requirements under the selected requirement model in Next Design, test viewpoints file (JSON)
  • Output:
    • Models generated in Next Design
      • Test design category
      • Test case designs for each leaf requirement
      • Test case design layers per viewpoint
      • Design test cases under each layer
    • Traceability between requirements and generated models

Procedure

  1. Open the Next Design project and select the top element that contains the target software requirements model.
    Example: 先進運転システムソフト開発/ソフト要求仕様開発/ソフト要求仕様/ADAS ECU/アダプティブクルーズコントロール/定速走行
  2. In DC Agentiqs, go to the workflow screen and click "NDSW要求からND適格性確認テスト生成".
  3. In the workflow editor, click "Run".
  4. A dialog appears; if necessary, specify the test viewpoints file path and click "Run".
  5. After the workflow completes, the following will be created under Next Design's 先進運転システムソフト開発/テスト設計:
    • "Conformity Verification Tests" category
    • Generated test design models

Applicable components

  • Workflow: NDSW要求からND適格性確認テスト生成
  • Agent: NDSW要求モデルからND適格性確認テストモデル生成

Constraints

  • This sample's processing flow assumes the input test viewpoints file (JSON) and the Next Design metamodel structure.
    If these structures differ, the processing logic must be reviewed.
  • Test design models are created to a predetermined destination.
  • Processing may take a long time if there are many input software requirements or many test viewpoints.

Reference: Workflow execution flow

This sample demonstrates a configuration that combines Next Design model information, external test viewpoint files, and AI agents to design test cases per requirement and per viewpoint.

  1. Read the test viewpoints JSON and obtain the list of viewpoints
  2. Extract leaf requirements under the selected model in Next Design
  3. Create a "Test Design Category" at the target location for test designs
  4. Create test case design models for each leaf requirement
  5. For each requirement, input each test viewpoint to the AI agent in sequence and create the following:
    • Test case design layers
    • Design test cases
  6. Set traceability between the generated layers/design test cases and the original requirements