Exploring the Effectiveness of Large Language Models in Generating Unit Tests

AI-generated keywords: Large Language Models Code Generation Unit Tests HumanEval EvoSuite SF110

AI-generated Key Points

The license of the paper does not allow us to build upon its content and the key points are generated using the paper metadata rather than the full article.

  • Study investigates the effectiveness of large language models in generating unit tests without fine-tuning
  • Focus on three generative models: CodeGen, Codex, and GPT-3.5
  • Two benchmarks used: HumanEval and Evosuite SF110
  • Evaluation criteria include compilation rates, test correctness, coverage levels, and test smells
  • Codex model achieves over 80% coverage for HumanEval dataset
  • None of the models achieve more than 2% coverage for EvoSuite SF110 benchmark
  • Generated tests exhibit test smells such as Duplicated Asserts and Empty Tests
  • Study highlights areas where improvements are needed to enhance performance in generating unit tests
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Mohammed Latif Siddiq, Joanna C. S. Santos, Ridwanul Hasan Tanvir, Noshin Ulfat, Fahmid Al Rifat, Vinicius Carvalho Lopes

Under review

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. To fill this gap, we investigated how well three generative models (CodeGen, Codex, and GPT-3.5) can generate test cases. We used two benchmarks (HumanEval and Evosuite SF110) to investigate the context generation's effect in the unit test generation process. We evaluated the models based on compilation rates, test correctness, 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.

Submitted to arXiv on 30 Apr. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2305.00418v1

This paper's license doesn't allow us to build upon its content and the summarizing process is here made with the paper's metadata rather than the article.

In the study titled "Exploring the Effectiveness of Large Language Models in Generating Unit Tests," authors Mohammed Latif Siddiq, Joanna C. S. Santos, Ridwanul Hasan Tanvir, Noshin Ulfat, Fahmid Al Rifat, and Vinicius Carvalho Lopes investigate the potential of code generation models for generating unit tests without fine-tuning. They specifically focus on three generative models: CodeGen, Codex, and GPT-3.5. The researchers utilize two benchmarks to assess the impact of context generation on the unit test generation process: HumanEval and Evosuite SF110. The evaluation criteria include compilation rates, test correctness, coverage levels and test smells. The findings reveal that while the Codex model achieves over 80% coverage for the HumanEval dataset, none of the models achieve more than 2% coverage for the EvoSuite SF110 benchmark. Additionally, generated tests exhibit test smells such as Duplicated Asserts and Empty Tests. This study sheds light on the effectiveness of large language models in generating unit tests and highlights areas where improvements are needed to enhance their performance in this domain.
Created on 27 Aug. 2023

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

The license of this specific paper does not allow us to build upon its content and the summarizing tools will be run using the paper metadata rather than the full article. However, it still does a good job, and you can also try our tools on papers with more open licenses.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.