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 条
  • [21] Security Mutants for Property-Based Testing
    Buecher, Matthias
    Oudinet, Johan
    Pretschner, Alexander
    TESTS AND PROOFS, TAP 2011, 2011, 6706 : 69 - 77
  • [22] Property-Based Testing via Proof Reconstruction
    Blanco, Roberto
    Miller, Dale
    Momigliano, Alberto
    PROCEEDINGS OF THE 21ST INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING (PPDP 2019), 2019,
  • [23] Checking Laws of the Blockchain with Property-Based Testing
    Chepurnoy, Alexander
    Rathee, Mayank
    2018 IEEE 1ST INTERNATIONAL WORKSHOP ON BLOCKCHAIN ORIENTED SOFTWARE ENGINEERING (IWBOSE), 2018, : 40 - 47
  • [24] FlinkCheck: Property-Based Testing for Apache Flink
    Espinosa, Cristina Valentina
    Martin-Martin, Enrique
    Riesco, Adrian
    Rodriguez-Hortala, Juan
    IEEE ACCESS, 2019, 7 : 150369 - 150382
  • [25] Property-Based Testing for the Robot Operating System
    Santos, Andre
    Cunha, Alcino
    Macedo, Nuno
    PROCEEDINGS OF THE 9TH ACM SIGSOFT INTERNATIONAL WORKSHOP ON AUTOMATING TEST CASE DESIGN, SELECTION, AND EVALUATION (A-TEST '18), 2018, : 56 - 62
  • [26] Automatic Property-based Testing of GraphQL APIs
    Karlsson, Stefan
    Causevic, Adnan
    Sundmark, Daniel
    2021 IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATION OF SOFTWARE TEST (AST 2021), 2021, : 1 - 10
  • [27] Property-Based Testing by Elaborating Proof Outlines
    Miller, Dale
    Momigliano, Alberto
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2024,
  • [28] Property-Based Testing: Climbing the Stairway to Verification
    Chen, Zilin
    Rizkallah, Christine
    O'Connor, Liam
    Susarla, Partha
    Klein, Gerwin
    Heiser, Gernot
    Keller, Gabriele
    PROCEEDINGS OF THE 15TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON SOFTWARE LANGUAGE ENGINEERING, SLE 2022, 2022, : 84 - 97
  • [29] From Temporal Models to Property-based Testing
    Alzahrani, Nasser
    Spichkova, Maria
    Blech, Jan Olaf
    ENASE: PROCEEDINGS OF THE 12TH INTERNATIONAL CONFERENCE ON EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING, 2017, : 241 - 246
  • [30] Genetic Algorithms as Shrinkers in Property-Based Testing
    Lo, Fang-Yi
    Chen, Chao-Hong
    Chen, Ying-ping
    PROCEEDINGS OF THE 2019 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE COMPANION (GECCCO'19 COMPANION), 2019, : 291 - 292