How Developers Implement Property-Based Tests

被引:0
作者
Corgozinho, Arthur Lisboa [1 ]
Valente, Marco Tulio [1 ]
Rocha, Henrique [2 ]
机构
[1] Univ Fed Minas Gerais, Dept Comp Sci, Belo Horizonte, MG, Brazil
[2] Loyola Univ Maryland, Dept Comp Sci, Baltimore, MD USA
来源
2023 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION, ICSME | 2023年
关键词
Property-Based Testing; Hypothesis; Testing;
D O I
10.1109/ICSME58846.2023.00049
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Property-based testing (PBT) is an interesting alternative to example-based testing where the inputs are randomly generated by the testing tool. In PBT, we check properties that always hold for any input. Despite being a promising testing category, to the best of our knowledge, we still lack studies that investigate in the wild how developers are using PBT in practice. In this paper, we report the preliminary results of a study we are conducting on the usage of PBT. We created a dataset of 30 popular Python repositories using Hypothesis (a PBT tool) and selected a random sample of 86 tests. We manually analyzed these tests to understand the most commonly implemented properties and also to reveal the most used features to create them.
引用
收藏
页码:380 / 384
页数:5
相关论文
共 8 条
  • [1] Property-Based Testing: Climbing the Stairway to Verification
    Chen, Zilin
    Rizkallah, Christine
    O'Connor, Liam
    Susarla, Partha
    Klein, Gerwin
    Heiser, Gernot
    Keller, Gabriele
    [J]. PROCEEDINGS OF THE 15TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON SOFTWARE LANGUAGE ENGINEERING, SLE 2022, 2022, : 84 - 97
  • [2] QuickCheck: A lightweight tool for random testing of Haskell programs
    Claessen, K
    Hughes, J
    [J]. ACM SIGPLAN NOTICES, 2000, 35 (09) : 268 - 279
  • [3] Cruz V. G., 2023, Journal of Systems and Software, V1, P1
  • [4] Fink George., 1997, ACM SIGSOFT Software Engineering Notes, V22, P74
  • [5] Hatfield Dodds Z., 2020, 19 PYTH SCI C, P162
  • [6] Targeted Property-Based Testing
    Loscher, Andreas
    Sagonas, Konstantinos
    [J]. PROCEEDINGS OF THE 26TH ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS (ISSTA'17), 2017, : 46 - 56
  • [7] MacIver D. R., 2019, Journal of Open Source Software, V4, P1
  • [8] Winters T., 2020, SOFTWARE ENG GOOGLE