Generating a test from a requirements document

Paste the spec for a feature and let Testsnag draft the steps, instead of starting from a blank recorder.

View as Markdown

Import PRD, in the recorder toolbar, turns a written description of a feature into a draft test. It suits the case where the behaviour is already specified somewhere but nobody has built the test yet: a ticket, an acceptance criteria list, or a short requirements document.

  1. 1Import PRD turns a written spec into a draft set of steps.
  2. 2The steps it generates are ordinary steps: edit, reorder, and delete them freely.
  3. 3Replay each one before saving. This is where an invented selector shows itself.
  4. 4The same warning applies: never paste real credentials or production data.

What to paste

Concrete user-facing behaviour works best. "The user enters an email and password, clicks Sign in, and lands on the dashboard with their name in the header" produces good steps. Architectural notes, database schemas, and anything the browser cannot observe produce nothing useful, because a test can only check what is visible on the page.

A template is offered if you want a shape to write against. It is a starting point, not a requirement: any reasonably concrete prose works.

Treat the result as a draft

The import produces ordinary steps that you then edit, reorder, and delete like any others. Expect to fix selectors, because the import is working from your description rather than from your actual DOM. Replay the steps once in the recorder before saving, which is where any invented selector will show itself immediately.

An imported test that has never been replayed is not a test yet. It is a guess at one. Run it before you schedule it.

Still stuck, or spotted something out of date?

Contact support