For the API testing project, I used Supertest and Mocha as the testing framework, along with Chai for assertions.
To install the repository and its dependencies using npm, follow these steps:
npm ci- To run the tests locally, you need to set up an
.env.localfile with theBASE_URLandTOKENparameters. Refer to.envfor an example.
Automated testing is set up using GitHub Actions:
- Navigate to the Actions tab in your GitHub repository.
- Select the workflow named RUN SuperTest API Test CI.
- Click the Run workflow button on the right.
- Wait for the workflow to complete.
- To view the generated report: Go to the finished job. Scroll down and access the attached report.
docker buildx build . -t api-test- Run docker with tests and report generation
docker run --env-file .env.local -v ~/reports:/app/mochawesome-report -it --rm api-test

