Guide

How to turn Playwright, Selenium or Cypress tests into tests without code

Tests you already have in code do not have to be recorded again. Your own coding agent reads them and writes one file, and Assertline makes tests of it that everyone on the team can read, run and change. Before anything is stored you see what comes over and what does not. This guide goes through it one step at a time.

Who does what

  • Someone who has the code (a developer, or whoever wrote the tests) puts one folder into the repository and gives their coding agent one sentence.
  • The coding agent reads the tests and writes one file that says what each test does. A small program then compares that file with the code.
  • Anyone who can change tests in Assertline uploads the file, looks at what comes over, enters the passwords and runs the tests.

The agent is yours, on your computer and on your own subscription: Cursor, GitHub Copilot, Claude Code, Codex or another that can read the files of a repository and run a program. It follows plain text files that you can read too. Assertline uses no AI for this.

Use a strong model. A weak one leaves more out and makes checks weaker. The small program and the upload page name much of that, and not all of it. We have tried it ourselves with Claude models, on test suites in Playwright, Selenium (Java and Python) and Cypress, and not with others.

What you need

  • The code of the tests on a computer, and a coding agent that can read it.
  • Node.js for the small program. Without it the file can be uploaded all the same, and the page says that nothing was compared.
  • An Assertline account. Bringing tests over is free on every plan. The Free plan has 2 editors, 2 projects, unlimited tests and unlimited runs on your own computer.
  • A place for the first run: the desktop app (1.1.35 or newer), free for Mac and Windows, or our cloud, which is part of Pro and Enterprise.
  • The passwords of the test accounts your tests use.

Step 1: get the kit

  1. In the dashboard open Bring tests from code. It is also in the New test menu of every project.
  2. Press Download the kit and put its folder, assertline-migration, into the repository of your tests.

The folder holds the instructions for the agent, a page for it to look things up in, a short page for each framework, and the small program that compares its work with your code.

Step 2: give your agent one sentence

Read assertline-migration/ASSERTLINE-MIGRATION.md and do what it says.

The agent reads the tests with the page objects and helpers they call, and writes assertline-migration/assertline-migration.json. The instructions tell it to change nothing else, not to run your tests, and to say what it could not convert and why. It works on one test file at a time, runs the program after each, and goes on until the program says that everything is accounted for.

The program also writes report.html: each line of your code that asserts something, beside what it has become. Whoever knows the code should look through it. Beside it stands lines.json with the cited lines of your code. Both stay on your computer.

Step 3: upload the file and look before anything is stored

  1. On the same page press Choose the file.
  2. Read what comes over: how many tests and checks, the steps of each test, what of your code does not come over and why, which checks differ from your code and the agent's reason, and which tests check nothing.
  3. To see your code under each step, choose lines.json too. The page reads it in your browser and does not upload it.
  4. Choose a project, enter the passwords your tests use, and bring the tests in. The page lists the sites the tests open: a password you entered before stays only with tests that open no new one.

A test without any check can be brought over too, but a run of it is shown as "Nothing checked", never as passed.

Step 4: run them once on your site

Open the project's From code tab, run five of them first and then the rest. The first run finds each element the way your code does, and remembers it the way the recorder would have. From then on most steps are found and changed like recorded ones. Some are looked up your code's way every time: a check that something is not there, and a check whose element your code names by a text or by its place.

  • A test that passes did on your site what the file says.
  • A test that fails stays and is shown as failing. Open it: the step, the page at that moment and the reason are there. Either your site does something else than the test expects, or the file says something else than your code.
  • For the second, press "Copy for your agent". It holds which tests failed, at which line of your code and what the page did. The agent corrects the file and you upload it again.

Step 5: when your code changes, upload again

Let the agent write the file again and upload it into the same project.

  • A test that changed in the code is updated, and shown as "Changed, not run yet" until it has run as it is now. One that has fewer checks than before is named, before the upload and after it.
  • A test that somebody changed in Assertline stays as it is, unless you say it should be replaced.
  • Tests of another code base never take the place of these, even with the same names: they go into another project or another folder's name. If it is the same code and only its repository moved, you say so with one tick.
  • No test is ever deleted by an upload. One that was in the file before and no longer is, is named.
  • The runs a test had stay what they were, for as long as your plan keeps results.

What comes over

In your codeIn Assertline
Opening pages, clicking, typing, choosing, keys, hover, drag, scrolling, dialogs, tabsSteps, in plain words.
Uploading a fileA step with a file of the same name: the real content when it is small, a stand-in otherwise.
Cookies, stored values, the window’s size, the page’s clock, a place, a new tabA step that sets it, and checks of cookies, stored values and tabs.
A forced click, a click at a place or with a key heldThe same.
Either this or thatOne check that passes when one of them is so.
Page objects, helpers, custom commands, what runs before each test in the browserWritten out as steps. Steps that several tests start with are kept in one place.
Data providers, parameterized testsOne test for each row.
Assertions about text, values, attributes, classes, counts, lists, the address and the titleChecks of the same kind: exact stays exact, a pattern stays a pattern, and capitals count where your framework counts them. Line breaks and repeated spaces count as one space.
Requests and their answers, API calls, database queries, downloads, accessibility scansSteps and checks for each.
Answers the code puts in place of the server's, going offlineSteps that do the same.
Loops and conditions about what the page showsBlocks that repeat, or run only if something is on the page.
Passwords, tokens and keysNames such as {{PASSWORD}}. You enter the value on the page and it is stored encrypted.

What does not come over

  • How long something took.
  • Two people in two browsers at once.
  • JavaScript of your own that runs in the page, and calculations only code can do.
  • The real content of an uploaded file that is too large to write into a step (a small one, such as a list in a .csv file, comes over).
  • What the browser pretends to be: another phone, a slow network.
  • Programs outside the browser, such as one that fills a database or reads a file on disk. An API call or a database query can often take their place.
  • Apps on a phone.

Cypress fails a test by itself when the page has an error that nothing catches, or answers 404 or 500 when it is opened. Here a run fails for that only when a check says so. What is transparent, or cut off by the box it is in, counts as hidden there and as shown here.

When what your code names is on the page several times, the run says how many it found. Open the step on the test's page and choose which one it is: the 1st, the 2nd, the last.

Tests that reset one shared database can get in each other's way when several run at once: in the cloud two do, on a computer they run one after another.

The agent writes each of these down with its reason, and you see the list before anything is stored. When only one line of a test is such a thing, the rest of the test comes over.

How you know that nothing was lost

The small program reads your code line by line, with no AI. It knows the usual ways of JavaScript, TypeScript, Java, Kotlin, C# and Python, and many of those of Ruby, PHP and Robot Framework. It names, with file and line:

  • a test or an assertion that is neither in the file nor on the list of what was left out, for every test that makes it;
  • a click, a text that is typed, a reset of the data, a replaced answer, a wait for a request or an address, or a compared picture that no step does;
  • a step that looks at another element than its line, waits for another request, types another text, or comes in another order;
  • a step that is always done where your code does it only under a condition;
  • a check that is plainly weaker than its line, stricter or about something else, unless the agent wrote down why;
  • rows, entries of a list and texts handed to a helper that are nowhere in the test;
  • a check that stands for many assertions, one that cannot fail, one that runs only under a condition your code does not have, and texts that are nowhere in your code;
  • a password of your code that is in the file.

The upload page shows the count, the differences with the agent's reasons, and says so when the program was not run or the file was changed afterwards.

What it cannot tell you:

  • Whether every line was understood rightly. It finds what is plain from two lines of text. The first run on your site shows what is wrong or too strict; a check that is too weak passes. That is why somebody who knows the code should look through the report.
  • Whether you have checks written as plain code, such as an if that throws an error. It does not recognise those, so ask your agent about them.

What leaves your computer

  • Your code is not sent to Assertline. Only the file you choose is. It holds what the tests do: addresses, texts, data, requests and database queries, how each element is found, settings that are not secret, titles and notes, the names of your files with line numbers, a fingerprint of the repository's address (it tells two code bases apart, and the address cannot be read from it), and the reasons for what was left out. You can read it before you upload it.
  • Passwords do not belong in it. The instructions tell the agent to leave every real one out and to write a name in its place. An upload is refused when a password, a token or a key is recognised: in a field, a header, the body of a request, an address or a row of data, or by its shape. The small program also looks for the passwords your code holds. Passwords that are wrong on purpose stay, and the page shows you each of them.
  • Your coding agent is a service of its own. It reads your code under your agreement with whoever provides it.

The small program sends nothing anywhere. How we keep what you upload is on the security page.

Questions

Which test frameworks can be converted?

Playwright, Selenium, Cypress, WebdriverIO, Robot Framework and others that drive a browser, in any language your coding agent can read. We have tried suites in Playwright (TypeScript), Selenium (Java and Python) and Cypress ourselves; the others have their rules in the instructions and are untried.

Do you get to see our code?

No. Your agent reads it on your computer and only the file it writes is uploaded. That file names your files and line numbers and says what the tests do.

Does a converted test check as much as the code did?

It is meant to, and what is plainly weaker than its line is named with the reason. Not everything can be seen that way: look through the report, and change a check in Assertline where you want it stricter.

Does it matter which AI model we use?

Yes. A weaker model leaves more out and weakens more. What is missing is named, what is plainly weaker is named, and some of it can only be seen by reading the report. We have tried only Claude models.

Do our tests in code stop working?

No. The instructions tell the agent to change nothing in your repository apart from the folder you put there. Both can go on side by side, and the file can be written again when the code changes.

Can converted tests run in my own Chrome?

Not the first time: that run finds the elements the way your code does, and needs the desktop app or the cloud. Afterwards a test can when all its steps can be done there; where one cannot, Assertline says which. Checks of requests, guards and some checks that something is not there cannot.

What does it cost?

Nothing from us for bringing them over. It is part of every plan, the Free plan too (2 editors, 2 projects, unlimited tests and unlimited runs on your own computer). Runs in our cloud, in a pipeline and on a schedule are part of Pro and Enterprise. Your coding agent runs on your own subscription.

Can I turn an Assertline test back into code?

No. Tests are not exported as code for a test framework. Your code stays yours, in your repository.

Start with one folder of tests

Bring over a few tests first, run them once and read the list of what was left out. Then do the rest folder by folder.