Font Size: a A A

Research Of The General-Utility In Embedded Software Coverage Testing

Posted on:2016-01-11Degree:MasterType:Thesis
Country:ChinaCandidate:W GuoFull Text:PDF
GTID:2308330461968867Subject:Software engineering
Abstract/Summary:
With the software application domain continue to expand, the embedded system has been fully developed and widely used. As an important part of embedded system, the embedded software quality has attracted great attention of all parties. Software testing is an important means to ensure software quality. Coverage testing technology is one of the important methods of software white-box testing. Compared with traditional software, the embedded software has its specific that it usually can be executed only on specified hardware platform. Embedded software development environment is different from its runtime environment. It’s uncertain whether embedded software can be executed normally on the target machine, no matter how sufficient it has been tested on the host. In addition, embedded software is usually real-time and has limited resources. The traditional software coverage testing technology can’t be used directly in embedded software testing. Most of the current embedded software testing is based on digital simulation platform. It spends a lot of time and energy to simulate the target machine before test. And as the scale of embedded system become bigger, it’s harder to simulate the target machine. Moreover, current test tools are usually made for specific software, and are developed from scratch. There is not a universal platform to provide good support for embedded software testing which lead that the testing cost a long time and the utilization rate of resources is low.This paper studies the key technologies of embedded software coverage testing, including source code analysis, instrumentation technology and coverage algorithm. An embedded software coverage testing universal model is proposed. The analysis of software under test is based on Eclipse CDT/JDT. Some source code of CDT/JDT is modified to customize AST we need and the AST is preprocessed to get standard program structure to be used in the next stage. Instrumentation technology is discussed in three areas:partition principles of program block, instrumentation strategy, design of probe function. Four kinds of coverage algorithm are explained like statement coverage, branch coverage, conditions coverage and basic path coverage. Especially, several solutions aiming at improving testing universality are given for coverage testing process like source code analysis, instrumentation of probes, compilation, program execution and test data analysis. First, relying on Eclipse CDT/JDT open source packages several different languages (C, C++, JAVA) source code can be analyzed. The abstract syntax tree which contains critical information of program under test is obtained and its redundant information is eliminated to improve the efficiency of traversal. Second, selection strategy of instrumentation position and strategy of probe function design are elaborated to reduce the impact of the instrumentation of the tested software and improve the efficiency of the program. A probe function library is set up to meet the needs of different programming languages and different instrumentation strategy. Third, the compiler of embedded software under test is customized to support software developed with different languages and run on different hardware platform. After compiling the program could be executed directly on the target machine. In addition, as the test is based on the hardware-in-the-loop test environment, the host is the core of the test model and the target machine is replaceable. To test software ran on different hardware platforms user only needs to replace the target machine. Test system is independent of hardware. Finally, the XML document is used as the test data storage media. XML can easily and effectively represent structured data. Test data is standardized and structured with XML to solve the differences between the different platforms and systems of data structures/patterns.This article implements an embedded software testing system based on the test framework. Embedded software developed with different programming language like C, C++, JAVA can be tested with this system. Four kinds of coverage strategies are supported, including statement coverage, branch coverage, condition coverage and path coverage. Several embedded software are tested with this testing system and the result is displayed in the forms of visualized data and charts. The experiment result shows that this testing tool is achievable efficiently.
Keywords/Search Tags:Embedded Software, Coverage Testing, General-Utility, Cross-test, Instrumentation
Related items