Run Vera end-to-end tests in Bitbucket Pipelines
Vera ships a Bitbucket Pipelines step that runs the same gate script as the GitLab template. It starts a Vera run, blocks the build only on a real failure, and writes JUnit XML where Bitbucket picks it up for the build’s Tests tab. The default Bitbucket image already has everything it needs.
What comes across
- The step runs on Bitbucket's default image, which already has curl.
- JUnit XML is written to test-results/, which Bitbucket picks up automatically for the Tests tab.
- A failed quarantined test passes the job with a warning; only a real, non-quarantined failure blocks.
- A test that passed only on retry is a warning by default. Set VERA_FAIL_ON_FLAKY to true to make it fail the pipeline.
- GitLab and Bitbucket run the same gate script, embedded verbatim, and a test in Vera executes it beside the GitHub Action against canned responses and fails if their exit codes differ.
What does not
- Bitbucket has no per-step variables block, so VERA_URL and VERA_PROJECT are set by editing export lines at the top of the step.
- The passed-on-heal opt-in never fires today: a CI-started run has no selector healer attached, so healed is always 0 on this path. The flag is kept so it takes effect the day CI runs can heal.
- The CI API needs the Pro plan's api-access feature on Vera's cloud; a free workspace's token is refused there. Self-hosted installs have no billing and hold everything.
- The template runs a fixed set: one test, one suite or the whole project. Running only the tests a change touches is a separate command, vera check.
How to set it up
- Mint a token under Settings → CI Tokens. The vera_… value is shown once, so store it as a secret straight away.
- Add VERA_TOKEN under Repository settings → Repository variables, marked Secured.
- Copy ci/bitbucket/bitbucket-pipelines.yml into your bitbucket-pipelines.yml, or merge its step into yours.
- Edit the export VERA_URL= and export VERA_PROJECT= lines at the top of the step.
Questions
Where do Vera results appear in Bitbucket?
In the build's Tests tab. The step writes JUnit XML to test-results/, which Bitbucket picks up automatically.
Does Bitbucket gate the same way as GitHub and GitLab?
Yes. GitLab and Bitbucket embed the same gate script, and a test in Vera executes it beside the GitHub Action against the same responses, failing if any exit code differs.
Does a quarantined test fail the Bitbucket build?
No. A failed quarantined test passes the step with a warning; only a real failure blocks.