Updated Mar 12 adding more info to extra credit assignment
You may work in a team of two students, but each student needs to make a submission. You are encouraged to engage in general discussions with other teams regarding the assignment, but specific details of a solution, including the solution itself, must always be the team's own work. You may submit the same code as the rest of your team.
Integrate all the code from all the previous programming assignments into one program runSQL. Fix any defects from previous assignments.
For the load case, if the config file contains tablename, runSQL behaves like a loader and the sqlfile is treated as the csv file.
Otherwise, the operation is detected from the SQL statement in sqlfile.
Write testcases to test all the functionality (Assignment 1-4) of your final program in Part 6. Each testcase must test a non-trivial feature or code path including exception handling. Repeating the same create table statement test with different table names is considered trivial. Your testcases need to conform to the format of the testcases in /home/db2inst1/tests/program[1-2]/*. You should name your testcase using the format:
test<assigamentnum>-<username>-<testnum>.{cfg,sql,csv,...}
Suppose your user name is jane and your first testcase attempts to test a feature/functionality from Assignment 1, then your testcase would consist of the following files:
You should develop these tests in your directory without the substitution patterns. You can run the tests in your directory using the runtestlocal command. For the above example, assuming run4.sh is the run script, you can run the test by issuing
runtestlocal run4.sh test1-jane-1
Once the test is running correctly in your directory, you may introduce the substitution patterns and copy the test to the /home/db2inst1/tests directory. And you can run it using
runtest run4.sh test1-jane-1Note that runtest would copy the testcase from the /home/db2inst1/tests directory to your directory after performing the substitutions and then run the test.
Your test must be correct and non-trivial in order to receive credit. Duplicate tests will not receive credit. Some co-ordination is required. So please use the wiki in laulima to announce your intention to code a particular test. Check the forum that no one else is writing the same test.
Submit:
antlrworks.jar is installed in /home/db2inst1/lib/antlrworks.jar on the submission machine