This document describes Judy plugin for Gradle tool.
property - optional) configuration property
method) adding argument to call Judy
string) argument namestring) argument valueTo quickly use Judy in Gradle it should add plugin to build.gradle file.
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath "pl.edu.pwr.judy:judy-gradle:3.0.0-M1"
}
}
apply plugin: 'pl.edu.pwr.judy'
To run Judy call judyAnalyze task. Judy needs compiled classes and tests so build is recommended too.
gradlew build judyAnalyze
To add the Judy parameter it should add judy property and then add parameter methods.
The first argument of parameter method is name of argument, the second is its value.
It is possible using short name of parameter.
apply plugin: 'pl.edu.pwr.judy'
judy {
parameter("production-files", "${project.buildDir.absolutePath}/classes/main")
parameter("test-files", "${project.buildDir.absolutePath}/classes/test")
parameter("result-path", "${project.buildDir.absolutePath}/JudyResult.json")
}
Arguments: production-files, test-files and result-path are set by default.
Full list of arguments is available in judyHelp task.
judyHelp taskExample result of judyHelp task
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.
Example configuration and result of mutation testing using Judy Gradle Plugin
build.gradle file: ModifiedBuild.gradle