Skip to content

How to quickly implement an existing mutation testing tool and test it

Notifications You must be signed in to change notification settings

loicdubois/mutation-testing-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Mutation Testing

We will use Mutate++ to play around.

Preparation

  1. git clone git@github.com:nlohmann/mutate_cpp.git && cd mutate_cpp
  2. Follow the installation steps, namely:
  • Create and activate a new virtual environment for the python install, I use pyenv for that
  • In requirements.txt, replace all ">=" by "==", it will save some time adapting some scripts
  • pip install -r requirements.txt
  • python3 db_create.py
  1. cd ..
  2. Get the example project: git clone https://github.com/bast/cmake-example.git && cd cmake-example
  3. Install the necessary package to build it: sudo apt install -y build-essential cmake
  4. In CMakeList.txt, line 5, remove Fortran from the supported languages (unless you have a compiler for it installed)
  5. Check that it builds:
  • mkdir build && cd build
  • cmake ..
  • make
  1. Run the tests: ctest, it should all pass

Usage

  1. In the mutate_cpp folder, start Mutate++: python3 run.py
  2. Open the app in your browser with the URL http://127.0.0.1:5000.
  3. Follow the tutorial in mutate_cpp, just adapt the path to the source and build folders
  4. Try with another project that you can build locally

About

How to quickly implement an existing mutation testing tool and test it

Topics

Resources

Stars

Watchers

Forks