Rayrun
← Back to videos

Playwright Test Runner Skip on Failure | Playwright Tutorial - Part 46

Serial: Declares a group of tests that should always be run serially. If one of the tests fails, all subsequent tests are skipped. All tests in a group are retried together.

In this video, the presenter discusses two features in the Playwright test framework. The first feature is "test.describe.serial", which allows for skipping tests within a describe block if a test within that block fails. The presenter demonstrates this feature by intentionally causing a test to fail and showing that the subsequent test is skipped. However, it is noted that using "test.describe.serial" is not recommended by the Playwright team because it goes against the concept of running tests in isolated contexts.

The second feature discussed is "test.step", which allows for organizing tests into steps within a single test block. This is useful for end-to-end scenarios where multiple actions need to be performed. The presenter demonstrates this feature by showing how to structure code into steps and how the test result is displayed in the report.

The presenter also shows how to increase the default timeout for tests and mentions that if a test.step fails, the entire test result is marked as broken.

In conclusion, the video explains how to use "test.describe.serial" to skip tests and how to use "test.step" to organize tests into steps. It also discusses the recommended usage of these features and demonstrates their functionality.

Related Videos

Playing Your Tests Wright with VS Code
Playing Your Tests Wright with VS Code
#16 - ARIA and how Playwright is making use of it to identify UI controls?
#16 - ARIA and how Playwright is making use of it to identify UI controls?
Working with multiple elements in Playwright Test (NodeJS)
Working with multiple elements in Playwright Test (NodeJS)
How to Install Playwright Test
How to Install Playwright Test
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].