Skip to main content

Running AEP and AJO regression checks in CI

By 16Labs · Updated

Short answer: create a test token with the adobe:run scope, start a suite run with POST /api/v1/adobe/suites/{id}/runs, poll the run until finished is true, and fail the build unless status is PASSED. Loop tests work the same way. For long-running checks, have the AEP Lab call a signed completion webhook instead of polling.

Start and wait

RUN=$(curl -fsS -X POST -H "Authorization: Bearer $AWK_TOKEN" \
  https://www.16labs.ca/api/v1/adobe/suites/$SUITE_ID/runs | jq -r .id)

until curl -fsS -H "Authorization: Bearer $AWK_TOKEN" \
  https://www.16labs.ca/api/v1/adobe/suite-runs/$RUN | jq -e .finished >/dev/null; do sleep 10; done

curl -fsS -H "Authorization: Bearer $AWK_TOKEN" \
  https://www.16labs.ca/api/v1/adobe/suite-runs/$RUN | jq -e '.status == "PASSED"'

Starting a run always answers 202 Accepted. A run refused because one is already in progress, or because the monthly limit is reached, answers 409. Errors use application/problem+json, and the API allows 120 requests per minute per token.

Scopes

Scope Allows
adobe:read List connections, suites and loop tests; read runs
adobe:run Verify a connection; start suite and loop-test runs and read them

Tokens are workspace-scoped, shown once, and stored only as hashes.

Signed completion webhook

Admins can set one completion webhook per workspace. When a suite run or loop-test run finishes, the Lab POSTs a JSON body with event (adobe.suite_run.finished or adobe.loop_run.finished), workspace and run, signed with an HMAC credential from the vault:

X-Timestamp: 1760520000
X-Signature: hex(HMAC-SHA256(secret, "<X-Timestamp>.<raw body>"))

Verify the signature over the raw body before parsing it, and reject old timestamps.

Schedules

The same suites can run as monitors on a cron schedule. A failed or blocked run emails the people listed on the monitor and alerts organization admins in the app.

Related