When you deploy a new version of your application, you can notify us and we will initiate a test run for this deployment.

<aside> ⚠️ Please note that these are meant to be triggered by your main environment, per the contract with QA Wolf. If you need additional environment support, please reach out to our team. There are both technical and account implications for secondary environments that are not fully covered in this document.

</aside>

Notify QA Wolf after Deployment

Prerequisites

A QAE representative must configure a trigger associated with an environment for deploy success requests to initiate test runs. The DeployConfig object below will require some parameters that match this Trigger configuration.

Contact a QA Wolf representative for assistance in this setup.d

Option 1: With our SDK (preferred)

Below is a sample script written in TypeScript:

<aside> ⚠️ Please refer to Choosing Fields Based on Your Setup to properly set up the DeployConfig object.

</aside>

import { type DeployConfig, makeQaWolfSdk } from "@qawolf/ci-sdk";

// Edit this to your needs.
const deployConfig: DeployConfig = {
  branch: undefined,
  commitUrl: undefined,
  deduplicationKey: undefined,
  deploymentType: undefined,
  deploymentUrl: undefined,
  hostingService: undefined,
  sha: undefined,
  variables: undefined,
};

const { attemptNotifyDeploy } = makeQaWolfSdk({
  apiKey: "qawolf_xxxxx"
});

(async () => {
  const result = await attemptNotifyDeploy(deployConfig);
  if (result.outcome !== "success") {
    // Fail the job.
    process.exit(1);
  }
  const runId = result.runId;
  // Store the runId as an output of the job to be used in a CI-greenlight job.
  // This will depend on the CI platform you are using.
})();

Option 2: With our API

Below is a sample “curl” usage:

curl -X POST -H "Authorization: Bearer <ApiKey>" \\
     -H "Content-Type: application/json" \\
     "<https://app.qawolf.com/api/webhooks/deploy_success>" \\
     -d '{"branch": "<BranchName>", "deployment_type": "staging", "commit_url": "<URL>", "sha": "de12adda500f2bc5a29dbd89f4fb1b0e1a31de81"}'

<aside> ℹ️ This command is for illustration purposes. We don’t recommend “curling” without inspecting the result as not all 200 responses imply a successful run trigger. We recommend using the SDK for that purpose as it does the interpretation work for you!

</aside>

You will find detailed documentation about this API usage here: Deploy Success Webhook.