This Article 
 Bibliographic References 
 Add to: 
Using Software Architecture for Code Testing
March 2004 (vol. 30 no. 3)
pp. 160-171

Abstract—Our research deals with the use of Software Architecture (SA) as a reference model for testing the conformance of an implemented system with respect to its architectural specification. We exploit the specification of SA dynamics to identify useful schemes of interactions between system components and to select test classes corresponding to relevant architectural behaviors. The SA dynamics is modeled by Labeled Transition Systems (LTSs). The approach consists of deriving suitable LTS abstractions called ALTSs. ALTSs offer specific views of SA dynamics by concentrating on relevant features and abstracting away from uninteresting ones. Intuitively, deriving an adequate set of test classes entails deriving a set of paths that appropriately cover the ALTS. Next, a relation between these abstract SA tests and more concrete, executable tests needs to be established so that the architectural tests derived can be refined into code-level tests. In the paper, we use the TRMCS case study to illustrate our hands-on experience. We discuss the insights gained and highlight some issues, problems, and solutions of general interest in architecture-based testing.

[1] AGEDIS Project, Automated Generation and Execution of Test Suites for Distributed Component-Based Software http://www.agedis.deindex.shtml, Jan. 2004.
[2] The Argus-I project, Univ. of California, Irvine,http://www. , Jan. 2004.
[3] L. Bass, P. Clements, and R. Kazman, Software Architecture in Practice. Addison-Wesley, 1998.
[4] A. Bechini and K.-C. Tai, Design of a Toolset for Dynamic Analysis of Concurrent Java Programs Proc. Sixth Int'l Workshop Program Comprehension, pp. 190-197, 1998.
[5] G. Bernot, M.C. Gaudel, and B. Marre, Software Testing Based on Formal Specifications: A Theory and a Tool Software Eng. J., vol. 6, no. 6, pp. 387-405, 1991.
[6] A. Bertolino, Knowledge Area Description of Software Testing SWEBOK, Joint IEEE-ACM Software Eng. Coordinating Committee, http:/, 2000.
[7] A. Bertolino and P. Inverardi, Architecture-Based Software Testing Proc. Int'l Software Architecture Workshop, Oct. 1996.
[8] A. Bertolino, F. Corradini, P. Inverardi, and H. Muccini, Deriving Test Plans from Architectural Descriptions ACM Proc. Int'l Conf. Software Eng., pp. 220-229, June 2000.
[9] A. Bertolino, P. Inverardi, and H. Muccini, An Explorative Journey from Architectural Tests Definition downto Code Tets Execution IEEE Proc. Int'l Conf. Software Eng., pp. 211-220, May 2001.
[10] G.v. Bochmann and A. Petrenko, Protocol Testing: Review of Methods and Relevance for Software Testing ACM Proc. Int'l Symp. Software Testing and Analysis, pp. 109-124, 1994.
[11] K. Bogdanov, Automated Testing of Harel's Statecharts PhD thesis, The Univ. of Sheffield, 2000.
[12] The C2 style and ADL Project web page, , Jan. 2004.
[13] The C2 Framework, software.html , Jan. 2004.
[14] Caesar/Aldebaran Tool (CADP),, Jan. 2004.
[15] R. Cardell-Oliver and T. Glover, A Practical and Complete Algorithm for Testing Real-Time Systems Proc. Fifth Int'l School and Symp. Formal Techniques in Real-Time and Fault-Tolerant Systems, A.P. Ravn and H. Rischel, eds., pp. 251-261, Sept. 1998.
[16] R.H. Carver and K.-C. Tai, Use of Sequencing Constraints for Specification-Based Testing of Concurrent Programs IEEE Trans. Software Eng., vol. 24, no. 6, pp. 471-490, 1998.
[17] J. Choi and H. Srinivasan, Deterministic Replay of Java Multithreaded Applications Proc. ACM Sigmetrics Symp. Parallel and Distributed Tools, pp. 48-59, 1998.
[18] E.M. Dashofy, A. van der Hoek, and R.N. Taylor, An Infrastructure for the Rapid Development of XML-Based Architecture Description Languages Proc. 24th Int'l Conf. Software Eng., 2002.
[19] J. Dick and A. Faivre, Automating the Generation and Sequencing of Test Cases from Model-Based Specifications Proc. FME'93 Conf.: Industrial-Strength Formal Methods, J.C.P. Woodcock and P.G. Larsen, eds., pp. 268-284, 1993.
[20] A. Egyed, A Scenario-Driven Approach to Traceability Proc. IEEE Int'l Conf. Software Eng., pp. 123-132, May 2001.
[21] FC2Tools, quick-guide.html, Jan. 2004.
[22] J.-C. Fernandez, C. Jard, T. Jeron, L. Nedelka, and C. Viho, Using On-the-Fly Verification Techniques for the Generation of Test Suites Proc. Eighth Int'l Conf. Computer Aided Verification, pp. 348-359, 1996.
[23] J.-C. Fernandez, C. Jard, T. Jeron, L. Nedelka, and C. Viho, An Experiment in Automatic Generation of Test Suites for Protocols with Verification Technology Science of Computer Programming, vol. 29, pp. 123-146, 1997.
[24] Formal Methods for Software Architectures Tutorial Book on Software Architectures and Formal Methods Lecture Notes in Computer Science 2804, M. Bernardo and P. Inverardi, eds., 2003.
[25] S. Fujiwara, V.G. Bochmann, F. Khendek, M. Amalou, and A. Ghedamsi, “Test Selection Based on Finite State Machine Model,” IEEE Trans. Software Eng., vol. 17, no. 6, pp. 591-603, June 1991.
[26] O. Gotel and A. Finkelstein, An Analysis of the Requirements Traceability Problem Proc. First Int'l Conf. Requirements Eng., pp. 94-101, 1994.
[27] M.J. Harrold, Architecture-Based Regression Testing of Evolving Systems Proc. Int'l Workshop the Role of Software Architecture in Testing and Analysis, pp. 73-77, July 1998.
[28] M.J. Harrold, Testing: A Roadmap Proc. ACM ICSE 2000 Conf., The Future of Software Eng., A. Finkelstein, ed., pp. 61-72, 2000.
[29] D.M. Hoffman and P.A. Strooper, Techniques and Tools for Java API Testing Proc. 2000 Australian Software Eng. Conf., pp. 235-245, 2000.
[30] C. Hofmeister, R.L. Nord, and D. Soni, Applied Software Architecture. Addison Wesley, 1999.
[31] P. Inverardi and A.L. Wolf, Formal Specifications and Analysis of Software Architectures Using the Chemical Abstract Machine Model IEEE Trans. Software Eng., vol. 21, no. 4, pp. 100-114, Apr. 1995.
[32] P. Inverardi and H. Muccini, The Teleservices and Remote Medical Care System (TRMCS) IEEE Proc. Int'l Workshop Software Specification and Design, Nov. 2000.
[33] R. Kazman et al., "SAAM: A Method for Analyzing the Properties of Software Architectures," Proc. Int'l Conf. Software Eng., IEEE CS Press, Los Alamitos, Calif., 1984, pp. 81-90.
[34] Labelled Transition System Analyzer (LTSA),http://www-dse., Jan. 2004.
[35] B. Long, D. Hoffman, and P. Strooper, Tool Support for Testing Concurrent Java Components IEEE Trans. Software Eng., vol. 29, no. 6, pp. 555-566, June 2003.
[36] D.C. Luckham,J.J. Kenney,L.M. Augustin,J. Vera,D. Bryan,, and W. Mann,“Specification and analysis of system architecture usingRapide,” IEEE Transactions on Software Engineering, vol. 21, no. 4, pp. 336-355, Apr. 1995.
[37] N.A. Lynch and M.R. Tuttle, An Introduction to Input/Output Automata CWI Quarterly, vol. 2, no. 3, pp. 219-246, Sept. 1989.
[38] J. Magee and J. Kramer, Concurrency: State Models&Java Programs. Wiley, Apr. 1999.
[39] D. Mandrioli, S. Morasca, and A. Morzenti, Generating Test Cases for Real-Time Systems from Logic Specifications ACM Trans. Computer Systems, vol. 13, no. 4, pp. 365-398, Nov. 1995.
[40] T.J. McCabe, A Complexity Measure IEEE Trans. Software Eng., vol. 2, no. 4, pp. 308-320, 1976.
[41] N. Medvidovic, D.S. Rosenblum, and R.N. Taylor, A Language and Environment for Architecture-Based Software Development and Evaluation Proc. IEEE Int'l Conf. Software Eng., pp. 44-53, 1999.
[42] R. Milner, Communication on Concurrences. Int'l Series on Computer Science, Prentice Hall, 1989.
[43] H. Muccini, A. Bertolino, and P. Inverardi, Using Software Architecture for Code Testing Technical Report TRCS 006/2004, Dipartimento di Informatica, Universitádegli Studi di L'Aquila, TSE04.htm, 2004.
[44] H. Muccini, M. Dias, and D.J. Richardson, Systematic Testing of Software Architectures in the C2 Style Proc. Int'l Conf. Fundamental Approaches to Software Engineering (FASE 2004), 2004.
[45] B. Nuseibeh, Weaving Together Requirements and Architectures Computer, vol. 34, no. 3, pp. 115-117, Mar. 2001.
[46] T.J. Ostrand and M.J. Balcer, The Category-Partition Method for Specifying and Generating Functional Tests Comm. ACM, vol. 31, no. 6, pp. 676-686, June 1988.
[47] D.J. Richardson and A.L. Wolf, Software Testing at the Architectural Level Proc. Software Architecture Workshop and Proc. ACM SIGSOFT '96 Workshop, pp. 68-71, 1996.
[48] D.J. Richardson, J. Stafford, and A.L. Wolf, A Formal Approach to Architecture-Based Software Testing technical report, Univ. of California, Irvine, 1998.
[49] J. Ryser and M. Glinz, A Practical Approach to Validating and Testing Software Systems Using Scenarios Proc. Third Int'l Software Quality Week Europe Conf., Nov. 1999.
[50] J. Castro and J. Kramer, From Software Requirements to Architectures Proc. Straw '01 First Int'l Workshop, May 2001.
[51] Q.M. Tan, A. Petrenko, and G.v. Bochmann, A Test Generation Tool for Specifications in the Form of State Machines Proc. IEEE Int'l Comm. Conf., pp. 225-229, June 1996.
[52] J. Tretmans, Conformance Testing with Labeled Transition Systems: Implementation Relations and Test Generation Computer Networks and ISDN Systems, vol. 29, pp. 49-79, 1996.
[53] M. Vieira, M. Dias, and D.J. Richardson, Object-Oriented Specification-Based Testing Using UML Statechart Diagrams Proc. Int'l Conf. Software Eng. 2000 Workshop Automated Program Analysis, Testing, and Verification, pp. 758-761, June 2000.
[54] A.H. Watson and T.J. McCabe, Structured Testing: A Testing Methodology Using the Cyclomatic Complexity Metric Nat'l Inst. of Standards and Technology Special Publication 500-235, Aug. 1996.
[55] M. Young, Testing Complex Architectural Conformance Relations Proc. Int'l Workshop Role of Software Architecture in Testing and Analysis, pp. 42-45, July 1998.

Index Terms:
Software engineering, software architectures, testing and debugging, testing strategies, tracing.
Henry Muccini, Antonia Bertolino, Paola Inverardi, "Using Software Architecture for Code Testing," IEEE Transactions on Software Engineering, vol. 30, no. 3, pp. 160-171, March 2004, doi:10.1109/TSE.2004.1271170
Usage of this product signifies your acceptance of the Terms of Use.