Playwright (JS/TS)
Integrating Playwright JavaScript/TypeScript based tests
Last updated
Was this helpful?
Integrating Playwright JavaScript/TypeScript based tests
Last updated
Was this helpful?
First we need to install cloudbeat/playwright in your project:
Then add cloudbeat as the reporter inside playwright.config:
In order to save screenshots and videos in cloudbeat, make sure to enable them:
Under Manage, open projects and click on add project, choose a name and select Playwright
CloudBeat is a platform for both test reporting and execution. To use CloudBeat, you must upload your test project files to execute tests and access report analytics. You can upload your project as a Zip file, or CloudBeat can automatically synchronize with your test project Git repository.
In order to sync your test project from git, select Git Integration and paste the url to your repository.
You can use your username and password, or with an access token.
If you want to upload a local test project, you need to zip your project folder, then select upload.
Make sure you skip node_modules, and preferably all the unnecessary files such as results, reports, etc.
Under manage, open Environments and recreate the values that you have inside your .env file.
Under Testing, go to cases and you will see all your tests, make sure Location is enabled under test mode, click on Run Now to execute the selected test on your selected location.
After your test is completed, click on the results tab to see all of the test steps, videos, logs and data.
Under Testing, go to Suites, right-click on Dashboard to create a new suite, or start by creating a new folder then right-click on it and choose Create suites - web.
Go to settings and make sure test mode is set to Location, save changes and choose your location.
Click on the cases tab and select your desired cases.
Similar to a single case, clicking on Run Now will execute all the selected cases.
Under results tab, you will see the status of your tests.