Supporting Tool for Embedded Software Testing Chorng-Shiuh Koong 1 , Hung-Jui Lai 1* , Chih-Hung Chang 2 , William C. Chu 3 , Nien-Lin Hsueh 4 , Pao-Ann Hsiung 5 , Chihhsiong Shih 3 , Chao-Tung Yang 3 1 Dept. of Computer and Information Science National Taichung University 2 Dept. of Information Management Hsiuping Institute of Technology 3 Dept. of Computer Science and Information Engineering Tunghai University 4 Dept. of Information Engineering and Computer Science Feng Chia University 5 Dept. of Computer Science and Information Engineering National Chung Cheng University Taichung, Taiwan Taichung, Taiwan Taichung, Taiwan Taichung, Taiwan Chiayi, Taiwan csko@mail.ntcu.edu.tw ; bcs097108@ms3.ntcu.edu.tw * Abstract—Embedded software testing is a complex and difficult task. During the testing process, testing tasks often require additional hardware devices to assist. This paper, in the perspective of software solution, presents a supporting tool for testing embedded software. This tool can automatically generate test cases and test drivers, and supports unit test and coverage test which are based cross testing technology and multiple rounds mechanism. The test results can be visually represented to facilitate the observation. By using our constructed testing environment in the embedded platform to do testing experiments, the experiment results show that our constructed testing environment is workable. Keywords - automatic testing; embedded software testing; coverage testing; unit testing; cross-testing; testing tool; test case generating; object testing I. INTRODUCTION As computer software technology has evolved to more sophistication, vast scale of embedded software application and growing customized demands have highlighted the importance of embedded software quality control [1] Among the most discussed issues of today’s software engineer, how software quality could be improved is the major one raised [2] extensive attention. Software testing is one of the leading approaches [3] to ensure software quality since it is the key to enhance software quality and reliability. However, mass manpower and efforts are consumed during software development. In general, testing time span and efforts can be economized through automatic or semi-automatic approaches and tools. Random testing [4] is currently the most popular testing approach to evaluate software quality and reliability. Software testing based on random testing method is firstly to randomly generate mass test cases [5] from all possible input collection, and then through the technology of code coverage test to quantify software testing quality. Studies indicates that when testing coverage is increased, software reliability is strengthened accordingly [6]. Relatively speaking, embedded system confronted with software and hardware limitations are more than those general-purpose computers faced with. More efforts are needed for testing engineer to conduct testing and improving embedded software quality during the process of testing embedded software [7]; Traditional unit testing tool is mainly focusing on workstation platform. Test case and test input data are generated from manual or automatic input. Automation as it is, approaches still need to be improved in generating test case [8]. Most unit testing tools, specifically, are only capable of either automatically generating program framework of test case, or merely supporting primitive type. Test engineers are obliged to manually write testing program/code segment and input test input data under the generated program framework, or generating test case manually [9]. The nature of testing demands numerous repetitions, which leads to enormous workloads. In addition, testing conducted through manually input test data is neither efficient, precise, nor capable of increasing test coverage [10]. In terms of testing performance, how embedded software execute on the Target platform can hardly be monitored by test engineer, making it even difficult to improve testing performance during the testing process [11]. To reduce executing overhead from implementing testing functions on embedded platform and decrease efforts for test engineer, we have developed an automatic testing tool to support cross-testing. Automation embedded software testing can be realized in the host-side and target-side testing environment of our system. Host-side is in control of the pre- processing action, including parsing source code, automatically generating instrument code segments and instrument to the target program, automatically generating test case and test driver based on cppunit library. Target-side is the actual target environment to implement embedded software testing. When testing is in process, the module will collect related testing data and results and transfer to host-side for further analysis and presentation of test results as reference for next round of automatically generated testing data. With the host-target mechanism, testing does not need to be implemented solely on embedded system platform. Hence, testing efficiency can be increased, embedded hardware resources can be utilized more fully, and efforts of test engineer can also be curtailed. Further, a random testing approach is developed to test simple and complicated data types, including primitive type, structure type and object type, so that automatic unit test can be free from the restrictions of testing input data type. With the approach, test case and test input data is generated automatically aiming at these types. Further, line coverage and branch coverage can be multi-round tested automatically. During runtime, performance of how program is executed on target-side can be monitored. Each round of coverage test 2010 10th International Conference on Quality Software 1550-6002/10 $26.00 © 2010 IEEE DOI 10.1109/QSIC.2010.34 481