In this section:

Overview

You can use your OpenAI or Azure OpenAI account to assist you in creating tests in SOAtest. See Creating Tests from an OpenAPI/Swagger Definition for more information. You must configure SOAtest to be able to use your OpenAI or Azure OpenAI account in the OpenAI preferences.

The SOAtest-OpenAI integration uses the OpenAI REST API over HTTPS/TLS, collecting summarized information from the user-provided OpenAPI document and including it with a user-defined prompt plus SOAtest's custom prompts in the requests to the OpenAI REST API. The diagram below illustrates what and how SOAtest communicates with OpenAI.

Writing User-Defined Prompts

When writing a general user-defined prompt for an app, it can be helpful to tell the AI what kind of app it is. For example:

Generate test scenarios for this banking app.

You can also write more detailed user-defined prompts for more control over the kinds of test scenarios generated. Here is an example prompt for CRUD:

Generate 5 test scenarios that follow the pattern of:

1) GET request on a collection

2) POST request to add to the collection

3) GET request on the collection

4) GET request on specifically the newly added item to the collection

5) PUT request on specifically the newly added item to the collection

6) GET request on specifically the newly added item to the collection

7) DELETE request on specifically the newly added item to the collection

8) GET request on the collection

  • No labels