This grading script consists of 30 pts worth of tests. The final grade is out of 10 pts. SCRIPT EDIT means that the source code of the grading script had to be edited to assist the server to complete the tests after making an error. Each SCRIPT EDIT cost a variable number of pts depending on the level of incapacitation caused by the error. Note that despite this attempt to decouple the tests, some server errors were unassistable and resulted in large point deductions. 1. CONNECT (1 pt) ... good: line termination byte is pot capacity <10> current time <13:56> ... correct: +1 (1/1) Resetting the server so we can begin tests. Do we need to wait for a brew to complete before we can reset? Sent: STAT Received: 203 COFFEEREADY C 8 6 9 160 No, reset now. Sent: RSET Received: 200 OK Resetting device ########################### # CANBREW TESTS # ########################### 2. STAT in CANBREW (.5 pt) Sent: STAT Received: 200 CANBREW ... correct: +.5 (1.5/1.5) 3. TEMP not in COFFEEREADY (1 pt) Sent: TEMP 140 Received: 400 WRONGSTATE Can't set tempurature unless coffee is ready ... correct: +1 (2.5/2.5) ######################## # Begin additive tests # ######################## 4a. AVLA (.5 pt) Sent: AVLA Received: 200 AVAILABLE milk:skim sweetener:sugar milk:half-and-half milk:cream alcohol:rum alcohol:kahlua sweetener:sweet-n-lo ... correct: +.5 (3/3) The recent RSET would hopefully have reset the additions. Did it? Sent: CURA Received: 200 CURRENT Yes. RSET worked 4b. ADDA (.5 pt) Sent: ADDA alcohol kahlua Received: 200 OK Addition added ... correct: +.5 (3.5/3.5) ADDA: check results (.5 pt) Sent: CURA Received: 200 CURRENT alcohol:kahlua ... correct: +.5 (4/4) 4c. DELA (.5 pt) Sent: DELA alcohol kahlua Received: 200 OK Addition deleted ... correct: +.5 (4.5/4.5) DELA: unselected addition (.5 pt) Sent: DELA milk half-and-half Received: 201 OK Addition was not previously selected ... correct: +.5 (5/5) DELA: check results (.5 pt) Sent: CURA Received: 200 CURRENT ... correct: +.5 (5.5/5.5) 4d. ADDA in CANBREW (.5 pt) Sent: ADDA garbagetype garbageaddition Received: 400 INVALIDARG Invalid specification ... correct: +.5 (6/6) DELA in CANBREW (.5 pt) Sent: ADDA moregarbargetype moregarbageaddition Received: 400 INVALIDARG Invalid specification ... correct: +.5 (6.5/6.5) ADDA/DELA : check results (.5 pt) Sent: CURA Received: 200 CURRENT ... correct: +.5 (7/7) 4e. ADDA and ADDA : check results (.5 pt) Sent: ADDA alcohol kahlua Received: 200 OK Addition added Sent: ADDA alcohol kahlua Received: 200 OK Addition added Sent: ADDA milk half-and-half Received: 200 OK Addition added Sent: CURA Received: 200 CURRENT alcohol:kahlua alcohol:kahlua milk:half-and-half ... correct: +.5 (7.5/7.5) ###################### # End additive tests # ###################### 5. POUR not in COFFEEREADY (1 pt) Sent: POUR SMALL 3 Received: 400 WRONGSTATE Can't pour unless we are in COFFEEREADY state ... correct: +1 (8.5/8.5) 6. RSET in CANBREW (1 pt) Sent: RSET Received: 201 OK In CANBREW state, nothing to do ... correct: +1 (9.5/9.5) EXTRA CREDIT: CURA in recently RSET CANBREW (1 pt) Sent: CURA Received: 200 CURRENT alcohol:kahlua alcohol:kahlua milk:half-and-half ... error: there should be no current selections ######################## # BREW QUEUED TESTS # ######################## 7a. QUEUE a BREW (.5 pt) Sent: BREW 13:58 C 3 8 Received: 201 OK Brew queued ... correct: +.5 (10/10) 7b. Representative state-independent test: HELP (.5 pt) Sent: HELP Received: 200 HELP INFO STAT TEMP BREW AVLA CURA ADDA DELA POUR RSET EXIT ... correct: +.5 (10.5/10.5) 8. STAT in CANBREW QUEUED (.5 pt) Sent: STAT Received: 201 CANBREW 13:58 ... correct: +.5 (11/11) 9. RSET in CANBREW QUEUED (.5 pt) Sent: RSET Received: 202 OK Canceled queued brew ... correct: +.5 (11.5/11.5) RSET: check results (.5 pt) Sent: STAT Received: 200 CANBREW ... correct: +.5 (12/12) Restart the old queued brew for more tests. Sent: BREW 13:58 C 3 8 Received: 201 OK Brew queued OK, BREW queued. 10. BREW in CANBREW QUEUED (.5 pt) Sent: BREW 13:57 D 7 3 Received: 201 OK Brew queued ... correct: +.5 (12.5/12.5) Queued BREW change: check results (.5 pt) Sent: STAT Received: 201 CANBREW 13:57 ... correct: +.5 (13/13) Test for BREW --> BREWING transition (1 pt) Sent: INFO Received: 200 COFFEEPOT 1.13 CoffeeMaker2001 10 13:56 pot capacity <10> current time <13:56> Sent: INFO Received: 200 COFFEEPOT 1.13 CoffeeMaker2001 10 13:56 pot capacity <10> current time <13:56> Sent: INFO Received: 200 COFFEEPOT 1.13 CoffeeMaker2001 10 13:56 pot capacity <10> current time <13:56> Sent: INFO Received: 200 COFFEEPOT 1.13 CoffeeMaker2001 10 13:56 pot capacity <10> current time <13:56> Sent: INFO Received: 200 COFFEEPOT 1.13 CoffeeMaker2001 10 13:56 pot capacity <10> current time <13:56> Sent: INFO Received: 200 COFFEEPOT 1.13 CoffeeMaker2001 10 13:57 pot capacity <10> current time <13:57> Sent: STAT Received: 202 BREWING D 7 3 ... correct: +1 (14/14) ################# # BREWING TESTS # (we will return to BREW QUEUE tests later) ################# 11. BREW in BREWING (.5 pt) Sent: BREW NOW C 8 1 Received: 400 WRONGSTATE Cant brew unless we are in CANBREW state ... correct: +.5 (14.5/14.5) BREW in BREWING: results (.5 pt) Sent: STAT Received: 202 BREWING D 7 3 ... correct: +.5 (15/15) 12. RSET in BREWING (.5 pt) Sent: RSET Received: 400 WRONGSTATE Brewing, please wait until done ... correct: +.5 (15.5/15.5) RSET in BREWING: results (.5 pt) Sent: STAT Received: 202 BREWING D 7 3 ... correct: +.5 (16/16) 13. Test for BREWING --> COFFEEREADY transition (1 pt) Sent: STAT Received: 202 BREWING D 7 3 Sent: STAT Received: 202 BREWING D 7 3 Sent: STAT Received: 203 COFFEEREADY D 7 3 0 160 ... correct: +1 (17/17) ##################### # COFFEEREADY TESTS # ##################### 14. Representative state-independent test: INFO (.5 pt) Sent: INFO Received: 200 COFFEEPOT 1.13 CoffeeMaker2001 10 13:57 ... correct: +.5 (17.5/17.5) 15. TEMP in COFFEEREADY (.5 pt) Sent: TEMP 156 Received: 200 OK Temperature set ... correct: +.5 (18/18) TEMP: Low (.5 pt) Sent: TEMP 120 Received: 200 OK Temperature set ... correct: +.5 (18.5/18.5) TEMP: High (.5 pt) Sent: TEMP 160 Received: 200 OK Temperature set ... correct: +.5 (19/19) TEMP: Invalid (.5 pt) Sent: TEMP 0 Received: 401 INVALIDARG Invalid temperature ... correct: +.5 (19.5/19.5) Establish some additions so we can evaluate POUR. Sent: ADDA milk half-and-half Received: 200 OK Addition added Sent: ADDA milk cream Received: 200 OK Addition added OK, ready for POUR. 16. POUR in COFFEEREADY (.5 pt) Sent: POUR SMALL 2 Received: 200 OK Pouring cup(s) of coffee ... correct: +.5 (20/20) POUR: check results (.5 pt) Sent: STAT Received: 203 COFFEEREADY D 5 3 0 160 ... correct: +.5 (20.5/20.5) POUR: check CURA results (.5 pt) Sent: CURA Received: 200 CURRENT ... correct: +.5 (21/21) POUR: too much TALL (.5 pt) Sent: POUR TALL 2 Received: 402 INVALIDARG Invalid size specification ... error: expected 401 UNAVAILABLE POUR: OK MEDIUM (.5 pt) Sent: POUR MEDIUM 2 Received: 200 OK Pouring cup(s) of coffee ... correct: +.5 (21.5/22) POUR: check results again (.5 pt) Sent: STAT Received: 203 COFFEEREADY D 1 3 0 160 ... correct: +.5 (22/22.5) POUR: empty the pot (.5 pt) Sent: POUR SMALL 1 Received: 200 OK Pouring cup(s) of coffee ... correct: +.5 (22.5/23) POUR: check final results (.5 pt) Sent: STAT Received: 203 COFFEEREADY D 0 3 0 160 ... correct: +.5 (23/23.5) 17. BREW in empty COFFEEREADY pot (.5 pt) Sent: BREW NOW C 6 8 Received: 400 WRONGSTATE Cant brew unless we are in CANBREW state ... correct: +.5 (23.5/24) Add an addition to test RSET in COFFEEREADY: Sent: ADDA milk cream Received: 200 OK Addition added OK, ready for RSET test. 18. RSET in COFFEEREADY pot (.5 pt) Sent: RSET Received: 200 OK Resetting device ... correct: +.5 (24/24.5) RSET: check results (.5 pt) Sent: STAT Received: 200 CANBREW ... correct: +.5 (24.5/25) RSET: check CURA results (.5 pt) Sent: CURA Received: 200 CURRENT ... correct: +.5 (25/25.5) 19. EXIT in CANBREW (.5 pt) Sent: EXIT Received: 200 OK Connection terminated ... correct: +.5 (25.5/26) Server communications after EXIT (1 pt) Sent: STAT ... correct: +1 (26.5/27) 20. RECONNECT after EXIT (1 pt) pot capacity <10> current time <13:57> ... correct: +1 (27.5/28) ######################## # FINISH BREWING TESTS # ######################## QUEUE a BREW in preparation: Sent: BREW 13:59 C 7 4 Received: 201 OK Brew queued OK, BREW queued for final tests. 21. Interrupt queued BREW with BREW NOW (.5 pt) Sent: BREW NOW D 3 4 Received: 200 OK Starting to brew ... correct: +.5 (28/28.5) BREW NOW: check results (.5 pt) Sent: STAT Received: 202 BREWING D 3 4 ... correct: +.5 (28.5/29) Wait for end of BREW cycle to reset so we can BREW again Sent: STAT Received: 202 BREWING D 3 4 Sent: STAT Received: 202 BREWING D 3 4 Sent: STAT Received: 203 COFFEEREADY D 3 4 0 160 Sent: RSET Received: 200 OK Resetting device 22. BREW with past time (.5 pt) Sent: BREW 13:56 C 3 4 Received: 200 OK Starting to brew ... correct: +.5 (29/29.5) BREW with past time: check results (.5 pt) Sent: STAT Received: 202 BREWING C 3 4 ... correct: +.5 (29.5/30) Tests complete: EXIT Sent: EXIT Received: 200 OK Connection terminated TOTAL POINTS : 29.5 POINTS POSSIBLE : 30