Exploring Fuzz-Driven Property-Based Testing in Pharmacovigilance Software
2025 (English)Independent thesis Advanced level (professional degree), 20 credits / 30 HE credits
Student thesis
Abstract [en]
Pharmacovigilance software, systems used to monitor the safety of pharmaceutical products, plays a critical role in safeguarding public health. Ensuring the correctness of such systems is essential, yet software testing remains a complex and time-consuming task. One approach to automated testing is Property-Based Testing (PBT), which verifies that defined properties hold for a wide range of randomly generated inputs. However, PBT suffers from key limitations: it generates inputs without learning from previous executions and requires manual implementation of custom input generators for complex data structures, an effort that is both time-consuming and error-prone. This thesis explores the use of coverage-guided fuzzing as an alternative input generation method to enhance the effectiveness of PBT, particularly within the context of pharmacovigilance software and the .NET ecosystem. The aim is to improve bug-finding capabilities through feedback-driven input exploration while simultaneously removing the need for manual generator development. To evaluate, a case study was conducted to compare traditional PBT with two fuzzing-extended variants, Coverage-Guided Property-Based Testing (CGPBT) and Structure-Aware Coverage-Guided Property-Based Testing (SAPBT). Results showed that coverage guidance significantly improved performance in scenarios with sparse input conditions, while also revealing that structure-aware mutations were essential even for relatively simple data structures. Consequently, only SAPBT was applied to preexisting property tests within the real-world pharmacovigilance system, System X. Although no actual bugs were uncovered by SAPBT, the false positive results revealed weaknesses in the definitions of the data structures used. These false positives were caused by implicit assumptions in the property tests that were not explicitly encoded in the structural definitions of the data types. However, SAPBT also encountered technical challenges, particularly with the complexity of integration. In conclusion, property-based testing enhanced with structure-aware coverage-guided input generation shows strong potential for improving test effectiveness. This thesis presents both a proof of concept and a functional prototype of the approach within the .NET ecosystem. However, the current implementation remains time-intensive, impractical for broader use, and limited to executing only a single property test at a time. To enable wider adoption, future work should focus on transforming the prototype into a more scalable and efficient tool, developed as a .NET package.
Place, publisher, year, edition, pages
2025.
Series
UPTEC X ; 25034
Keywords [en]
Software Testing, Property-Based Testing, Fuzzing, Pharmacovigilance Software
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:uu:diva-563267OAI: oai:DiVA.org:uu-563267DiVA, id: diva2:1981750
External cooperation
Uppsala Monitoring Centre
Educational program
Molecular Biotechnology Engineering Programme
Supervisors
Examiners
2025-08-132025-07-052025-08-13Bibliographically approved