Bringing Modern Unit Testing Techniques to Sensornets

Unit testing, an important facet of software quality assurance, is underappreciated by wireless sensor network (sensornet) developers. This is likely because our tools lag behind the rest of the computing field. As a remedy, we present a new framework that enables modern unit testing techniques in sensornets. Although the framework takes a holistic approach to unit testing, its novelty lies mainly in two aspects. First, to boost test development, it introduces embedded mock modules that automatically abstract out dependencies of tested code. Second, to automate test assessment, it provides embedded code coverage tools that identify untested control flow paths in the code. We demonstrate that in sensornets these features pose unique problems, solving which requires dedicated support from the compiler and operating system. However, the solutions have the potential to offer substantial benefits. In particular, they reduce the unit test development effort by a few factors compared to existing solutions. At the same time, they facilitate obtaining full code coverage, compared to merely 57--72% that can be achieved with integration tests. They also allow for intercepting and reporting many classes of runtime failures, thereby simplifying the diagnosis of software flaws. Finally, they enable fine-grained management of the quality of sensornet software.

[1]  Koen Langendoen,et al.  Murphy loves potatoes: experiences from a pilot sensor network deployment in precision agriculture , 2006, Proceedings 20th IEEE International Parallel & Distributed Processing Symposium.

[2]  Deborah Estrin,et al.  Towards a debugging system for sensor networks , 2005, Int. J. Netw. Manag..

[3]  Kamin Whitehouse,et al.  Unit testing for wireless sensor networks , 2010, SESENA '10.

[4]  Matt Welsh,et al.  MoteLab: a wireless sensor network testbed , 2005, IPSN '05.

[5]  Andraž Cej,et al.  Agile software development with Scrum , 2010 .

[6]  W. Archer,et al.  Interface Contracts for TinyOS , 2007, 2007 6th International Symposium on Information Processing in Sensor Networks.

[7]  Richard M. Stallman,et al.  An introduction to GCC : for the GNU compilers gcc and g++ , 2005 .

[8]  Konrad Iwanicki KonTest : A Wireless Sensor Network Testbed at Vrije Universiteit Amsterdam , 2008 .

[9]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[10]  George C. Necula,et al.  Dependent Types for Low-Level Programming , 2007, ESOP.

[11]  Adam Dunkels,et al.  Contiki - a lightweight and flexible operating system for tiny networked sensors , 2004, 29th Annual IEEE International Conference on Local Computer Networks.

[12]  David E. Culler,et al.  Software design patterns for TinyOS , 2007, TECS.

[13]  Klaus Wehrle,et al.  KleeNet: discovering insidious interaction bugs in wireless sensor networks before deployment , 2010, IPSN '10.

[14]  Steve Freeman,et al.  Mock Roles, not Objects , 2004 .

[15]  Roger Wattenhofer,et al.  YETI: A TinyOS Plug-in for Eclipse , 2006 .

[16]  David E. Culler,et al.  The nesC language: A holistic approach to networked embedded systems , 2003, PLDI.

[17]  Philip Levis,et al.  The nesC language: a holistic approach to networked embedded systems , 2003, SIGP.

[18]  David E. Culler,et al.  TOSSIM: accurate and scalable simulation of entire TinyOS applications , 2003, SenSys '03.

[19]  Adam Dunkels,et al.  Cross-Level Sensor Network Simulation with COOJA , 2006, Proceedings. 2006 31st IEEE Conference on Local Computer Networks.

[20]  Jonathan W. Hui,et al.  T 2 : A Second Generation OS For Embedded Sensor Networks , 2005 .

[21]  Michal Gregorczyk,et al.  NarrowCast: A New Link-Layer Primitive for Gossip-Based Sensornet Protocols , 2014, EWSN.

[22]  Ramesh Govindan,et al.  Deriving State Machines from TinyOS Programs Using Symbolic Execution , 2008, 2008 International Conference on Information Processing in Sensor Networks (ipsn 2008).

[23]  Philip Levis,et al.  Collection tree protocol , 2009, SenSys '09.

[24]  Eric Eide,et al.  Efficient memory safety for TinyOS , 2007, SenSys '07.

[25]  Richard M. Stallman,et al.  An Introduction to GCC , 2004 .

[26]  Kamin Whitehouse,et al.  Clairvoyant: a comprehensive source-level debugger for wireless sensor networks , 2007, SenSys '07.

[27]  David E. Culler,et al.  Design of an application-cooperative management system for wireless sensor networks , 2005, Proceeedings of the Second European Workshop on Wireless Sensor Networks, 2005..

[28]  Jonathan W. Hui,et al.  Marionette: using RPC for interactive development and debugging of wireless embedded networks , 2006, 2006 5th International Conference on Information Processing in Sensor Networks.

[29]  Kent L. Beck,et al.  Embracing Change with Extreme Programming , 1999, Computer.

[30]  Dave Astels,et al.  Test Driven Development: A Practical Guide , 2003 .

[31]  Matt Welsh,et al.  Fidelity and yield in a volcano monitoring sensor network , 2006, OSDI '06.

[32]  Peng Li,et al.  T-check: bug finding for sensor networks , 2010, IPSN '10.

[33]  Konrad Iwanicki,et al.  Towards a Versatile Problem Diagnosis Infrastructure for LargeWireless Sensor Networks , 2007, OTM Workshops.

[34]  Jens Palsberg,et al.  Avrora: scalable sensor network simulation with precise timing , 2005, IPSN 2005. Fourth International Symposium on Information Processing in Sensor Networks, 2005..

[35]  V. Kulathumani,et al.  Kansei: a testbed for sensing at scale , 2006, 2006 5th International Conference on Information Processing in Sensor Networks.

[36]  Kay Römer,et al.  PDA: Passive distributed assertions for sensor networks , 2009, 2009 International Conference on Information Processing in Sensor Networks.

[37]  Michal Gregorczyk,et al.  On Decentralized In-network Aggregation in Real-World Scenarios with Crowd Mobility , 2014, 2014 IEEE International Conference on Distributed Computing in Sensor Systems.

[38]  Amy L. Murphy,et al.  Wireless Sensor Networks , 2010 .

[39]  Philip Levis,et al.  Four-Bit Wireless Link Estimation , 2007, HotNets.

[40]  Mark D. Yarvis,et al.  Design and deployment of industrial sensor networks: experiences from a semiconductor plant and the north sea , 2005, SenSys '05.

[41]  Pawel Gburzynski,et al.  PicOS: A Tiny Operating System for Extremely Small Embedded Platforms , 2003, Embedded Systems and Applications.

[42]  François Ingelrest,et al.  The hitchhiker's guide to successful wireless sensor network deployments , 2008, SenSys '08.