Using git metadata
The CLI can attach git metadata like
owner and more when executing the
test --record and
deploy commands. This way you can keep track of
your test sessions and deployed resources in the UI and cross-reference them with any updates to your code.
For example, in the screenshot below we ran a test session from our CI server after the project was deployed to our
Staging environment with the
npx checkly test --record command.
After the test succeeds, we deploy this check so it runs as a monitor with
npx checkly deploy.
The CLI will attempt to auto-detect and parse git specific information from your local machine or CI environment, but you can also set these data items specifically by using environment variables.
|The URL of your repo on GitHub, GitLab etc.
|The SHA of the commit.
|The branch name.
|The committer’s name or email.
|The commit message.
|The environment name, e.g. “staging”
For example, if you want to specifically set the Environment you invoke:
CHECKLY_TEST_ENVIRONMENT=Production npx checkly test --record
Or, if you want to set repo URL you invoke:
CHECKLY_REPO_URL="https://my.git.solution/project/" npx checkly test --record
You can contribute to this documentation by editing this page on Github