cookiescrumbs/ui-api-test-framework-python
A UI and API test framework using Cypress & httpretty (Python)
UI and API test framework
This test framework uses Cypress & Typescript for e2e testing the UI.
Docker & Docker compose ๐ณ to run the tests locally in containers or via a build pipeline platform ( like circleci ... there are other flavours)๐ฆ
Usage
If you just want to run the tests you only need docker. Install Docker Desktop ๐ณ
Run the UI tests in a Docker container
If you have an M1, you'll need to run this command docker compose run ui-tests-m1 npm run test ๐๐ฟ
If you are on the old school Mac or anything that isn't ARM64 then you'll need to run this
docker-compose run ui-tests npm run test ๐โโ๏ธ
Run the API tests in a Docker container
docker-compose run api-tests npm run test ๐โโ๏ธ
Local development
First, you'll need to install node.... ๐ค
I like to use FNM ๐จ๐ปโ๐ป and the Node Version is 16.14.0
To setup the local development for this framework you can run ๐ข ๐จ
npm run setup-local-devThis will install dependencies for you to work on the UI and API tests locally.
Run the UI test in headless mode via Cypress ๐๐ปโโ๏ธ
npm run ui-tests:runOpen the UI tests in the Cypress GUI ๐โโ๏ธ
npm run ui-tests:openFeature File .. but no cucumber?! ๐ฅ
You'll find a feature file in the root of the project that outlines the scenarios that have been tested.
This file is written in Gherkin but you'll find no cucmber ๐ฅ steps in the tests.
I've used the Gherkin syntax to outline the acceptance critera. I find that it can be a good tool for defining the requirements of a new feature ideally in
3 Amigos session ๐งโโ๏ธ ๐ง๐ปโโ๏ธ ๐ฆน๐ปโโ๏ธ
Issues ๐ป
โ ๏ธ Running Cypress inside a Docker container using an Apple M1 ARM64 Processor has some issues โ ๏ธ
I've managed to solve the issue by creating a Docker image just for ARM64, as suggested on this github thread
The Docker image can be found here cookiescrumbs/cypress-m1:9.4.1
The image has Cypress v9.4.1 baked into it. ๐