Triggering tests via API

mabl has a Deployment Events API endpoint that you can use to trigger tests via API. This is particularly useful for integrating with your preferred CI/CD tools, including Jenkins.

Reviewing the API settings for your workspace

  1. Click "Settings" in the left-hand navigation menu.
  2. Locate and click on the "API Keys" tab. In that section, you'll see the API key for your workspace.
  3. Scroll down to the "Deployment Events API" section. In that section, you'll see instructions and a CURL command builder that you can use to understand the required format to trigger tests via the Deployment Events API.

Testing the CURL command

  1. Select your target environment and application from the button menus.
  2. Select and copy the CURL command.
  1. Open a terminal window on your machine
  2. Paste the CURL command into the terminal
  3. Hit Enter
  4. Confirm that you received a successful response, similar to the following:
{"id":"ewew-b7d3-dafd-81e4-fddfafdwew","environment_id":"dfasad-wewrfe42-645df-b94d-ff78011828ad","application_id":"42424-fda-fa-fdafda-233224dazrw","received_time":1513266635798}
  1. Navigate to the main dashboard by clicking "Monitor" in the right-hand navigation menu.
  2. Click "Test Status"
  3. Locate the plan that should have been triggered.
  4. Confirm that the status is "Running"
  5. Click "View Output" to view the live output of the triggered test.

Note that new deployment events are also displayed as blue lines on the "Recent Journey Results" timeline chart.