In this video, we'll learn how to run the same test with multiple data.
In this video, the presenter demonstrates how to perform parameterized testing using Playwright, a tool for automating browser actions. The video begins with an introduction to the concept of parameterized testing and its benefits. The presenter then explains that they will be using an application with a form to demonstrate the testing process.
The presenter starts by writing a test script that interacts with the form and performs a verification step. They demonstrate how to select values from a dropdown menu, fill in text fields, and click on buttons. They also explain how to use assertions to verify the expected results.
After writing the test script for a single set of test data, the presenter explains how to parameterize the test so that it can be executed with multiple sets of data. They show how to create an array of objects representing the test data, with each object containing the values for the dropdown menu and text fields.
The presenter then demonstrates how to use a loop to iterate through the test data array and run the test for each set of data. They explain that the test name should be unique for each iteration, and show how to use the data from the current iteration to customize the test name.
Next, the presenter discusses how to run the parameterized tests in parallel for faster execution. They explain that this can be achieved by configuring the number of workers in the Playwright configuration file and setting the "fully parallel" option to true. They demonstrate how the tests are then executed simultaneously in multiple browser instances.
The video concludes by mentioning that there are additional topics related to parameterized testing that will be covered in future videos, such as project-level parameterization and environment-specific configuration.
Overall, the video provides a thorough explanation and demonstration of parameterized testing using Playwright. The presenter covers the necessary steps to write, parameterize, and run the tests, as well as how to configure parallel execution for faster testing.
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].