REST API Validation via Combinatorial Test Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing REST APIs lack comprehensive validation tools to ensure conformance to REST standards, leading to potential performance issues and security vulnerabilities, as they often require manual testing and lack automated checks for consistency and correctness.

Innovation Solution

A REST API validation system that automatically generates test inputs from REST API specifications, performs security and functional testing, and checks for compliance with REST standards, including HTTP return codes, mandatory parameters, and HATEOAS links, using combinatorial testing algorithms and parsers to validate all possible parameter combinations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual testing is used for REST APIs, then flexibility in testing approach is maintained, but validation comprehensiveness and consistency are insufficient

Engineering Contradiction:
ImproveAPI validation reliabilityVSAvoidtesting system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The validation system automatically generates test inputs from the REST API specification itself, making the specification serve its own validation purpose without requiring external test case creation. The system extracts parameters, constraints, and expected behaviors directly from the specification document and uses them to generate comprehensive test cases automatically.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary parsing and analysis of the REST API specification to extract all parameters, constraints, and expected behaviors before generating test cases. This preliminary action ensures that all validation requirements are identified and incorporated into the test generation process, improving comprehensive coverage.

Inventive Principle:
Principle #10Preliminary action

2Manufacturing precision

If automated validation is implemented, then validation comprehensiveness and consistency improve, but system complexity increases

Engineering Contradiction:
Improvevalidation precisionVSAvoidvalidation system complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The system introduces an intermediary layer that parses the REST API specification and generates an internal representation of the API structure, parameters, and constraints. This intermediary representation serves as a bridge between the specification document and the test generation engine, enabling automated validation without requiring complex direct parsing during test execution.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The validation system segments the REST API specification into distinct components such as endpoints, parameters, request bodies, response formats, and constraints. Each segment is processed independently to generate targeted test cases, improving precision while managing complexity through modular processing.

Inventive Principle:
Principle #1Segmentation

3Reliability

If all possible parameter combinations are tested, then validation completeness is achieved, but testing time and computational resources increase

Engineering Contradiction:
Improvevalidation completenessVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system generates test cases that cover all possible parameter combinations as specified in the REST API specification, including edge cases and constraint violations. This excessive action ensures complete validation coverage by testing beyond typical usage scenarios, validating all boundary conditions and error states defined in the specification.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system systematically varies parameter values across all possible combinations based on the constraints and data types defined in the REST API specification. By automating parameter generation and variation, the system achieves comprehensive coverage without manual intervention for each test case, reducing the time penalty of exhaustive testing.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11829283B2REST Api validation
Publication Date: 2023.11.28 ORACLE INT CORP
  • US11829283B2 patent drawing
  • US11829283B2 patent drawing
  • US11829283B2 patent drawing

AI summary

Embodiments validate representational state transfer (“REST”) application program interfaces (“API”). Embodiments receive a REST API specification that provides information for a plurality of REST APIs and parse the REST API specification to extract, for each REST API, a corresponding Uniform Resource Locator (“URL”), and corresponding parameter names response codes and payloads. Embodiments convert the parsed REST API specification into a converted text file, the converting including parameter constraints and parameter default values. Embodiments then generate all possible combinations of test data for each REST API from the converted text file and perform one or more test operations on each of the combinations of test data.