Instructions of the assesment can be found in this file: given_instructions.md
- ✅ Postman collection - QA_Challenge.postman_collection.json
- ✅ Integration tests [Loginactions & Sumactions] - Folder & Screenshot of passing tests
- ✅ Code coverage -Folder & Screenshot of passing tests
- ✅ Bugs found - Bug.md
- ⚡️ Unit tests [Loginactions & Sumactions] - Created to test both the lambda functions and to increase the code coverage with the help of Jest - Screenshot of passing tests
- ⚡️ Github Actions - Created a workflow to run Integration tests and Unit tests on every push to the main branch
- ⚡️ Superagent - Used to autoamte HTTP requests with a high-level abstraction
- ⚡️ Jest - A testrunner used to automate unit tests with the flexibility to mock and stub the api calls
- ⚡️ Code Abstraction - Code abstractions were made to simplify the test implememntation and for better maintainalibility and readability.
- ⚡️ Commit style - Used conventional commit style.
- Started with the local repo setup
- Ran offline serverless locally
- Explored lambda functions and its responses through POSTMAN
- Observed the bugs in code
- Created API tests using superagent
- Then created Integration tests with cucumber & superagent
- Wrote unit tests to improve the code coverage with Jest
- Created a Github workflow to run unit and integration tests in CI/CD env
- Documented the solution in README
- Submitted the code repository for review
- Clone this repository
- Navigate to the path the project was cloned in
- Install dependencies using:
yarn
- Run integration tests using:
yarn test:offline
- Run unit tests using:
yarn jest
Generate code coverage report using:
yarn coverage
To test postman collection:
- Import the collection to Postman
- Install serverless globally:
npm -g install serverless@2.72.2
- Start the server using:
serverless offline
- Then run the collection
Further Ideas:
- Improve the code coverage
- Implement stubs using Jest to test the lambda function
- Implement Artillery tests for load testing