Specification testing of agent-based simulation using property-based testing

被引:0
|
作者
Thaler, Jonathan [1 ,2 ]
Siebers, Peer-Olaf [1 ]
机构
[1] Univ Nottingham, Sch Comp Sci, 7301 Wollaton Rd, Nottingham, England
[2] FH Vorarlberg, Dept Comp Sci, Hsch Str 1, A-6850 Dornbirn, Austria
关键词
Agent-based simulation testing; Code testing; Test driven development; Model specification; FRAMEWORK;
D O I
10.1007/s10458-020-09473-8
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
The importance of Agent-Based Simulation (ABS) as scientific method to generate data for scientific models in general and for informed policy decisions in particular has been widely recognised. However, the important technique of code testing of implementations like unit testing has not generated much research interested so far. As a possible solution, in previous work we have explored the conceptual use ofproperty-based testing. In this code testing method, model specifications and invariants are expressed directly in code and tested throughautomatedandrandomisedtest data generation. This paper expands on our previous work and explores how to use property-based testing on a technical level to encode and test specifications of ABS. As use case the simple agent-based SIR model is used, where it is shown how to test agent behaviour, transition probabilities and model invariants. The outcome are specifications expressed directly in code, which relate whole classes of random input to expected classes of output. During test execution, random test data is generated automatically, potentially covering the equivalent of thousands of unit tests, run within seconds on modern hardware. This makes property-based testing in the context of ABS strictly more powerful than unit testing, as it is a much more natural fit due to its stochastic nature.
引用
收藏
页数:22
相关论文
共 50 条
  • [41] Shrinking Counterexamples in Property-Based Testing with Genetic Algorithms
    Lo, Fang-Yi
    Chen, Chao-Hong
    Chen, Ying-ping
    2020 IEEE CONGRESS ON EVOLUTIONARY COMPUTATION (CEC), 2020,
  • [42] Property-Based Testing and Debugging of Quantum Programs (Keynote)
    Mousavi, Mohammad Reza
    PROCEEDINGS OF THE 8TH INTERNATIONAL CONFERENCE ON THE ART, SCIENCE, AND ENGINEERING OF PROGRAMMING, PROGRAMMING COMPANION 2024, 2024, : 117 - 117
  • [43] TYCHE: Making Sense of Property-Based Testing Efectiveness
    Goldstein, Harrison
    Tao, Jeffrey
    Hatfield-Dodds, Zac
    Pierce, Benjamin C.
    Head, Andrew
    PROCEEDINGS OF THE 37TH ANNUAL ACM SYMPOSIUM ON USER INTERFACE SOFTWARE AND TECHNOLOGY, USIT 2024, 2024,
  • [44] MAKING PROPERTY-BASED TESTING EASIER TO READ FOR HUMANS
    Castro, Laura M.
    Lamela, Pablo
    Thompson, Simon
    COMPUTING AND INFORMATICS, 2016, 35 (04) : 890 - 913
  • [45] Statistical Model Checking Meets Property-Based Testing
    Aichernig, Bernhard K.
    Schumi, Richard
    2017 10TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST), 2017, : 390 - 400
  • [46] Failing Faster: Overlapping Patterns for Property-Based Testing
    Fowler, Jonathan
    Hutton, Graham
    PRACTICAL ASPECTS OF DECLARATIVE LANGUAGES (PADL 2017), 2017, 10137 : 103 - 119
  • [47] Stress-testing the resilience of the Austrian healthcare system using agent-based simulation
    Michaela Kaleta
    Jana Lasser
    Elma Dervic
    Liuhuaying Yang
    Johannes Sorger
    D. Ruggiero Lo Sardo
    Stefan Thurner
    Alexandra Kautzky-Willer
    Peter Klimek
    Nature Communications, 13
  • [48] Stress-testing the resilience of the Austrian healthcare system using agent-based simulation
    Kaleta, Michaela
    Lasser, Jana
    Dervic, Elma
    Yang, Liuhuaying
    Sorger, Johannes
    Lo Sardo, D. Ruggiero
    Thurner, Stefan
    Kautzky-Willer, Alexandra
    Klimek, Peter
    NATURE COMMUNICATIONS, 2022, 13 (01)
  • [49] Property-Based Testing of Browser Rendering Engines with a Consensus Oracle
    Martin, Joel
    Levine, David
    2018 IEEE 42ND ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC 2018), VOL 2, 2018, : 424 - 429
  • [50] Agent-based simulation for testing control software of high bay warehouses
    Triebig, C
    Credner, T
    Fischer, P
    Leskien, T
    Deppisch, A
    Landvogt, S
    MULTIAGENT SYSTEM TECHNOLOGIES, PROCEEDINGS, 2005, 3550 : 229 - 234