https://github.com/adequatica/api-testing-comparison
Testing API with Cypress, Playwright, and Jest + Axios
https://github.com/adequatica/api-testing-comparison
cypress jest playwright testing
Last synced: about 1 month ago
JSON representation
Testing API with Cypress, Playwright, and Jest + Axios
- Host: GitHub
- URL: https://github.com/adequatica/api-testing-comparison
- Owner: adequatica
- Created: 2023-07-01T22:13:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-16T10:33:52.000Z (almost 2 years ago)
- Last Synced: 2025-06-01T23:52:46.584Z (about 1 year ago)
- Topics: cypress, jest, playwright, testing
- Language: TypeScript
- Homepage: https://adequatica.medium.com/api-testing-comparison-cypress-vs-playwright-vs-jest-2ff1f80c5a7b
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Testing Comparison: Cypress vs. Playwright vs. Jest
There is an implementation of a bunch of the same tests for each framework: [Cypress](https://www.cypress.io/), [Playwright](https://playwright.dev/), and [Jest](https://jestjs.io/) as a test runner + [Axios](https://axios-http.com/) as HTTP library.
Example API for testing: [OpenWeatherMap API](https://openweathermap.org/api), which requires a key for authorization (`API_KEY` env variable).
## How to Use
1. Clone repository
2. Install dependencies: `npm install`
3. Install Cypress as [per the documentation](https://docs.cypress.io/guides/getting-started/installing-cypress#Installing)
4. Run all tests: `API_KEY={string} npm run test`
---
Read more in the article «[API Testing Comparison: Cypress vs. Playwright vs. Jest](https://adequatica.github.io/2023/07/02/api-testing-comparison-cypress-playwright-jest.html)».
Methods of gathering results for the article:
- `time API_KEY={string} npm run cypress:run`
- `time API_KEY={string} npm run test:playwright`
- `time API_KEY={string} npm run test:jest`
Resulting average results:
- Cypress:run command time: 12,96 sec
- Playwright command time: 3,21 sec
- Jest command time: 3,84 sec
This means that Сypress is 4 times slower than Playwright.