Skip to content

Latest commit

 

History

History
133 lines (80 loc) · 5.06 KB

test-pr-guide.md

File metadata and controls

133 lines (80 loc) · 5.06 KB

Steps to test a PR

  1. Follow instructions in README to setup the system running locally.

  2. Check on Zulip chat if any of the PR's here are high-priority if the priority is not set already.

  3. If the PRs are not prioritized then pick any 1 PR from the list from the link in step 2 to test locally.

  4. Go to the Issue that PR is fixing and follow the steps to reproduce that issue while you are under the develop branch.

  5. Run the following commands to get to the PR branch, where <contributor> is the GitHub username of the contributor that submitted the PR:

git clone https://github.com/<contributor>/mentorship-backend/
git checkout <branch-name>
  1. Verify the code addition/deletions in the PR.

  2. Reproduce the issue and test the fix.

  3. Get screenshots/gifs of before and after the fix and attach them to the PR comment.

  4. If the testing is unsuccessful and fixes are needed change then remove the label Status: Needs Testing and add Status: Needs Review.

  5. If the testing is successful and no improvements needed then remove the label Status: Needs Testing and add Status: Ready to Merge.

Template to report PR testing results

This template can be used to add a review comment to a PR after testing is done. It can be used irrespective of the success or failure of testing.
The changes made in this PR were tested locally. Following are the results:

1. Code review - Done or Not Done

2. All possible responses (positive and negative tests) were tested as below:

  * _Test1 Description_  
    _Screenshot/gif_:  
    _Expected Result_:  
    _Actual Result_:
  * _Test2 Description_  
    _Screenshot/gif_:  
    _Expected Result_:  
    _Actual Result_:  
    ...  
    
3. Additional testcases covered:

  * _Test1 Description_  
    _Screenshot/gif_:  
    _Expected Result_:  
    _Actual Result_:
    
4. Additional Comments:

5. Status of PR Changed to: Needs Review or Ready to Merge.

Steps to test multiple features (User Registration, List users, ...) of the Mentorship System.

Registering users

Register 3 users. Follow instructions in this video

The users used here are

  • testusera
  • testuserb
  • testuserc

Register user screenshot

Login as the users and capture the access tokens

Steps to login and capture the token are shown in this video

Login user screenshot

Get the user ID's of the users

In this example they are:

  • testusera - ID: 120
  • testuserb - ID: 121
  • testuserc - ID: 122

User ID screenshot1

User ID screenshot2

Create a mentorship relation between 2 users

Send a mentorship request

In this example testusera is the mentee and testuserb is the mentor and testusera is sending the request. The steps to do this is explained in this video.

Demo Video

Mentorship Request screenshot1

Check pending requests

Check pending requests for testusera. The relation should be in state 1 (pending). Note the request ID. Here it is 13.

Pending request testusera screenshot1

Pending request testusera screenshot2

Accept the mentorship request

testuserb accepts the mentorship request from testusera.

Accepted request screenshot

List current relations of a user

List the current relationships of testusera. The relation should be state 2 (accepted).

Current relations screenshot

Create a task under a relation.

testusera creates a task for the relation 13. This will be successful because testusera is a part of this relation.

Create task screenshot

testuserc cannot create a task under this relation

Invalid task screenshot