ARgorithm/Server

Testing Requirements

Closed this issue · 1 comments

Currently there is a feature to add code testing to the server application but tests havent been written. This issue will act as a checklist for pending tests

Interface testing

The first tests we have to implement is to check whether the various core components are setup properly based on the environment variables set. We can use the pytest MonkeyPatch and fixture to easily test these.

Database connection testing

These connection testing should only test whether connections work or not without create alterations in production level data. If possible, test command on dummy connection if supported by packages used.

  • SQL database connection testing
  • MongoDB database connection testing
  • Redis cache connection testing

Route testing

Using the fastapi TestClient we can send request and check whether the right response is received from those requests. These tests will happen on data stored in TestSource which is a internal container used to dummy data source. Route checking should also check how well the request handles errors and exceptions.

The difference between the dummy source used here and dummy connection mentioned above is that the dummy source is to emulate a data storage whereas a dummy connection is to emulate a connection to a database/datastore of that type

Account Routes testing

Test conducted to check the authentication and authorization systems in place.

  • Auth check
  • Register Programmer
  • Register User
  • Login User
  • Login Programmer
  • Token verification for User
  • Token verification for Programmer
  • Token verification for Admin use

ARgorithm Route testing

Test conducted to check the argorithm management interface

  • ARgorithm list
  • ARgorithm submit
  • ARgorithm update
  • ARgorithm run
  • ARgorithm delete
  • ARgorithm view

Admin Routes testing

Test conducted to check admin priveleges

  • Admin delete
  • Admin blacklist and check if programmer has been blacklisted properly or not
  • Admin whitelist and check if programmer has been whitelisted properly
  • Admin grant and check if granted
  • Admin revoke and check if revoked
  • Admin management of ARgorithm not authored by admin

Report Route Testing

Need Bug report mechanism to be fully implemented fist
refer #15

Tests for report mechanism

  • User report submit
  • System report submit

Monitoring testing

Check Monitoring package

  • Performance monitor
  • Request middleware for successful requests
  • Request middleware for failed requests
  • Log data verification

Closing issue as repo is being archived.