Pith. sign in

REVIEW 1 cited by

Using Large Language Models to Generate JUnit Tests: An Empirical Study

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2305.00418 v4 pith:DVDP5LLJ submitted 2023-04-30 cs.SE cs.LG

classification cs.SEcs.LG
keywords testcodegenerationmodelstestscoveragemodelunit
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

A code generation model generates code by taking a prompt from a code comment, existing code, or a combination of both. Although code generation models (e.g., GitHub Copilot) are increasingly being adopted in practice, it is unclear whether they can successfully be used for unit test generation without fine-tuning for a strongly typed language like Java. To fill this gap, we investigated how well three models (Codex, GPT-3.5-Turbo, and StarCoder) can generate unit tests. We used two benchmarks (HumanEval and Evosuite SF110) to investigate the effect of context generation on the unit test generation process. We evaluated the models based on compilation rates, test correctness, test coverage, and test smells. We found that the Codex model achieved above 80% coverage for the HumanEval dataset, but no model had more than 2% coverage for the EvoSuite SF110 benchmark. The generated tests also suffered from test smells, such as Duplicated Asserts and Empty Tests.

Discussion (0). Sign in to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. OpenAlex reports about 10 citations worldwide. Full citation record

  1. Leveraging GPT-4 for Vulnerability-Witnessing Unit Test Generation

    cs.SE 2025-06 conditional novelty 6.0 of 10

    GPT-4 generated syntactically valid vulnerability-witnessing unit tests in 66.5% of runs, semantically valid tests in 7.5%, and useful templates in 68.5%, suggesting a semi-automated role.

Pith tools