Compare commits
3 commits
75946b97b0
...
6afb669a0b
Author | SHA1 | Date | |
---|---|---|---|
6afb669a0b | |||
8a5b9c9431 | |||
6faea5a8f4 |
19 changed files with 74 additions and 1152 deletions
7
.github/workflows/bld.yml
vendored
7
.github/workflows/bld.yml
vendored
|
@ -22,11 +22,8 @@ jobs:
|
|||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
|
||||
- name: Grant execute permission for bld
|
||||
run: chmod +x bld
|
||||
|
||||
- name: Download the dependencies
|
||||
- name: Download dependencies
|
||||
run: ./bld download
|
||||
|
||||
- name: Run tests with bld
|
||||
- name: Run tests
|
||||
run: ./bld compile test
|
||||
|
|
4
.idea/libraries/bld.xml
generated
4
.idea/libraries/bld.xml
generated
|
@ -2,12 +2,12 @@
|
|||
<library name="bld">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.0-SNAPSHOT.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1-sources.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.0-SNAPSHOT-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||
|
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -9,7 +9,7 @@
|
|||
],
|
||||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.project.referencedLibraries": [
|
||||
"${HOME}/.bld/dist/bld-1.9.1.jar",
|
||||
"${HOME}/.bld/dist/bld-2.0.0-SNAPSHOT.jar",
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
||||
|
|
5
examples/.gitignore
vendored
5
examples/.gitignore
vendored
|
@ -52,4 +52,7 @@ atlassian-ide-plugin.xml
|
|||
.idea/sonarlint/
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
.idea/httpRequests
|
||||
|
||||
|
||||
reports
|
4
examples/.idea/libraries/bld.xml
generated
4
examples/.idea/libraries/bld.xml
generated
|
@ -2,12 +2,12 @@
|
|||
<library name="bld">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.0-SNAPSHOT.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1-sources.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.0-SNAPSHOT-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||
|
|
2
examples/.vscode/settings.json
vendored
2
examples/.vscode/settings.json
vendored
|
@ -9,7 +9,7 @@
|
|||
],
|
||||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.project.referencedLibraries": [
|
||||
"${HOME}/.bld/dist/bld-1.9.1.jar",
|
||||
"${HOME}/.bld/dist/bld-2.0.0-SNAPSHOT.jar",
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.downloadLocation=
|
||||
bld.extension-pitest=com.uwyn.rife2:bld-pitest:0.9.9-SNAPSHOT
|
||||
bld.extension-pitest=com.uwyn.rife2:bld-pitest:0.9.8
|
||||
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,MAVEN_LOCAL,RIFE2_SNAPSHOTS
|
||||
bld.sourceDirectories=
|
||||
bld.version=1.9.1
|
||||
bld.version=2.0.0-SNAPSHOT
|
||||
|
|
|
@ -1,163 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="../style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<h1>ExamplesLib.java</h1>
|
||||
|
||||
<table class="src">
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@4d02f94e_1'/>
|
||||
1
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4d02f94e_1'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''>package com.example;</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@4d02f94e_2'/>
|
||||
2
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4d02f94e_2'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''></span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='covered'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@4d02f94e_3'/>
|
||||
3
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4d02f94e_3'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class='covered'><pre><span class=''>public class ExamplesLib {</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@4d02f94e_4'/>
|
||||
4
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4d02f94e_4'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''> public String getMessage() {</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='covered'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@4d02f94e_5'/>
|
||||
5
|
||||
</td>
|
||||
<td class='killed'>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4d02f94e_5'>1</a>
|
||||
<span>
|
||||
1. getMessage : replaced return value with "" for com/example/ExamplesLib::getMessage → KILLED<br/>
|
||||
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class='covered'><pre><span class='killed'> return "Hello World!";</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@4d02f94e_6'/>
|
||||
6
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4d02f94e_6'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''> }</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@4d02f94e_7'/>
|
||||
7
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4d02f94e_7'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''>}</span></pre></td></tr>
|
||||
|
||||
|
||||
|
||||
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
|
||||
|
||||
<tr>
|
||||
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@4d02f94e_5'>5</a></td>
|
||||
<td></td>
|
||||
<td>
|
||||
|
||||
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@4d02f94e_5'/>
|
||||
|
||||
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getMessage<br/><b>Killed by : </b>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()]</span></span> replaced return value with "" for com/example/ExamplesLib::getMessage → KILLED</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<h2>Active mutators</h2>
|
||||
<ul>
|
||||
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
|
||||
<li class='mutator'>EMPTY_RETURNS</li>
|
||||
<li class='mutator'>FALSE_RETURNS</li>
|
||||
<li class='mutator'>INCREMENTS</li>
|
||||
<li class='mutator'>INVERT_NEGS</li>
|
||||
<li class='mutator'>MATH</li>
|
||||
<li class='mutator'>NEGATE_CONDITIONALS</li>
|
||||
<li class='mutator'>NULL_RETURNS</li>
|
||||
<li class='mutator'>PRIMITIVE_RETURNS</li>
|
||||
<li class='mutator'>TRUE_RETURNS</li>
|
||||
<li class='mutator'>VOID_METHOD_CALLS</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Tests examined</h2>
|
||||
<ul>
|
||||
<li>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()] (9 ms)</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
|
||||
Report generated by <a href='https://pitest.org'>PIT</a>
|
|
@ -1,238 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="../style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<h1>ExamplesTest.java</h1>
|
||||
|
||||
<table class="src">
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_1'/>
|
||||
1
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_1'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''>package com.example;</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_2'/>
|
||||
2
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_2'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''></span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_3'/>
|
||||
3
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_3'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''>import org.junit.jupiter.api.Test;</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_4'/>
|
||||
4
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_4'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''></span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_5'/>
|
||||
5
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_5'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''>import static org.junit.jupiter.api.Assertions.assertEquals;</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_6'/>
|
||||
6
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_6'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''></span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='covered'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_7'/>
|
||||
7
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_7'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class='covered'><pre><span class=''>public class ExamplesTest {</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_8'/>
|
||||
8
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_8'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''> @Test</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_9'/>
|
||||
9
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_9'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''> void verifyHello() {</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='covered'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_10'/>
|
||||
10
|
||||
</td>
|
||||
<td class='survived'>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_10'>1</a>
|
||||
<span>
|
||||
1. verifyHello : removed call to org/junit/jupiter/api/Assertions::assertEquals → SURVIVED<br/>
|
||||
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class='covered'><pre><span class='survived'> assertEquals("Hello World!", new ExamplesLib().getMessage());</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='covered'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_11'/>
|
||||
11
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_11'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class='covered'><pre><span class=''> }</span></pre></td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='na'>
|
||||
<a name='org.pitest.mutationtest.report.html.SourceFile@446293d_12'/>
|
||||
12
|
||||
</td>
|
||||
<td class=''>
|
||||
<span class='pop'>
|
||||
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@446293d_12'></a>
|
||||
<span>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class=''><pre><span class=''>}</span></pre></td></tr>
|
||||
|
||||
|
||||
|
||||
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
|
||||
|
||||
<tr>
|
||||
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@446293d_10'>10</a></td>
|
||||
<td></td>
|
||||
<td>
|
||||
|
||||
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@446293d_10'/>
|
||||
|
||||
<p class='SURVIVED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>verifyHello<br/><b>Killed by : </b>none</span></span> removed call to org/junit/jupiter/api/Assertions::assertEquals → SURVIVED</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<h2>Active mutators</h2>
|
||||
<ul>
|
||||
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
|
||||
<li class='mutator'>EMPTY_RETURNS</li>
|
||||
<li class='mutator'>FALSE_RETURNS</li>
|
||||
<li class='mutator'>INCREMENTS</li>
|
||||
<li class='mutator'>INVERT_NEGS</li>
|
||||
<li class='mutator'>MATH</li>
|
||||
<li class='mutator'>NEGATE_CONDITIONALS</li>
|
||||
<li class='mutator'>NULL_RETURNS</li>
|
||||
<li class='mutator'>PRIMITIVE_RETURNS</li>
|
||||
<li class='mutator'>TRUE_RETURNS</li>
|
||||
<li class='mutator'>VOID_METHOD_CALLS</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Tests examined</h2>
|
||||
<ul>
|
||||
<li>com.example.ExamplesTest.[engine:junit-jupiter]/[class:com.example.ExamplesTest]/[method:verifyHello()] (9 ms)</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
|
||||
Report generated by <a href='https://pitest.org'>PIT</a>
|
|
@ -1,66 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="../style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Pit Test Coverage Report</h1>
|
||||
<h2>Package Summary</h2>
|
||||
<h3>com.example</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Number of Classes</th>
|
||||
<th>Line Coverage</th>
|
||||
<th>Mutation Coverage</th>
|
||||
<th>Test Strength</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">5/5</div></div></td>
|
||||
<td>50% <div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
||||
<td>50% <div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<h3>Breakdown by Class</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Line Coverage</th>
|
||||
<th>Mutation Coverage</th>
|
||||
<th>Test Strength</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td><a href="./ExamplesLib.java.html">ExamplesLib.java</a></td>
|
||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">2/2</div></div></td>
|
||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">1/1</div></div></td>
|
||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">1/1</div></div></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="./ExamplesTest.java.html">ExamplesTest.java</a></td>
|
||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">3/3</div></div></td>
|
||||
<td><div class="coverage_percentage">0% </div><div class="coverage_bar"><div class="coverage_complete width-0"></div><div class="coverage_legend">0/1</div></div></td>
|
||||
<td><div class="coverage_percentage">0% </div><div class="coverage_bar"><div class="coverage_complete width-0"></div><div class="coverage_legend">0/1</div></div></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
Report generated by <a href='https://pitest.org'>PIT</a>
|
|
@ -1,65 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Pit Test Coverage Report</h1>
|
||||
|
||||
<h3>Project Summary</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Number of Classes</th>
|
||||
<th>Line Coverage</th>
|
||||
<th>Mutation Coverage</th>
|
||||
<th>Test Strength</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">5/5</div></div></td>
|
||||
<td>50% <div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
||||
<td>50% <div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<h3>Breakdown by Package</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number of Classes</th>
|
||||
<th>Line Coverage</th>
|
||||
<th>Mutation Coverage</th>
|
||||
<th>Test Strength</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td><a href="./com.example/index.html">com.example</a></td>
|
||||
<td>2</td>
|
||||
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">5/5</div></div></td>
|
||||
<td><div class="coverage_percentage">50% </div><div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
||||
<td><div class="coverage_percentage">50% </div><div class="coverage_bar"><div class="coverage_complete width-50"></div><div class="coverage_legend">1/2</div></div></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
Report generated by <a href='https://pitest.org'>PIT</a>
|
|
@ -1,563 +0,0 @@
|
|||
html, body, div, span, p, blockquote, pre {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
font-size: 100%;
|
||||
font-family: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
body{
|
||||
line-height: 1;
|
||||
color: black;
|
||||
background: white;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.src {
|
||||
border: 1px solid #dddddd;
|
||||
padding-top: 10px;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
font-family: Consolas, Courier, monospace;
|
||||
}
|
||||
|
||||
.covered, .COVERED {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
.uncovered, .UNCOVERED {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
.killed, .KILLED {
|
||||
background-color: #aaffaa;
|
||||
}
|
||||
|
||||
.survived, .SURVIVED {
|
||||
background-color: #ffaaaa;
|
||||
}
|
||||
|
||||
.uncertain, .UNCERTAIN {
|
||||
background-color: #dde7ef;
|
||||
}
|
||||
|
||||
.run_error, .RUN_ERROR {
|
||||
background-color: #dde7ef;
|
||||
}
|
||||
|
||||
.na {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.timed_out, .TIMED_OUT {
|
||||
background-color: #dde7ef;
|
||||
}
|
||||
|
||||
.non_viable, .NON_VIABLE {
|
||||
background-color: #aaffaa;
|
||||
}
|
||||
|
||||
.memory_error, .MEMORY_ERROR {
|
||||
background-color: #dde7ef;
|
||||
}
|
||||
|
||||
.not_started, .NO_STARTED {
|
||||
background-color: #dde7ef; color : red
|
||||
}
|
||||
|
||||
.no_coverage, .NO_COVERAGE {
|
||||
background-color: #ffaaaa;
|
||||
}
|
||||
|
||||
.tests {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mutees {
|
||||
float: right;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.unit {
|
||||
padding-top: 20px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.coverage_bar {
|
||||
display: inline-block;
|
||||
height: 1.1em;
|
||||
width: 130px;
|
||||
background: #FAA;
|
||||
margin: 0 5px;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #AAA;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.coverage_complete {
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
background: #DFD;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.coverage_legend {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.line, .mut {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.coverage_percentage {
|
||||
display: inline-block;
|
||||
width: 3em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.pop {
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.pop strong {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.pop {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.pop span {
|
||||
z-index: 10;
|
||||
display: none;
|
||||
padding: 14px 20px;
|
||||
margin-top: -30px;
|
||||
margin-left: 28px;
|
||||
width: 800px;
|
||||
line-height: 16px;
|
||||
word-wrap: break-word;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-box-shadow: 5px 5px 8px #CCC;
|
||||
-webkit-box-shadow: 5px 5px 8px #CCC;
|
||||
box-shadow: 5px 5px 8px #CCC;
|
||||
}
|
||||
|
||||
.pop:hover span {
|
||||
display: inline;
|
||||
position: absolute;
|
||||
color: #111;
|
||||
border: 1px solid #DCA;
|
||||
background: #fffAF0;
|
||||
}
|
||||
|
||||
.width-1 {
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.width-2 {
|
||||
width: 2%;
|
||||
}
|
||||
|
||||
.width-3 {
|
||||
width: 3%;
|
||||
}
|
||||
|
||||
.width-4 {
|
||||
width: 4%;
|
||||
}
|
||||
|
||||
.width-5 {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.width-6 {
|
||||
width: 6%;
|
||||
}
|
||||
|
||||
.width-7 {
|
||||
width: 7%;
|
||||
}
|
||||
|
||||
.width-8 {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.width-9 {
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.width-10 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.width-11 {
|
||||
width: 11%;
|
||||
}
|
||||
|
||||
.width-12 {
|
||||
width: 12%;
|
||||
}
|
||||
|
||||
.width-13 {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.width-14 {
|
||||
width: 14%;
|
||||
}
|
||||
|
||||
.width-15 {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.width-16 {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
.width-17 {
|
||||
width: 17%;
|
||||
}
|
||||
|
||||
.width-18 {
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
.width-19 {
|
||||
width: 19%;
|
||||
}
|
||||
|
||||
.width-20 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.width-21 {
|
||||
width: 21%;
|
||||
}
|
||||
|
||||
.width-22 {
|
||||
width: 22%;
|
||||
}
|
||||
|
||||
.width-23 {
|
||||
width: 23%;
|
||||
}
|
||||
|
||||
.width-24 {
|
||||
width: 24%;
|
||||
}
|
||||
|
||||
.width-25 {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.width-26 {
|
||||
width: 26%;
|
||||
}
|
||||
|
||||
.width-27 {
|
||||
width: 27%;
|
||||
}
|
||||
|
||||
.width-28 {
|
||||
width: 28%;
|
||||
}
|
||||
|
||||
.width-29 {
|
||||
width: 29%;
|
||||
}
|
||||
|
||||
.width-30 {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.width-31 {
|
||||
width: 31%;
|
||||
}
|
||||
|
||||
.width-32 {
|
||||
width: 32%;
|
||||
}
|
||||
|
||||
.width-33 {
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.width-34 {
|
||||
width: 34%;
|
||||
}
|
||||
|
||||
.width-35 {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.width-36 {
|
||||
width: 36%;
|
||||
}
|
||||
|
||||
.width-37 {
|
||||
width: 37%;
|
||||
}
|
||||
|
||||
.width-38 {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
.width-39 {
|
||||
width: 39%;
|
||||
}
|
||||
|
||||
.width-40 {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.width-41 {
|
||||
width: 41%;
|
||||
}
|
||||
|
||||
.width-42 {
|
||||
width: 42%;
|
||||
}
|
||||
|
||||
.width-43 {
|
||||
width: 43%;
|
||||
}
|
||||
|
||||
.width-44 {
|
||||
width: 44%;
|
||||
}
|
||||
|
||||
.width-45 {
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.width-46 {
|
||||
width: 46%;
|
||||
}
|
||||
|
||||
.width-47 {
|
||||
width: 47%;
|
||||
}
|
||||
|
||||
.width-48 {
|
||||
width: 48%;
|
||||
}
|
||||
|
||||
.width-49 {
|
||||
width: 49%;
|
||||
}
|
||||
|
||||
.width-50 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.width-51 {
|
||||
width: 51%;
|
||||
}
|
||||
|
||||
.width-52 {
|
||||
width: 52%;
|
||||
}
|
||||
|
||||
.width-53 {
|
||||
width: 53%;
|
||||
}
|
||||
|
||||
.width-54 {
|
||||
width: 54%;
|
||||
}
|
||||
|
||||
.width-55 {
|
||||
width: 55%;
|
||||
}
|
||||
|
||||
.width-56 {
|
||||
width: 56%;
|
||||
}
|
||||
|
||||
.width-57 {
|
||||
width: 57%;
|
||||
}
|
||||
|
||||
.width-58 {
|
||||
width: 58%;
|
||||
}
|
||||
|
||||
.width-59 {
|
||||
width: 59%;
|
||||
}
|
||||
|
||||
.width-60 {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.width-61 {
|
||||
width: 61%;
|
||||
}
|
||||
|
||||
.width-62 {
|
||||
width: 62%;
|
||||
}
|
||||
|
||||
.width-63 {
|
||||
width: 63%;
|
||||
}
|
||||
|
||||
.width-64 {
|
||||
width: 64%;
|
||||
}
|
||||
|
||||
.width-65 {
|
||||
width: 65%;
|
||||
}
|
||||
|
||||
.width-66 {
|
||||
width: 66%;
|
||||
}
|
||||
|
||||
.width-67 {
|
||||
width: 67%;
|
||||
}
|
||||
|
||||
.width-68 {
|
||||
width: 68%;
|
||||
}
|
||||
|
||||
.width-69 {
|
||||
width: 69%;
|
||||
}
|
||||
|
||||
.width-70 {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.width-71 {
|
||||
width: 71%;
|
||||
}
|
||||
|
||||
.width-72 {
|
||||
width: 72%;
|
||||
}
|
||||
|
||||
.width-73 {
|
||||
width: 73%;
|
||||
}
|
||||
|
||||
.width-74 {
|
||||
width: 74%;
|
||||
}
|
||||
|
||||
.width-75 {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.width-76 {
|
||||
width: 76%;
|
||||
}
|
||||
|
||||
.width-77 {
|
||||
width: 77%;
|
||||
}
|
||||
|
||||
.width-78 {
|
||||
width: 78%;
|
||||
}
|
||||
|
||||
.width-79 {
|
||||
width: 79%;
|
||||
}
|
||||
|
||||
.width-80 {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.width-81 {
|
||||
width: 81%;
|
||||
}
|
||||
|
||||
.width-82 {
|
||||
width: 82%;
|
||||
}
|
||||
|
||||
.width-83 {
|
||||
width: 83%;
|
||||
}
|
||||
|
||||
.width-84 {
|
||||
width: 84%;
|
||||
}
|
||||
|
||||
.width-85 {
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.width-86 {
|
||||
width: 86%;
|
||||
}
|
||||
|
||||
.width-87 {
|
||||
width: 87%;
|
||||
}
|
||||
|
||||
.width-88 {
|
||||
width: 88%;
|
||||
}
|
||||
|
||||
.width-89 {
|
||||
width: 89%;
|
||||
}
|
||||
|
||||
.width-90 {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.width-91 {
|
||||
width: 91%;
|
||||
}
|
||||
|
||||
.width-92 {
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
.width-93 {
|
||||
width: 93%;
|
||||
}
|
||||
|
||||
.width-94 {
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
.width-95 {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.width-96 {
|
||||
width: 96%;
|
||||
}
|
||||
|
||||
.width-97 {
|
||||
width: 97%;
|
||||
}
|
||||
|
||||
.width-98 {
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
.width-99 {
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
.width-100 {
|
||||
width: 100%;
|
||||
}
|
|
@ -30,8 +30,8 @@ public class ExamplesBuild extends Project {
|
|||
.include(dependency("org.pitest", "pitest", version(1, 16, 1)))
|
||||
.include(dependency("org.pitest", "pitest-command-line", version(1, 16, 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.platform", "junit-platform-console-standalone", version(1, 10, 2)));
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 3)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 3)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
|
Binary file not shown.
|
@ -2,8 +2,8 @@ bld.downloadExtensionJavadoc=false
|
|||
bld.downloadExtensionSources=true
|
||||
bld.downloadLocation=
|
||||
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.1
|
||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5
|
||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.0
|
||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.6
|
||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.2
|
||||
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.sourceDirectories=
|
||||
bld.version=1.9.1
|
||||
bld.version=2.0.0-SNAPSHOT
|
||||
|
|
|
@ -22,11 +22,9 @@ import rife.bld.publish.PublishDeveloper;
|
|||
import rife.bld.publish.PublishLicense;
|
||||
import rife.bld.publish.PublishScm;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
|
||||
import static rife.bld.dependencies.Repository.RIFE2_RELEASES;
|
||||
import static rife.bld.dependencies.Repository.*;
|
||||
import static rife.bld.dependencies.Scope.compile;
|
||||
import static rife.bld.dependencies.Scope.test;
|
||||
import static rife.bld.operations.JavadocOptions.DocLinkOption.NO_MISSING;
|
||||
|
@ -42,18 +40,18 @@ public class PitestOperationBuild extends Project {
|
|||
downloadSources = true;
|
||||
autoDownloadPurge = true;
|
||||
|
||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS);
|
||||
|
||||
var pitest = version(1, 16, 1);
|
||||
scope(compile)
|
||||
.include(dependency("com.uwyn.rife2", "bld", version(1, 9, 1)));
|
||||
.include(dependency("com.uwyn.rife2", "bld", version(2, 0, 0, "SNAPSHOT")));
|
||||
scope(test)
|
||||
.include(dependency("org.pitest", "pitest", pitest))
|
||||
.include(dependency("org.pitest", "pitest-command-line", pitest))
|
||||
.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.platform", "junit-platform-console-standalone", version(1, 10, 2)))
|
||||
.include(dependency("org.assertj", "assertj-core", version(3, 26, 0)));
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 3)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 3)))
|
||||
.include(dependency("org.assertj", "assertj-core", version(3, 26, 3)));
|
||||
|
||||
javadocOperation()
|
||||
.javadocOptions()
|
||||
|
@ -96,14 +94,14 @@ public class PitestOperationBuild extends Project {
|
|||
}
|
||||
|
||||
@BuildCommand(summary = "Generates JaCoCo Reports")
|
||||
public void jacoco() throws IOException {
|
||||
public void jacoco() throws Exception {
|
||||
new JacocoReportOperation()
|
||||
.fromProject(this)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Runs PMD analysis")
|
||||
public void pmd() {
|
||||
public void pmd() throws Exception {
|
||||
new PmdOperation()
|
||||
.fromProject(this)
|
||||
.failOnViolation(true)
|
||||
|
|
|
@ -18,10 +18,14 @@ package rife.bld.extension;
|
|||
|
||||
import rife.bld.BaseProject;
|
||||
import rife.bld.operations.AbstractProcessOperation;
|
||||
import rife.bld.operations.exceptions.ExitStatusException;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Mutation testing and coverage with <a href="https://pitest.org">PIT</a>.
|
||||
|
@ -34,17 +38,12 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
|||
* False constant.
|
||||
*/
|
||||
protected static final String FALSE = "false";
|
||||
/**
|
||||
* Source directories command line option.
|
||||
*/
|
||||
protected static final String SOURCE_DIRS = "--sourceDirs";
|
||||
/**
|
||||
* True constant.
|
||||
*/
|
||||
protected static final String TRUE = "true";
|
||||
/**
|
||||
* The PIT options.
|
||||
*/
|
||||
private static final Logger LOGGER = Logger.getLogger(PitestOperation.class.getName());
|
||||
private static final String SOURCE_DIRS = "--sourceDirs";
|
||||
private final Map<String, String> options_ = new ConcurrentHashMap<>();
|
||||
private BaseProject project_;
|
||||
|
||||
|
@ -330,33 +329,45 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() throws IOException, InterruptedException, ExitStatusException {
|
||||
if (project_ == null) {
|
||||
if (LOGGER.isLoggable(Level.SEVERE) && !silent()) {
|
||||
LOGGER.severe("A project must be specified.");
|
||||
}
|
||||
throw new ExitStatusException(ExitStatusException.EXIT_FAILURE);
|
||||
} else {
|
||||
super.execute();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Part of the {@link #execute} operation, constructs the command list
|
||||
* to use for building the process.
|
||||
*/
|
||||
@Override
|
||||
protected List<String> executeConstructProcessCommandList() {
|
||||
if (project_ == null) {
|
||||
throw new IllegalArgumentException("A project must be specified.");
|
||||
} else if (!options_.containsKey(SOURCE_DIRS)) {
|
||||
options_.put(SOURCE_DIRS, project_.srcDirectory().getPath());
|
||||
}
|
||||
|
||||
final List<String> args = new ArrayList<>();
|
||||
args.add(javaTool());
|
||||
|
||||
args.add("-cp");
|
||||
args.add(String.format("%s:%s:%s:%s", Path.of(project_.libTestDirectory().getPath(), "*"),
|
||||
Path.of(project_.libCompileDirectory().getPath(), "*"), project_.buildMainDirectory(),
|
||||
project_.buildTestDirectory()));
|
||||
args.add("org.pitest.mutationtest.commandline.MutationCoverageReport");
|
||||
if (project_ != null) {
|
||||
args.add(javaTool());
|
||||
args.add("-cp");
|
||||
args.add(String.format("%s:%s:%s:%s", new File(project_.libTestDirectory(), "*"),
|
||||
new File(project_.libCompileDirectory(), "*"), project_.buildMainDirectory(),
|
||||
project_.buildTestDirectory()));
|
||||
args.add("org.pitest.mutationtest.commandline.MutationCoverageReport");
|
||||
|
||||
options_.forEach((k, v) -> {
|
||||
args.add(k);
|
||||
if (!v.isEmpty()) {
|
||||
args.add(v);
|
||||
if (!options_.containsKey(SOURCE_DIRS)) {
|
||||
options_.put(SOURCE_DIRS, project_.srcDirectory().getPath());
|
||||
}
|
||||
});
|
||||
|
||||
options_.forEach((k, v) -> {
|
||||
args.add(k);
|
||||
if (!v.isEmpty()) {
|
||||
args.add(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.junit.jupiter.api.Test;
|
|||
import rife.bld.BaseProject;
|
||||
import rife.bld.Project;
|
||||
import rife.bld.WebProject;
|
||||
import rife.bld.operations.exceptions.ExitStatusException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
@ -29,7 +30,8 @@ import java.util.Set;
|
|||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||
import static rife.bld.extension.PitestOperation.*;
|
||||
import static rife.bld.extension.PitestOperation.FALSE;
|
||||
import static rife.bld.extension.PitestOperation.TRUE;
|
||||
|
||||
class PitestOperationTest {
|
||||
private static final String AS_LIST = "as list";
|
||||
|
@ -287,6 +289,12 @@ class PitestOperationTest {
|
|||
"--sourceDirs c:\\myProject\\src");
|
||||
}
|
||||
|
||||
@Test
|
||||
void executeNoProject() {
|
||||
var op = new PitestOperation();
|
||||
assertThatCode(op::execute).isInstanceOf(ExitStatusException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void exportLineCoverage() {
|
||||
var op = new PitestOperation()
|
||||
|
@ -547,12 +555,12 @@ class PitestOperationTest {
|
|||
var op = new PitestOperation()
|
||||
.fromProject(new BaseProject())
|
||||
.sourceDirs(FOO, BAR);
|
||||
assertThat(op.options().get(SOURCE_DIRS)).isEqualTo(FOOBAR);
|
||||
assertThat(op.options().get("--sourceDirs")).isEqualTo(FOOBAR);
|
||||
|
||||
op = new PitestOperation()
|
||||
.fromProject(new Project())
|
||||
.sourceDirs(List.of(FOO, BAR));
|
||||
assertThat(op.options().get(SOURCE_DIRS)).as(AS_LIST).isEqualTo(FOOBAR);
|
||||
assertThat(op.options().get("--sourceDirs")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue