This repository purpose is to show how to use Cypress with Playwright, Mocha/Supertest, and Pytest test frameworks for API testing and to measure the performance of these frameworks.
JavaScript libraries can be installed with npm
npm installPytest can be installed with pipenv
pip install pipenv
pipenv shell
pipenv installFor the sake of clean measurements there are no external reporters installed.
Cypress can be run from the command line.
npm run cypressPlaywright can be run from the command line.
npm run playwrightMocha can be run from the command line.
npm run mochaPytest can be run from the command line.
pipenv run pytestnode test_time.jspython pytest_time.pyTime measured per framework for one user and one contact scenario (25 tests run sequentially):
- Cypress: > 37s
- Playwright: > 16s
- Mocha: > 14s
- Pytest: > 5s
Time measured per framework for multiple users (11) and multiple contact (11) scenarios 300 tests:
- Cypress: > 4m29s
- Playwright: > 39s
- Mocha: > 1m21s
- Pytest: > 53s
Measured performance results can be found in results folder.
I hope you find this repository useful.