CSC 509 Lecture Notes Week 8
Introduction to System Testing
void SomeDB::Add(Item* i) /* * pre: not Find(i); * post: (i in this'->data) and ... ; * */
where AddException is a defined exception value.void SomeDB::Add(Item* i) /* * pre: not Find(i); * post: if (not Find(i) then * (i in this'->data) and ... ; * else * (this == this') and * (throw == AddException) * */
Case No. Inputs Expected Output Remarks 1 parm 1 = ... ref parm 1 = ... ... ... parm m = ... ref parm n = ... return = ... data member a = ... data member a = ... ... ... data member z = ... data member z = ... n parm 1 = ... ref parm 1 = ... ... ... parm m = ... ref parm n = ... return = ... data member a = ... data member a = ... ... ... data member z = ... data member z = ...
projects/work/rolodex/testing/design/RolodexTest.html
where p is the number of the function path covered by the test.
Test No. Inputs Expected Output Remarks Path i parm 1= ref parm 1 = p ... ... parm m = ref parm n =
projects/alpha/rolodex/testing/implementation/Makefile
class SomeModestModel { public void doSomeModelThing(String name) { ... hdb.doSomeProcessThing(...); ... } protected HumongousDatabase hdb; } class HumongousDatabase { public void doSomeProcessThing(...) { ... } }
Figure 1: Testing directory structure.
DIRECTORY or FILE DESCRIPTION ======================================================================== *Test.java Implementation of module testing plans. Per the project testing methodology, each testing class is a subclass of the design/implementation class that it tests. input Test data input files used by scripts. These include both black-box and white-box input data, as appropriate. This subdir will be empty in cases where testing is performed entirely programatically, i.e., the testing scripts construct all test input data dynamically within the script, rather than inputing from test data files. output-good Output results from the last good run of the tests. These are results that have been confirmed to be correct. Note that these good results are platform independent. I.e., the correct results should be the same across all platforms. output-prev-good Previous good results, in case current results are erroneously deemed good. Note that this dir is superfluous if version control of test results is properly employed. However this directory remains as a backup to avoid nasty data loss in case version control has not been kept up to date. $PLATFORM/output Current platform-specific output results. These are the results produced by issuing a make command in a platform-specific directory. Note that current results are maintained separately in each platform-specific subdir. This allows for the case that current testing results differ across platforms. I.e., an implementation may work properly on one platform, but not on another. $PLATFORM/diffs Differences between current and good results. $PLATFORM/Makefile Makefile to compile tests, execute tests, and difference current results with good results. $PLATFORM/.make* Shell scripts called from the Makefile to perform specific testing tasks. $PLATFORM/*.class Test implementation object files.