WebdriverIO Tutorial Home / Video /

How to Parameterize Your Tests in WebdriverIO

How to Parameterize Your Tests in WebdriverIO

About The Video

In part 7 of the WebdriverIO tutorial series, join 𝐌𝐚𝐫𝐜𝐨 𝐀 𝐂𝐫𝐮𝐳, founder of automateNow, as he demonstrates how to perform parameterization in WebdriverIO. You will learn how to integrate different test scenarios and configure the page object. Marco also explains how to create test data, leading to the final creation of the test.

By the end of this tutorial, you will be able to run automated tests multiple times with different sets of data. This approach will help you ensure your application behaves as expected with various input values and scenarios, improving test coverage and reliability.

Video Chapters

00:00 Intro

00:31 What is test parameterization?

01:05 Test scenario

02:27 Creating the page object

04:40 Adding test data

07:05 Creating the test

10:50 Review

15:16 Running the test

16:42 Outro

Key Topics Covered

Introduction to Parameterization: Explanation of what test parameterization is and its benefits in automated testing.

Test Scenario Example: Demonstration of a test scenario using a login page, showcasing different sets of data for testing (e.g., valid and invalid credentials).

Creating Page Objects: Detailed steps on how to create page objects in WebdriverIO, emphasizing the use of the page object model for maintaining clean and reusable code.

Adding Test Data: Guidance on how to create and use a JSON file to store different sets of test data for parameterization.

Writing the Parameterized Test:

Step-by-step process for writing the actual parameterized test, including:

Importing the JSON file with test data.

Creating a for loop to iterate through different data sets.

Using the page object methods to interact with the web elements.

Adding assertions to validate the test results based on expected error messages.

Running the Test: Instructions on how to execute the parameterized test and view the results, including using the LambdaTest platform for running the tests and analyzing the test execution logs and videos.

Review and Recap: Recap of the key steps and concepts covered in the video, reinforcing the importance of parameterization in improving test coverage and reliability.

Related Blogs & Hubs

Selenium WebdriverIO Tutorial with Example

Cross Browser Testing With WebDriverIO [Tutorial]

WebdriverIO Tutorial For Handling Dropdown In Selenium

WebdriverIO Tutorial For Handling Dropdown In Selenium

WebdriverIO Tutorial: Run Your First Automation Script

......
...

Testμ 2024

Join the free online conference to decode the future of testing!

...21 - 23 August, 2024

More Videos from WebdriverIO Tutorial