Reading, writing and repairing automated checks and page objects with AI
Ask an artificial intelligence assistant to write an automated check, then read it line by line, repair brittle locators and invented calls, and run it failing first.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a power tool: it cuts quickly, and you still measure twice. A power saw cuts a plank in a second. That is its gift. But a saw does not know where you meant to cut. If you do not measure, you get a fast, clean cut in the wrong place.
Daily List is a to-do list app. Tom, the tester, asks an (AI) assistant to write an (A small program that runs a fixed step, looks at the result and says pass or fail without a person) that adds a task. An automated check is a small program that tests one thing without a person pressing buttons. The assistant writes it in seconds.
Tom measures twice. He reads every line. He fixes the parts that would break next week. He runs the check once while it should fail, to see that it can.
The picture has limits. A saw cannot make up a tool that does not exist. An assistant can, and the line looks just as neat as the real ones.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named here are made up.)
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Using an assistant to draft automated checks, then reading, repairing and proving them before they join the suite.
- Prompt with the rules
- Read every line
- Run it failing first
- Repair and review
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| A power saw | The assistant |
| Measuring twice | Reading the code line by line |
| A cut in the wrong place | A weak assertion that always passes |
| A tool that does not exist | An invented call |
WHERE THIS PICTURE STOPS
- A saw cannot invent a tool. An assistant can invent a call that looks real.
- A saw leaves a visible cut. A bad assertion leaves a green result that hides the fault.
- A saw works the same every time. An assistant may give different code for the same prompt.
HOOK
Prompt, read, run, repair, prove.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
Usually run a new check once while it should fail. If it still passes, the check is weak.
| In the trick | What it stands for |
|---|---|
| Should fail | Tom runs the check once to see that it can |
| Still passes | A weak assertion in the wrong place |
It misleads when a check passes for a good reason, so look at why before you call it weak.
TELL A FRIEND
A power saw that cuts fast, so you measure twice before you trust the cut.
OFTEN MIXED UP WITH Reading an automated check. The reading lesson teaches how to read you did not write. This lesson adds an assistant as the writer and a routine for repairing what it wrote.
Sources & standards — 4 sources
- Market practice
How to generate unit tests with GitHub Copilot: tips and examples (GitHub Blog) ↗ — GitHub · Name the test framework, list the edge cases and boundary values you want, keep the code under test in view, and treat generated tests like any other code: never trust them without your normal review (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page or preprint, no edition number; read as a search excerpt only. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
StudioAssist overview (Katalon documentation) ↗ — Katalon · The assistant can generate code that uses made-up built-in keywords; check generated code and replace them with valid ones; it does not know your test objects, variables or custom keywords unless you say so in the prompt (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page or preprint, no edition number; read as a search excerpt only. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Building better tests with artificial intelligence (Ministry of Testing media session) ↗ — Ministry of Testing · A practitioner talk says language models tend to default to fragile CSS selectors and that assertions can break on content changes; the page is behind a free account, so only the abstract was seen (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page or preprint, no edition number; read as a search excerpt only. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Why AI can't write good Playwright tests and how to fix it (DEV Community) ↗ — DEV Community · The author reports that assistants using accessibility snapshots often write position-based locators such as a role plus a position index, and fixes it by scoping a role locator inside a test-id container (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page or preprint, no edition number; read as a search excerpt only. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
PRACTISE AND KEEP
Sources for this topic — 4 sources
- Market practice
How to generate unit tests with GitHub Copilot: tips and examples (GitHub Blog) ↗ — GitHub · Name the test framework, list the edge cases and boundary values you want, keep the code under test in view, and treat generated tests like any other code: never trust them without your normal review (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page or preprint, no edition number; read as a search excerpt only. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
StudioAssist overview (Katalon documentation) ↗ — Katalon · The assistant can generate code that uses made-up built-in keywords; check generated code and replace them with valid ones; it does not know your test objects, variables or custom keywords unless you say so in the prompt (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page or preprint, no edition number; read as a search excerpt only. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Building better tests with artificial intelligence (Ministry of Testing media session) ↗ — Ministry of Testing · A practitioner talk says language models tend to default to fragile CSS selectors and that assertions can break on content changes; the page is behind a free account, so only the abstract was seen (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page or preprint, no edition number; read as a search excerpt only. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Why AI can't write good Playwright tests and how to fix it (DEV Community) ↗ — DEV Community · The author reports that assistants using accessibility snapshots often write position-based locators such as a role plus a position index, and fixes it by scoping a role locator inside a test-id container (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page or preprint, no edition number; read as a search excerpt only. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.