This is the source code repo for HITS. This repo supports you to inspect
- The detailed implementation of our prompt design (COT-procedures, instructions and examples)
- The detailed implementation of the whole working procedure
- Code to reproduce the experiment results
For step 1, we recommend you read the prompts in Dir prompts
directly. The prompts are implemented using jinja2
templates.
For step 2, we recommend you start from Dir scripts
. The working process is
- Create workspace for each method-to-test via
create_workspace.py
- Generate slices for methods-to-test via
prompt_slice_parallel.py
- Generate init test suites via
prompt_init_parallel.py
- Execute and fix the test suites via
prompt_fix_parallel.py
For step 3, you need to download the dataset provided via the private link [url]https://figshare.com/s/6f9d74f2e17c77d0700c and following these steps:
- create a directory and decompress everything provided in the link
- start a mongodb server and add everything in the dataset to the database. Each directory in the dataset corresponds to a collection for one project-to-test
- start a docker container from a conda image and login as 'root'
- Be aware that map the directory created in step 1 to the container as
/root/experiments
- Be aware that map the directory created in step 1 to the container as
- install dependencies provided in this repo to the container
- install java 17 to the container
- Edit the
config_template.ini
and save asconfig.ini
. You need to set:- mondo db info
- openai info
- Generate test cases following the procedures in step 2.
If you don't want to execute the whole generation process, we also provide the test cases already generated in the link provided above.