Chinese Journal of Computers (计算机学报) 2013/36:12 PP.2371-2389
Wireless Sensor Networks (WSNs) represent a fundamental building block of the Internet of Things. With the growing application of WSNs, the software-quality issues have become increasingly prominent. Transient bugs in WSN applications are difficult to be found because they are triggered by occasionally interleaved event-handling logics and an effective automated test oracle is rarely available. Interval-based testing in this area partitions a sensor's program execution into intervals and finds the buggy intervals, but it might report numerous false positives. In this paper, we report the results of an in-depth study of the causes of false positives that arise from interval-based testing that we performed. Based on these results, we propose an effective approach for detecting transient bugs in application-level components. Our approach features an interval-partitioning strategy and a program behavior-selection strategy. Both strategies aim to reduce benign occasional behaviors from those to be analyzed. We propose an interval-identification algorithm. Based on this algorithm, we developed a prototype tool that implements our interval-based testing technique, and conducted a set of experiments to evaluate its effectiveness and efficiency. The empirical studies show that our tool is both effective and efficient in detecting transient bugs for our subject programs.