# US 2019/0155721 A1 · Automated integration testing with mock microservices

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0155721 A1
- Document ID: US20190155721A1
- Status: Published application
- Kind: A1
- Application number: 15/817,364
- Filed: 2017-11-20
- Published: 2019-05-23
- Earliest claimed: 2017-11-20
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: John A. Reeve; Mark Peter Frost; Paul S.M. Thorpe
- Web page: https://patentgrep.com/patent/US20190155721A1

## CPC

- G06F 11/3696: {Methods or tools to render software testable}
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 11/3692: {for test results analysis}
- G06F 17/17: Function evaluation by approximation methods, e.g. inter- or extrapolation, smoothing, least mean square method ({G06F17/18 takes precedence } ; interpolation for numerical control G05B19/18)
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 18/231: Hierarchical techniques, i.e. dividing or merging pattern sets so as to obtain a dendrogram
- G06F 11/36: Prevention of errors by analysis, debugging or testing of software
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Automated software-testing systems and computer program products use mock software entities to perform integration testing on a microservices-based application. The mock entities emulate the behavior of other microservices or external software applications that would normally interact with the tested microservices in a production environment. The mock entities are managed by a mock server that communicates with the test system through a messaging system. The mock server determines how the mock entities should respond to the tested application's service requests by referring to test guidelines stored in a behavior store. During testing, the test system dynamically updates the behavior store in response to the tested application's service requests and to other indicators of the current state of the tested application. If the tested application interacts with the mock entities during the test as expected, the test system deems the application to have passed the integration test.

## Claims

### Claim 1

An automated application-testing system comprising a processor, a memory coupled to the processor, and a computer-readable hardware storage device coupled to the processor, the storage device containing program code configured to be run by the processor via the memory to implement a method for automated integration testing with mock microservices, the method comprising:
the processor accepting from the automated application-testing system a request to perform an integration test upon a tested set of microservices, where the tested set of microservices is comprised by a tested application;
the processor launching a mock server;
the processor directing the mock server to launch and maintain a mock entity; where the mock entity emulates the operation of a software entity that is not a subject of the integration test;
the processor receiving from the mock server a first service request that had been communicated to the mock entity by the tested set;
the processor, in response to the receiving, sending to the tested set a service response to the most recently received service request, where the sending comprises communicating the service response to the mock server and the mock server directing the mock entity to forward the service response to the tested set;
the processor repeating the sending each time the processor receives another service request from the mock server;
the processor determining, from the repeated receiving, that the tested set is operating correctly; and
the processor returning to the automated application-testing system a notification that the tested set has passed the integration test.

### Claim 2 (depends on 1)

The system of claim 1, where the tested set comprises all microservices of the tested application and the mock entity emulates a software entity that is capable of communicating with the tested application.

### Claim 3 (depends on 1)

The system of claim 1,
where the mock entity emulates an untested microservice of the tested application and
where the untested microservice is capable of communicating with a tested microservice of the tested set.

### Claim 4 (depends on 1)

The system of claim 1, where the processor communicates with the mock server through a messaging system.

### Claim 5 (depends on 4)

The system of claim 4, where the messaging system s a publish-subscribe system.

### Claim 6 (depends on 1)

The system of claim 1,
where the automated application-testing system comprises a behavior store,
where each service response sent by the processor to the mock server is selected as a function of contents of the behavior store.

### Claim 7 (depends on 6)

The system of claim 6,
where the automated application-testing system further comprises a test script, and
where the processor dynamically updates the contents of the behavior store during the integration test as a function of the test script.

### Claim 8 (depends on 7)

The system of claim 7, where the dynamic updating is performed as a further function of a current state of the tested set.

### Claim 9 (depends on 7)

The system of claim 7, where the dynamic updating is performed in response to communications received from the tested set.

### Claim at position 10

10-15. (canceled)

### Claim 16

A computer program product, comprising a computer-readable hardware storage device having a computer-readable program code stored therein, the program code configured to be executed by an automated application-testing system comprising a processor, a memory coupled to the processor, and a computer-readable hardware storage device coupled to the processor, the storage device containing program code configured to be run by the processor via the memory to implement a method for automated integration testing with mock microservices, the method comprising:
the processor accepting from the automated application-testing system a request to perform an integration test upon a tested set of microservices, where the tested set of microservices is comprised by a tested application;
the processor launching a mock server;
the processor directing the mock server to launch and maintain a mock entity, where the mock entity emulates the operation of a software entity that is not a subject of the integration test;
the processor receiving from the mock server a first service request that had been communicated to the mock entity by the tested set;
the processor, in response to the receiving, sending to the tested set a service response to the most recently received service request, where the sending comprises communicating the service response to the mock server and the mock server directing the mock entity to forward the service response to the tested set;
the processor repeating the sending each time the processor receives another service request from the mock server;
the processor determining, from the repeated receiving, that the tested set s operating correctly; and
the processor returning to the automated application-testing system a notification that the tested set has passed the integration test.

### Claim 17 (depends on 16)

The computer program product of claim 16, where the tested set comprises all microservices of the tested application and the mock entity emulates a software entity that is capable of communicating with the tested application.

### Claim 18 (depends on 16)

The computer program product of claim 16,
where the mock entity emulates an untested microservice of the tested application and
where the untested microservice is capable of communicating with a tested microservice of the tested set.

### Claim 19 (depends on 16)

The computer program product of claim 16, where the processor communicates with the mock server through a messaging system.

### Claim 20 (depends on 16)

The computer program product of claim 16,
where the automated application-testing system comprises a behavior store
where each service response is selected as a function of contents of the behavior store, and
where the behavior store is dynamically updated during the integration test in response to communications received from the tested set.
