TOPIC 43/6016 MINNOT STARTED

Steps, test info and attachments

Name the parts of a long test so the report reads like a story, and attach screenshots or notes to a result so a failure comes with its evidence.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: chapter headings and photographs in a lab notebook. Imagine a notebook with one long page of notes. To find the part about the mixing, you must read everything. Now add chapter headings and tape a photograph beside the odd result. A new reader finds the right place at once.

Daily List is a to-do list app. Tom, the tester, has written a long test that signs up, adds a task and shares a list. When it fails, the report is one block of lines. Mei, the test lead, cannot tell which part broke.

What it is: Playwright is a free tool, made by Microsoft, that drives real web browsers from test code. Its , called , also writes a report of each run. This topic is about two helpers that make that report easier to read. A step is a named group of actions inside one test, like a chapter heading. An attachment is a file or note added to a test result, like a photograph. Playwright keeps facts about each running test in an object called test info, and that object is how you add an attachment.

Why it matters: a long failure without headings leaves Mei guessing which part broke. Named steps and attachments put the place and the proof in the report, so she can fix the right stage without running the test again.

The picture has a limit. A heading does not make the test better. It only makes the report easier to read.

Kept simple: the notebook has one kind of heading and one kind of photograph. Playwright has more options than this lesson shows.

(SYNTHETIC / TRAINING ONLY: Daily List, its test site and every person named here are made up.)

PLAIN WORDS · 1 in this section
playwright
a free Microsoft tool that drives a browser for tests

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 Making a long test report easy to read, and keeping the evidence for a failure with the result.

  1. Name the step
  2. Run the test
  3. Attach the proof
  4. Read the report
Headings for the story, photographs for the proof

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The chapter headingsReport steps made with test step
The photograph taped beside the odd resultA test attachment
The notebook's own page for one experimentThe output folder owned by one test
The facts on the notebook coverTest info

WHERE THIS PICTURE STOPS

  • A heading does not make the experiment better. A step does not make the test better.
  • A photograph can show private things. An attachment can hold private data.
  • A notebook is read by one person. A report is read by a whole team, so names must stay stable.

HOOK

Headings for the story, photographs for the proof.

REMEMBER IT THIS WAY

A contrast: two neighbours told apart by one test.

Headings tell where it broke, photographs show what it looked like. Add a step per chapter and an attachment for the odd result.

What each part of the trick stands for
In the trickWhat it stands for
stepthe heading
attachmentthe photograph

An attachment can hold private data, so check it before sharing the report.

TELL A FRIEND

A lab notebook with chapter headings and a photograph beside the odd result.

OFTEN MIXED UP WITH Reporters and artifacts: reports, screenshots, videos and traces. The reporters lesson covers files Playwright saves by itself. This lesson covers the steps and attachments you add on purpose.

Sources & standards — 4 sources
  1. Market practice

    Playwright Test class reference (Playwright documentation) ↗ — Microsoft (Playwright) · test.step groups actions under a name in the report; test.info() returns the TestInfo of the running test (search excerpt, page not opened)

    Reference for test, test.step, test.setTimeout, test.slow and test.only. Says test.step declares a step that is shown in the report and can be nested, test.slow gives a test triple the default timeout and test.setTimeout sets an explicit limit. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. 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.

  2. Market practice

    Test info (Playwright documentation) ↗ — Microsoft (Playwright) · testInfo.attach takes a name and either a body or a path, not both; outputPath gives a file path inside the test's own output folder that is safe when tests run in parallel; workerIndex and parallelIndex identify the worker (search excerpt, page not opened)

    Describes the TestInfo object: attach, outputPath, retry, workerIndex and parallelIndex. Vendor documentation, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. 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.

  3. Market practice

    Test step info (Playwright documentation) ↗ — Microsoft (Playwright) · TestStepInfo.attach attaches a value or file to the current step instead of to the whole test; added in recent versions (search excerpt, page not opened)

    Describes the object passed into a test step and its attach method. Vendor documentation, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. 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.

  4. Market practice

    Playwright Test class reference (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: beforeEach, step, fail and locks type definitions. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Documents test.describe, the hooks beforeEach, afterEach, beforeAll and afterAll, test.skip, test.fixme, test.slow and test.step. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: beforeEach, step, fail and locks type definitions. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

PRACTISE AND KEEP

Sources for this topic — 4 sources
  1. Market practice

    Playwright Test class reference (Playwright documentation) ↗ — Microsoft (Playwright) · test.step groups actions under a name in the report; test.info() returns the TestInfo of the running test (search excerpt, page not opened)

    Reference for test, test.step, test.setTimeout, test.slow and test.only. Says test.step declares a step that is shown in the report and can be nested, test.slow gives a test triple the default timeout and test.setTimeout sets an explicit limit. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. 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.

  2. Market practice

    Test info (Playwright documentation) ↗ — Microsoft (Playwright) · testInfo.attach takes a name and either a body or a path, not both; outputPath gives a file path inside the test's own output folder that is safe when tests run in parallel; workerIndex and parallelIndex identify the worker (search excerpt, page not opened)

    Describes the TestInfo object: attach, outputPath, retry, workerIndex and parallelIndex. Vendor documentation, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. 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.

  3. Market practice

    Test step info (Playwright documentation) ↗ — Microsoft (Playwright) · TestStepInfo.attach attaches a value or file to the current step instead of to the whole test; added in recent versions (search excerpt, page not opened)

    Describes the object passed into a test step and its attach method. Vendor documentation, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number; read at the time of writing. 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.

  4. Market practice

    Playwright Test class reference (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: beforeEach, step, fail and locks type definitions. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Documents test.describe, the hooks beforeEach, afterEach, beforeAll and afterAll, test.skip, test.fixme, test.slow and test.step. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: beforeEach, step, fail and locks type definitions. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

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.