IP Library Granted Patent US 11,163,672
Granted Patent B2
US 11,163,672 · App. 16/778,660 · Granted Nov 2, 2021

Test suite generation from metadata

Inventors: Julio Alejandro Larosa (Buenos Aires, AR); Ignacio Bottero (Buenos Aires, AR); Mauro Dentoni (Buenos Aires, AR); Maria Mare (Ciudad Autónoma de Buenos Aires, AR); Nicolas Grossi (Buenos Aires, AR)
Assignee: salesforce.com, inc.
G06F11/3684G06F9/547G06F11/3688G06Q10/105
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,163,672
App. No.
16/778,660
Granted
Nov 2, 2021
Kind
B2
Abstract

Disclosed herein are system, method, and computer program product embodiments for providing the ability to generate unit tests for a web service from a logged interaction with the web service and an API specification for the web service. Rather than having to manually generate tests for the web service, a test developer may interact with the web service through a web browser and record a log of these interactions. The log is then matched to a definition of the API specification, and a test is created. The test developer can either run this test against the web service, or use the test as a foundation for developing and refining the test further.

Claims (49)

1. A method, comprising:

receiving, by one or more computing devices, an interaction file comprising a request from a client to an application programming interface (API) on a web service, and a response to the request from the web service;

receiving, by the one or more computing devices, a specification of the API;

generating, by the one or more computing devices, a test request to the web service using the request from the interaction file configured to satisfy the specification of the API; and

generating, by the one or more computing devices, a test suite comprising the test request and a constraint, wherein the constraint is set using the response from the interaction file.

2. The method of claim 1 , further comprising:

executing, by the one or more computing devices, the test suite on the web service, wherein the test suite is configured to apply the constraint against a test response received from the web service.

3. The method of claim 1 , wherein the interaction file is generated by a web browser logging an interaction with the web service.

4. The method of claim 1 , wherein generating the test request comprises:

matching, by the one or more computing devices, the request from the interaction file to an API call defined by the specification of the API.

5. The method of claim 1 , further comprising:

providing, by the one or more computing devices, the test suite for manual editing.

6. The method of claim 1 , further comprising:

generating, by the one or more computing devices, an additional test request; and

including, by the one or more computing devices, the additional test request in the test suite.

7. The method of claim 1 , wherein the specification of the API is defined in a REpresentational State Transfer (REST)-ful API Modeling Language (RAML) file.

8. A system, comprising:

a memory configured to store operations; and

one or more processors configured to perform the operations, the operations comprising:

receiving an interaction file comprising a request from a client to an application programming interface (API) on a web service, and a response to the request from the web service,

receiving a specification of the API,

generating a test request to the web service using the request from the interaction file, configured to satisfy the specification of the API, and

generating a test suite comprising the test request and a constraint, wherein the constraint is set using the response from the interaction file.

9. The system of claim 8 , the operations further comprising:

executing the test suite on the web service, wherein the test suite is configured to apply the constraint against a test response received from the web service.

10. The system of claim 8 , wherein the interaction file is generated by a web browser logging an interaction with the web service.

11. The system of claim 8 , wherein generating the test request comprises:

matching the request from the interaction file to an API call defined by the specification of the API.

12. The system of claim 8 , the operations further comprising:

providing the test suite for manual editing.

13. The system of claim 8 , the operations further comprising:

generating an additional test request; and

including the additional test request in the test suite.

14. The system of claim 8 , wherein the specification of the API is defined in a Representational State Transfer (REST)-ful API Modeling Language (RAML) file.

15. A non-transitory computer readable storage device having instructions stored thereon, execution of which, by one or more processing devices, causes the one or more processing devices to perform operations comprising:

receiving an interaction file comprising a request from a client to an application programming interface (API) on a web service, and a response to the request from the web service;

receiving a specification of the API;

generating a test request to the web service using the request from the interaction file configured to satisfy the specification of the API; and

generating a test suite comprising the test request and a constraint, wherein the constraint is set using the response from the interaction file.

16. The non-transitory computer readable storage device of claim 15 , the operations further comprising:

executing the test suite on the web service, wherein the test suite is configured to apply the constraint against a test response received from the web service.

17. The non-transitory computer readable storage device of claim 15 , wherein the interaction file is generated by a web browser logging an interaction with the web service.

18. The non-transitory computer readable storage device of claim 15 , wherein generating the test request comprises:

matching the request from the interaction file to an API call defined by the specification of the API.

19. The non-transitory computer readable storage device of claim 15 , the operations further comprising:

providing the test suite for manual editing.

20. The non-transitory computer readable storage device of claim 15 , the operations further comprising:

generating an additional test request; and

including the additional test request in the test suite.

Assignments (2)
CHANGE OF NAME Recorded Dec 18, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069717/0475 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 17, 2020
From: LAROSA, JULIO ALEJANDRO; BOTTERO, IGNACIO; DENTONI, MAURO; MARE, MARIA MARTA; TROTTA, NICOLAS CARLOS GROSSI
To: SALESFORCE.COM, INC.
Reel/Frame 052133/0351 →
Continuity (1)
Related Publication 20210240600A1 · Aug 5, 2021