Skip to content

Testing (Backend)

tnzhu edited this page Mar 20, 2020 · 3 revisions

Testing of Schema

Unit tests for our Schemas were written using the Mocha framework.

The tests can be run with npm test in the terminal.

Testing of API

Postman Collections and Test scripts were used to test our APIs.

The current Doto collection can be accessed here: https://www.getpostman.com/collections/17c539bc0fe909d838cf

This collection can be imported into Postman by using the link above.

Guide to testing with authorisation in Postman

  1. Have Doto web app running.
  2. Sign in using Google.
  3. Find accessToken= in the URL and copy everything after =
  4. When making a request through Postman, navigate to the Headers tab.
  5. Follow the table below, replacing YOUR_ACCESS_TOKEN with the access token copied before.
Key Value Description
Authorization Bearer YOUR_ACCESS_TOKEN

Clone this wiki locally