Trigger test execution via the Wolfpack API

It is possible to trigger the execution of a large number of tests directly via the Wolfpack API. In Wolfpack, launching a series of tests is called a "job". For this, you will need an API key (see here for how to obtain one).

Wolfpack provides an endpoint for executing jobs by specifying the required environments and test suites.

1. Executing a  Job

URL

POST https://api.wolfpackqa.com/schedule-jobs/new

Description

This endpoint allows you to execute a job manually. You can use this endpoint to trigger test runs based on predefined schedules and environments.

Authentication

The request header must include a valid API token:

x-api-token: YOUR_API_TOKEN

Request Body

The request body must contain the following information:

  • environmentKeys (required): An array of environment keys where the tests should be executed.
  • testSuites (optional): An array of test suites to execute. If no suites are provided, the job will run all the tests of the projet.

Since API keys are tied to a specific project, it is not necessary to specify the project unless the request is made without a project token.

Example Request Body

{
	"environmentKeys": ["staging", "production"],  
    "testSuites": ["auth-tests", "payment-tests"],  
    "projectId": "123abc456def"
}

Responses

  • 201 OK: The  job has been successfully triggered.
  • 400 Bad Request: Missing required parameters (environmentKeys) or an invalid request format.
  • 401 Unauthorized: Invalid token
  • 403 Forbidden: The user does not have access to the specified project.

declencher-lexecution-de-tests-via-lapi-wolfpack