The following tests should be implemented after the code for these user-stories is complete. They will ensure that that the code for these sub-sections is correct. We haven't discovered a way to automate these tests at this time. This is simply documentation on the test cases that should be run.
Unit Tests For Following User Story
| Date: | 11/07/00 | Type of User Story (New/Fix): | New |
| Story Number: | 8 | Time Estimate: | 1 week |
| Story description: | |||
| Only one TA / grader (or the professor) will be allowed to update data for a course at the same time. | |||
Definitions:
Grade Listing - a specific grade type in the gradebook. For example, HW1, MIDTERM1, etc.
Test Case Requirements
The Following User Types (or Users w/ following access permissions/titles) are needed in the system to run these test cases.
These users must have the access to modify/change grades in the same class.
Atleast 1 grade listing must be listed in the class.
Professor #1
Professor #2
TA #1
TA #2
Unit Test Cases:
These describe a sequence of events that must pass to ensure this section of code if functioning properly. They should be run on 1 machine (automated), and on seperate machines (possibly automated? by hand?).
Test #1:
Professor #1 chooses a grade listing to input/modify grade data.
Professor #1 enters Grade Modification Screen for that grade listing.
Professor #2 chooses a grade listing to input/modify grade data.
Professor #2 recieves error message indicating Professor #1 is entering in data.
Professor #1 exits Grade Modification Screen for that grade listing.
Professor #2 chooses a grade listing to input/modify grade data.
Professor #2 enters Grade Modification Screen for that grade listing.
Test #2:
Professor #1 chooses a grade listing to input/modify grade data.
Professor #1 enters Grade Modification Screen for that grade listing.
TA #1 chooses a grade listing to input/modify grade data.
TA #1 recieves error message indicating Professor #1 is entering in data.
Professor #1 exits Grade Modification Screen for that grade listing.
TA #1 chooses a grade listing to input/modify grade data.
TA #1 enters Grade Modification Screen for that grade listing.
Test #3:
TA #1 chooses a grade listing to input/modify grade data.
TA #1 enters Grade Modification Screen for that grade listing.
Professor #1 chooses a grade listing to input/modify grade data.
Professor #1 recieves error message indicating TA #1 is entering in data.
TA #1 exits Grade Modification Screen for that grade listing.
Professor #1 chooses a grade listing to input/modify grade data.
Professor #1 enters Grade Modification Screen for that grade listing.
Test #4:
TA #1 chooses a grade listing to input/modify grade data.
TA #1 enters Grade Modification Screen for that grade listing.
TA #2 chooses a grade listing to input/modify grade data.
TA #2 recieves error message indicating TA #1 is entering in data.
TA #1 exits Grade Modification Screen for that grade listing.
TA #2 chooses a grade listing to input/modify grade data.
TA #2 enters Grade Modification Screen for that grade listing.
Unit Tests For Following User Story
| Date: | 11/07/00 | Type of User Story (New/Fix): | New |
| Story Number: | 7 | Time Estimate: | 2 weeks |
| Story description: | |||
| TAs and professors can update student grade data for the courses they are involved with. | |||
Grade Listing - a specific grade type in the gradebook. For example, HW1, MIDTERM1, etc.
Unit Tests Part One:
Part One - Test Case Requirements
The Following User Types (or Users w/ following access permissions/titles) are needed in the system to run these test cases.
These users must have the access to modify/change grades in the same class.
Atleast 1 grade listing must be listed in the class.
Professor #1
TA #1
Part One - Unit Test Cases
These test cases test boundary conditions for grade inputs.
Test #1:
Professor #1 chooses a grade listing to input/modify grade data.
Professor #1 enters Grade Modification Screen for that grade listing.
Professor #1 will modify a grade listing and enter in a grade of -1 points.
Professor #1 attempts to save grade changes.
Professor #1 will recieve an error message indicating grades must be >= 0 points and is taken back to grade modifcation screen
Test #2:
Professor #1 chooses a grade listing to input/modify grade data.
Professor #1 enters Grade Modification Screen for that grade listing.
Professor #1 will modify a grade listing and enter in a grade of 0 points.
Professor #1 attempts to save grade changes.
No Error Returned.
Test #3:
Professor #1 chooses a grade listing to input/modify grade data.
Professor #1 enters Grade Modification Screen for that grade listing.
Professor #1 will modify a grade listing and enter in a grade of system defined MAXPOINT points.
Professor #1 attempts to save grade changes.
No Error Returned.
Test #4:
Professor #1 chooses a grade listing to input/modify grade data.
Professor #1 enters Grade Modification Screen for that grade listing.
Professor #1 will modify a grade listing and enter in a grade of system defined MAXPOINT + 1 points.
Professor #1 attempts to save grade changes.
Professor #1 will recieve an error message indicating grades must be <= MAXPOINT points and is taken back to grade modification screen
Test #5:
TA #1 chooses a grade listing to input/modify grade data.
TA #1 enters Grade Modification Screen for that grade listing.
TA #1 will modify a grade listing and enter in a grade of -1 points.
TA #1 attempts to save grade changes.
TA #1 will recieve an error message indicating grades must be >= 0 points and is taken back to grade modification screen
Test #6:
TA #1 chooses a grade listing to input/modify grade data.
TA #1 enters Grade Modification Screen for that grade listing.
TA #1 will modify a grade listing and enter in a grade of 0 points.
TA #1 attempts to save grade changes.
No Error Returned.
Test #7:
TA #1 chooses a grade listing to input/modify grade data.
TA #1 enters Grade Modification Screen for that grade listing.
TA #1 will modify a grade listing and enter in a grade of system defined MAXPOINT points.
TA #1 attempts to save grade changes.
No Error Returned.
Test #8:
TA #1 chooses a grade listing to input/modify grade data.
TA #1 enters Grade Modification Screen for that grade listing.
TA #1 will modify a grade listing and enter in a grade of system defined MAXPOINT + 1 points.
TA #1 attempts to save grade changes.
TA #1 will recieve an error message indicating grades must be <= MAXPOINT points and is taken back to grade modification screen
Unit Tests Part Two:
Part Two - Test Case Requirements
The Following User Types (or Users w/ following access permissions/titles) are needed in the system to run these test cases.
These users must have the access to modify/change grades in the same class.
Professor #1
TA #1
The Following grade listings must be available to be entered.
HW1 - out of 1 point
MP1 - out of 100 points
EXAM1 - out of system defined MAXPOINT points
The Following classes must be available to be tested upon.
ECON102 - 1 student in class
CS327 - 50 students in class
HIST225 - system defined MAXSTUDENTS in class
Part Two - Unit Test Cases
These tests make sure grades are inputted correctly, saved/canceled correctly, and do not make any unforeseen changes to the database as a whole.
There are many combinations of tests in this section. In order to reduce writing (and increase ease of reading) a formatted test case will be used. After defining the format, test cases will be listed filling in spaces in the format.
Test Format A:
{USER1} enters grade modification screen for grade listing of {GRADE} in class {CLASS}.
{USER1} modifies 0 student grades.
{USER1} attempts to save grade changes.
{USER1} re-enters grade modification screen for grade listing of {GRADE}.
- All grade changes have NOT been made and CANNOT be seen.
{USER2} enters grading system and views changes.
- All grade changes have NOT been made and CANNOT be seen.
* Test Should then analyze grades database to ensure grade modifications
have not changed grades for any other grade listing in this class and
other classes.
Format A Tests:
Test Case #1A:
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = ECON102
Test Case #2A:
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = CS327
Test Case #3A:
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = HIST225
Test Case #4A:
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = ECON102
Test Case #5A:
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = CS327
Test Case #6A:
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = HIST225
Test Format B:
{USER1} enters grade modification screen for grade listing of {GRADE} in class {CLASS}.
{USER1} modifies {NUM} student grades.
{USER1} attempts to save grade changes.
{USER1} re-enters grade modification screen for grade listing of {GRADE}.
- All grade changes have been made and can be seen.
{USER2} enters grading system and views changes.
- All grade changes have been made and can be seen.
* Test Should then analyze grades database to ensure grade modifications
have not changed grades for any other grade listing in this class and
other classes.
Test Format C:
{USER1} enters grade modification screen for grade listing of {GRADE} in class {CLASS}.
{USER1} modifies {NUM} student grades.
{USER1} attempts to cancel grade changes.
{USER1} recieves warning "Changes Have Been Made"
{USER1} is given 'Save Changes & Exit' or 'Cancel Changes' options
{USER1} selects "Save Changes & Exit"
{USER1} re-enters grade modification screen for grade listing of {GRADE}.
- All grade changes have been made and can be seen.
{USER2} enters grading system and views changes.
- All grade changes have been made and can be seen.
* Test Should then analyze grades database to ensure grade modifications
have not changed grades for any other grade listing in this class and
other classes.
Test Format D:
{USER1} enters grade modification screen for grade listing of {GRADE} in class {CLASS}.
{USER1} modifies {NUM} student grades.
{USER1} attempts to cancel grade changes.
{USER1} recieves warning "Changes Have Been Made"
{USER1} is given 'Save Changes & Exit' or 'Cancel Changes' options
{USER1} selects "Cancel Changes"
{USER1} re-enters grade modification screen for grade listing of {GRADE}.
- All grade changes have NOT been made and CANNOT be seen.
{USER2} enters grading system and views changes.
- All grade changes have NOT been made and CANNOT be seen.
* Test Should then analyze grades database to ensure grade modifications
have not changed grades for any other grade listing in this class and
other classes.
Format B & C & D Tests:
Each of the following tests should be run against Format B, C, & D
Test Case #1BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = HW1
{CLASS} = ECON102
{NUM} = 1
Test Case #2BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = ECON102
{NUM} = 1
Test Case #3BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = EXAM1
{CLASS} = ECON102
{NUM} = 1
Test Case #4BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = HW1
{CLASS} = CS327
{NUM} = 1
Test Case #5BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = CS327
{NUM} = 1
Test Case #6BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = EXAM1
{CLASS} = CS327
{NUM} = 1
Test Case #7BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = HW1
{CLASS} = CS327
{NUM} = 5
Test Case #8BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = CS327
{NUM} = 5
Test Case #9BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = EXAM1
{CLASS} = CS327
{NUM} = 5
Test Case #10BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = HW1
{CLASS} = CS327
{NUM} = ALL 50
Test Case #11BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = CS327
{NUM} = ALL 50
Test Case #12BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = EXAM1
{CLASS} = CS327
{NUM} = ALL 50
Test Case #13BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = HW1
{CLASS} = HIST225
{NUM} = 1
Test Case #14BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = HIST225
{NUM} = 1
Test Case #15BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = EXAM1
{CLASS} = HIST225
{NUM} = 1
Test Case #16BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = HW1
{CLASS} = HIST225
{NUM} = 5
Test Case #17BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = HIST225
{NUM} = 5
Test Case #18BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = EXAM1
{CLASS} = HIST225
{NUM} = 5
Test Case #19BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = HW1
{CLASS} = HIST225
{NUM} = MAXSTUDENTS
Test Case #20BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = MP1
{CLASS} = HIST225
{NUM} = MAXSTUDENTS
Test Case #21BCD
{USER1} = Professor #1
{USER2} = TA #1
{GRADE} = EXAM1
{CLASS} = HIST225
{NUM} = MAXSTUDENTS
Test Case #22BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = HW1
{CLASS} = ECON102
{NUM} = 1
Test Case #23BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = ECON102
{NUM} = 1
Test Case #24BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = EXAM1
{CLASS} = ECON102
{NUM} = 1
Test Case #25BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = HW1
{CLASS} = CS327
{NUM} = 1
Test Case #26BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = CS327
{NUM} = 1
Test Case #27BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = EXAM1
{CLASS} = CS327
{NUM} = 1
Test Case #28BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = HW1
{CLASS} = CS327
{NUM} = 5
Test Case #29BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = CS327
{NUM} = 5
Test Case #30BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = EXAM1
{CLASS} = CS327
{NUM} = 5
Test Case #31BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = HW1
{CLASS} = CS327
{NUM} = ALL 50
Test Case #32BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = CS327
{NUM} = ALL 50
Test Case #33BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = EXAM1
{CLASS} = CS327
{NUM} = ALL 50
Test Case #34BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = HW1
{CLASS} = HIST225
{NUM} = 1
Test Case #35BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = HIST225
{NUM} = 1
Test Case #36BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = EXAM1
{CLASS} = HIST225
{NUM} = 1
Test Case #37BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = HW1
{CLASS} = HIST225
{NUM} = 5
Test Case #38BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = HIST225
{NUM} = 5
Test Case #39BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = EXAM1
{CLASS} = HIST225
{NUM} = 5
Test Case #40BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = HW1
{CLASS} = HIST225
{NUM} = MAXSTUDENTS
Test Case #41BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = MP1
{CLASS} = HIST225
{NUM} = MAXSTUDENTS
Test Case #42BCD
{USER1} = TA #1
{USER2} = Professor #1
{GRADE} = EXAM1
{CLASS} = HIST225
{NUM} = MAXSTUDENTS