Skip to content

REST API Testing with Boomerang

Let's dive into testing REST APIs using Boomerang. We'll use the Petstore OpenAPI example to demonstrate how to import API specifications, create requests, and validate responses. Whether you're testing your own APIs or integrating with third-party services, this guide will show you how to make the most of Boomerang's REST testing capabilities.

Importing the Petstore API

  1. Click the "Import" button in the top navigation
  2. Select "OpenAPI" as the import type
  3. Enter the Petstore OpenAPI URL:
    https://petstore3.swagger.io/api/v3/openapi.json
  4. Click "Import" to proceed

After import, you'll see a new collection named "Swagger Petstore" in your left sidebar with operations:

Swagger Petstore
├── POST addPet
├── PUT updatePet
├── GET findPetsByStatus
├── GET getPetById
├── DELETE deletePet
├── GET getInventory
├── POST placeOrder
├── POST createUser
└── GET getUserByName

Creating Requests from Operations

To test any endpoint, create a request from the operation:

  1. Double-click on an operation (e.g., "GET findPetsByStatus")
  2. Boomerang creates a new request tab with pre-configured: • URL • HTTP method • Query parameters • Headers • Request body schema (for POST/PUT methods)
  3. The request is automatically saved to your Collections

Testing Pet Endpoints

Finding Pets by Status

  1. Double-click "GET findPetsByStatus" operation
  2. A new request is created and saved to Collections with:
    URL: https://petstore3.swagger.io/api/v3/pet/findByStatus?status=available
    Method: GET
  3. You can modify the status value in either the URL or PARAMS tab
  4. Click "Send"

You'll receive a response containing pets based on the status value:

json
[
  {
    "id": 9223372036854776000,
    "name": "doggie",
    "category": {
      "id": 1,
      "name": "Dogs"
    },
    "status": "available"
  }
]

Adding a New Pet

  1. Double-click "POST addPet" operation
  2. A new request is created and saved with a pre-populated body:
    json
    {
      "name": "Fluffy",
      "category": {
        "id": 1,
        "name": "Dogs"
      },
      "photoUrls": ["string"],
      "tags": [
        {
          "id": 0,
          "name": "friendly"
        }
      ],
      "status": "available"
    }
  3. Click "Send" to create the pet

Working with Authentication

Boomerang currently supports Basic Authentication (Username/Password) through the AUTH tab. For other authentication types:

  1. Use the HEADERS tab to add authentication headers directly:

    // Bearer Token
    Authorization: Bearer your-token-here
    
    // API Key
    api_key: your-api-key-here
    
    // Custom Auth
    Custom-Auth-Header: auth-value
  2. For basic authentication: • Select "Basic Auth" in the AUTH tab • Enter username and password • Boomerang automatically adds the Authorization header

Boomerang's integration with OpenAPI specifications makes API testing straightforward and efficient. The automatic request configuration allows you to focus on testing functionality rather than setup details.

Boomerang - Lightning-fast API testing tool