For teams with Cypress tests in GitLab who want them to run after every deploy to staging.
Your setup
- Cypress tests in a GitLab repo.
- A GitLab CI pipeline deploys the app to staging, on the internet.
- You want the suite to run after each deploy, with a report.
Say this to Certyn
Our Cypress tests are in gitlab.com/acme/web. Run them against staging after every deploy.
What Certyn does
- Opens a form for a GitLab access token, saved as the secret project variable
GITLAB_TOKEN. Theread_repositoryscope is enough to run tests. - On a Machine, clones over https with a git credential helper that reads
GITLAB_TOKEN. The token never goes in a URL. - Runs one spec to check the install and the URL, and saves the repo and test command as project variables.
- Creates an agent process with the goal: clone the repo, install, run
npx cypress runagainst this environment, report. - Turns on "after each deploy" for staging (
app.process.trigger.setwithon_deploy). You approve it. A deploy is a new environment version. - Gives you a job to add after your deploy job. It sets the new version:
curl -sS -X PUT \
"https://api.certyn.io/api/projects/$CERTYN_PROJECT_ID/environments/$CERTYN_ENVIRONMENT_ID" \
-H "Content-Type: application/json" \
-H "X-API-Key: $CERTYN_API_KEY" \
-d "{\"version\": \"$CI_COMMIT_SHORT_SHA\"}"
The key needs the Projects scope (platform:manage). Create it in Settings → API Keys and save it as a masked GitLab CI variable.
What you get
- A run after each deploy, for that version.
- A run report with failures grouped by cause, and one issue per real product bug.
- The version history of the environment.
Limits
- A deploy-triggered run has 60 minutes. Split a longer suite into two processes.
- The CI Runs API (
POST /api/ci/runs) starts only Certyn test-case suites, not a goal. Set the version instead, as above. - The key from the
ci_setupform has only CI scopes. It cannot change an environment. - Sending the same version again starts no run.
- A staging app inside your network needs a self-hosted runner.