## DOCKER SETUP 1. `docker build -t my-mutation-test .` 2. `docker run --env-file .env my-mutation-test` 3. `docker ps -a ` 4. `docker cp :/app ./app_output` ### GIST If you want to remove all containers `docker rm -f $(docker ps -aq)` ## RESULTS In docker output (copied to `app_output`), there is duplicated copied project along with extracted data under eda folder For original diploma thesis Evaluation run, see results in [eda](Evaluation/eda) folder in Evaluation directory. You can compare these with yours in `app_output\eda`. ### Mutation Analysis results - eda/MT_EDA_output.ipynb for Mutation Testing postprocessing, EDA and evaluation - eda/MA_EDA_output.ipynb for Mutation Analysis run analysis - eda/mutpy_results.csv contains data for all of the subjected files to MA - eda/per_suite.csv contains data for all of the successfully computed MT metrics per suite - eda/per_test.csv contains data for all of the successfully computed MT metrics per test - eda/per_mutant.csv contains mutant generation data For MA/MT inspected dataset (reference_data/small_data being set as default) you can find out output files for each LLM. For example, /home/xtuchyna/git/gen-test-bench-simulation/reference_data/small_data/animation/test_deepseek_coder_animation_mutpy_output.txt These outpfiles are already there for original Evaluation run, but do not worry - they get overwritten by your run (note: there are also two clean jupyter notebooks, eda/MT_EDA.ipynb and eda/MA_EDA.ipynb) ### Visualizations eda/images contain all of the mentioned visualizations in thesis ### Test data You can do MA on test data first or small subset of data. Just go to .env and change BASE_FOLDER variable (there are commented samples so you can uncomment them) ### RAPFD test Bear in mind that RAPFD testing works with modifying txt files as basis for test counter i.e. it creates `test_call_count.csv` file and deletes it during runtime It was discovered that for some reason such testing environment does not work in Docker If you want to run RAPFD testing and see expected outcomes you need to do it manually RAPFD call (from project dir) for rapfd testing contraint=5 is as follows: "mut.py", "--target", "reference_data/test_data/rapfd/rapfd.py", "--unit-test", "reference_data/test_data/rapfd/test_deepseek_coder_rapfd.py", "-m", "--hom-strategy", "BETWEEN_OPERATORS", "--order", "2", "-f", "5", "--theta", "0.99", "--eda-folder", "./eda", "--rapfd-factor", "5", ### Experimental MutPy attached Experimentally modified fork of mutpy is attached in mutpy folder. Pipenv uses this directly for pip installation mutpy into the python environment. My fork is versioned [here](https://github.com/xtuchyna/mutpy) with the PR with all of the changes [here](https://github.com/xtuchyna/mutpy/pull/1) ### VSCODE configs I have attached my vscode config file for MA runs in [text](.vscode), but in order to use it in vscode substitue the mutpy executable path with plain `mutpy` or path to your mutpy python directory. ## IMPORTANT NOTES ### Resource hogs Several files from original Rosetta dataset have been identified as resource hogs (i.e. script that runs MA breaks after a while because of memory leaks or other issues) These files are in their independent folder [resource_hogs](reference_data/resource_hogs) ### Experimental MA supported only for >=Python 3.12 Because of the implemented test order assignment in mutpy, only Python 3.12 and above is suported (it has `addDuration()` function implemented for unittest runs) Docker script is already set up with Py3.12 so you should not worry about this # Common issues Sometimes when building image, you can experience spacy download error: ERROR: failed to solve: process "/bin/sh -c pipenv run python3.12 -m spacy download en_core_web_sm" did not complete successfully: exit code: 1 You should solve it by just plainly re-running the build command.