******************************************************************************* README.txt FOR Testing socs.pl Version 0.01 Copyright (C) 2002-2004 Ted Pedersen, tpederse@umn.edu Amruta Purandare pura0010@d.umn.edu University of Minnesota, Duluth http://www.d.umn.edu/~tpederse/code.html ******************************************************************************* Testing for socs.pl -------------------- AMRUTA PURANDARE pura0010@d.umn.edu 01/13/2003 1. Introduction: ---------------- This program is a component of a NSP package which finds the 2nd order co-occurrences of a given word. The scripts and files provided here could be used to test the correct behaviour of the program and backward compatibility. 2. Phases of Testing: --------------------- We have divided the testing into two main phases: Phase A: Testing socs.pl's behaviour under normal conditions. Phase B: Testing socs.pl's response to erroneous conditions. 2.1. Phase A: Testing socs.pl's behaviour under normal conditions. ------------------------------------------------------------------- The scripts written for this test are in testA*.sh files. A single command normal-op.sh will run the following tests- 2.1.1 Tests A1: --------------- Checks if the program finds correct 2nd order co-occurrences when the co-occurrence graph as a tree form. ------ Input test-A1.count ------ ----------------- Expected Output test-A1.reqd ----------------- ---------------- Obtained Output test-A1.output ---------------- 2.1.2 Tests A2: --------------- Checks if the program finds correct 2nd order co-occurrences when the co-occurrence graph has loops. ------ Input test-A2.count ------ ----------------- Expected Output test-A2.reqd ----------------- ---------------- Obtained Output test-A2.output ---------------- 2.1.3 Tests A3: --------------- Checks if the program finds correct 2nd order co-occurrences when the co-occurrence graph has a form like a square folded 4 times. ------ Input test-A3.count ------ ----------------- Expected Output test-A3.reqd ----------------- ---------------- Obtained Output test-A3.output ---------------- 2.1.4 Tests A4: --------------- Checks if the program finds correct 2nd order co-occurrences when the co-occurrence graph is a complete bipartite of order 3. ------ Input test-A4.count ------ ----------------- Expected Output test-A4.reqd ----------------- ---------------- Obtained Output test-A4.output ---------------- 2.1.5 Tests A5: --------------- Checks if the program finds correct 2nd order co-occurrences when the co-occurrence graph is a cycle. ------ Input test-A5.count ------ ----------------- Expected Output test-A5.reqd ----------------- ---------------- Obtained Output test-A5.output ---------------- 2.1.6 Tests A6: --------------- Checks if the program finds correct 2nd order co-occurrences when the co-occurrence graph is a chain with 2 loops. ------ Input test-A6.count ------ ----------------- Expected Output test-A6.reqd ----------------- ---------------- Obtained Output test-A6.output ---------------- 2.1.7 Tests A7: --------------- Checks if the program finds correct 2nd order co-occurrences when the co-occurrence graph has a zigzag shape. ------ Input test-A7.count ------ ----------------- Expected Output test-A7.reqd ----------------- ---------------- Obtained Output test-A7.output ---------------- 2.2 Phase B: Testing socs.pl's behaviour under error conditions. ------------------------------------------------------------------- The scripts wrtitten to test the error conditions are in testB*.sh files. Run a single script error-op.sh to run following tests - 2.2.1 Tests B1: --------------- Checks the error condition when SOURCE is not a valid bigram output ------ Input test-B1.count ------ ----------------- Expected Output test-B1.reqd ----------------- ---------------- Obtained Output test-B1.output ---------------- 2.2.2 Tests B2: --------------- Checks the error condition when the specified word is not found in the input file. ------ Input test-B2.count ------ ----------------- Expected Output test-B2.reqd ----------------- ---------------- Obtained Output test-B2.output ---------------- 3. Conclusions: --------------- We have tested program socs.pl and conclude that it runs correctly. We have also provided the test scripts so that future versions of socs.pl can be compared to the current version against these scripts.