IP Library › Patent Application 18902364
Patent Application
App. No. 18/902,364

AUTOMATIC NON-CODE TEST SUITE GENERATION FROM API SPECIFICATION

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 None
App. No.
18/902,364
Abstract

Disclosed herein are system, method, and computer program product embodiments for automatic non-code test suite generation of an application programming language (API) specification. An embodiment operates by receiving a specification of an API, wherein the API comprises a plurality of endpoints. The embodiment generates, using a parser, an abstraction model corresponding to the specification of the API, wherein the abstraction model comprises a plurality of entities corresponding to the plurality of endpoints. The embodiment identifies, based on the abstraction model, an operation that is applicable to an entity of the plurality of entities. The embodiment then generates a functional test based on a use case corresponding to the entity and the operation.

Claims (43)

1 . A method, comprising:

analyzing, by one or more processors, a specification of an application programming interface (“API”) in response to a request;

generating a model based on the analyzing of the specification, wherein the model relates resource entities to operations of the specification;

identifying a function of the API, wherein the function uses a set of the operations and corresponding resource entities identified via the model;

generating source code for a functional test of the identified function; and

performing the functional test using the source code.

2 . The method of claim 1 , the performing the functional test further comprising:

executing the set of one or more operations using the corresponding resource entities via a path, in a request format, with a required parameter, as identified via the model; and

verifying that a received response code from the API matches an expected response value identified via the model.

3 . The method of claim 1 , wherein the specification is defined in a RESTful API Modeling Language (RAML), an Open API Specification (OAS), a GraphQL, or a gRPC Remote Procedure Call format.

4 . The method of claim 1 , wherein the operations comprise a fetch, a create, a list, a delete, or an update.

5 . The method of claim 1 , wherein the request is generated in response to an event in a development pipeline.

6 . The method of claim 5 , wherein the event comprises an update to the specification.

7 . The method of claim 1 , wherein the model is formed as a black box model without access to source code.

8 . A system, comprising:

a memory; and

at least one processor coupled to the memory and configured to:

analyze a specification of an application programming interface (“API”) in response to a request;

generate a model based on the analyzing of the specification, wherein the model relates resource entities to operations of the specification;

identify a function of the API, wherein the function uses a set of the operations and corresponding resource entities identified via the model;

generate source code for a functional test of the identified function; and

perform the functional test using the source code.

9 . The system of claim 8 , wherein to perform the functional test the at least one processor is further configured to:

execute the set of one or more operations using the corresponding resource entities via a path, in a request format, with a required parameter, as identified via the model; and

verify that a received response code from the API matches an expected response value identified via the model.

10 . The system of claim 8 , wherein the specification is defined in a RESTful API Modeling Language (RAML), an Open API Specification (OAS), a GraphQL, or a gRPC Remote Procedure Call format.

11 . The system of claim 8 , wherein the operations comprise a fetch, a create, a list, a delete, or an update.

12 . The system of claim 8 , wherein the request is generated in response to an event in a development pipeline.

13 . The system of claim 12 , wherein the event comprises an update to the specification.

14 . The system of claim 8 , wherein the model is formed as a black box model without access to source code.

15 . A non-transitory computer-readable device having instructions stored thereon that, when executed by at least one computing device, cause the at least one computing device to perform operations comprising:

analyzing a specification of an application programming interface (“API”) in response to a request;

generating a model based on the analyzing of the specification, wherein the model relates resource entities to operations of the specification;

identifying a function of the API, wherein the function uses a set of the operations and corresponding resource entities identified via the model;

generating source code for a functional test of the identified function; and

performing the functional test using the source code.

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

executing the set of one or more operations using the corresponding resource entities via a path, in a request format, with a required parameter, as identified via the model; and

verifying that a received response code from the API matches an expected response value identified via the model.

17 . The non-transitory computer-readable device of claim 15 , wherein the specification is defined in a RESTful API Modeling Language (RAML), an Open API Specification (OAS), a GraphQL, or a gRPC Remote Procedure Call format.

18 . The non-transitory computer-readable device of claim 15 , wherein the request is generated in response to an event in a development pipeline.

19 . The non-transitory computer-readable device of claim 18 , wherein the event comprises an update to the specification.

20 . The non-transitory computer-readable device of claim 15 , wherein the model is formed as a black box model without access to source code.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 27, 2024
From: O'DELL, ROBERT; BATTIATO, NICOLAS HERNAN; LARRALDE, DIEGO; MARTINEZ, GUIDO AGUSTIN
To: SALESFORCE, INC.
Reel/Frame 069421/0114 →