Compare commits
No commits in common. "b6995b05a25db6c0ab13c11f5335f9732de93224" and "87a55200b334e72a208f67c9fe41f940193ae1bc" have entirely different histories.
b6995b05a2
...
87a55200b3
6 changed files with 25 additions and 362 deletions
|
@ -1,6 +1,6 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extensions=com.uwyn.rife2:bld-pitest:0.9.8
|
bld.extensions=com.uwyn.rife2:bld-pitest:0.9.7
|
||||||
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,MAVEN_LOCAL,RIFE2_SNAPSHOTS
|
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,MAVEN_LOCAL,RIFE2_SNAPSHOTS
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
|
|
|
@ -155,7 +155,7 @@
|
||||||
|
|
||||||
<h2>Tests examined</h2>
|
<h2>Tests examined</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()] (11 ms)</li>
|
<li>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()] (9 ms)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
|
@ -230,7 +230,7 @@
|
||||||
|
|
||||||
<h2>Tests examined</h2>
|
<h2>Tests examined</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()] (11 ms)</li>
|
<li>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()] (9 ms)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class PitestOperationBuild extends Project {
|
||||||
public PitestOperationBuild() {
|
public PitestOperationBuild() {
|
||||||
pkg = "rife.bld.extension";
|
pkg = "rife.bld.extension";
|
||||||
name = "PitestExtension";
|
name = "PitestExtension";
|
||||||
version = version(0, 9, 8);
|
version = version(0, 9, 7);
|
||||||
|
|
||||||
javaRelease = 17;
|
javaRelease = 17;
|
||||||
downloadSources = true;
|
downloadSources = true;
|
||||||
|
@ -51,7 +51,7 @@ public class PitestOperationBuild extends Project {
|
||||||
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 1)))
|
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 1)))
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2)))
|
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2)))
|
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2)))
|
||||||
.include(dependency("org.assertj", "assertj-core", version(3, 26, 0)));
|
.include(dependency("org.assertj", "assertj-core", version(3, 25, 3)));
|
||||||
|
|
||||||
javadocOperation()
|
javadocOperation()
|
||||||
.javadocOptions()
|
.javadocOptions()
|
||||||
|
|
|
@ -293,13 +293,15 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JUnit4 runners to exclude.
|
* List of globs to match against test class names. Matching tests will not be run (note if a test suite includes
|
||||||
|
* an excluded class, then it will “leak” back in).
|
||||||
*
|
*
|
||||||
* @param runners the runners
|
* @param excludedTest one ore more excluded tests
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
|
* @see #excludedTests(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedRunners(String runners) {
|
public PitestOperation excludedTests(String... excludedTest) {
|
||||||
options.put("--excludedRunners", runners);
|
options.put("--excludedTests", String.join(",", excludedTest));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,26 +309,13 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* List of globs to match against test class names. Matching tests will not be run (note if a test suite includes
|
* List of globs to match against test class names. Matching tests will not be run (note if a test suite includes
|
||||||
* an excluded class, then it will “leak” back in).
|
* an excluded class, then it will “leak” back in).
|
||||||
*
|
*
|
||||||
* @param testClasses one or more excluded tests
|
* @param excludedTests the excluded tests
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
* @see #excludedTestClasses(Collection)
|
* @see #excludedTests(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedTestClasses(String... testClasses) {
|
public PitestOperation excludedTests(Collection<String> excludedTests) {
|
||||||
options.put("--excludedTestClasses", String.join(",", testClasses));
|
options.put("--excludedTests",
|
||||||
return this;
|
String.join(",", excludedTests.stream().filter(this::isNotBlank).toList()));
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of globs to match against test class names. Matching tests will not be run (note if a test suite includes
|
|
||||||
* an excluded class, then it will “leak” back in).
|
|
||||||
*
|
|
||||||
* @param testClasses the excluded tests
|
|
||||||
* @return this operation instance
|
|
||||||
* @see #excludedTestClasses(String...)
|
|
||||||
*/
|
|
||||||
public PitestOperation excludedTestClasses(Collection<String> testClasses) {
|
|
||||||
options.put("--excludedTestClasses",
|
|
||||||
String.join(",", testClasses.stream().filter(this::isNotBlank).toList()));
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,21 +420,6 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether to create a full mutation matrix
|
|
||||||
*
|
|
||||||
* @param isFullMutationMatrix {@code true} or {@code false}
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation fullMutationMatrix(boolean isFullMutationMatrix) {
|
|
||||||
if (isFullMutationMatrix) {
|
|
||||||
options.put("--fullMutationMatrix", TRUE);
|
|
||||||
} else {
|
|
||||||
options.put("--fullMutationMatrix", FALSE);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Path to a file containing history information for incremental analysis.
|
* Path to a file containing history information for incremental analysis.
|
||||||
*
|
*
|
||||||
|
@ -519,32 +493,6 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Test methods that should be included for challenging the mutants.
|
|
||||||
*
|
|
||||||
* @param testMethod the test method
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation includedTestMethods(String testMethod) {
|
|
||||||
options.put("--includedTestMethods", testMethod);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Input encoding.
|
|
||||||
* <p>
|
|
||||||
* Default is {@code UTF-8}.
|
|
||||||
*
|
|
||||||
* @param encoding the encoding
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation inputEncoding(String encoding) {
|
|
||||||
if (isNotBlank(encoding)) {
|
|
||||||
options.put("--inputEncoding", encoding);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determines if a string is not blank.
|
* Determines if a string is not blank.
|
||||||
*/
|
*/
|
||||||
|
@ -592,17 +540,6 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Maximum number of surviving mutants to allow without throwing an error.
|
|
||||||
*
|
|
||||||
* @param maxSurviving the maximin number
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation maxSurviving(int maxSurviving) {
|
|
||||||
options.put("--maxSurviving", String.valueOf(maxSurviving));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of classpaths which should be considered to contain mutable code. If your build maintains separate output
|
* List of classpaths which should be considered to contain mutable code. If your build maintains separate output
|
||||||
* directories for tests and production classes this parameter should be set to your code output directory in order
|
* directories for tests and production classes this parameter should be set to your code output directory in order
|
||||||
|
@ -641,19 +578,6 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Mutation engine to use.
|
|
||||||
* <p>
|
|
||||||
* Defaults to {@code gregor}
|
|
||||||
*
|
|
||||||
* @param engine the engine
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation mutationEngine(String engine) {
|
|
||||||
options.put("--mutationEngine", engine);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mutation score threshold below which the build will fail. This is an integer percent (0-100) that represents the
|
* Mutation score threshold below which the build will fail. This is an integer percent (0-100) that represents the
|
||||||
* fraction of killed mutations out of all mutations.
|
* fraction of killed mutations out of all mutations.
|
||||||
|
@ -671,17 +595,6 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Maximum number of mutations to include.
|
|
||||||
*
|
|
||||||
* @param size the size
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation mutationUnitSize(int size) {
|
|
||||||
options.put("--mutationUnitSize", String.valueOf(size));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of mutation operators.
|
* List of mutation operators.
|
||||||
*
|
*
|
||||||
|
@ -722,7 +635,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of formats in which to write mutation results as the mutations are analysed.
|
* Comma separated list of formats in which to write mutation results as the mutations are analysed.
|
||||||
* Supported formats are {@code HTML}, {@code XML}, {@code CSV}.
|
* Supported formats are {@code HTML}, {@code XML}, {@code CSV}.
|
||||||
* <p>
|
* <p>
|
||||||
* Defaults to {@code HTML}.
|
* Defaults to {@code HTML}.
|
||||||
|
@ -738,7 +651,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of formats in which to write mutation results as the mutations are analysed.
|
* Comma separated list of formats in which to write mutation results as the mutations are analysed.
|
||||||
* Supported formats are {@code HTML}, {@code XML}, {@code CSV}.
|
* Supported formats are {@code HTML}, {@code XML}, {@code CSV}.
|
||||||
* <p>
|
* <p>
|
||||||
* Defaults to {@code HTML}.
|
* Defaults to {@code HTML}.
|
||||||
|
@ -752,29 +665,6 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom plugin properties.
|
|
||||||
*
|
|
||||||
* @param key the key
|
|
||||||
* @param value the value
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation pluginConfiguration(String key, String value) {
|
|
||||||
options.put("--pluginConfiguration", key + '=' + value);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Project base.
|
|
||||||
*
|
|
||||||
* @param file the file
|
|
||||||
* @return this operations instance
|
|
||||||
*/
|
|
||||||
public PitestOperation projectBase(String file) {
|
|
||||||
options.put("--projectBase", file);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output directory for the reports.
|
* Output directory for the reports.
|
||||||
*
|
*
|
||||||
|
@ -866,14 +756,14 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of globs can be supplied to this parameter to limit the tests available to be run.
|
* A comma separated list of globs can be supplied to this parameter to limit the tests available to be run.
|
||||||
* If this parameter is not supplied then any test fixture that matched targetClasses may be used, it is however
|
* If this parameter is not supplied then any test fixture that matched targetClasses may be used, it is however
|
||||||
* recommended that this parameter is always explicitly set.
|
* recommended that this parameter is always explicitly set.
|
||||||
* <p>
|
* <p>
|
||||||
* This parameter can be used to point PIT to a top level suite or suites. Custom suites such as
|
* This parameter can be used to point PIT to a top level suite or suites. Custom suites such as
|
||||||
* <a href="https://github.com/takari/takari-cpsuite"></a>ClassPathSuite</a> are supported.
|
* <a href="https://github.com/takari/takari-cpsuite"></a>ClassPathSuite</a> are supported.
|
||||||
*
|
*
|
||||||
* @param test one or more tests
|
* @param test one ore more tests
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
* @see #targetTests(Collection)
|
* @see #targetTests(Collection)
|
||||||
*/
|
*/
|
||||||
|
@ -883,7 +773,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of globs can be supplied to this parameter to limit the tests available to be run.
|
* A comma separated list of globs can be supplied to this parameter to limit the tests available to be run.
|
||||||
* If this parameter is not supplied then any test fixture that matched targetClasses may be used, it is however
|
* If this parameter is not supplied then any test fixture that matched targetClasses may be used, it is however
|
||||||
* recommended that this parameter is always explicitly set.
|
* recommended that this parameter is always explicitly set.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -899,17 +789,6 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Test strength score below which to throw an error.
|
|
||||||
*
|
|
||||||
* @param threshold the threshold
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation testStrengthThreshold(int threshold) {
|
|
||||||
options.put("--testStrengthThreshold", String.valueOf(threshold));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of threads to use when mutation testing.
|
* The number of threads to use when mutation testing.
|
||||||
*
|
*
|
||||||
|
@ -999,17 +878,4 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The verbosity of output.
|
|
||||||
* <p>
|
|
||||||
* Defaults to {@code DEFAULT}
|
|
||||||
*
|
|
||||||
* @param verbosity the verbosity
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public PitestOperation verbosity(String verbosity) {
|
|
||||||
options.put("--verbosity", verbosity);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,121 +57,6 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--avoidCallsTo")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options.get("--avoidCallsTo")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void checkAllParameters() {
|
|
||||||
var params = List.of(
|
|
||||||
"--argLine",
|
|
||||||
"--avoidCallsTo",
|
|
||||||
"--classPath",
|
|
||||||
"--classPathFile",
|
|
||||||
"--coverageThreshold",
|
|
||||||
"--detectInlinedCode",
|
|
||||||
"--excludedClasses",
|
|
||||||
"--excludedGroups",
|
|
||||||
"--excludedMethods",
|
|
||||||
"--excludedRunners",
|
|
||||||
"--excludedTestClasses",
|
|
||||||
"--exportLineCoverage",
|
|
||||||
"--failWhenNoMutations",
|
|
||||||
"--features",
|
|
||||||
"--fullMutationMatrix",
|
|
||||||
"--historyInputLocation",
|
|
||||||
"--historyOutputLocation",
|
|
||||||
"--includeLaunchClasspath",
|
|
||||||
"--includedGroups",
|
|
||||||
"--includedTestMethods",
|
|
||||||
"--inputEncoding",
|
|
||||||
"--jvmArgs",
|
|
||||||
"--jvmPath",
|
|
||||||
"--maxSurviving",
|
|
||||||
"--mutableCodePaths",
|
|
||||||
"--mutationEngine",
|
|
||||||
"--mutationThreshold",
|
|
||||||
"--mutationUnitSize",
|
|
||||||
"--mutators",
|
|
||||||
"--outputEncoding",
|
|
||||||
"--outputFormats",
|
|
||||||
"--pluginConfiguration",
|
|
||||||
"--projectBase",
|
|
||||||
"--reportDir",
|
|
||||||
"--skipFailingTests",
|
|
||||||
"--sourceDirs",
|
|
||||||
"--targetClasses",
|
|
||||||
"--targetTests",
|
|
||||||
"--testStrengthThreshold",
|
|
||||||
"--threads",
|
|
||||||
"--timeoutConst",
|
|
||||||
"--timeoutFactor",
|
|
||||||
"--timestampedReports",
|
|
||||||
"--useClasspathJar",
|
|
||||||
"--verbose",
|
|
||||||
"--verbosity"
|
|
||||||
);
|
|
||||||
|
|
||||||
var args = new PitestOperation()
|
|
||||||
.fromProject(new BaseProject())
|
|
||||||
.argLine(FOO)
|
|
||||||
.avoidCallsTo(FOO, BAR)
|
|
||||||
.classPath(FOO, BAR)
|
|
||||||
.classPathFile(FOO)
|
|
||||||
.coverageThreshold(0)
|
|
||||||
.detectInlinedCode(false)
|
|
||||||
.excludedClasses("class")
|
|
||||||
.excludedClasses(List.of(FOO, BAR))
|
|
||||||
.excludedGroups("group")
|
|
||||||
.excludedGroups(List.of(FOO, BAR))
|
|
||||||
.excludedMethods("method")
|
|
||||||
.excludedMethods(List.of(FOO, BAR))
|
|
||||||
.excludedTestClasses("test")
|
|
||||||
.excludedRunners("runners")
|
|
||||||
.exportLineCoverage(true)
|
|
||||||
.failWhenNoMutations(true)
|
|
||||||
.features("feature")
|
|
||||||
.fullMutationMatrix(true)
|
|
||||||
.historyInputLocation("inputLocation")
|
|
||||||
.historyOutputLocation("outputLocation")
|
|
||||||
.includeLaunchClasspath(true)
|
|
||||||
.includedGroups("group")
|
|
||||||
.includedTestMethods("method")
|
|
||||||
.inputEncoding("encoding")
|
|
||||||
.jvmArgs("-XX:+UnlogregckDiagnosticVMOptions")
|
|
||||||
.jvmPath("path")
|
|
||||||
.maxSurviving(1)
|
|
||||||
.mutableCodePaths("codePaths")
|
|
||||||
.mutationEngine("engine")
|
|
||||||
.mutationThreshold(0)
|
|
||||||
.mutationUnitSize(1)
|
|
||||||
.mutators(List.of(FOO, BAR))
|
|
||||||
.outputEncoding("encoding")
|
|
||||||
.outputFormats("json")
|
|
||||||
.pluginConfiguration("key", "value")
|
|
||||||
.projectBase("base")
|
|
||||||
.reportDir("dir")
|
|
||||||
.skipFailingTests(true)
|
|
||||||
.targetClasses("class")
|
|
||||||
.targetTests("test")
|
|
||||||
.testStrengthThreshold(0)
|
|
||||||
.threads(0)
|
|
||||||
.timeoutConst(0)
|
|
||||||
.timeoutFactor(0)
|
|
||||||
.timestampedReports(true)
|
|
||||||
.useClasspathJar(true)
|
|
||||||
.verbose(true)
|
|
||||||
.verbosity("default")
|
|
||||||
.executeConstructProcessCommandList();
|
|
||||||
|
|
||||||
for (var p : params) {
|
|
||||||
var found = false;
|
|
||||||
for (var a : args) {
|
|
||||||
if (a.startsWith(p)) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assertThat(found).as(p + " not found.").isTrue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void classPath() {
|
void classPath() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
|
@ -258,25 +143,17 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--excludedMethods")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options.get("--excludedMethods")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void excludedRunners() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new BaseProject())
|
|
||||||
.excludedRunners(FOO);
|
|
||||||
assertThat(op.options.get("--excludedRunners")).isEqualTo(FOO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void excludedTests() {
|
void excludedTests() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedTestClasses(FOO, BAR);
|
.excludedTests(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedTestClasses")).isEqualTo(FOOBAR);
|
assertThat(op.options.get("--excludedTests")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedTestClasses(List.of(FOO, BAR));
|
.excludedTests(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedTestClasses")).as("as list").isEqualTo(FOOBAR);
|
assertThat(op.options.get("--excludedTests")).as("as list").isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -369,14 +246,6 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--features")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options.get("--features")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void fullMutationMatrix() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new BaseProject())
|
|
||||||
.fullMutationMatrix(true);
|
|
||||||
assertThat(op.options.get("--fullMutationMatrix")).isEqualTo(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void historyInputLocation() {
|
void historyInputLocation() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
|
@ -419,22 +288,6 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--includedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options.get("--includedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void includedTestMethods() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new Project())
|
|
||||||
.includedTestMethods(FOO);
|
|
||||||
assertThat(op.options.get("--includedTestMethods")).isEqualTo(FOO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void inputEncoding() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new BaseProject())
|
|
||||||
.inputEncoding(FOO);
|
|
||||||
assertThat(op.options.get("--inputEncoding")).isEqualTo(FOO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void jvmArgs() {
|
void jvmArgs() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
|
@ -456,14 +309,6 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--jvmPath")).isEqualTo(FOO);
|
assertThat(op.options.get("--jvmPath")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void maxSurviving() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new Project())
|
|
||||||
.maxSurviving(1);
|
|
||||||
assertThat(op.options.get("--maxSurviving")).isEqualTo("1");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void mutableCodePaths() {
|
void mutableCodePaths() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
|
@ -477,14 +322,6 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--mutableCodePaths")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options.get("--mutableCodePaths")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void mutationEngine() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new Project())
|
|
||||||
.mutationEngine(FOO);
|
|
||||||
assertThat(op.options.get("--mutationEngine")).isEqualTo(FOO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void mutationThreshold() {
|
void mutationThreshold() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
|
@ -498,14 +335,6 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--mutationThreshold")).isNull();
|
assertThat(op.options.get("--mutationThreshold")).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void mutationUnitSize() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new Project())
|
|
||||||
.mutationUnitSize(2);
|
|
||||||
assertThat(op.options.get("--mutationUnitSize")).isEqualTo("2");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void mutators() {
|
void mutators() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
|
@ -540,22 +369,6 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--outputFormats")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options.get("--outputFormats")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void pluginConfiguration() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new Project())
|
|
||||||
.pluginConfiguration(FOO, BAR);
|
|
||||||
assertThat(op.options.get("--pluginConfiguration")).isEqualTo(FOO + "=" + BAR);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void projectBase() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new Project())
|
|
||||||
.projectBase(FOO);
|
|
||||||
assertThat(op.options.get("--projectBase")).isEqualTo(FOO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void reportDir() {
|
void reportDir() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
|
@ -616,14 +429,6 @@ class PitestOperationTest {
|
||||||
assertThat(op.options.get("--targetTests")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options.get("--targetTests")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void testStrengthThreshold() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new Project())
|
|
||||||
.testStrengthThreshold(6);
|
|
||||||
assertThat(op.options.get("--testStrengthThreshold")).isEqualTo("6");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void threads() {
|
void threads() {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
|
@ -686,12 +491,4 @@ class PitestOperationTest {
|
||||||
.verbose(false);
|
.verbose(false);
|
||||||
assertThat(op.options.get("--verbose")).isEqualTo(FALSE);
|
assertThat(op.options.get("--verbose")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void verbosity() {
|
|
||||||
var op = new PitestOperation()
|
|
||||||
.fromProject(new Project())
|
|
||||||
.verbosity(FOO);
|
|
||||||
assertThat(op.options.get("--verbosity")).isEqualTo(FOO);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue