This repository provides an example of the API automated tests with custom API Handler fixture and Logger. Includes:
2. API tests boilerplate of the application https://airportgap.com/api/airports with the Playwright
3. Custom API Handler module with fixture to leverage the API calls with additional logger to stdout
-
Clone this repository or unzip the downloaded file.
-
Install dependencies with
npm install
. -
Run tests using the following commands:
npm run test
to run the test file.npm run posttest
to create an Allure report.npm run clean
to clean the previous reports
-
Run tests with a docker container:
docker build -t test-image:latest -f Dockerfile_playwright_official_java .
docker run -i --rm --name test -v ${pwd}:/app/ -w /app test-image:latest npm t