API Testing in Eggplant Functional

You can use Eggplant Functional to create and perform API tests. API testing is fundamentally different from the image-based testing that you might perform with SenseTalk scripts. Combining Eggplant Functional's image-based approach with API testing in SenseTalk provides an opportunity for enhanced test coverage.

The API Tests section is found in the Suite window sidebar, though it is toggled off by default. Click the globe icon in the Assets Toggle bar at the top of the sidebar to toggle the API Tests pane view on:

API Test toggle icon in Eggplant Functional

The Assets Toggle bar in Eggplant Functional

What Is API Testing?

API testing tests application programming interfaces, or APIs, to ensure that they return the proper response for a given request. This testing can be used to verify whether the results users see on the front end of a website match those on the back end.

API testing returns the same information that you'd receive from your application's GUI, but bypasses that interface. Because there is no GUI involved, API testing is performed at the message layer. Eggplant Functional sends requests using HTTP and HTTPS.

Create, Edit, and Run API Tests

To create a new API test, right-click inside the API Tests pane, then select New API Test. The new test opens in its own tab in the API Test Editor view in the center pane. To open an existing test, select it in the list in the API Tests pane. API tests open in the API Test Editor.

Opening an API test in Eggplant Functional

Opening an API test in Eggplant Functional from the API Tests pane

API tests can be invoked several ways, including from SenseTalk scripts and via the command line. See Running API Tests to compare methods.

 

This topic was last updated on August 19, 2021, at 03:30:51 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant