Giter Site home page Giter Site logo

lambda-functions's Introduction

Lambda-Functions

Instructions of the assesment can be found in this file: given_instructions.md

Solution

  1. ✅ Postman collection - QA_Challenge.postman_collection.json
  2. ✅ Integration tests [Loginactions & Sumactions] - Folder & Screenshot of passing tests
  3. ✅ Code coverage -Folder & Screenshot of passing tests
  4. ✅ Bugs found - Bug.md
Besides that, my solution has:
  • ⚡️ 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.

Task Accomplishment Steps:

  1. Started with the local repo setup
  2. Ran offline serverless locally
  3. Explored lambda functions and its responses through POSTMAN
  4. Observed the bugs in code
  5. Created API tests using superagent
  6. Then created Integration tests with cucumber & superagent
  7. Wrote unit tests to improve the code coverage with Jest
  8. Created a Github workflow to run unit and integration tests in CI/CD env
  9. Documented the solution in README
  10. Submitted the code repository for review

Test Execution

  1. Clone this repository
  2. Navigate to the path the project was cloned in
  3. Install dependencies using:
yarn
  1. Run integration tests using:
yarn test:offline
  1. 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 [email protected]
  • Start the server using: serverless offline
  • Then run the collection

Further Ideas:

  1. Improve the code coverage
  2. Implement stubs using Jest to test the lambda function
  3. Implement Artillery tests for load testing

lambda-functions's People

Contributors

tux7p avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.