Biased Random API Test Generation via REST

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional methods for testing Representational State Transfer (REST) APIs are limited in generating a range of tests to locate unknown deficiencies, often focusing on valid requests and failing to effectively validate the system's performance with erroneous requests, which can lead to hidden deficiencies and unexpected behaviors.

Innovation Solution

A system and method for conducting model-based, biased, and random test generation through REST APIs, where the state of the System Under Test (SUT) is continuously monitored and updated, biasing the generation of validation tests towards valid requests and incorporating semantic checking to enhance testing robustness.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional testing methods focus on valid requests, then the testing process is simple and easy to implement, but the system's performance with erroneous requests cannot be effectively validated, leading to hidden deficiencies

Engineering Contradiction:
Improvevalidation of system performance with erroneous requestsVSAvoidtesting process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The testing system dynamically adjusts the proportion of valid versus erroneous requests based on testing progress and system state. The test generation module continuously monitors system responses and adapts the test mix, transitioning from primarily valid requests to including erroneous requests as testing deepens, thereby resolving the contradiction between testing reliability and process complexity

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes key parameters of test requests including data formats, value ranges, and structural properties to generate both valid and erroneous requests. By systematically varying these parameters, the system can effectively test error handling while maintaining a structured approach that doesn't overly complicate the testing process

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If model-based biased random test generation is used to generate syntactically and semantically valid requests, then the comprehensiveness and predictability of validation tests improve, but the device complexity and implementation difficulty increase

Engineering Contradiction:
Improvepredictability and comprehensiveness of validation testsVSAvoidtesting system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by maintaining a model of the system under test and pre-defining biasing strategies before actual testing begins. This preliminary modeling and bias selection framework enables comprehensive and predictable test generation without requiring complex real-time decision-making during execution, thus improving measurement precision while managing device complexity

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces a test generation module as an intermediary between the testing objectives and the actual test execution. This module uses system models and biasing mechanisms to translate high-level testing goals into specific test requests, thereby improving test comprehensiveness and predictability while abstracting away the complexity from the overall testing system

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11748238B2Model-based biased random system test through rest API
Publication Date: 2023.09.05 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11748238B2 patent drawing
  • US11748238B2 patent drawing
  • US11748238B2 patent drawing

AI summary

Embodiments relate to a system, program product, and method for validating a system under test (SUT). The method includes selecting one or more random biases for one or more properties of the one or more API requests. The method also includes transmitting the one or more API requests to the SUT, transmitting an API response from the SUT for each of the one or more API requests, and validating each API response.