RESTful Web Service Testing Framework Using Dynamic Expected Response Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional testing frameworks for web services are inflexible and labor-intensive, requiring hard coding of expected results and being specific to particular software products, making it difficult to revise or adapt test cases for changes in the system under test.
Innovation Solution
A generalized RESTful testing framework that uses configuration files to separate test scenarios from expected results, automatically generates expected responses at runtime, and employs Web Application Definition Language (WADL) to define APIs and test cases, allowing for agile test case authoring and centralized assertion logic.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional testing frameworks hard code expected results into each test assertion, then test cases can be executed, but revising test cases and composing new test cases becomes complex, time consuming and labor intensive
Solution Approach 1:
The patent segments the testing framework into separate components: test case definitions, expected result generation logic, and assertion mechanisms. This allows test cases to be defined independently of specific expected results, enabling reuse and reducing the time to compose new test cases while maintaining execution reliability through separate validation components.
Solution Approach 2:
The patent introduces dynamic expected result generation that adapts to different input parameters and system states. Instead of static hard-coded expectations, the framework dynamically computes expected results based on actual system behavior, allowing test cases to remain valid across system changes without requiring manual updates.
2Measurement precision
If testing frameworks are specific to a particular software product with hard coded expected responses, then they can provide precise testing, but they cannot be applied to new systems and require complete redesign when products change
Solution Approach 1:
The patent creates a universal testing framework that can be applied to multiple web service systems through parameterized test cases and dynamic expected result generation. The framework accepts different input parameters and adapts to various system behaviors, maintaining precise testing across different products without requiring framework redesign.
Solution Approach 2:
The patent uses parameter changes to enable the same test case structure to work across different systems. By parameterizing test inputs and using dynamic expected result generation based on actual system parameters, the framework maintains precision for each specific system while being adaptable to new systems through parameter configuration rather than structural changes.
3Ease of operation
If general purpose simulators are used to simulate expected responses, then testing can be performed, but they tend to be complex, must be designed for particular test cases, and cannot be changed easily
Solution Approach 1:
The patent implements self-service through automatic expected result generation that computes expectations based on actual system responses rather than requiring complex external simulators. The system serves its own testing needs by analyzing its own behavior patterns, eliminating the need for separate, complex simulator components that would need to be designed and maintained for each test case.
Data Source
AI summary
A generalized testing framework for testing a RESTful web service defines test cases that described RESTful operations on resource object and associated data in configuration files generates HTTP requests to the web service based upon a test case and receives corresponding responses, creates expected responses, and filters fields of interest from the actual and expected responses, and compares the filtered responses to determine whether they match. Expected responses are automatically created during runtime by mapping input data and RESTful API operations to a resource object based upon the test case, avoiding the necessity of predicting responses in advance. Test cases may be readily changed or adapted to different Restful web services by changing configuration files.


