Last modified: Tue Sep 14 09:50:19 HST 1999
Here are some of the problems I found in Project 1:
However, I also want to help you learn about writing test cases, and so I have decided to publish the specifications for the test cases I ran on your Project 1. You definitely should implement these cases yourselves and make sure your software passes them, because I will run your future projects over these cases (as well as new ones).
Each of the following test cases are prefaced by a number. In the feedback sheet I will give you on Project 1 during your module 05 interview, I will list which tests your program failed on by this number. In the following list, I have made a few of the cases links to the actual test file I used. First, the cases containing some sort of error:
And here were the valid cases:
Note: I found it extremely convenient to create a batch file that ran each of the cases sequentially, pausing after each one so I could check the output. I highly recommend you build your own batch file for this "regression testing" purpose that you maintain and enhance during the semester. Here's what mine looks like (for the Windows platform):
rem Test file for Program p1 set P1=lixinz-P1 rem Test nonexistant file java -jar %P1%\%P1%.jar -qa tests/t00.qa pause rem Test empty file java -jar %P1%\%P1%.jar -qa tests/t02.qa pause rem Test file containing misc (illegal) text java -jar %P1%\%P1%.jar -qa tests/t03.qa pause rem Test file containing no :TYPE java -jar %P1%\%P1%.jar -qa tests/t04.qa pause rem Test missing command line args java -jar %P1%\%P1%.jar pause rem Test bad command line args java -jar %P1%\%P1%.jar -qb tests/t50.qa pause rem 1 question, missing :TYPE java -jar %P1%\%P1%.jar -qa tests/t07.qa pause rem 1 question, :TYPE:A (bad param) java -jar %P1%\%P1%.jar -qa tests/t08.qa pause rem 1 question, missing :CAT java -jar %P1%\%P1%.jar -qa tests/t09.qa pause rem 1 question, missing :TITLE java -jar %P1%\%P1%.jar -qa tests/t10.qa pause rem 1 question, missing :QUESTION java -jar %P1%\%P1%.jar -qa tests/t11.qa pause rem 1 question, :CAT no arg java -jar %P1%\%P1%.jar -qa tests/t12.qa pause rem 1 question, :TITLE no arg java -jar %P1%\%P1%.jar -qa tests/t13.qa pause rem 1 question, :QUESTION with arg java -jar %P1%\%P1%.jar -qa tests/t14.qa pause rem 1 question, :QUESTION no text field java -jar %P1%\%P1%.jar -qa tests/t15.qa pause rem 1 question, OK, -list java -jar %P1%\%P1%.jar -qa tests/t50.qa -list pause rem 1 question, maximal attributes, -list java -jar %P1%\%P1%.jar -list -qa tests/t52.qa