Challenge Overview

Welcome to “Poseidon LPC Payment Backend API Unit and E2E Tests Fixes Challenge”.  In this challenge, we would like to continue building the LPC Payment Backend API.
 

PROJECT BACKGROUND

The project objective is to build an SDK for the Loyalty Payment Card (LPC) for our client. This SDK will be used by LPC’s clients to build the LPC mobile app.

So the SDK will provide all required functionalities from authentication to payment processing, reward management, etc. 
 

FRAMEWORK

  • Node.js 12+

  • NestJS

  • Sequelize

  • Postgresql 10+

  • SOAP (WSDL)
     

REQUIREMENTS

  • Update the existing Unit and E2E tests to avoid making calls to external services or system.

  • Controller and Service unit tests should be separated.

  • Cognito should be mocked. Try to use existing AWS libraries.

  • Fix all E2E tests. 

  • The application during the tests should not connect to a real database or any other system.

  • Do not delete configuration files in existing code base without authorization in the forum.

  • E2E tests (nestjs naming convention) - local api calls responses to be verified.

  • All external services like Cognito, DB and SOAP Api should be mocked

  • Unit tests:

    • Should not depend on environment, external data, or other unit tests

    • Should cover all the paths of the code, assert edge cases, and not have side effects

    • 80% of coverage in each category. We expect that all controllers, services will have 100%

    • Test a single small unit of work, and assert the results of the code

    • Well-factored and run fast and efficiently

  • E2E test (integration):

    • Should not depend on environment, external data, or other unit tests

    • Should cover success and failure cases (400, 401, 403, 404, etc)

    • E2E tests should use the mock database calls, mock Cognito and SOAP api

    • If unit testing is doing good coverage of services, E2E can stub the service call altogether



Final Submission Guidelines

  • Updated source code

ELIGIBLE EVENTS:

2020 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30113029