QA Interview Hub · Knowledge base · Quizzes · Українська
15 AI-driven Automation questions that come up in QA interviews, with short answers. Open the topic in the knowledge base for a deeper explanation.
An assistant answers in one step (autocomplete, chat), and a person carries the result over. An agent works in a plan → act → observe loop with tools: it performs actions itself and sees the result. An autonomous pipeline is an agent inside a process (for example CI), started by an event and acting without a person at each step. The more autonomy, the more important permissions, limits and result verification are.
It helps with: drafts of test plans and cases, test generation and maintenance, failure triage, test data, hints for exploratory testing. A person keeps: risk assessment, the oracle (what counts as correct behaviour) and the release decision. An agent’s result is always verified.
Hallucinations (invented APIs, "passed" steps) — verification by running and review. Non-determinism — the result is verified, not reproduced. Limited context — lasting rules in a project file, short sessions. Cost — a step and budget limit and a stop criterion with handoff to a person.
An open file format with instructions for agents (plain Markdown, a "README for agents"); the agent reads the one nearest to the file in the tree. There are tool-specific files too: CLAUDE.md, .github/copilot-instructions.md. Write: run and lint commands, conventions, test id rules, prohibitions. Do not write: secrets and things that go stale quickly.
MCP is an open protocol for connecting AI applications to tools and data; a server exposes tools to the agent. Playwright MCP lets an agent drive a browser and works with an accessibility tree snapshot (roles and names as text) rather than screenshots. It is not a security boundary: isolation comes from the environment, and the server version is pinned.
An instruction is a request to the model, which it may fail to follow. A hook is run by the environment as code and blocks an action deterministically. Critical prohibitions go in hooks and an allowlist, with least privilege and a sandbox. A task for an agent: a goal, constraints (what not to touch), a done-when criterion and a check command.
Since Playwright 1.56: the planner (explores the application, writes a Markdown plan in specs/), the generator (turns the plan into tests in tests/, verifying selectors and assertions in a live browser), the healer (runs failed tests and repairs them; it may skip a test if it believes the functionality is broken). Setup: npx playwright init-agents --loop=vscode|claude|codex|opencode; the starting state is set by a seed test. Review of the plan and the patches stays with a person.
Right when the interface changed and the behaviour did not (a renamed button, a moved element): the locator is updated. Harmful when a test is "healed" by a weakened assertion, a changed expected value, a larger timeout with no cause found, or a skip: that hides a regression. A heuristic choice of the "closest" element may pick a wrong one. Healer patches go in a PR with a diff.
The seed test prepares the state (login, data). The planner writes a plan — a person reviews risks and expected results. The generator creates tests (they may have initial errors). The healer repairs failed ones — a person reviews the diff, especially changed expectations and skips. Then repeated runs and evidence (trace).
An assertion that cannot fail (toBeDefined, "not empty"); expectations taken from current behaviour rather than requirements; invented selectors and APIs; over-mocking that replaces the real response; weakened expectations and increased timeouts; forgotten test.only and test.skip; duplicate tests.
Stability: many repeats (npx playwright test --repeat-each=20), no masking by retries; forbidOnly in CI. Ability to fail: deliberately break the behaviour and see red, or apply mutation testing. Evidence: a trace, video, reproducible command output.
A report is a claim, not evidence: ask for the diff, a reproducible run, a trace and a list of what was not verified. The oracle must come from requirements, not from observing the application. The quality of changes to a model or instructions is measured on a golden set: a fixed set of tasks with known defects, comparing the share of found defects and false passes.
Start in "reads and comments" mode, with the merge decision for a person; then allow opening PRs; auto-merge is the last step. A token with minimal scope and expiry, step and time limits, the result in a PR or comment, an action log (who, which commands and files, model and prompt version).
Prompt injection: untrusted text (a page, an issue) contains "commands" for the model. Secret leaks (a token in an instruction file). An untrusted MCP server is code with your rights. Defence is limiting consequences: least privilege, secrets not in instruction files but in a secret manager or environment variables, with a narrow scope and only those the task needs, a sandbox, confirmation of dangerous actions, a pinned server version. A phrase in a prompt is not a defence.
Outcome metrics: time to green, escaped defects, review time, share of false passes. Vanity: the number of generated tests, tokens, lines. Interview answer: I compare with requirements, check that the test fails on broken behaviour, repeat runs, look at the trace, and responsibility for the result stays with me. An agent does not fit decisions on risk acceptance and release.