Model-Based Test Oracle Generation for Automated Unit Testing of Agent Systems

Software testing remains the most widely used approach to verification in industry today, consuming between 30-50 percent of the entire development cost. Test input selection for intelligent agents presents a problem due to the very fact that the agents are intended to operate robustly under conditions which developers did not consider and would therefore be unlikely to test. Using methods to automatically generate and execute tests is one way to provide coverage of many conditions without significantly increasing cost. However, one problem using automatic generation and execution of tests is the oracle problem: How can we automatically decide if observed program behavior is correct with respect to its specification? In this paper, we present a model-based oracle generation method for unit testing belief-desire-intention agents. We develop a fault model based on the features of the core units to capture the types of faults that may be encountered and define how to automatically generate a partial, passive oracle from the agent design models. We evaluate both the fault model and the oracle generation by testing 14 agent systems. Over 400 issues were raised, and these were analyzed to ascertain whether they represented genuine faults or were false positives. We found that over 70 percent of issues raised were indicative of problems in either the design or the code. Of the 19 checks performed by our oracle, faults were found by all but 5 of these checks. We also found that 8 out the 11 fault types identified in our fault model exhibited at least one fault. The evaluation indicates that the fault model is a productive conceptualization of the problems to be expected in agent unit testing and that the oracle is able to find a substantial number of such faults with relatively small overhead in terms of false positives.

[1]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

[2]  Glenford J. Myers,et al.  Art of Software Testing , 1979 .

[3]  Michael L. Fredman,et al.  The AETG System: An Approach to Testing Based on Combinatiorial Design , 1997, IEEE Trans. Software Eng..

[4]  Robert V. Binder,et al.  Testing Object-Oriented Systems: Models, Patterns, and Tools , 1999 .

[5]  Holger Knublauch,et al.  Extreme programming of multi-agent systems , 2002, AAMAS '02.

[6]  Massimo Cossentino,et al.  Designing a multi-agent solution for a bookstore with the PASSI methodology , 2002, AOIS@CAiSE.

[7]  Gregory Tassey,et al.  Prepared for what , 2007 .

[8]  Michael Winikoff,et al.  Debugging multi-agent systems using design artifacts: the case of interaction protocols , 2002, AAMAS '02.

[9]  Agostino Poggi,et al.  Multi-Agent Systems Implementation and Testing , 2003 .

[10]  Ilene Burnstein,et al.  Practical Software Testing , 2003, Springer Professional Computing.

[11]  Winfried Lamersdorf,et al.  Jadex: Implementing a BDI-Infrastructure for JADE Agents , 2003 .

[12]  Vincent Massol,et al.  JUnit in Action , 2003 .

[13]  Michael Winikoff,et al.  Developing intelligent agent systems - a practical guide , 2004, Wiley series in agent technology.

[14]  Nicholas R. Jennings,et al.  The Gaia Methodology for Agent-Oriented Analysis and Design , 2000, Autonomous Agents and Multi-Agent Systems.

[15]  Tsong Yueh Chen,et al.  Automated Test Case Generation for BDI Agents , 1999, Autonomous Agents and Multi-Agent Systems.

[16]  Fausto Giunchiglia,et al.  Tropos: An Agent-Oriented Software Development Methodology , 2004, Autonomous Agents and Multi-Agent Systems.

[17]  S. Reid The Art of Software Testing, Second edition. Glenford J. Myers. Revised and updated by Tom Badgett and Todd M. Thomas, with Corey Sandler. John Wiley and Sons, New Jersey, U.S.A., 2004. ISBN: 0-471-46912-2, pp 234: Book Reviews , 2005 .

[18]  Michael Winikoff,et al.  JACKTM Intelligent Agents: An Industrial Strength Platform , 2005, Multi-Agent Programming.

[19]  S. DeLoach Multiagent systems engineering of organization-based multiagent systems , 2005, ACM SIGSOFT Softw. Eng. Notes.

[20]  S. DeLoach Multiagent systems engineering of organization-based multiagent systems , 2005, ACM SIGSOFT Softw. Eng. Notes.

[21]  Michael Winikoff,et al.  Adding debugging support to the Prometheus methodology , 2005, Eng. Appl. Artif. Intell..

[22]  Riza Cenk Erdur,et al.  SUNIT: A Unit Testing Framework for Test Driven Development of Multi-Agent Systems , 2006, AOSE.

[23]  Steve S. Benfield,et al.  Making a strong business case for multiagent technology , 2006, AAMAS '06.

[24]  Lin Padgham,et al.  Automated Unit Testing for Agent Systems , 2007, ENASE.

[25]  Michael Wooldridge,et al.  Programming Multi-Agent Systems in AgentSpeak using Jason (Wiley Series in Agent Technology) , 2007 .

[26]  Carlos José Pereira de Lucena,et al.  JAT: A Test Automation Framework for Multi-Agent Systems , 2007, 2007 IEEE International Conference on Software Maintenance.

[27]  Zaïdi Sahnoun,et al.  A Recursive Colored Petri Nets semantics for AUML as base of test case generation , 2008, 2008 IEEE/ACS International Conference on Computer Systems and Applications.

[28]  Oguz Dikenelli,et al.  SEAGENT MAS platform development environment , 2008, AAMAS.

[29]  Lin Padgham,et al.  Automated Testing for Intelligent Agent Systems , 2009, AOSE.

[30]  Anna Perini,et al.  Goal-oriented testing for MASs , 2010, Int. J. Agent Oriented Softw. Eng..

[31]  Gary Gregory,et al.  JUnit in Action, Second Edition , 2010 .

[32]  Lin Padgham,et al.  Test Coverage Criteria for Agent Interaction Testing , 2010, AOSE.

[33]  Petar Tahchiev JUnit in action , 2011 .

[34]  Mats Per Erik Heimdahl,et al.  Programs, tests, and oracles: the foundations of testing revisited , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[35]  Michael Luck,et al.  Evolutionary testing of autonomous software agents , 2009, Autonomous Agents and Multi-Agent Systems.