TestEval-extend / README.md
wellbeing's picture
Improve dataset card: Add task categories, GitHub link, and sample usage (#2)
a9ad2b5 verified
metadata
license: apache-2.0
task_categories:
  - text-generation
tags:
  - code-generation
  - unit-test-generation
  - diffusion-llm

TestEval-extend

This is the extended dataset used in the paper DiffTester: Accelerating Unit Test Generation for Diffusion LLMs via Repetitive Pattern.

Code: https://github.com/wellbeingyang/DLM4UTG-open

Overview

Software development relies heavily on extensive unit testing, making the efficiency of automated Unit Test Generation (UTG) crucial. This dataset, TestEval-extend, is designed to evaluate diffusion large language models (dLLMs) in UTG. It extends the original TestEval benchmark by incorporating additional programming languages, including Java and C++, alongside Python, to enable comprehensive evaluation of dLLMs for UTG. The dataset supports research into accelerating UTG without compromising the quality of the generated test cases, as explored by the DiffTester framework.

Sample Usage

To get started with the associated code and reproduce the main results from the paper, follow these steps:

Installation

First, install the Python dependencies:

pip install -r requirements.txt

For Java, you need to install JDK17 and Maven. You can set them up with the following commands:

wget https://download.oracle.com/java/17/archive/jdk-17.0.12_linux-x64_bin.tar.gz
wget https://dlcdn.apache.org/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz
tar -zxvf jdk-17.0.12_linux-x64_bin.tar.gz
tar -zxvf apache-maven-3.9.11-bin.tar.gz
export JAVA_HOME=~/jdk-17.0.12
export PATH=$PATH:$JAVA_HOME/bin
export MAVEN_HOME=~/apache-maven-3.9.11
export PATH=$PATH:$MAVEN_HOME/bin

For C++, ensure your environment supports the C++20 standard.

Run Experiments

After environment preparation, you can run the following command to reproduce the main results in the paper:

./run_all.sh

Note: to enable acceleration, the evaluation code will replace generate_utils.py in the model folder with ./generate_utils_diffucoder.py. Please make sure that generate_utils.py in your model folder is writable.