PyTester: Deep Reinforcement Learning for Text-to-Testcase Generation :magic_wand:
:gear: Installation
pip install -r requirements.txt
Running
Please check the path of dataset and output directory before running.
Finetuning
This script is for the policy training step in the paper. The model in this step is the CodeT5 baseline (see baselines/Finetune CodeT5).
python finetuning.py
RL Training
This script is for the policy optimizing step in the paper. The model in this step is our PyTester (see results in the folder results).
python ppo_training.py
Inference
This inference script is used for CodeT5 and PyTester models only. For other baseline models, please checkout the folder baselines.
python inference.py
Evaluation
This evaluation script applies to all the models.
python evaluation.py
Datasets and Models
The processed APPS dataset (train and test sets) and the PyTester model can be accessed here.
The MBPP and HumanEval datasets are in the folder datasets.
The baseline result logs and predictions are in the folder baselines.
Reference
If you use our code or PyTester, please cite our PyTester Paper.
@article{takerngsaksiri2024tdd,
title={TDD Without Tears: Towards Test Case Generation from Requirements through Deep Reinforcement Learning},
author={Takerngsaksiri, Wannita and Charakorn, Rujikorn and Tantithamthavorn, Chakkrit and Li, Yuan-Fang},
journal={arXiv preprint arXiv:2401.07576},
year={2024}
}
关于
from https://github.com/awsm-research/pytester 20250513
PyTester: Deep Reinforcement Learning for Text-to-Testcase Generation :magic_wand:
:gear: Installation
Please check the path of dataset and output directory before running.
Finetuning
This script is for the policy training step in the paper. The model in this step is the CodeT5 baseline (see
baselines/Finetune CodeT5
).RL Training
This script is for the policy optimizing step in the paper. The model in this step is our PyTester (see results in the folder
results
).Inference
This inference script is used for CodeT5 and PyTester models only. For other baseline models, please checkout the folder
baselines
.Evaluation
This evaluation script applies to all the models.
The processed APPS dataset (train and test sets) and the PyTester model can be accessed here.
The MBPP and HumanEval datasets are in the folder
datasets
.The baseline result logs and predictions are in the folder
baselines
.Reference
If you use our code or PyTester, please cite our PyTester Paper.