Property-based Testing within ML Projects: an Empirical Study

Research output: Chapter in Book/Report/Conference proceedingConference paper

19 Downloads (Pure)

Abstract

In property-based testing (PBT), developers specify properties that they expect the system under test to hold. The PBT tool generates random inputs for the system and tests for each of these inputs whether the given property holds. An advantage of this approach over testing a set of manually defined example inputs is that it enables a higher code coverage.

Machine learning (ML) projects, however, often have to process large amounts of diverse data, both for training a model and afterwards, when the trained model is deployed. Generating a sufficient amount of diverse data for the property-based tests is therefore challenging.

In this paper, we present the results of a preliminary study in which we examined a dataset of 58 open-source ML projects that have dependencies on the popular PBT library Hypothesis, to identify issues faced by developers writing property-based tests. For a subset of 28 open-source ML projects, we study the property-based tests in detail and report on the part of the ML project that is being tested as well as on the adopted data generation strategies. This way, we aim to identify issues in porting current PBT techniques to ML projects so that they can be addressed in the future.
Original languageEnglish
Title of host publication2024 IEEE International Conference on Software Maintenance and Evolution (ICSME)
PublisherIEEE
Pages648-653
Number of pages6
Volume40th
Edition2024
ISBN (Electronic)979-8-3503-9568-6
Publication statusPublished - Oct 2024
Event40th International Conference on Software Maintenance and Evolution (ICSME 2024) - Flagstaff, United States
Duration: 6 Oct 202411 Oct 2024
Conference number: 40
https://conf.researchr.org/track/icsme-2024/

Publication series

Name
ISSN (Electronic)2576-3148

Conference

Conference40th International Conference on Software Maintenance and Evolution (ICSME 2024)
Abbreviated titleICSME
Country/TerritoryUnited States
CityFlagstaff
Period6/10/2411/10/24
Internet address

Keywords

  • property-based testing
  • machine learning projects
  • testing machine learning
  • Empirical Study
  • software testing

Cite this