Understanding the Characteristics of LLM-Generated Property-Based Tests in Exploring Edge Cases

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Tanaka, Hidetake, Tanaka, Haruto, Shimari, Kazumasa, Matsumoto, Kenichi
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911239329808384
author Tanaka, Hidetake
Tanaka, Haruto
Shimari, Kazumasa
Matsumoto, Kenichi
author_facet Tanaka, Hidetake
Tanaka, Haruto
Shimari, Kazumasa
Matsumoto, Kenichi
contents As Large Language Models (LLMs) increasingly generate code in software development, ensuring the quality of LLM-generated code has become important. Traditional testing approaches using Example-based Testing (EBT) often miss edge cases -- defects that occur at boundary values, special input patterns, or extreme conditions. This research investigates the characteristics of LLM-generated Property-based Testing (PBT) compared to EBT for exploring edge cases. We analyze 16 HumanEval problems where standard solutions failed on extended test cases, generating both PBT and EBT test codes using Claude-4-sonnet. Our experimental results reveal that while each method individually achieved a 68.75\% bug detection rate, combining both approaches improved detection to 81.25\%. The analysis demonstrates complementary characteristics: PBT effectively detects performance issues and edge cases through extensive input space exploration, while EBT effectively detects specific boundary conditions and special patterns. These findings suggest that a hybrid approach leveraging both testing methods can improve the reliability of LLM-generated code, providing guidance for test generation strategies in LLM-based code generation.
format Preprint
id arxiv_https___arxiv_org_abs_2510_25297
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Understanding the Characteristics of LLM-Generated Property-Based Tests in Exploring Edge Cases
Tanaka, Hidetake
Tanaka, Haruto
Shimari, Kazumasa
Matsumoto, Kenichi
Software Engineering
As Large Language Models (LLMs) increasingly generate code in software development, ensuring the quality of LLM-generated code has become important. Traditional testing approaches using Example-based Testing (EBT) often miss edge cases -- defects that occur at boundary values, special input patterns, or extreme conditions. This research investigates the characteristics of LLM-generated Property-based Testing (PBT) compared to EBT for exploring edge cases. We analyze 16 HumanEval problems where standard solutions failed on extended test cases, generating both PBT and EBT test codes using Claude-4-sonnet. Our experimental results reveal that while each method individually achieved a 68.75\% bug detection rate, combining both approaches improved detection to 81.25\%. The analysis demonstrates complementary characteristics: PBT effectively detects performance issues and edge cases through extensive input space exploration, while EBT effectively detects specific boundary conditions and special patterns. These findings suggest that a hybrid approach leveraging both testing methods can improve the reliability of LLM-generated code, providing guidance for test generation strategies in LLM-based code generation.
title Understanding the Characteristics of LLM-Generated Property-Based Tests in Exploring Edge Cases
topic Software Engineering
url https://arxiv.org/abs/2510.25297