Testing and QA · Intermediate · 24 min
Automate accessibility checks with axe and Playwright
By Padding · Updated 18 Nov 2026
node:26 image · Node.js 26 · Playwright 1.65.1 · @axe-core/playwright 4.14.1 · WCAG 2.2 A and AA
You will have a Playwright suite that scans a page with axe after each important state change, skips a third-party widget under a named ticket, attaches every result to the report and fails only on violations that are not in a reviewed baseline.
On this page
A one-off axe scan tells you how a page looks today. It does not stop the next pull request from adding an unlabelled button. For that, the scan has to live inside your end-to-end suite and run on every change, and it has to be strict without being noisy: a suite that is always red because of a hundred old problems gets ignored, and a suite that only scans the page as it first loads misses everything behind a menu or a failed form.
In this tutorial you build that suite for a small fictional shop page, Tide Books. It has a menu that opens, a sign-up form that shows an error, a chat widget from a third-party vendor and one old problem the content team has not fixed yet. Every one of those is planted on purpose. By the end you have:
- one shared helper that runs axe with the WCAG 2.2 A and AA rules,
- scans after each state that matters, not only on page load,
- an exclusion for the vendor widget that names its ticket,
- the violations attached to each test in the Playwright report,
- a baseline file, so the suite fails on new violations only,
- a few plain Playwright checks for behaviour axe cannot judge.
If axe and its results are new to you, start with test a page for accessibility with axe and a screen reader, which explains how to read each violation. This tutorial assumes you know that and focuses on running it as a regression suite.
Step 1 · Set up the project
Make a throwaway project folder and install pinned versions of Playwright's test runner and the axe integration. @axe-core/playwright 4.14.1 brings axe-core 4.14 with it, so you do not install axe-core separately:
mkdir -p ~/axe-suite-demo
cd ~/axe-suite-demo
npm init -y > /dev/null
npm install --save-dev @playwright/test@1.65.1 @axe-core/playwright@4.14.1
npx playwright install --with-deps chromium--with-deps also installs the system libraries Chromium needs on Linux, using sudo, so it may ask for your password. The browser download is a few hundred megabytes. On prepaid mobile data, run it once on Wi-Fi; Playwright keeps the browser in a shared cache, so later projects on the same machine reuse it.
Check it worked
cd ~/axe-suite-demo
npx playwright --version
npm ls @axe-core/playwrightThe first command prints Version 1.65.1. The second shows @axe-core/playwright@4.14.1 in the tree.
Step 2 · Build the sample page and serve it
An end-to-end suite tests a running site, so the page is served over HTTP, not opened as a file. Create the page, its stylesheet, its script and a placeholder image in a site folder:
cd ~/axe-suite-demo
mkdir -p site
cat > site/index.html <<'HTML'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tide Books</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<a class="brand" href="/">Tide Books</a>
<button id="menu-toggle" type="button" aria-expanded="false" aria-controls="site-menu">Menu</button>
<nav id="site-menu" aria-label="Main" hidden>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/books">Books</a></li>
<li><a id="cart-link" href="/cart"><svg width="20" height="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false"><path d="M2 3h3l2 10h9l2-7H6" fill="none" stroke="currentColor" stroke-width="2"/></svg></a></li>
</ul>
</nav>
</header>
<main>
<h1>New this week</h1>
<img id="hero" src="hero.svg" width="600" height="200">
<h2>Get the weekly list</h2>
<form id="signup" novalidate>
<label for="name">Name</label>
<input id="name" name="name" autocomplete="name">
<label for="email">Email</label>
<input id="email" name="email" type="email" autocomplete="email" aria-describedby="email-error">
<p id="email-error" class="error" hidden>Enter your email address</p>
<button type="submit">Sign up</button>
</form>
</main>
<div id="chat-widget">
<button type="button" class="chat-launch"><svg width="24" height="24" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9" fill="currentColor"/></svg></button>
</div>
<script src="app.js"></script>
</body>
</html>
HTML
cat > site/style.css <<'CSS'
body { font-family: system-ui, sans-serif; margin: 0; color: #0b0c0e; background: #ffffff; }
header { display: flex; gap: 1rem; align-items: center; padding: 1rem; border-bottom: 1px solid #d9dce1; }
nav ul { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
main { padding: 1rem; max-width: 40rem; }
#hero { max-width: 100%; height: auto; }
form { display: grid; gap: 0.5rem; max-width: 24rem; }
.error { color: #ff8a8a; margin: 0; }
#chat-widget { position: fixed; right: 1rem; bottom: 1rem; }
CSS
cat > site/app.js <<'JS'
const toggle = document.getElementById('menu-toggle');
const menu = document.getElementById('site-menu');
toggle.addEventListener('click', () => {
const open = toggle.getAttribute('aria-expanded') === 'true';
toggle.setAttribute('aria-expanded', String(!open));
menu.hidden = open;
});
document.getElementById('signup').addEventListener('submit', (event) => {
const email = document.getElementById('email');
const error = document.getElementById('email-error');
if (!email.value.trim()) {
event.preventDefault();
error.hidden = false;
email.setAttribute('aria-invalid', 'true');
email.focus();
}
});
JS
cat > site/hero.svg <<'SVG'
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="200" viewBox="0 0 600 200"><rect width="600" height="200" fill="#d9dce1"/><text x="300" y="110" font-family="sans-serif" font-size="28" text-anchor="middle" fill="#2a2d33">Six new novels</text></svg>
SVGFour problems are planted, and only one of them is visible when the page first loads:
- The hero image has no
alt. Pretend it comes from the CMS, where hundreds of images share the problem and the fix belongs to the content team. - The cart link in the menu is an icon with no text. The menu is
hiddenuntil someone opens it. - The email error is pale pink on white, far below the 4.5 to 1 contrast WCAG asks of normal text. It is
hiddenuntil the form is sent empty. - The chat launcher has no accessible name. It is the vendor's markup, and you cannot change it.
axe skips content that is hidden, so a scan of the page as it loads sees the image and the chat button and nothing else.
Now a small static server with Node's standard library, and a Playwright config that starts it before the tests and stops it afterwards:
cd ~/axe-suite-demo
cat > serve.js <<'JS'
const http = require('node:http');
const fs = require('node:fs');
const path = require('node:path');
const root = path.join(__dirname, 'site');
const types = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': 'text/javascript', '.svg': 'image/svg+xml' };
http.createServer((req, res) => {
const urlPath = new URL(req.url, 'http://localhost').pathname;
const file = path.join(root, urlPath === '/' ? 'index.html' : urlPath);
if (!file.startsWith(root)) { res.writeHead(403); return res.end(); }
fs.readFile(file, (err, data) => {
if (err) { res.writeHead(404); return res.end('Not found'); }
res.writeHead(200, { 'Content-Type': types[path.extname(file)] || 'application/octet-stream' });
res.end(data);
});
}).listen(4173, '127.0.0.1');
JS
cat > playwright.config.js <<'JS'
const { defineConfig } = require('@playwright/test');
module.exports = defineConfig({
testDir: 'tests',
reporter: [['list'], ['html', { open: 'never' }]],
use: { baseURL: 'http://127.0.0.1:4173', browserName: 'chromium' },
webServer: {
command: 'node serve.js',
url: 'http://127.0.0.1:4173',
reuseExistingServer: !process.env.CI,
},
});
JS
mkdir -p testswebServer is how you would point the same suite at your real app: swap node serve.js for your dev server command, such as npm run dev, and the port for the one it uses. With reuseExistingServer, a server you already have running on your laptop is used as it is, while in CI, where the CI variable is set, Playwright always starts a fresh one.
Check it worked
Run node serve.js in a second terminal and open http://127.0.0.1:4173 in a browser. You see the "New this week" heading, a grey banner reading "Six new novels", a Menu button and a dark circle in the bottom-right corner. Stop the server with Ctrl+C before you go on, so the port is free for Playwright.
Step 3 · Write one helper and run a first scan
Keep the axe setup in one helper, so every test scans with the same rules and a change of policy is a one-line edit. This first version runs the WCAG A and AA rules for 2.0, 2.1 and 2.2, attaches the violations to the test, and fails on any it finds:
cd ~/axe-suite-demo
cat > tests/a11y.js <<'JS'
const { expect } = require('@playwright/test');
const AxeBuilder = require('@axe-core/playwright').default;
// WCAG 2.0, 2.1 and 2.2 at levels A and AA. axe has no separate "wcag22a" tag.
const WCAG_TAGS = ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'];
async function checkA11y(page, testInfo, state, { include } = {}) {
let builder = new AxeBuilder({ page }).withTags(WCAG_TAGS);
if (include) builder = builder.include(include);
const results = await builder.analyze();
await testInfo.attach(`axe-${state}`, {
body: JSON.stringify(results.violations, null, 2),
contentType: 'application/json',
});
// One line per failing element: rule id, then axe's CSS selector for it.
const found = results.violations
.flatMap((v) => v.nodes.map((n) => `${v.id} ${n.target.join(' ')}`))
.sort();
expect(found, `axe violations in "${state}"`).toEqual([]);
}
module.exports = { checkA11y };
JS
cat > tests/home.spec.js <<'JS'
const { test } = require('@playwright/test');
const { checkA11y } = require('./a11y');
test('home page as it loads', async ({ page }, testInfo) => {
await page.goto('/');
await checkA11y(page, testInfo, 'home');
});
JSThe helper turns each failing element into one string, such as image-alt #hero. That shape matters later: it is what the baseline stores and compares. Run the test:
cd ~/axe-suite-demo
npx playwright testCheck it worked
The run ends with 1 failed. The diff under axe violations in "home" lists two strings, something like button-name .chat-launch and image-alt #hero. Nothing mentions the cart link or the error colour: they are hidden, so axe did not look at them.
Step 4 · Exclude the third-party widget, with a ticket
You cannot fix the chat launcher, and a test that stays red for a reason nobody on the team can act on teaches people to ignore red. You also should not switch off button-name for the whole page, because then your own unnamed buttons slip through. Exclude the widget's wrapper element, and make the exclusion carry its reason and ticket so it shows in code review and in the report:
cd ~/axe-suite-demo
cat > tests/a11y.js <<'JS'
const { expect } = require('@playwright/test');
const AxeBuilder = require('@axe-core/playwright').default;
// WCAG 2.0, 2.1 and 2.2 at levels A and AA. axe has no separate "wcag22a" tag.
const WCAG_TAGS = ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'];
// Code we do not own. Every entry needs a ticket, and someone re-checks it each release.
const EXCLUDED = [
{ selector: '#chat-widget', ticket: 'A11Y-142', reason: 'vendor chat launcher has no accessible name; reported to the vendor' },
];
async function checkA11y(page, testInfo, state, { include } = {}) {
let builder = new AxeBuilder({ page }).withTags(WCAG_TAGS);
if (include) builder = builder.include(include);
for (const { selector, ticket, reason } of EXCLUDED) {
builder = builder.exclude(selector);
testInfo.annotations.push({ type: 'a11y-excluded', description: `${selector} (${ticket}): ${reason}` });
}
const results = await builder.analyze();
await testInfo.attach(`axe-${state}`, {
body: JSON.stringify(results.violations, null, 2),
contentType: 'application/json',
});
const found = results.violations
.flatMap((v) => v.nodes.map((n) => `${v.id} ${n.target.join(' ')}`))
.sort();
expect(found, `axe violations in "${state}"`).toEqual([]);
}
module.exports = { checkA11y };
JSexclude takes one CSS selector per call, so the loop chains one call per entry. Excluding an element skips everything inside it. Keep the selector as tight as the vendor's markup allows; excluding body > div would hide half your page.
Excluding is not the same as accepting. Send the vendor the axe output, and if they cannot fix it, weigh a different widget: a chat button a screen reader user cannot find is a support channel they cannot use.
cd ~/axe-suite-demo
npx playwright testCheck it worked
The run still fails, but the diff now lists only the image-alt line. button-name is gone because the chat widget was not scanned.
Step 5 · Scan after each state that matters
Most accessibility bugs live in states a page-load scan never sees: an open menu, a dialog, a tab panel, error messages, a loaded search result. In an end-to-end suite you already drive the page into those states, so scan right there. Wait for the state to be visible first, then scan only the region that changed; the home test already covers the rest of the page, and scoping keeps one old problem from failing every test:
cd ~/axe-suite-demo
cat > tests/states.spec.js <<'JS'
const { test, expect } = require('@playwright/test');
const { checkA11y } = require('./a11y');
test('menu open', async ({ page }, testInfo) => {
await page.goto('/');
await page.getByRole('button', { name: 'Menu' }).click();
await expect(page.locator('#site-menu')).toBeVisible();
await checkA11y(page, testInfo, 'menu-open', { include: '#site-menu' });
});
test('sign-up errors shown', async ({ page }, testInfo) => {
await page.goto('/');
await page.getByRole('button', { name: 'Sign up' }).click();
await expect(page.getByText('Enter your email address')).toBeVisible();
await checkA11y(page, testInfo, 'signup-errors', { include: '#signup' });
});
JSThe toBeVisible waits are not decoration. If you scan before the menu has finished opening, axe sees it hidden, finds nothing, and the test passes for the wrong reason. Run only the new file:
cd ~/axe-suite-demo
npx playwright test tests/states.spec.jsBoth fail. The menu test reports link-name on the cart link, and the sign-up test reports color-contrast on #email-error. These are yours to fix, so fix them rather than baseline them. Give the cart link a name and darken the error text:
cd ~/axe-suite-demo
cat > site/index.html <<'HTML'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tide Books</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<a class="brand" href="/">Tide Books</a>
<button id="menu-toggle" type="button" aria-expanded="false" aria-controls="site-menu">Menu</button>
<nav id="site-menu" aria-label="Main" hidden>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/books">Books</a></li>
<li><a id="cart-link" href="/cart" aria-label="Cart"><svg width="20" height="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false"><path d="M2 3h3l2 10h9l2-7H6" fill="none" stroke="currentColor" stroke-width="2"/></svg></a></li>
</ul>
</nav>
</header>
<main>
<h1>New this week</h1>
<img id="hero" src="hero.svg" width="600" height="200">
<h2>Get the weekly list</h2>
<form id="signup" novalidate>
<label for="name">Name</label>
<input id="name" name="name" autocomplete="name">
<label for="email">Email</label>
<input id="email" name="email" type="email" autocomplete="email" aria-describedby="email-error">
<p id="email-error" class="error" hidden>Enter your email address</p>
<button type="submit">Sign up</button>
</form>
</main>
<div id="chat-widget">
<button type="button" class="chat-launch"><svg width="24" height="24" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9" fill="currentColor"/></svg></button>
</div>
<script src="app.js"></script>
</body>
</html>
HTML
cat >> site/style.css <<'CSS'
/* Error text: about 7:1 on white, well above the 4.5:1 minimum */
.error { color: #b00020; }
CSS
npx playwright test tests/states.spec.jsThe only change to the HTML is aria-label="Cart" on the cart link. The hero image is deliberately left alone.
Check it worked
The last command ends with 2 passed. Open the page in a browser, send the form empty, and the error now shows in a deep red you can read easily.
Step 6 · Fail only on new violations with a baseline
The hero image is still failing the home test, and it will be until the content team works through the CMS. You want the suite green now and still able to catch the next problem. A baseline does that: a reviewed list of known violations, kept in the repository. The test fails on anything not in the list and tells you when something on the list has been fixed.
Replace the helper with a version that reads and writes baselines. Each state gets its own file, because Playwright runs tests in parallel and two tests writing one file would overwrite each other:
cd ~/axe-suite-demo
cat > tests/a11y.js <<'JS'
const fs = require('node:fs');
const path = require('node:path');
const { expect } = require('@playwright/test');
const AxeBuilder = require('@axe-core/playwright').default;
// WCAG 2.0, 2.1 and 2.2 at levels A and AA. axe has no separate "wcag22a" tag.
const WCAG_TAGS = ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'];
// Code we do not own. Every entry needs a ticket, and someone re-checks it each release.
const EXCLUDED = [
{ selector: '#chat-widget', ticket: 'A11Y-142', reason: 'vendor chat launcher has no accessible name; reported to the vendor' },
];
const BASELINE_DIR = path.join(__dirname, 'a11y-baseline');
function readBaseline(state) {
const file = path.join(BASELINE_DIR, `${state}.json`);
if (!fs.existsSync(file)) return [];
return JSON.parse(fs.readFileSync(file, 'utf8'));
}
async function checkA11y(page, testInfo, state, { include } = {}) {
let builder = new AxeBuilder({ page }).withTags(WCAG_TAGS);
if (include) builder = builder.include(include);
for (const { selector, ticket, reason } of EXCLUDED) {
builder = builder.exclude(selector);
testInfo.annotations.push({ type: 'a11y-excluded', description: `${selector} (${ticket}): ${reason}` });
}
const results = await builder.analyze();
await testInfo.attach(`axe-${state}`, {
body: JSON.stringify(results.violations, null, 2),
contentType: 'application/json',
});
const found = results.violations
.flatMap((v) => v.nodes.map((n) => `${v.id} ${n.target.join(' ')}`))
.sort();
if (process.env.UPDATE_A11Y_BASELINE === '1') {
fs.mkdirSync(BASELINE_DIR, { recursive: true });
fs.writeFileSync(path.join(BASELINE_DIR, `${state}.json`), JSON.stringify(found, null, 2) + '\n');
return;
}
const baseline = readBaseline(state);
const added = found.filter((item) => !baseline.includes(item));
const fixed = baseline.filter((item) => !found.includes(item));
for (const item of fixed) {
const note = `${item} is fixed: remove it from tests/a11y-baseline/${state}.json`;
console.log(note);
testInfo.annotations.push({ type: 'a11y-fixed', description: note });
}
expect(added, `new axe violations in "${state}" (not in the baseline)`).toEqual([]);
}
module.exports = { checkA11y };
JSWrite the baseline once, then read it before you commit it. Every line in it is a problem you are agreeing to live with for now, so treat the file like code: it goes through review, and each entry should have a ticket in your tracker.
cd ~/axe-suite-demo
UPDATE_A11Y_BASELINE=1 npx playwright test
cat tests/a11y-baseline/home.jsonhome.json holds one entry, something like "image-alt #hero". menu-open.json and signup-errors.json hold empty lists, because you fixed those. Now run the suite normally:
cd ~/axe-suite-demo
npx playwright testIt passes. Prove it still catches regressions: keep a copy of the script, then make it add a second image with no alt, the kind of thing a new promotion banner might do:
cd ~/axe-suite-demo
cp site/app.js site/app.backup.js
cat >> site/app.js <<'JS'
document.querySelector('main').insertAdjacentHTML('beforeend', '<img id="promo" src="hero.svg" width="300" height="100">');
JSnpx playwright testThe home test fails with new axe violations in "home", and the diff lists only image-alt #promo. The hero image is the same rule but is already in the baseline, so it does not count. Put the script back:
cd ~/axe-suite-demo
mv site/app.backup.js site/app.js
npx playwright testTwo habits keep the baseline honest:
- Give important elements stable ids. The baseline matches on axe's selector for each element, and axe prefers an id when there is one. If an element has no id, its selector can change when nearby markup changes, and an old problem then shows up as "new". When that happens, check the diff, confirm nothing new was added, and regenerate.
- Shrink it, never grow it quietly. When a fix lands, the run prints
... is fixed: remove it from tests/a11y-baseline/home.json. Regenerate the file withUPDATE_A11Y_BASELINE=1so the list gets shorter. Do not regenerate to make a new violation go away; fix the code instead.
Check it worked
The final run ends with 3 passed. tests/a11y-baseline/ holds three files, and only home.json has an entry. During the regression check the home test failed naming #promo and nothing else.
Step 7 · Read the results in the report
Every scan attaches its violations as JSON, pass or fail, and every excluded selector appears as an annotation. That gives a reviewer the evidence without rerunning anything. Open the HTML report from the last run:
cd ~/axe-suite-demo
npx playwright show-reportcd ~/axe-suite-demo
test -f playwright-report/index.htmlClick the "home page as it loads" test. Under Attachments there is axe-home; open it and you see the full axe entry for the hero image, including the element's HTML, the failureSummary that says how to fix it, and a helpUrl to Deque's rule page. The test header shows the a11y-excluded annotation with the ticket number. In CI, upload the playwright-report folder as a build artefact so anyone can open it from the pull request.
The attachment holds violations only. axe's full result also includes every rule that passed, which makes it many times larger; that adds up fast on a big suite and on a slow connection.
Check it worked
playwright-report/index.html exists, and in the report each of the three tests has an axe- attachment. The one for menu-open is an empty list, [].
Step 8 · Add checks for what axe cannot see
Automated rules catch a useful share of problems, not most of them. Deque, which makes axe, studied over 2,000 of its own audits in 2021 and found that automated tests caught 57 percent of the issues by count. The older and still common benchmark, which counts WCAG success criteria rather than issues, puts automated coverage at 20 to 30 percent: most criteria need a person to judge them. Read either way, a large part of the work is not done by this suite. axe cannot tell whether alt text is accurate, whether focus goes somewhere sensible, whether an error is announced at the right moment or whether a page makes sense read aloud.
Some of that you can still test with plain Playwright, because you know what the page should do. Add behaviour checks for the two interactions on this page:
cd ~/axe-suite-demo
cat > tests/behaviour.spec.js <<'JS'
const { test, expect } = require('@playwright/test');
test('the menu opens from the keyboard and reports its state', async ({ page }) => {
await page.goto('/');
const toggle = page.getByRole('button', { name: 'Menu' });
await expect(toggle).toHaveAttribute('aria-expanded', 'false');
await toggle.focus();
await page.keyboard.press('Enter');
await expect(toggle).toHaveAttribute('aria-expanded', 'true');
await expect(page.getByRole('link', { name: 'Cart' })).toBeVisible();
});
test('an empty email moves focus to the field and explains why', async ({ page }) => {
await page.goto('/');
await page.getByRole('button', { name: 'Sign up' }).click();
const email = page.getByLabel('Email');
await expect(email).toBeFocused();
await expect(email).toHaveAttribute('aria-invalid', 'true');
await expect(email).toHaveAccessibleDescription('Enter your email address');
});
JS
npx playwright testNeither test uses axe. The first proves a keyboard user can open the menu and that a screen reader is told it is open. The second proves that after a failed submit, focus lands on the field with the problem and the error is tied to it, so it is read out with the field. axe would pass this page even if email.focus() were deleted.
Then keep the human checks. Before a release, someone tabs through the page and listens to it with a screen reader, as in the manual axe and screen reader tutorial. If many of your users are on low-cost Android phones, make that pass TalkBack on one. If your pages mix languages, for example English with Hausa, Swahili or Amharic, mark each passage with its own lang: axe checks that lang values are valid, but only a listener can tell you the right voice is reading.
Check it worked
The run ends with 5 passed: one home scan, two state scans and two behaviour tests. To see a behaviour test earn its place, delete the email.focus(); line from site/app.js, run npx playwright test tests/behaviour.spec.js, and watch the focus test fail while every axe scan still passes. Put the line back afterwards.
Step 9 · Clean up
Remove the demo folder. npx playwright uninstall removes the browsers this Playwright version downloaded; leave that line out if other projects on this machine use Playwright.
cd ~/axe-suite-demo
npx playwright uninstall
cd ~
rm -rf ~/axe-suite-demoCheck it worked
ls ~/axe-suite-demo reports that there is no such file or directory.
Next steps
- Learn to read and fix each axe violation by hand, then add a keyboard test and a screen reader pass: test a page for accessibility with axe and a screen reader.
- Put these scans into the flows your suite already covers, such as sign-in and checkout: write end-to-end browser tests with Playwright.
- Mobile apps need the same care, with different tools: make a React Native app work with screen readers.
Related tutorials
- Write unit tests that stay useful as the code changesYou will replace a brittle pytest suite with behaviour tests that catch a real boundary bug and stay green when the code under them is rewritten.
- Write property-based tests in TypeScript with fast-checkYou will use fast-check and Vitest to find a rounding bug in a TypeScript money module, replay the failure from its seed, fix it, and model-test a shopping cart with generated command sequences.
- Write negative tests for an API: bad input, auth and limitsYou will build a pytest and httpx suite that attacks a small FastAPI ordering API with missing and extra fields, wrong types, boundary values, long and multilingual text, bad tokens, another user's data, rate limits and reused idempotency keys, and proves every error comes back in one RFC 9457 format.
Need this done for you?
Padding does this work for growing companies, from the first diagnosis to a system that keeps working.
Get new tutorials