Microservice Test Support via State Transition Correspondence

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing test support methods, such as those described in Japanese Patent Application Publication No. 2020-9271, are inadequate for efficiently conducting tests when multiple services cooperate to form one service, particularly in Microservice Architecture (MSA), as they do not account for the correspondence relationship between state transitions of individual services.

Innovation Solution

A test support apparatus and method that generates a test scenario based on state transition information and correspondence information between state transitions of individual services, creating a stateful pact and test program to ensure data integrity testing across multiple microservices, including consideration of trigger events and abnormal events.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional test methods using state transition pair information are used, then testing of individual services can be conducted, but testing of multiple cooperative services cannot be conducted efficiently

Engineering Contradiction:
Improvetesting efficiencyVSAvoidapplicability to multiple services
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the service system into multiple individual services, each with its own state transition information. By dividing the overall service into separable units with defined interfaces, the system can generate test cases for each service independently while still testing their cooperative behavior through the correspondence relationship between state transitions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces correspondence information as an intermediary element that links state transition information from different services. This intermediary establishes the relationship between trigger events in one service and state transitions in another service, enabling efficient testing of multiple cooperative services without requiring complex manual test case design.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of manufacture

If state transition pair information for single service is used, then test case generation is simple, but correspondence relationship between multiple services is not captured

Engineering Contradiction:
Improvetest case generation simplicityVSAvoiddata integrity testing accuracy
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent merges state transition information from multiple services by combining them through correspondence information. This integration maintains the simplicity of individual service testing while adding the necessary relationships between services, ensuring that data integrity across service boundaries is properly tested without significantly complicating the test case generation process.

Inventive Principle:
Principle #5Merging (Combining)

3Productivity

If microservice architecture is adopted, then system development can be parallelized, but state transition correspondence between services becomes unclear

Engineering Contradiction:
Improvedevelopment parallelizationVSAvoidstate transition relationship complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by generating and storing state transition information and correspondence information for each microservice during the development phase. This preparatory work establishes the relationships between services in advance, allowing parallel development to proceed while maintaining clarity about state transition correspondences through pre-defined interfaces and relationships.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250021455A1Test support apparatus and test support method
Publication Date: 2025.01.16 HITACHI LTD
  • US20250021455A1 patent drawing
  • US20250021455A1 patent drawing
  • US20250021455A1 patent drawing

AI summary

Based on a state transition table of each of individual services and a state transition correspondence table that shows the correspondence relationship between a state transition in each individual service and a trigger event that triggers a state transition of another individual service caused by that state transition, a test scenario generation portion 15 generates a test scenario indicating a state transition pattern of a test target service and a state transition pattern of a coupling destination service that occurs in conjunction with that state transition pattern. A stateful pact generation portion 16 generates a stateful pact describing a response of the coupling destination service that takes into account the transition pattern of the coupling destination service. Based on the test scenario and the stateful pact, a test program generation portion 17 generates a pact test program, which is a program for conducting a test.