From eadbd8f14a6d65c50317f945b91b3587ac157db3 Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Sat, 9 Dec 2023 18:27:49 +0100 Subject: [PATCH] Interim submission for parts 05,06,07 done --- README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) 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