Badge embed

Add the badge to a README or site, and what each state means.

The badge is an SVG image served from /badge/<badge_id>.svg. Your badge_id is public and safe to embed. It is not your write key.

Embed it

Markdown
[![Test results](https://badger.virdify.com/badge/BADGE_ID.svg)](https://badger.virdify.com/v/BADGE_ID)
HTML
<a href="https://badger.virdify.com/v/BADGE_ID"><img src="https://badger.virdify.com/badge/BADGE_ID.svg" alt="Test results"></a>

Linking the badge to /v/BADGE_ID lets visitors open the verification page. The project page in your dashboard shows these snippets with your own ID filled in.

States

Every state shows a word, so the badge does not depend on colour.

Badge states
Badge textWhen
passing 145/145No failures and every test passed.
partial 140/145No failures, but fewer tests passed than the total (some skipped or not run).
failing 142/145At least one test failed.
stale 145/145The last result is more than 7 days old.
no dataWe have not received a result yet, or the ID does not exist.

Caching

We send Cache-Control: public, max-age=300, s-maxage=300 and an ETag, so a new result can take up to 5 minutes to appear on pages that cache the image. Viewing a badge never writes to our database.

Shields.io

/badge/<badge_id>.json returns the Shields.io endpoint format (schemaVersion, label, message, color). Point a Shields endpoint badge at it if you want that style:

Shields.io endpoint badge
https://img.shields.io/endpoint?url=https://badger.virdify.com/badge/BADGE_ID.json