Register
Submit a solution
The challenge is finished.

Challenge Overview

Challenge objective

  • Write robust e2e tests covering all endpoints and functions in Topcoder Groups API

Project background

  • Topcoder is upgrading its APIs to V5 standards and one such API being updated is Groups API. Groups API is mainly used by Admins to maintain the user group membership mapping. Groups API supports running private challenges.

Technology Stack

  • Node.js 10.x

  • Neo4j Desktop (Docker version available as well)

  • Mocha

Challenge Assets

  • Source code of Groups API can be found here. Please refer to the latest commit in develop branch

  • Auth0 credentials for running the Groups API locally is shared in the challenge forum which will be accessible after registration

Individual Requirements

Robust E2E tests

  • Please use Mocha, chai, chai-http, chai-as-promised for testing, Sinon and Nock for mocking any external http interactions like posting to Bus API or Auth0 calls for getting M2M token, nyc(istanbul) for generating test report.

  • Please use async / await model while writing test cases as well

  • Neo4j database instance should be real. Tests should set up the database before running tests and clear it after running tests. Please use latest neo4j from docker hub

  • Please use meaningful statements while writing test cases in `it` clause

  • We expect 95%+ coverage in all aspects (Statements, Branches, Functions and Lines)

  • Test cases should be robust and do strong validation. E.g. Instead of validating that a response object exist, we need to validate the values inside the response.

  • Every test case should have proper assertion statement and shouldn’t invoke the api endpoint / function simply to increase the code coverage.

  • If there is a need to validate logs, it can be done by injecting the logger into the tests and pushing the logs into an array and validating the required entries later on.

  • If a function is not covered properly in e2e tests (API testing), please write unit tests for that function and run it as part of e2e tests.

  • Command to run e2e tests should be `npm run test`

  • Command to run e2e tests with coverage should be `npm run test:cov`

Important Notes:

  • Submission, Review, Appeals timeline for this challenge shorter than usual. Please pay attention to the shortened timelines

  • Please ensure that there are no lint errors and every test case pass

  • If you have any doubts, Please feel free to post it in the forum. We will be happy to resolve your queries as soon as possible.



Final Submission Guidelines

  • Create a git patch file against the latest commit in `develop` branch. Please prepare git patch file using git CLI only. Please make sure to test your patch file before submitting.

  • Create a Validation document using any format like Word, Markdown, txt file

  • Zip the patch file and Validation document and submit the zip file using the Submit link

  • After submitting, please ensure that you are able to download your submission from Online Review

ELIGIBLE EVENTS:

2020 Topcoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30109576