This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Automated Module Testing in Prolog
September 1991 (vol. 17 no. 9)
pp. 934-943

Tools and techniques for writing scripts in Prolog that automatically test modules implemented in C are presented. Both the input generation and the test oracle problems are addressed, focusing on a balance between the adequacy of the test inputs and the cost of developing the output oracle. The authors investigate automated input generation according to functional testing, random testing, and a novel approach based on trace invariants. For each input generation scheme, a mechanism for generating the expected outputs has been developed. The methods are described and illustrated in detail. Script development and maintenance costs appear to be reasonable, and run-time performance appears to be acceptable.

[1] C. M. White,ALS Prolog User's Guide and Reference Manual. Applied Logic Syst., Inc., 1988.
[2] Quintus Prolog User's Guide. Mountain View, CA: Quintus Computer Syst., Inc., 1987.
[3] BNR Prolog Reference Manual. Bell-Northern Research Ltd., 1988.
[4] J. B. Goodenough and S. L. Gerhart, "Toward a theory of test data selection,"IEEE Trans. Software Eng., vol. SE-1, pp. 156-173, June 1975.
[5] W. E. Howden, "Reliability of the path analysis testing strategy,"IEEE Trans. Software Eng., vol. SE-2, pp. 208-215, Sept. 1976.
[6] S. Rapps and E. J. Weyuker, "Selecting software test data using data flow information,"IEEE Trans. Software Eng., vol. SE-11, no. 4, pp. 367-375, Apr. 1985.
[7] W. E. Howden, "Functional program testing."IEEE Trans. Software Eng., vol. SE-6, pp. 162-169, Mar. 1980.
[8] J. W. Duran and S. C. Ntafos, "An evaluation of random testing,"IEEE Trans. Software Eng., vol. SE-10, pp. 438-444, July 1984.
[9] L. A. Clarke, "A system to generate test data and symbolically execute programs,"IEEE Trans. Software Eng., vol. SE-2, pp. 215-222, Sept. 1976.
[10] L. J. White and E. I. Cohen, "A domain strategy for computer program testing,"IEEE Trans. Software Eng., vol. SE-6, pp. 247-257, May 1980.
[11] J. Gannon, P. McMullin, and R. Hamlet, "Data-abstraction implementation, specification and testing,"ACM Trans. Program. Lang. syst., vol 3, no. 3, pp. 211-223, July 1981.
[12] P. G. Frankl, "Tools for testing object-oriented programs," inProc. Pacific Northwest Software Quality Conf., 1990, pp. 309-324.
[13] D. J. Panzl, "A language for specifying software tests," inProc. AFIPS Natl. Comp. Conf., 1978, pp. 609-619.
[14] A. Jagota and V. Rao, "TCL and TCI: A powerful language and an interpreter for writing and executing black box tests," inProc. Pacific Northwest Software Quality Conf.Los Alamitos, CA: IEEE Computer Soc., 1986, pp. 147-166.
[15] A. G. Duncan and J. S. Hutchison, "Using attributed grammars to test designs and implementations," inProc. 5th Int. Conf. Software Eng.Los Alamitos, CA: IEEE Computer Soc., 1981, pp. 170-178.
[16] M. M. Gorlick, C. F. Kesselman, D. A. Marotta, and D. S. Parker, "Mockingbird: A logical methodology for testing,"J. Logic Program., vol. 8, nos. 1/2, pp. 95-119, 1990.
[17] N. Choquet, "Test data generation using a Prolog with constraints," inWorkshop on Software Test. Los Alamitos, CA: IEEE Computer Soc., 1986, pp. 132-141.
[18] J.H. Weber, C. de Vroedt, and D.E. Boekee, "Bounds and constructions for binary codes of length less than 24 and asymmetric distance less than 6,"IEEE Trans. Inform. Theory, submitted for publication.
[19] H. Pesch, P. Schnupp, H. Schaller, and A. P. Spirk, "Test-case generation using Prolog," inProc. 8th Int. Conf. Software Eng.Los Alamitos, CA: IEEE Computer Soc., 1985, pp. 252-258.
[20] S. Gerhart, "A test data generation method using Prolog," Wang Inst. of Grad. Studies, Tech. Rep. TR85-02, 1985.
[21] W. T. Tsai, D. Volovik, and T. F. Keefe "Automated test case generation for programs specified by relational algebra queries,"IEEE Trans. Software Eng., vol. 16, pp. 316-324, Mar. 1990.
[22] D. L. Parnas and P. C. Clements, "A rational design process: How and why to fake it,"IEEE Trans. Software Eng., vol. SE-12, pp. 251-257, Feb. 1986.
[23] IEEE Standard Glossary of Software Engineering Terminology. Los Alamitos, CA: IEEE Computer Soc., 1982.
[24] F. P. Brooks,The Mythical Man-Month. Reading, MA: Addison-Wesley, 1975.
[25] D. M. Hoffman, "A CASE study in module testing," inProc. Conf. Software Maintenance. Los Alamitos, CA: IEEE Computer Soc., 1989, pp. 100-105.
[26] D. M. Hoffman and P. A. Strooper, "The role of Prolog in software testing," to be presented at the ILPS '91 Int. Logic Program. Symp, 1991.
[27] D. M. Hoffman and P. A. Strooper, "Graph-based module testing," Univ. Victoria, Victoria, BC, Can., Tech. Rep. DCS-150-IR, 1991.

Index Terms:
Prolog; C; input generation; test oracle problems; test inputs; output oracle; automated input generation; functional testing; random testing; trace invariants; maintenance costs; run-time performance; C language; logic programming; program testing; PROLOG
Citation:
D.M. Hoffman, P. Strooper, "Automated Module Testing in Prolog," IEEE Transactions on Software Engineering, vol. 17, no. 9, pp. 934-943, Sept. 1991, doi:10.1109/32.92913
Usage of this product signifies your acceptance of the Terms of Use.