Example how to combine functional https://playwright.dev/ and performance https://k6.io/ testing frameworks in one project.
Current example tests a website at https://demoqa.com. It includes tests for logging in and navigating between pages.
- Register a new account https://demoqa.com/register.
- Export environment variables:
export BASE_URL=https://demoqa.com
export USER_NAME=your-user-name
export PASSWORD='****'
Run:
npm install # install dependencies
npm pw:install # install playwright
npm run lint # check code style
npm run test # run tests for all available browsers
npm run report # show reports
- Build an image:
docker build -t playwright-k6-automation .
- Run tests:
docker run --rm -e BASE_URL -e USER_NAME -e PASSWORD --name playwright-k6-automation playwright-k6-automation:latest