End Users:
Providers: Users who fill out the review forms.
Admins: Users who send out review forms to providers. They can also invite providers.
Superadmins: Users who manage the website. They can see all data in the system and invite admins or providers to access the system.
Tools:
Jest
Mocha
Unit Testing:
Test database operations
adding/updating/deleting data and retrieve to see if they're correctly done
Test login information
if user entered incorrect username or password (i.e. username or password not in database), then the application should
Integration Testing:
Test review flow
once admin adds a provider to a review they should be able to see the provider in the list of people in the review, and the provider should now have access to the review page and its content
once super-admin adds an admin to a review they should be able to see the admin in the list of people in the review, and the admin should now have access to the review page and its content
Test restricted pages
since admins and providers can only view the reviews they are a part of, if the admins and providers try to access any review they are not a part of, the application should display a 404 error and redirect them to the home page
since providers can only see the data they entered, they should only have the content they inputted on their accounts and any other content should not be visible
if they are able to get hold of other data, it should display a 404 error and redirect them to their content
providers should be able to view other teams but should only be able to enter data under their team names, so the textbox to enter content in other teams should not be accessible
Usability testing
Test the time and the success rate for Admins to send out reviews to providers
Test the time and the success rate for providers to navigate to review forms.
Reliability testing:
Test the database can store many users.
Test many users using the website at the same time.
Test many sign ups or log ins within short period of time.
Unit Test
Test database operations
adding/deleting data and retrieve to see if they're correctly done
Test token generation
After giving out an invite, a random token should be generated. The token should associate with the role and the email address of the invited person. The token, the role and the email address should be stored in the database.
Test sign up
Upon signing up, username and password should be stored in the database, along with the role associated with the user.
Test Sign Up Strong Password
The system will refuse to sign up and prompt the user to enter a stronger password if the inputted password doesn't meet the requirement
Integration Testing
Test invite new user flow
A superadmin should be able to go to the "Invite New User" page through their dashboard, input the person’s email they would like to invite, assign a role (admin or provider), and click “Send Invite Email”. An invite email should be sent to that person’s email.
An admin should be able to invite new user, but only as a provider, in a similar fashion.
If the logged in user is not a superadmin or admin, they should not be able to invite new user
Test sign up flow
An invited user can click on the url in the invite email, finish setting up their account in the sign up page as the role they’re assigned.
Test login flow
All user should be able to log in with their email and password
Test both correct and wrong password cases
Acceptance Testing
Demonstrate the website to the client, gather feedback, and refine features based on their responses.
Each type of user logs in to their specific UI page: superadmins to the superadmin UI, admins to the admin UI, and providers to the provider UI.
Test that admins can only view reviews they generated.
Providers can only view reviews they are assigned.
Superadmins can see all reviews.
Only superadmins can invite superadmins.
Providers can only be invited by admins or superadmins.