This project uses Playwright to perform automated tests on the ServRest API. The goal is to ensure that the main functionalities of the API are working correctly.
-
Clone the repository:
git clone https://github.com/brunobzs/playwright-api-test.git cd playwright-api-test -
Install the dependencies:
npm install
-
Install the necessary browsers for Playwright:
npx playwright install --with-deps
To run the tests, use the following command:
npx playwright test├── .github/workflows # Contains the GitHub Actions configuration files
│ └── playwright.yml # Configuration for the CI pipeline to run Playwright tests.
├── tests # Contains the test files
│ ├── carrinho-test.spec.ts # Authentication API Tests
│ ├── login-test.spec.ts # Login API Tests
│ ├── produto-test.spec.ts # Product API Tests
│ └── usuario-test.spec.ts # User API Tests
├── playwright.config.ts # Playwright configuration file.
├── package.json # Contains the project dependencies and scripts.
└── README.md # Project documentation
The project is configured to use GitHub Actions to run the tests automatically on each push or pull request to the master branch. The pipeline configuration is in the .github/workflows/playwright.yml file.
@playwright/test: Playwright's testing framework.@faker-js/faker: Library to generate fake data for the tests.
Feel free to open issues and pull requests to contribute to the project.