Rayrun
← Back to videos

Playwright Tutorial | Flexible Test Execution: Running Tests with Either or Both Tags in Playwright

Tag test in Playwright, Tags in playwright tests, Tagging in Playwright

Welcome to another video in our Playwright with TypeScript series. This tutorial covers how to run tests using tags in Playwright. If you haven't watched the previous video on providing and executing test tags, you can find the link in the description or click the 'i' button at the top right corner.

Recap of the Previous Video

In the previous video, we learned how to add single or multiple tags to test titles using the @ symbol, and how to provide tags via the test's second argument as an object. We also covered commands to run (npx playwright test -g @TAG_NAME) or skip (npx playwright test -g-v @TAG_NAME) tests with specific tags.

Current Topic: Running Tests with Either or Both Tags

In this video, we'll delve into running tests with either a single tag or multiple tags using different terminal types, namely PowerShell, Bash, and CMD.

Terminals Overview

  1. PowerShell: Provided by Microsoft.
  2. Command Prompt (cmd.exe): Also a Windows interface.
  3. Bash: Default terminal on Unix-based systems like Linux and MacOS.

Running Tests with Either Tag

To run tests containing either one tag or another, use specific commands for each terminal type:

  • PowerShell: `npx playwright test -g -G
TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].