Quick start
Command line quick start
Installation
Mutation testing on Apache Commons Lang example
- Download and unzip Apache Commons Lang with unit tests in this case
commons-lang3-3.5-src.zip
- Build software under test to create binary classes
mvn compile test-compile
~/Downloads/commons-lang3-3.5-src $ mvn compile test-compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Commons Lang 3.5
[INFO] ------------------------------------------------------------------------
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.162 s
[INFO] Finished at: 2016-11-13T11:22:17+01:00
[INFO] Final Memory: 28M/316M
[INFO] ------------------------------------------------------------------------
- The application classes are located under
target/classes/
and test classes are under target/test-classes/
- Change current directory to
bin
under Judy distribution
- List and description of current Judy’s parameters is available under
./judy --help
command
~/Downloads/judy-3.0.0-M1/bin $ ./judy --help
Option Description
------ -----------
-h, --help Print a brief help message.
-l, --libraries <path> Path to the library directory.
-p, --production-files <path> Path to the production classes directory.
--plugin-manager <class name> Set a plugin manager. (default: pl.edu.pwr.judy.
plugin.SimplePluginManager)
-r, --production-file-regex Regex that filters production files.
--result-format Format of the result output file. (default: json)
--result-path Location of the result output file. (default:
result.json)
-t, --test-files <path> Path to the test classes directory.
--test-file-regex Regex that filters test files.
./judy -p ~/Downloads/commons-lang3-3.5-src/target -t ~/Downloads/commons-lang3-3.5-src/target
runs mutation anaylysis of the Apache Commons Lang
~/Downloads/judy-3.0.0-M1/bin $ ./judy -p ~/Downloads/commons-lang3-3.5-src/target -t ~/Downloads/commons-lang3-3.5-src/target
11:47:50.711 [main] INFO pl.edu.pwr.judy.workflow.MutationResultProvider - Initial analysis...
11:47:50.722 [main] DEBUG pl.edu.pwr.judy.general.InitialTestRunner - Checking potential test class: org.apache.commons.lang3.ConversionTest
11:47:50.810 [main] DEBUG pl.edu.pwr.judy.general.InitialTestRunner - Running JUnit test class: org.apache.commons.lang3.ConversionTest
...
17:01:46.577 [main] INFO pl.edu.pwr.judy.workflow.MutationResultProvider - Computing mutation result... Done
17:01:46.577 [main] INFO pl.edu.pwr.judy.workflow.MutationResultProvider - Shutting down executor...
17:01:46.577 [main] INFO pl.edu.pwr.judy.workflow.MutationResultProvider - Shutting down executor... Done (true)
- The
result.json
file is by default created in current directory