IP Library › Granted Patent US 11,086,763
Granted Patent B2
US 11,086,763 · App. 16/898,271 · Granted Aug 10, 2021

Asynchronous consumer-driven contract testing in micro service architecture

Inventor: Yingqiao Liu (Shanghai, CN)
Assignee: SAP SE
G06F11/3672G06F9/546H04L63/123H04L67/26H04L67/34G06F2209/548
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,086,763
App. No.
16/898,271
Granted
Aug 10, 2021
Kind
B2
Abstract

A method of verifying, during a continuous integration (CI) and continuous delivery (CD) process, that an asynchronous message contract between a consumer service and a provider service in a microservice architecture has not been broken by a change to the provider service is disclosed. The asynchronous message contract is retrieved from a central server. A test message queue is created, the test message queue being separate from an existing message queue. Generation of a message based on a precondition specified in the asynchronous message contract is triggered. The message is retrieved from the test queue. The message is verified according to the asynchronous message contract, the verifying based on a build error not being generated during the CI and CD process.

Claims (41)

1. A system comprising:

one or more computer processors;

one or more computer memories; and

a set of instructions incorporated into the one or more computer memories, the set of instructions configuring the one or more computer processors to perform operations for verifying a message, the operations comprising:

selecting an asynchronous message contract based on a phase of a continuous integration (CI) and continuous delivery (CD) process into which the verifying of the message is integrated and a code branch into which the asynchronous message contract is stored on a central server, the asynchronous message contract having been pushed to the central server by a consumer service; retrieving the asynchronous message contract from the central server;

creating a test message queue, the test message queue being separate from an existing message queue;

triggering generation of a message based on a precondition specified in the asynchronous message contract;

getting the message from the test queue; and

performing the verifying of the message according to the asynchronous message contract.

2. The system of claim 1 , wherein the precondition includes calling a standard Application Program Interface (API) of a provider service and the triggering of the generation of the message includes performing the calling of the standard API.

3. The system of claim 1 , wherein a satisfaction of the precondition includes calling a non-standard API of a provider service and the triggering of the generation of the message includes writing the non-standard API on-demand and performing the calling of the non-standard API.

4. The system of claim 1 , wherein the generation of the message includes restoring basic master data from a test tenant template corresponding to the message.

5. The system of claim 1 , wherein the performing of the verifying of the message is based on changes to source code using tools that are invokable from within one or more docker containers.

6. The system of claim 1 , wherein the precondition is empty.

7. The system of claim 1 , wherein the precondition is a creation of a product.

8. A method comprising:

performing, using one or more computer processors, operations for verifying a message, the operations comprising:

selecting an asynchronous message contract based on a phase of a continuous integration (CI) and continuous delivery (CD) process into which the verifying of the message is integrated and a code branch into which the asynchronous message contract is stored on a central server, the asynchronous message contract having been pushed to the central server by a consumer service;

retrieving the asynchronous message contract from the central server;

creating a test message queue, the test message queue being separate from an existing message queue;

triggering generation of a message based on a precondition specified in the asynchronous message contract;

getting the message from the test message queue; and

performing the verifying of the message according to the asynchronous message contract.

9. The method of claim 8 , wherein the precondition includes calling a standard Application Program Interface (API) of a provider service and the triggering of the generation of the message includes performing the calling of the standard API.

10. The method of claim 8 , wherein a satisfaction of the precondition includes calling a non-standard API of a provider service and the triggering of the generation of the message includes writing the non-standard API on-demand and performing the calling of the non-standard API.

11. The method of claim 8 , wherein the generation of the message includes restoring basic master data from a test tenant template corresponding to the message.

12. The method of claim 8 , wherein the performing of the verifying of the message is based on changes to source code using tools that are invokable from within one or more docker containers.

13. The method of claim 8 , wherein the precondition is empty.

14. The method of claim 8 , wherein the precondition is a creation of a product.

15. A non-transitory machine-readable storage medium including a set of instructions that, when executed by one or more computer processors, cause the one or more computer processors to perform operations for verifying a message, the operations comprising:

selecting an asynchronous message contract based on a phase of a continuous integration (CI) and continuous delivery (CD) process into which the verifying of the message is integrated and a code branch into which the asynchronous message contract is stored on a central server, the asynchronous message contract having been pushed to the central server by a consumer service;

retrieving the asynchronous message contract from the central server;

creating a test message queue, the test message queue being separate from an existing message queue;

triggering generation of a message based on a precondition specified in the asynchronous message contract;

getting the message from the test message queue; and

performing the verifying of the message according to the asynchronous message contract.

16. The non-transitory machine-readable storage medium of claim 15 , wherein the precondition includes calling a standard Application Program Interface (API) of a provider service and the triggering of the generation of the message includes performing the calling of the standard API.

17. The non-transitory machine-readable storage medium of claim 15 , wherein a satisfaction of the precondition includes calling a non-standard API of a provider service and the triggering of the generation of the message includes writing the non-standard API on-demand and performing the calling of the non-standard API.

18. The non-transitory machine-readable storage medium of claim 15 , wherein the generation of the message includes restoring basic master data from a test tenant template corresponding to the message.

19. The non-transitory machine-readable medium of claim 15 , wherein the precondition is empty.

20. The non-transitory machine-readable medium of claim 15 , wherein the precondition is a creation of a product.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 23, 2020
From: LIU, YINGQIAO
To: SAP SE
Reel/Frame 053011/0119 →
Continuity (2)
Continuation 16202901 · Nov 28, 2018
Related Publication 20200334131A1 · Oct 22, 2020
Cited By (1)
US 12,724,688