Spike: Playwright Implementation Web App.
1. POC
A POC carried out to execute playwright test on Lambdatest and following are the outcomes
LambdaTest does not provide a direct API endpoint for fetching step-by-step test results specifically. However, there is an API that can access the logs and other detailed information about the test session which often includes step-by-step execution actions details.
Network logs:
Console Logs:
Commands Logs:
Lambdatest does not provide an API endpoint specifically to fetch screenshots of individual steps directly.
However, there is an API that can retrieve screenshots from test sessions
2. Approach
Cloud Execution
GTP Extension will record and provide playwright executable script and in Web App a new column will be created in DB script table to store playwright script.
In a web application, a Playwright executable script template will be created by getting the recorded script from database and adding required dependencies to execute test on cloud. The dependencies include Playwright imports, Lambdatest capabilities and a command to call Lambda test endpoint.
Local Execution
For local execution, the Playwright script template will be created without cloud dependencies, and the user may have the option to run the script on extension and download the script and execute it locally.
3. Playwright Test Execution on Local Selenium Grid
To run Playwright tests on a local Selenium Grid running in Docker, ensure that the Playwright tests are configured to connect to the Selenium Grid. Below are the steps to set this up:
Docker desktop installed on the deployment server.
Pull the latest Selenium Grid Docker images
docker pull selenium/hub
docker pull selenium/node-chrome
docker pull selenium/node-firefox
Install Playwright and Dependencies
npm install playwright
npm install selenium-webdriver
4. GoTestPro Architecture Diagram
Â