Sample set of UI test cases build for the website saucedemo. This repo can showcase that how this repo can integrate or use with other tools
- Local copy
- Mongo DB database integration
- Test Trend by Influx DB 2.0
- Dockerfile
- Github Actions Workflow
- Kubernetes
Just clone this repo and run these commands npm install
for dowload all dependencies and run npx playwright test
.
You can find the report in this path with timestamp ./playwright-report/<timestamp>
By using the custom reporter of playwright, we can easily feed the summary result to any time series database. Here it used the docker image to build and run the server, refer docker-compose.yml
for setup. And also see the ./custom_report
folder for code configuration.
If you want to build and run the test case in Docker
environment. Clone this repo and to build the image
docker build -t <name>:<tag> .
and run these command for test execution docker run -it -v $(pwd)/report:/app/playwright-report <name>:<tag> -c "npx playwright test"
For continious integration we can easily accomodate the playwright test execution in github action workflow
- Execute playwright test directly in git hosted linux server. Refer this flow
- Build the image and push to docker hub, refer this flow
- Pull the image from docker hub and execute the test, refer this flow
If you would like to execute the test inside the kubernetes pod refer these manifest file
- For Persistent Volume to save to test results, refer this.
- Allow the pod to share the memory with host using persistent valume claim, refer this.
- Deploy the job to execute the test inside the image, refer this.
For more details, refer these blogs