Playwright

Tag and grep a subset of tests

Medium70 pts
  • Test Tags
  • Grep Filtering
  • Test Suites
Practice app · TargetQA Practice Store

A small storefront landing page for browser setup, navigation, titles, URLs and screenshots.

Test URL
/lab/playwright-tag-and-grep-a-subset-of-tests

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Tag tests with @smoke or @regression and run filtered subsets using grep.

Your Task

  1. 1Include a test tag such as '@smoke' or '@regression' in your test title (e.g. 'Verify homepage @smoke').
  2. 2Navigate to the store home page at TEST_URL.
  3. 3Assert that the hero heading (#page-title) is visible and contains 'Welcome to the practice store'.
  4. 4Assert that the browser document title matches 'TargetQA Practice Store'.

Validation Checks

  • Test title contains tag @smoke or @regression
  • Store home page is loaded at TEST_URL
  • Hero heading (#page-title) is verified visible and contains 'Welcome to the practice store'
  • Browser document title matches 'TargetQA Practice Store'
  • At least 1 assertion passes

Playwright · Playwright Practice Track · Projects & configuration