Introduction

"Welcome to this tutorial on integrating Playwright with TestReport.io. In just a few steps, you'll learn how to set up and upload your test reports effortlessly."


Step 1: Access the Playwright Plugin Setup

"After logging in to TestReport.io, navigate to the profile section. In the Playwright plugin, you'll find all the steps required to set up the integration."


Step 2: Create the Configuration File

"First, create a configuration file named testreport.config.js in your Playwright project. Ensure this file is located in the root directory."

"Paste this code into the file to define your project access key, base URL, target directory, and screenshots directory."


Step 3: Specify Paths in the Configuration File

"In the configuration file:"

  1. Set targetDir:

    "Specify the path where the index.html test report file is generated. Add double slashes (//) in the path for compatibility."

  2. Set screenshotsDir:

    "Point this to the directory where failed test screenshots are stored. For example, use the data folder in your project."

  3. Set sourceFilePath:

    "Define the path of the index.html file generated by your tests. This ensures TestReport.io can locate and process your test report."


Step 4: Install the TestReport.io Dependency

"Next, install the TestReport.io dependency by running the following command in your terminal:"

npm install testreport-io