Automated SDK Test Case Generation via API Path Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional methods for testing Software Development Kits (SDKs) are inefficient, requiring extensive manual effort and time, often failing to cover all use cases and detect SDK crashes, due to the large number of test cases needed and the difficulty in controlling test case depth and coverage.

Innovation Solution

An automated system generates optimized test cases by constructing API categories, determining API call paths, and using genetic algorithms to select and optimize test cases, ensuring high coverage and crash detection with reduced manual intervention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If manually designed test cases are used, then test case depth can be controlled, but use case coverage is insufficient and time consumption is high

Engineering Contradiction:
Improvetime consumptionVSAvoiduse case coverage
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The system performs preliminary actions by automatically constructing a comprehensive candidate set of test cases that includes all possible API combinations before execution. This preliminary generation ensures complete use case coverage is achieved upfront, eliminating the need for extensive manual test case design and reducing overall time consumption while maintaining high coverage.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the number of test cases is increased to cover all API combinations, then use case coverage improves, but time and financial costs increase

Engineering Contradiction:
Improveuse case coverageVSAvoidtime and financial costs
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system extracts and identifies the most critical and high-value test cases from the complete candidate set using automated evaluation metrics. By taking out only the essential test cases that provide maximum coverage with minimum execution time, the system achieves high use case coverage while significantly reducing the number of test cases that need to be executed, thereby lowering time and financial costs.

Inventive Principle:
Principle #2Taking out (Extraction)

3Quantity of substance

If random test case generation is used, then test case quantity increases, but test cases may be unrealistic and debugging becomes difficult

Engineering Contradiction:
Improvetest case quantityVSAvoiddebugging friendliness
Core Design Contradiction:
Quantity of substanceVSEase of operation

Solution Approach 1:

The system implements feedback mechanisms by evaluating generated test cases against multiple criteria including realism, feasibility, and expected outcomes. Test cases that fail these evaluation criteria are automatically refined or discarded. This feedback loop ensures that the generated test cases are not only numerous but also realistic and debugging-friendly, as they are continuously improved based on evaluation results.

Inventive Principle:
Principle #23Feedback

4Manufacturing precision

If manual test case design is used, then test case quality can be ensured, but automation level remains low

Engineering Contradiction:
Improvetest case qualityVSAvoidautomation level
Core Design Contradiction:
Manufacturing precisionVSExtent of automation

Solution Approach 1:

The system enables self-service by automatically performing all test case generation, evaluation, optimization, and selection tasks without human intervention. The automated system serves itself by using built-in evaluation metrics to assess and refine test cases, ensuring high quality while achieving complete automation. This eliminates the need for manual test case design while maintaining or even improving test case quality through systematic automated evaluation.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20230350789A1System and method for automatically generating test cases for testing sdks
Publication Date: 2023.11.02 AGORA LAB INC
  • US20230350789A1 patent drawing
  • US20230350789A1 patent drawing
  • US20230350789A1 patent drawing

AI summary

An automatic SDK testing case generation system includes a computer software application for automatically generating optimized test cases. The automatic SDK testing case generation system categorizes candidate APIs presented by an SDK to be tested. The categories conform to an API call category sequence. The system iterates through API calling paths, which conform to the API call category sequence, to generate optimized subsets of test cases. The combination of the optimized subsets of test cases forms the final set of test cases for being used to test the SDK