I tested my own blog (and it failed) đ§Ș
Thereâs an old saying about the shoemakerâs children going barefoot. đ Mine goes like this: the testerâs blog had zero tests.
Time to fix that. Itâs also the first real experiment of the âAI joins the test teamâ series: I built the safety net with an AI assistant as my pair. Ground rules as promised: AI assists, I decide. đ€
đĄïž The safety net
Before every deploy, four checks now run on GitHub Actions. If any of them fails, nothing goes live:
- đ Links: every internal link, image, stylesheet and script on every page must load.
- âż Accessibility: axe-core checks each page against WCAG 2.1 A/AA, in light and dark mode.
- đ SEO guards: title, description, canonical URL, preview image and exactly one
<h1>per page. - đŠ Lighthouse: accessibility and SEO must score at least 95, or the build fails.
The page list comes straight from the sitemap, so every new post gets tested without me touching a thing.
đ§Ș SITE-001: Run the tests on my own blog
| Field | Value |
|---|---|
| Expected result | All green. Itâs a small blog, how bad can it be? đ |
| Actual result | đŽ 4 failures |
| Bugs found | About and Resume had no <h1> · grey text on the Resume cards had a 4.35:1 contrast ratio in light mode (WCAG asks for 4.5:1) |
| Status | â Fixed: proper headings, and a slightly darker grey (now 5.2:1) |
Nobody would have reported these. Screen readers and search engines would just have struggled with them. Thatâs exactly the kind of bug automation is good at. đŻ
đą Plot twists
1. The test that tested nothing. The first link checker came back green: âSuccessfully scanned 0 links.â â Zero links. On a whole website. A green test that checks nothing is worse than a red one, because it lies with confidence. I replaced it with a Playwright test that fails if it doesnât find any links.
2. The test that broke itself. The 404 page sends you home after 5 seconds. To keep the test still, my AI pair froze all the pageâs timers. axe-core uses timers too, so it froze with them. đ„¶ The fix was to cancel only the redirect. AI-written tests still need a human reading the failures.
3. Flaky â broken. Locally, a different set of tests crashed on every run. When the failures keep moving, suspect the environment, not the code. The culprit: too many browsers in parallel for a work laptop. Capping it at two made the noise go away.
4. The 404 thatâs supposed to be there. The âFull CVâ button points to a 404 on purpose (no PDF yet). The test knows that, and the code says when to remove the exception. Tests are documentation too. đ
đĄ What Iâm taking away
- â Check your checks: a pass with zero assertions is a fail.
- đ Test both themes: a colour that passes in one mode can fail in the other. Mine failed in light mode, the one Iâd have bet on.
- đ€ AI is a fast pair, not an oracle: it wrote most of the setup in minutes, and one of the bugs too. Reviewing still matters.
- đ§ Quality as a gate: if a broken link canât be deployed, it wonât be.
The blog now refuses to publish itself if itâs broken. I wish more software had that attitude. đ
Got a check youâd add to the safety net? Iâd love to hear it.
Hugo âš