ML-Based Test Script Generation from Product Requirements

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional test script generation requires intense manual effort, lacks comprehensive test coverage, and is prone to errors, necessitating skilled resources and manual creation of keywords and test scripts, especially in automated functional testing.

Innovation Solution

A method and system utilizing pre-trained machine learning models for classifying product requirements into categories, generating predefined questions, and determining answer-values to automatically create test scripts, leveraging Natural Language Processing (NLP) for extracting logical functions from product requirement documents.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional manual test script generation is used, then test scripts can be created with human expertise, but it requires intense manual effort and skilled resources

Engineering Contradiction:
Improvetest script qualityVSAvoidmanual effort
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system enables automatic test script generation by having the machine learning models self-process product requirements and generate test scripts without human intervention. The first ML model automatically classifies requirements into categories, the second ML model extracts test cases and parameters, and the system automatically generates executable test scripts, eliminating the need for manual test script creation by skilled testers.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical process of manual test script creation with an automated intelligent system. Instead of testers manually analyzing requirements and writing test scripts, the system uses pre-trained machine learning models to perform classification, extraction, and generation tasks, substituting human cognitive work with automated AI processing.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If traditional manual test script generation is used, then test scripts can be created with product knowledge, but it suffers from lack of test coverage and increased probability of errors

Engineering Contradiction:
Improvetest coverageVSAvoiderror probability
Core Design Contradiction:
ReliabilityVSManufacturing precision

Solution Approach 1:

The machine learning models are trained to handle multiple types of product requirements across different categories (UI, API, database, etc.). The system universally processes various requirement formats and generates comprehensive test cases for all categories, ensuring complete test coverage without missing edge cases that manual methods might overlook.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system incorporates feedback mechanisms where the ML models learn from the classification and extraction processes to improve accuracy. The models analyze the relationship between product requirements and expected test cases, continuously refining their understanding to reduce errors and improve test coverage in subsequent generations.

Inventive Principle:
Principle #23Feedback

3Productivity

If Behavior Driven Development (BDD) techniques are used for automated test script generation, then test scripts can be generated automatically from test cases, but it requires creation of keywords and corresponding test scripts manually

Engineering Contradiction:
Improveautomation levelVSAvoidkeyword creation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system performs preliminary classification of product requirements into categories before generating test cases. The first ML model pre-processes requirements by identifying their categories (UI, API, database, etc.), which then guides the second ML model to generate appropriate test cases and parameters, eliminating the need for manual keyword creation and organization.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts test cases and parameters directly from product requirements using the second ML model, without requiring intermediate keyword definitions. The system takes out the essential testing information directly from the requirement text and transforms it into executable test scripts, bypassing the complex keyword creation step required by BDD approaches.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS20240345940A1Method and system for generating test scripts
Publication Date: 2024.10.17 HCL TECH LTD
  • US20240345940A1 patent drawing
  • US20240345940A1 patent drawing
  • US20240345940A1 patent drawing

AI summary

The method and system for generating test script from product requirements is disclosed. The method may include classifying a product requirement into a corresponding category of a plurality of predefined categories, using a first pre-trained machine learning (ML) model and obtaining a set of predefined questions corresponding to the product requirement, based on the category associated with the product requirement, from a database. The method may further include determining an answer-value corresponding to each predefined question of the set of predefined questions, using a second pre-trained machine learning (ML) model and generating a test script based on the set of predefined questions and the answer value corresponding to each question of the set of questions.