Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Manual Testing in DG #201

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 75 additions & 55 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,59 +611,64 @@ Given below are instructions to test the app manually.

1. Initial launch

1. Download the jar file and copy into an empty folder
2. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
1. Download the jar file and copy into an empty folder
2. Double-click the jar file <br>
Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.

2. Saving window preferences

1. Resize the window to an optimum size. Move the window to a different location. Close the window.
2. Re-launch the app by double-clicking the jar file.<br>
Expected: The most recent window size and location is retained.
1. Resize the window to an optimum size. Move the window to a different location. Close the window.
2. Re-launch the app by double-clicking the jar file.<br>
Expected: The most recent window size and location is retained.

### Adding a patient

1. Adding a patient

1. Prerequisites: There exist no patient with NRIC `A1234567B` in the patient records.
1. Prerequisites: There exist no patient with NRIC `A1234567B` in the patient records.

2. Test case (Valid parameters): `add n\John Smith ic\A1234567B dob\01/01/2000 ad\02/02/2020 w\a1 t\diarrhea
r\likes to go to the park`<br>
Expected: Patient successfully added into patient list. Details of the added patient shown in the status bar.
2. Test case (Valid parameters): `add n\John Smith ic\A1234567B dob\01/01/2000 ad\02/02/2020 w\a1 t\diarrhea
r\likes to go to the park`<br>
Expected: Patient successfully added into patient list. Details of the added patient shown in the status bar.

3. Test case (Missing parameter): `add n\John Smith`<br>
Expected: No patient is added. Error details shown in the status bar.
3. Test case (Missing parameter): `add n\John Smith`<br>
Expected: No patient is added. Error details shown in the status bar.

4. Test case (Invalid Name): `add n\ ic\A1234567B dob\01/01/2000 ad\02/02/2020 w\a1 t\diarrhea r\likes to go to the park`<br>
Expected: Similar to previous.
4. Test case (Invalid Name): `add n\ ic\A1234567B dob\01/01/2000 ad\02/02/2020 w\a1 t\diarrhea r\likes to go to the park`<br>
Expected: Similar to previous.

5. Test case (Invalid NRIC): `add n\John Smith ic\A12347B dob\01/01/2000 ad\02/02/2020 w\a1 t\diarrhea r\likes to go to the park`<br>
Expected: Similar to previous.

5. Test case (Invalid NRIC): `add n\John Smith ic\A12347B dob\01/01/2000 ad\02/02/2020 w\a1 t\diarrhea r\likes to go to the park`<br>
Expected: Similar to previous.
6. Test case (Invalid Date of Birth): `add n\John Smith ic\A1234567B dob\2000 ad\02/02/2020 w\a1 t\diarrhea r\likes to go to the park`<br>
Expected: Similar to previous.

7. Test case (Repeated Parameter): `add n\John Smith ic\A1234567B ic\A1234567B dob\01/01/2000 ad\02/02/2020 w\a1
t\diarrhea r\likes to go to the park`<br>
Expected: Similar to previous.

6. Test case (Invalid Date of Birth): `add n\John Smith ic\A1234567B dob\2000 ad\02/02/2020 w\a1 t\diarrhea r\likes to go to the park`<br>
Expected: Similar to previous.
8. Test case (Date of Birth after Admission Date): `add n\John Smith ic\A1234567B dob\03/03/2000 ad\01/01/1999 w\a1`<br>
Expected: Similar to previous.

7. Test case (Repeated Parameter): `add n\John Smith ic\A1234567B ic\A1234567B dob\01/01/2000 ad\02/02/2020 w\a1
t\diarrhea r\likes to go to the park`<br>
Expected: Similar to previous.

### Viewing patients

1. Viewing all patients

1. Prerequisites: Multiple patients in the patient list.
1. Prerequisites: Multiple patients in the patient list.

2. Test case: `list`<br>
Expected: List of patients is shown.
2. Test case: `list`<br>
Expected: List of patients is shown.

3. Test case: `list 181` or any command with extra characters supplied<br>
Expected: Similar to previous.
3. Test case: `list 181` or any command with extra characters supplied<br>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will produce an error...I will update in the next PR!

Expected: Similar to previous.

2. Viewing patients by tags and ward

1. Prerequisites: Multiple patients in the patient list.

1. Test case: `list tag\diarrhea w\a1`<br>
Expected: List of patients is shown.
Expected: List of patients is shown.

1. Test case: `list t\diarrhea`<br>
Expected: List of patients is shown.
Expand All @@ -673,27 +678,45 @@ Given below are instructions to test the app manually.

### Editing a patient

1. Edit a person while all persons are being shown
1. Edit a patient while all patients are being shown

1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
1. Prerequisites: List all patients using the `list` command. Multiple patients in the list.

1. Test case: `edit 1 n\John`<br>
Expected: Name of first patient is changed. Details of the edited patient is shown in the status bar.

1. Test case: `edit 1 ic\W9876543M`<br>
Expected: NRIC of first patient is changed. Details of the edited patient is shown in the status bar.
1. Test case: `edit 1 ic\W9876543M`<br>
Expected: NRIC of first patient is changed. Details of the edited patient is shown in the status bar.

1. Test case: `edit 1 dob\03/03/2005`<br>
Expected: Date of birth of first patient is changed. Details of the edited patient is shown in the status bar.

1. Test case: `edit 1 dob\03/03/2005`<br>
Expected: Date of birth of first patient is changed. Details of the edited patient is shown in the status bar.
1. Test case: `edit 1 ad\05/05/2021`<br>
Expected: Admission date of first patient is changed. Details of the edited patient is shown in the status bar.

1. Test case: `edit 1 ad\05/05/2021`<br>
Expected: Admission date of first patient is changed. Details of the edited patient is shown in the status bar.
1. Test case: `edit 1 t\flu r\afraid of darkness`<br>
Expected: tag and remark of first patient is changed. Details of the edited patient is shown in the status bar.

1. Test case: `edit 1 t\flu r\afraid of darkness`<br>
Expected: tag and remark of first patient is changed. Details of the edited patient is shown in the status bar.
2. Test case (Invalid Index): `edit x n\John` where x is larger than list size <br>
Expected: Error details shown in status bar.

1. Test case(invalid name): `edit n\ `<br>
Expected: Patient name is not changed. Error details shown in the status message.
1. Test case (Invalid Name): `edit 1 n\ `<br>
Expected: Patient name is not changed. Error details shown in the status bar.

2. Test case (Invalid NRIC): `edit 1 ic\a1231234b`<br>
Expected: Patient NRIC is not changed. Error details shown in the status bar.

3. Test case (Invalid Date of Birth): `edit 1 dob\03-03-2004`<br>
Expected: Patient Date of Birth is not changed. Error details shown in the status bar.

4. Test case (Invalid Admission Date): `edit 1 ad\04-02-2024 `<br>
Expected: Patient Admission Date is not changed. Error details shown in the status bar.

5. Test case (Date of Birth after Admission Date): `edit 1 dob\03/03/2024 ad\01/01/2024 `<br>
Expected: Patient Date of Birth and Admission Date is not changed. Error details shown in the status bar.

6. Test case (Invalid Ward): `edit 1 w\B-1 `<br>
Expected: Patient ward is not changed. Error details shown in the status bar.

### Finding a patient

Expand All @@ -710,42 +733,39 @@ Given below are instructions to test the app manually.
1. Test case: `find n\Smith`<br>
Expected: Similar to previous.

1. Test case: `find n\j`<br>
Expected: No patient is shown.
1. Test case: `find n\j`<br>
Expected: No patient is shown.

1. Test case: `find n\`<br>
Expected: Similar to previous.
1. Test case: `find n\`<br>
Expected: Similar to previous.

2. Finding a patient by NRIC

1. Prerequisites: There exist a patient with the NRIC `A1234567B` in the patient records.
1. Prerequisites: There exist a patient with the NRIC `A1234567B` in the address book.

1. Test case: `find ic\A1234567`<br>
Expected: The patient with the NRIC `A1234567B` is shown.

1. Test case: `find ic\a1234567b`<br>
Expected: Similar to previous.

1. Test case: `find n\Smith`<br>
Expected: Similar to previous.

1. Test case: `find ic\`<br>
Expected: No patient is shown.

### Deleting a person

1. Deleting a person while all persons are being shown
1. Deleting a patient while all patients are being shown

1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
1. Prerequisites: List all patients using the `list` command. Multiple patients in the list.

1. Test case: `delete 1`<br>
Expected: First patient is deleted from the list. Details of the deleted contact shown in the status message.
1. Test case: `delete 1`<br>
Expected: First patient is deleted from the list. Details of the deleted contact shown in the status message.

1. Test case: `delete 0`<br>
Expected: No person is deleted. Error details shown in the status message.
1. Test case: `delete 0`<br>
Expected: No patient is deleted. Error details shown in the status message.

1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)<br>
Expected: Similar to previous.
1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)<br>
Expected: Similar to previous.


### Saving data
Expand All @@ -755,4 +775,4 @@ Given below are instructions to test the app manually.
1. Prerequisites: The addressbook.json file in the data directory must exist.

1. Test case: Delete the addressbook.json file.<br>
Expected: The app launches successfully, populated with the sample data.
Expected: The app launches successfully, populated with the sample data.
Loading