An Automated Unit Testing Framework for Wireless Sensor Networks

  • Dongyu Yang
  • Fan Zhang
  • Jun Lin
Conference paper
Part of the Lecture Notes in Electrical Engineering book series (LNEE, volume 295)


Over 90 % of developers regard unit testing as most effective in reducing software bugs. However, current unit testing method which is writing test stub manually for Wireless Sensor Networks (WSN) is designed for different applications. Combining Embedded Remote Procedure Call (ERPC) with web service, this paper presents a new Automated Unit Testing Framework (AUTF) of unit testing for WSN. First, tester uploads source code through web service interfaces. At the time of compiling, the server stub of ERPC, web service, and test case are generated automatically for the corresponding function unit. The AUTF automatically runs test case through dynamic and asynchronous web service invocation, and then converts web service invocations into remote function invocations from ERPC Client to ERPC Server. Finally, automated unit testing is realized on sensor nodes under the AUTF.


Wireless sensor networks Automated unit testing Embedded remote procedure call Web service TinyOS 



This paper was supported by National Key Technology R&D Program under Grant No. 2011ZX03005-001, Breakthroughs Project in Key Areas of Guang dong and Hong Kong under Grant No. 2011A011302002, and Youth Fund Program of The fifth Electronics Research Institute of the Ministry of Industry and Information Technology under Grant No. 12Q08.


  1. 1.
    Limin S, Jianzhong L, Yu C, Hongsong Z (2005) Wireless sensor networks. Tsinghua University Press, BeijingGoogle Scholar
  2. 2.
    Karl H, Willig A (2005) Protocols and architectures for wireless sensor networks. Wiley, New YorkGoogle Scholar
  3. 3.
    Qing S, Jin H, Suxian Z (2008) Software process quality management. Science PressGoogle Scholar
  4. 4.
    Levis P, Madden S, Polastre J, Szewczyk R, Whitehouse K, Woo A, Gay D, Hill J, Welsh M, Brewer E, Culler D (2005) TinyOS: an operating system for sensor networks. In: Ambient intelligence. Springer, Berlin HeidelbergGoogle Scholar
  5. 5.
    Dunkels A, Gronvall B, Voigt I (2004) Contiki—a lightweight and flexible operating system for tiny networked sensors. In: 29th annual IEEE international conference on local computer networks, IEEE PressGoogle Scholar
  6. 6.
    Z-Stack - ZigBee Protocol Stack.
  7. 7.
    Ma JY, Zhou XS, Zhang Y, Li SN, Li ZG (2012) Debugging sensor networks: A survey. Jisuanji Xuebao (Chin J Comput) 35(3):405–422Google Scholar
  8. 8.
    Werner-Allen G, Swieskowski P, Welsh M (2005) MoteLab: a wireless sensor network testbed. In: Proceedings of the 4th international symposium on information processing in sensor networks (IPSN), ACMGoogle Scholar
  9. 9.
    Ertin E, Arora A, Ramnath R, Nesterenko M, Naik V, Bapat S, Kulathumani V, Sridharan M, Zhan H, Cao H (2006) Kansei: a testbed for sensing at scale. In: Proceedings of the 5th international symposium on information processing in sensor networks (IPSN), ACMGoogle Scholar
  10. 10.
    Tianlin L, Fangmin L (2009) Wireless sensor networks test platform. Wuhan University of Technology, WuhanGoogle Scholar
  11. 11.
  12. 12.
    Whitehouse K, Tolle G, Taneja J, Sharp C, Kim S, Jeong J, Hui J, Dutta P, Culler D (2006) Marionette: using RPC for interactive development and debugging of wireless embedded networks. In: Proceedings of the 5th international symposium on information processing in sensor networks (IPSN), ACMGoogle Scholar
  13. 13.
    Okola M, Whitehouse K (2010) Unit testing for wireless sensor networks. In: Proceedings of the 2010 ICSE workshop on software engineering for sensor network applications, ACMGoogle Scholar
  14. 14.
    Birrell AD, Nelson BJ (1984) Implementing remote procedure calls. ACM Trans Comput Syst (TOCS) 2:39–59Google Scholar
  15. 15.
    Bershad BN, Anderson TE, Lazowska ED, Levy HM (1990) Lightweight remote procedure call. ACM Trans Comput Syst (TOCS) 8:37–55Google Scholar
  16. 16.
    Erl T (2004) Service-oriented architecture: a field guide to integrating XML and web services. Prentice Hall PTR, New JerseyGoogle Scholar
  17. 17.
    Okola M, Whitehouse K (2010) Automatically exporting TinyOS modules as web services. In: The first international workshop on networks of cooperating objects (CONET)Google Scholar
  18. 18.
    Leitner P, Rosenberg F, Dustdar S (2009) Daios: efficient dynamic web service invocation. IEEE Internet Comput. 13:72–80Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  1. 1.China Electronic Product Reliability and Environmental Testing Research InstituteTianhe District, City of GuangzhouChina

Personalised recommendations