Automated testing of stochastic systems
- 21 July 2006
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 215-224
- https://doi.org/10.1145/1146238.1146263
Abstract
Automated tests can play a key role in ensuring system quality in software development. However, significant problems arise in automating tests of stochastic algorithms. Normally, developers write tests that simply check whether the actual result is equal to the expected result (perhaps within some tolerance). But for stochastic algorithms, restricting ourselves in this way severely limits the kinds of tests we can write: either to trivial tests, or to fragile and hard-tounderstand tests that rely on a particular seed for a random number generator. A richer and more powerful set of tests is possible if we accommodate tests of statistical properties of the results of running an algorithm many times. The work described in this paper has been done in the context of a real-world application, a large-scale simulation of urban development designed to inform major decisions about land use and transportation. We describe our earlier experience with using automated testing for this system, in which we took a conventional approach, and the resulting difficulties. We then present a statistically based approach for testing stochastic algorithms based on hypothesis testing. Three different ways of constructing such tests are given, which cover the most commonly used distributions. We evaluate these tests in terms of frequency of failing when they should and when they should not, and conclude with guidelines and practical suggestions for implementing such unit tests for other stochastic applications.Keywords
This publication has 10 references indexed in Scilit:
- Optimal strategies for testing nondeterministic systemsPublished by Association for Computing Machinery (ACM) ,2004
- An extensible, modular architecture for simulating urban development, transportation, and environmental impactsComputers, Environment and Urban Systems, 2003
- Discrete Choice Methods with SimulationPublished by Cambridge University Press (CUP) ,2003
- Microsimulation of Urban Development and Location Choices: Design and Implementation of UrbanSimNetworks and Spatial Economics, 2003
- UrbanSim: Modeling Urban Development for Land Use, Transportation, and Environmental PlanningJournal of the American Planning Association, 2002
- Unit testing frameworksPublished by Association for Computing Machinery (ACM) ,2002
- Testing nondeterministic message-passing programs with NOPEPublished by Association for Computing Machinery (ACM) ,1998
- Principles and methods of testing finite state machines-a surveyProceedings of the IEEE, 1996
- Testing finite state machinesPublished by Association for Computing Machinery (ACM) ,1991
- Formal methods for protocol testing: a detailed studyIEEE Transactions on Software Engineering, 1989