Skip to main content

Generating Test Cases for Each Requirements Model

Overview

This is a sample for designing test cases for qualification testing, using a software requirements model within Next Design and a JSON file defining test perspectives as input.

  • This sample targets the terminal requirements under the selected top element, and uses an AI agent to design test cases by sequentially applying each test perspective to each requirement.
  • During generation, "Test Case Design," "Test Case Design Layer," and "Designed Test Case" are created hierarchically, and traceability to the original requirements is also set. This allows you to confirm the flow of designing test cases while organizing them by perspective, corresponding to the requirements.

The purpose is to create a test case design model based on the contents of the requirements model and to confirm the flow of streamlining the process from requirements to test design using AI.

What this sample can do

  • Extract end-level requirements from the requirements model within Next Design
  • Create a model in Next Design according to the metamodel structure
  • Read test perspectives from a JSON file and use them in the workflow
  • Apply each test perspective to each requirement and process iteratively in combination units
  • Set traceability between the generated model and the requirements
  • Pass Next Design model information to an AI agent for use

Intended Users

This sample is primarily intended for the following users:

  • Designers and testers who want to efficiently design test cases from requirements models in Next Design
  • Users who want to see examples of how to use model generation by linking Next Design and an AI agent

Contents Included

This sample includes the following data as an example:

TypeContent
Workflow DefinitionGeneration of ND Qualification Tests from NDSW Requirements
Agent DefinitionGeneration of ND Qualification Test Models from NDSW Requirements Models
Input: Test Perspective FileinputData/QualificationTestPerspectives.json
Input/Output: Next Design ProjectinputData/Advanced Driving System Software Development (Demo).nproj
DocumentationThis README

Using Sample Data

Prerequisites

  • The target Next Design project is open.
  • The Next Design project contains an input SW requirements model.
  • The Next Design project contains a destination for the output model (Advanced Driving System Software Development/Test Design).
  • The following data structure is the same as the input for this sample.
    • Next Design Metamodel
    • Test Perspective File (JSON)

Input/Output

  • Input: Terminal requirements under the selected requirements model in Next Design, Test Perspective File (JSON)
  • Output:
    • Model generated on Next Design
      • Test Design Category
      • Test Case Design for Each End-Level Requirement
      • Test Case Design Layer for Each Perspective
      • Design Test Cases Under Each Layer
    • Traceability of Requirements and Generated Models

Work Procedure

  1. Open the Next Design project and select the top element containing the target SW requirement model.
    Example: Advanced Driver-Assistance System Software Development/Software Requirements Specification Development/Software Requirements Specification/ADAS ECU/Adaptive Cruise Control/Constant Speed ​​Driving
  2. On the Agentiqs workflow screen, click "Generate ND Qualification Tests from NDSW Requirements".
  3. On the workflow editing screen, click "Execute".
  4. A dialog box will appear. Specify the test perspective file path as needed and click "Execute".
  5. After the workflow is complete, the following will be created under "Advanced Driver-Assistance System Software Development/Test Design" in Next Design.
    • "Qualification Test" Category
    • Generated Test Design Models

Target Operation

  • Workflow: Generation of ND Qualification Tests from NDSW Requests
  • Agent: Generation of ND Qualification Test Models from NDSW Request Models

Constraints

  • This sample's processing flow assumes the input test perspective file (JSON) and the Next Design metamodel structure. If these structures differ, the processing content needs to be reviewed.
  • Test design models are created in a predetermined location.
  • Completion will take time if there are many input SW requests or test perspectives.

Reference: Workflow Execution Flow

This sample demonstrates a configuration that combines Next Design model information, external file test perspectives, and an AI agent to design test cases for each request and perspective.

  1. Read the test perspective JSON and obtain a list of perspectives.
  2. Extract the terminal requirements under the model selected in Next Design.
  3. Create a "Test Design Category" in the destination of the test design.
  4. Create a test case design model for each terminal requirement.
  5. Input each test perspective for each requirement into the AI ​​agent in order and create the following:
    • Test case design layer
    • Design test case
  6. Set traceability between the generated layer and design test case and the original requirement.