diff --git a/README.md b/README.md index 69e7888..af56661 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ This project has the goal of writing a search based automated test generator for It is part of the Knowledge Search & Extraction - 2023 course from the Università della Svizzera italiana. In this repository, you can find the following files: -- benchmark folder: which contains the benchmark of functions under test to be instrumented + +- `benchmark/` folder: which contains the benchmark of functions under test to be instrumented Note: Feel free to modify this file according to the project's necessities. @@ -19,3 +20,31 @@ python3 -m venv env source env/bin/activate pip install -r requirements.txt ``` + +## Instrumentation (Part 1) + +To generate the instrumented code for all the files in the benchmark run the command: + +```shell +python3 ./instrument.py +``` + +The generated files are created in the directory `instrumented`. Each file name matches the file name of the +corresponding source file in `benchmark`. + +## Test case generation (Part 2 and Part 3) + +To generate test cases for all files in the benchmark run the command: + +```shell +python3 ./genetic.py +``` + +The test suite is created in the directory `tests`. One test class is generated for each function defined in the +`benchmark` package. Run the command with the `-h` options for more details on partial generation. + +The test suite can be then executed over the benchmark code with the command: + +```shell +python3 -m unittest discover tests +``` \ No newline at end of file