Skip to content

Commit 46ca568

Browse files
committed
Update some known DG bugs reported by Pe-D
1 Update the glossary so it is consistent with the archive and load. 2 Write some test cases in the Appendix to guide the tester.
1 parent 3c5aef8 commit 46ca568

File tree

1 file changed

+89
-7
lines changed

1 file changed

+89
-7
lines changed

docs/DeveloperGuide.md

+89-7
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ Priorities: High (must have) - `* * *`, Medium (Good to have) - `* *`, Low (nice
642642
### Glossary
643643

644644
* **Archive**: A feature that allows users to store old data for use later without cluttering the current interface.
645-
* **Export**: Saving the student data in a file format such as `.csv` or `.txt` for external use.
645+
* **Export**: Saving the student data in a file format as `json` file. This is done through data archiving.
646646
* **Private contact detail**: A contact detail that is not meant to be shared with others
647647
* **Mainstream OS**: Windows, Linux, Unix, MacOS
648648
* **Student Number**: A unique identifier assigned to each student.
@@ -675,7 +675,36 @@ testers are expected to do more *exploratory* testing.
675675
1. Re-launch the app by double-clicking the jar file.<br>
676676
Expected: The most recent window size and location is retained.
677677

678-
1. _{ more test cases …​ }_
678+
1. Exit the App
679+
1. Enter `exit` in the command box. This will exit the app.
680+
681+
### Adding a person
682+
1. Adding a person into the person list
683+
1. Assumption: We assume there is no duplicate in this test case
684+
2. Test case `add n/John Doe p/98765432 g/male m/Physics`<br>
685+
Expected: A person named John Doe into StoreClass with the details givens
686+
3. Test case `add n/John Doe p/000 g/male m/Physics`<br>
687+
Expected: No person is added, an error message will be displayed.
688+
4. Other incorrect add command to try : <br>
689+
`add n/John Doe p/98765432 g/notAGender m/Physics`<br>
690+
`add n/J@hn Do! p/98765432 g/male m/Physics`<br>
691+
Expected: Same as test case 3
692+
693+
### Editing a person
694+
1. Editing a person in the person list
695+
1. Assumption: We assume the index here is valid if it is a positive integer
696+
2. Test case `edit 1 g/femal`<br>
697+
Expected: The gender of the first person in the list is changed to female
698+
3. Test case `edit 0 g/female`<br>
699+
Expected: No person is edited, an error message will be displayed.
700+
4. Other incorrect edit command to try : <br>
701+
`edit 1 p/000`<br>
702+
`edit 1 n/J@hn D*n`<br>
703+
Expected: Same as test case 3
704+
5. Other valid edit command to try : <br>
705+
`edit 1 n/Angelica Lee`<br>
706+
`edit 1 p/96754328`<br>
707+
Expected: the field indicated by the prefix is edit to the information given.
679708

680709
### Deleting a person
681710

@@ -692,12 +721,65 @@ testers are expected to do more *exploratory* testing.
692721
1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)<br>
693722
Expected: Similar to previous.
694723

695-
1. _{ more test cases …​ }_
724+
696725

697726
### Saving data
698727

699728
1. Dealing with missing/corrupted data files
700-
701-
1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_
702-
703-
1. _{ more test cases …​ }_
729+
1. Here `<HomeFolder>` refer to the folder containing the jar file.
730+
1. Test case: Missing data file<br>
731+
1. Close the app
732+
2. Delete the json file with path `<HomeFolder>/data/addressbook.json` or remove the `data` folder entirely
733+
3. Reopen the app <br>
734+
Expected: a sample database will be provided.
735+
2. Test case: Corrupted file<br>
736+
1. Ensure that there is at least 1 student in StoreClass
737+
1. Close the app
738+
2. Open the json file with path `<HomeFolder>/data/addressbook.json` and edit the name of the first student name to a invalid one e.g. `J@hn D*n`
739+
3. ReOpen the app <br>
740+
Expected: the corrupted list is discarded and an empty list is provided
741+
742+
1. Saving data
743+
1. Do some simple command to add / edit / delete student
744+
2. Close the app
745+
3. Reopen the app to see if your changes are saved correctly<br>
746+
Expected: Data is saved correctly, the list should after reopen should be same as before close.
747+
748+
### Finding a person
749+
750+
1. Test case: `find John`<br>
751+
Expected: list out all students whose names and tags contain john
752+
753+
### Filtering a list
754+
755+
1. Test case: `filter g/male`<br>
756+
Expected: list out all the male students.
757+
758+
### Undoing and Redoing a action
759+
760+
1. Test case: Undo and redo a command
761+
1. Perform a simple command that is supported by undo and redo e.g. add, edit or delete
762+
2. Enter the command `undo`<br>
763+
Expected: the action performed in step 1 will be undo
764+
3. Enter the command `redo`<br>
765+
Expected: the action undone in step 2 will be redo
766+
767+
### Archiving Data
768+
Prerequisite: Ensure you can write in the `<HomeFolder>`
769+
770+
Test case: `archive pa/mybook.json`<br>
771+
Expected: The current list is cleared. Its data is stored in a json file with path `<HomeFolder>/archived/mybook.json`
772+
773+
### Loading Data
774+
Prerequisite: Ensure you have a local `json` file containing a StoreClass data to read in the folder `<HomeFolder>/archived`. This can be done by try to archive one using the previous test
775+
776+
Test case: `load pa/mybook.json`<br>
777+
Expected: The current list will be overwritten and the content of the file will be loaded into the list.
778+
779+
### Grade a person
780+
Assumption: The index and module are valid
781+
782+
1. Test case: `grade 1 m/Math s/95`<br>
783+
Expected: Grade the first student's math as 95.
784+
2. Test case `grade 1 m/Math s/999`<br>
785+
Expected: No one will be graded, an error message will be shown.

0 commit comments

Comments
 (0)