How to run all your Playwright test steps with soft assertions
AI Summary
The video is a Playwright tip about using assertions in test scripts. The presenter demonstrates a simple test script for the website checkhq.com that verifies the page title, clicks the signup button, and checks the resulting URL. They show what happens when an assertion fails: the test stops executing subsequent instructions, which can be problematic if the test contains many steps. To save time debugging multiple failures, the video introduces “soft assertions” in Playwright by adding the soft method to expect objects. This allows the test to continue running all assertions even if some fail, enabling the tester to see all failing assertions in one run. The presenter highlights how soft assertions help identify multiple failures efficiently and save time fixing tests. The tip concludes with a recommendation to use soft assertions when working with many assertions in Playwright tests.