Visual Editor (Drag-and-Drop)

This guide will show the basics of creating your first API test using RapidAPI Testing's visual editor and the drag-and-drop interface.

You can build custom tests using the Visual Editor.

We will test some endpoints in the Spoonacular API, so if you want to follow along subscribe to the API for free here.

๐Ÿ“˜

RapidAPI Testing Link

To get started, navigate to https://rapidapi.com/testing/.

Once you have signed up or logged in to your RapidAPI account, you will be able to see all your APIs. You can click on one of them to add tests to or create a new API to test.

1907

Once you click an API, go ahead and create a test. You can give it any name you'd like. Click the pencil icon in the test row to edit it.

1916

In this test, we are going to test the Extract Recipe from Website endpoint in the API.

Click "+ Add Step" to add the first test step.

1728

You will be prompted to choose from the following options:

  • HTTP Methods: HTTP GET, HTTP PUT, HTTP POST
  • Assertions: Assert Equals, Assert Exists, Assert Type, Assert In, JSON Validate
  • Advanced Options: Loop Foreach, Set Variable, Logic If, Code Run
919

For our example, we will choose HTTP GET. We can add a URL and a variable (a). You can also set the URL parameters and headers using the tab.

908

๐Ÿ“˜

You can find the URL for the API from the RapidAPI Marketplace.

906

Making Assertions

Let's add an assertion to our test.

Select "+ Add Step" and select the Assert Equals option.

You can build assertions from context variables. In the previous step, we set the variable a. Therefore, we can assert that API status is 200 using the expression a.status and setting the value to 200.

1529

If you want to add multiple assertions to your test, consider using the automatic test generation tool to speed up the process.

Running the Test

For a test to be successful, all steps of the test must pass. Save and run the test by clicking the button in the top right corner.

1912

You can see the test result (sucess or fail) on the left-hand side:

1912

Click on a test result to view more details:

1164

๐Ÿ“˜

Now that you have created a basic test consider doing the following steps: