Load Testing with Playwright

In this tutorial, we'll show you how to easily set up and run a browser-based load test with Step's wizard, using your existing Playwright tests, on the Step automation platform.

Get Step SaaS for free to follow this tutorial
Illustration for Load Testing with Playwright

Test scenario

In this tutorial, we want to simulate multiple people visiting a sample online store simultaneously. To achieve this, we’ll use the OpenCart sample online store as our target application.

To create our load test, we’ll make use of a Playwright script that mimics user actions: searching for a product, adding it to the shopping cart, and completing the order.

Step’s wizard takes care of integrating your Playwright project in Step and configuring the load test, making the process quick and straightforward.

The tutorial involves the following steps:

  1. Setting up the Playwright project
  2. Configuring the load test in Step
  3. Running and analyzing the test

The main advantage of Step is the ability to reuse automation artifacts, so if you have already followed our Synthetic Monitoring with Playwright or RPA with Playwright tutorials, you can go straight to using the wizard.

Note: Step’s Cypress load test wizard simplifies the process, making it easier than the example in the advanced use case tutorial.

Set up the Playwright project

Clone the Playwright sample keyword from GitHub:

  git clone https://github.com/exense/step-samples
  

Optionally, run the Playwright JUnit test locally:

  cd step-samples/keywords/java/demo-playwright-keyword
mvn test
  

Create the Keyword Package that will be used in Step:

  mvn package -DskipTests
  

After execution of this command, a JAR file named demo-playwright-keyword-0.0.0.jar is generated and located in the “target” directory of the project. This JAR file will be used in the subsequent steps of this tutorial.

Use the Step wizard

Log in to the Step portal, or sign up for free and create a Step Cluster with ten agents, following this Quick setup guide.

To launch the Step wizard, from the Step platform:

  1. Go to home.
  2. Click on Start wizard.
Image showing how to start Playwright wizard

Step 1: Set up Playwright project

On the Playwright Load Test dialog, fill in the information as outlined in the following sections.

  1. Upload the Keyword Package containing your keywords. This is the file that you created in the previous step ( demo-playwright-keyword-0.0.0.jar ).
  2. Enter the Keyword Name to use: Buy MacBook in OpenCart
  3. Click on Next
Image showing how to set up Playwright project in Step

Step 2: Load test configuration

For this simple demo, we will be limiting ourselves to 5 users and 5 minutes. You can specify different values of course, just remember that for optimal results, each simulated user should run on a separate agent.

  1. Enter the Number of parallel users: 5
  2. Enter the Load test duration: 5 minutes. Test will terminate after the specified time.
  3. Click Next
Image showing how to configure playwright load using step wizard

Step 3: Run and view the result

Execute your load test plan by clicking the Execute button.

Image showing how execute playwright load test using step wizard

Once the execution has started, you will be redirected to the execution page.

Image showing the execution page of playwright load test using step wizard

Analyze the result

In the Performance tab, you can check the performance metrics:

Image showing performance charts
Illustration for Using Step with Grafana
Using Step with Grafana

This article demonstrates how to connect Grafana to data generated by Step.

Illustration for Setting up system monitoring with a Step agent
Setting up system monitoring with a Step agent

This article demonstrates how to set up distributed system monitoring using Keyword executions, and analyze the results as measurements.

Illustration for NET tutorials: Microsoft Office automation with Step
NET tutorials: Microsoft Office automation with Step

This tutorial demonstrates how to automate interaction with Microsoft Office applications using the Office Interop Assembly.

Illustration for JUnit Plan Runner
JUnit Plan Runner

This article provides documentation for how to integrate JUnit tests into Step.

Illustration for How to monitor services availability and performance
How to monitor services availability and performance

This tutorial demonstrates how Step can be used to monitor services, availability and performance metrics.

Illustration for .NET tutorials: AutoIt with Step
.NET tutorials: AutoIt with Step

This tutorial demonstrates how to utilize the AutoIt C# binding to automate interactions with Windows applications.

Illustration for Android Testing using Step and Appium
Android Testing using Step and Appium

This article demonstrates the automation of mobile applications on Android using the Appium framework.

Illustration for Browser-based automation with Step and Selenium
Browser-based automation with Step and Selenium

This article defines three Keywords which will be used in browser-based automation scenarios, using Step and Selenium, as general drivers.

Illustration for Load Testing with Cypress
Load Testing with Cypress - advanced

This tutorial shows you how to efficiently set up a browser-based load test using existing Cypress tests in the Step automation platform.

Illustration for Adding and Configuring New Agents
Adding and Configuring New Agents

In this short tutorial, we show how to quickly implement a simple browser-based load test based on Cypress scripts in Step.

Illustration for Load Testing with Playwright
Load Testing with Playwright - advanced

This tutorial shows you how to efficiently set up a browser-based load test using existing Playwright tests in the Step automation platform.

Illustration for Basic Keyword Development
Basic Keyword Development

This article explains Keywords in Step and demonstrates how to create simple ones.

Illustration for Designing functional tests
Designing functional tests

This tutorial demonstrates the design, execution, and analysis of functional tests using the web interface of Step.

Illustration for Robotic Process Automation (RPA) with Selenium
Robotic Process Automation (RPA) with Selenium

This tutorial will demonstrate how to use Step and Selenium to automate various browser tasks.

Illustration for Robotic Process Automation (RPA) with Cypress
Robotic Process Automation (RPA) with Cypress

This tutorial demonstrates how to use Step and Cypress to automate various browser tasks.

Illustration for Synthetic Monitoring with Selenium
Synthetic Monitoring with Selenium

This tutorial demonstrates how Selenium automation tests can be turned into full synthetic monitoring using Step.

Illustration for Load Testing with Cypress
Load Testing with Cypress

In this tutorial, we'll show you how to easily set up and run a browser-based load test with Step's wizard, using your existing Cypress tests, on the Step automation platform.

Illustration for Load Testing with Selenium
Load Testing with Selenium

This tutorial shows you how to efficiently set up a browser-based load test using existing Selenium tests in the Step automation platform.

Illustration for Synthetic Monitoring with Playwright
Synthetic Monitoring with Playwright

This tutorial demonstrates how Playwright automation tests can be turned into full synthetic monitoring using Step.

Illustration for Synthetic Monitoring with Cypress
Synthetic Monitoring with Cypress

This tutorial demonstrates how Cypress automation tests can be turned into full synthetic monitoring using Step.

Illustration for Robotic Process Automation (RPA) with Playwright
Robotic Process Automation (RPA) with Playwright

This tutorial will demonstrate how to use Step and Playwright to automate various browser tasks.

Illustration grafana devops tutorial
Continuous load testing with K6

Quickly integrate K6 based load-tests in your DevOps workflow

Illustration for playwright synthetic monitoring in a devops workflow
DevOps Synthetic Monitoring with Playwright - Advanced

This tutorial demonstrates how Playwright tests can be reused for synthetic monitoring of a productive environment in a DevOps workflow

Illustration for playwright synthetic monitoring in a devops workflow
DevOps Synthetic Monitoring with Playwright

This tutorial demonstrates how Playwright tests can be reused for synthetic monitoring of a productive environment in a DevOps workflow

Illustration for okhttp devops
Protocol-based load testing with okhttp

In this tutorial you'll learn how to quickly set up a protocol-based load test with okhttp

Illustration for playwright devops
Continuous end-to-end testing

Learn how to set up continuous end-to-end testing across several applications based on Playwright tests in your DevOps pipeline using Step

Illustration for playwright devops
Continuous load testing with Playwright

Learn how to quickly set up continuous browser-based load testing using Playwright tests in your DevOps pipeline

Want to hear our latest updates about automation?

Don't miss out on our regular blog posts - Subscribe now!

Image of a laptop device to incentivize users to subscribe