YCPRadioTelescope / RT-Contracts

Back-end architecture for the Radio Telescope Senior Software Design Project for the 2018-2019 academic year
3 stars 1 forks source link

Postman API Testing Suite #109

Open lgartrell opened 3 years ago

lgartrell commented 3 years ago

Overview

Work related to end-to-end testing of the back-end application. Test cases are to be made from the paths below

Things to keep in mind

1. This needs to be flexible, and not break on new additions

To get to this point, we need to have a set database configuration we will be running tests on. My idea is to have the setup for the database also be run through the routes. The test routes create the test users, appointments, sensors, etc. we will be accessing and modifying through the routes.

2. We need as close to 100% code coverage as it gets

This will be a multi team effort, mainly by other teams describing test cases for how they touch the backend. I know I do not have the knowledge needed to write out every test case possible, there is just too much I don't know. Group effort on this one

3. Hard to test parts of our application

Things like sending emails, admins interacting with links sent through email, and testing the routes directly related to hardware are all going to be difficult to isolate in a "unit" style test. Until we get to the point where we have everything easily testable written down in a collection, we can let this slide. After that, I think the best case will be to create a dummy endpoint that has identical functions as the real routes. The dummy endpoints can be hard coded so they behave in the edge cases we decide.

lgartrell commented 3 years ago

Test Setup:

routes hit:

  1. Create radio telescope object - can we do this through a route? need postman to run a SQL seed script?
  2. Create users - how many do we need? what types?
  3. Create appointments for users - how many do we need? types?
  4. Fake / generate sensor, weather, spectracyber data, rf data, feedback, and celestial bodies - how many, types?
lgartrell commented 3 years ago

Profile Pictures

test case:

On success:

user has submitted a profile picture, an admin either approves or denies it and the user receives feedback

lgartrell commented 3 years ago

Test Finish:

  1. remove all faked data
  2. remove test appointments
  3. remove test users
  4. remove test radio_telescope

On success:

anything entered into the database during testing is deleted