API Adapter Test Code Generation Using State Transition Patterns

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for generating test codes for API adapters do not consider transition state patterns, requiring significant manual labor from developers.

Innovation Solution

A test code generation device and method that includes an action generation unit to acquire API-related data and generate action code data corresponding to state transition patterns, and a test code generation unit to create test codes based on this data, automating the process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If test codes are generated manually considering state transition patterns, then test code quality and completeness are improved, but development time and labor cost increase

Engineering Contradiction:
Improvetest code qualityVSAvoiddevelopment time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by automatically generating test code templates based on API specifications before actual testing begins. The test code generation unit creates reusable templates that incorporate state transition patterns in advance, eliminating the need for manual test code creation during development phases.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses copying by generating test code templates that can be reused across different testing scenarios. Once a test code template is created for a particular state transition pattern, it can be copied and adapted for similar testing needs, significantly reducing repetitive manual work while maintaining test quality.

Inventive Principle:
Principle #26Copying

2Productivity

If test code generation is automated without considering state transition patterns, then development efficiency is improved, but test code completeness deteriorates

Engineering Contradiction:
Improvedevelopment efficiencyVSAvoidtest code completeness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements feedback by having the test code generation unit reference pre-defined state transition patterns during test code generation. The generation process continuously checks against the state transition pattern database to ensure all necessary test cases are included, providing feedback loops that guarantee test code completeness while maintaining automation.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system achieves universality by creating a multi-functional test code generation unit that can handle various API specifications and state transition patterns through a unified automated process. This single unit performs multiple functions including template generation, pattern matching, and test case creation, maintaining both efficiency and completeness.

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

3Reliability

If manual test code generation is used to cover all state transition patterns, then test coverage is improved, but labor cost increases

Engineering Contradiction:
Improvetest coverageVSAvoidlabor cost
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The system applies self-service by enabling automatic generation of comprehensive test codes that cover all state transition patterns without requiring manual intervention. The test code generation unit autonomously processes API specifications, references state transition patterns, and produces complete test suites, eliminating the need for manual test code creation labor.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system uses copying to reduce labor costs by creating reusable test code templates that automatically cover all state transition patterns. Once templates are generated, they can be copied and executed repeatedly for different API scenarios, maintaining full test coverage without requiring repeated manual effort.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS12536095B2Test code generator, test code generation method, and, test code generation program
Publication Date: 2026.01.27 NT T INC
  • US12536095B2 patent drawing
  • US12536095B2 patent drawing
  • US12536095B2 patent drawing

AI summary

A test code generation device includes an action generation unit that acquires at least one of pieces of API-related data of an API specification, an API execution order file, a parameter setting file, a script setting file, a test type, and a parameter list and generates action code data corresponding to an action of a state transition pattern of an API adapter, and the test code generation unit that generates a test code of the API adapter based on the action code data generated by the action generation unit and the state transition pattern of the API adapter.