free tool
Review a Playwright, Cypress or Selenium test
Find common problems before you share your test code. Paste a JavaScript or TypeScript test from Playwright, Cypress or Selenium. The review checks selectors, waits and assertions. An assertion checks whether a result matches what you expect.
The review runs in your browser. Your code is not uploaded. You do not need an account.
What this looks for
- Missing assertions. A test can pass without checking a result. Add an assertion for the behaviour you want to test.
- Fixed sleeps. These pause for a set time. They can waste time or end before the app is ready. Wait for the result you expect instead.
- Selectors based on position. A selector finds an element on the page. Choosing by position can select the wrong element after a layout change.
- Missing awaits. Some Playwright assertions need
awaitto wait for the check. Without it, the test can finish before the check finishes. - Checks that miss the changed value. A total can be visible and still be wrong. After an action, check the expected text, count or value.
- Checks that pass without testing the app. Comparing a value with itself checks no app result. A check inside an
ifblock may never run.
How it works
The review reads your code without running it. This is called static analysis. It looks for known code patterns in your browser. It does not open your app or run your tests.
It works in three steps.
- 1. Detect the language and framework. Each framework uses different commands. A fixed sleep is
waitForTimeoutin Playwright,cy.waitin Cypress anddriver.sleepin Selenium. The tool suggests a framework when it recognises the code. You can change it. Your choice stays selected. - 2. Check common code patterns. Each rule looks for a specific problem. The rules are listed below.
- 3. Explain what to change. Each issue explains the problem and the next step. The review shows line numbers when it can identify them.
Review rules
A blocker means a required check is missing or incomplete. A warning means a pattern needs review. A warning does not prove the test is wrong.
| Rule | Level | What it catches |
|---|---|---|
| No assertions | Blocker | The review found no assertion. Check whether the test verifies an app result. |
| Empty test | Blocker | The test body contains no code or checks. |
| Missing await on an assertion | Blocker | A Playwright assertion needs await. The test may finish before the check finishes. |
| Fixed sleep | Warning | A set delay can waste time or end before the app is ready. |
| Position-based selector | Warning | A selector chooses by position. A layout change may change which element it selects. |
| Awaiting a Cypress command | Warning | Cypress manages its own command order. Chain its commands instead of using await. |
| Only checks an element exists | Warning | An element can exist while its value is wrong. Check the expected value too. |
| Assertion compares a value with itself | Warning | A value compared with itself does not check an app result. |
| Assertion inside a condition | Warning | If the condition is false, the assertion is skipped. The test may still pass. |
What it cannot tell you
Use the review as a starting point. Read these limits before relying on the result.
- It only reads JavaScript and TypeScript. It stops when it recognises Java, Python or C#. The review cannot reliably check those languages.
- It cannot read code you have not pasted. A helper method puts shared test code in a separate function. A name such as
assertHeadingIsVisiblecounts as a check. The review cannot inspect what that method checks. - It cannot tell you whether your test catches the bug. A test can pass these rules and still miss a bug. This tool does not run the app to check that.
Use a practice problem to check whether your test detects a planted bug. Verify runs the working app first, then copies with a bug planted on purpose. If your test still passes, the result names the bug it missed.