Package rife.bld.extension
Class JUnitReporterOperation
java.lang.Object
rife.bld.operations.AbstractOperation<T>
rife.bld.operations.AbstractProcessOperation<JUnitReporterOperation>
rife.bld.extension.JUnitReporterOperation
An operation that parses JUnit XML reports and prints test failure information grouped by test class.
Usage:
@BuildCommand(summary = "Runs the JUnit reporter")
public void reporter() throws Exception {
new JUnitReporterOperation()
.fromProject(this)
.failOnSummary(true)
.reportFile("build/test-results/test/TEST-junit-jupiter.xml")
.execute();
}
- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Field Summary
Fields inherited from class rife.bld.operations.AbstractProcessOperation
classpath_, DEFAULT_JAVA_TOOL, environment_, errorProcessor_, errorProcessorThread_, javaOptions_, javaTool_, mainClass_, module_, modulePath_, outputProcessor_, outputProcessorThread_, process_, successful_, workDirectory_ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Preforms the operation.Constructs the command list to use for the operation.booleanReturns whether the operation should fail if the summary is printed.failOnSummary(boolean failOnSummary) Configures whether the operation should fail if the summary is printed.fromProject(BaseProject project) Configures the operation from aBaseProject.Returns the path to the report file.reportFile(File reportFile) Specifies the XML report file.reportFile(String reportFile) Specifies the XML report file.reportFile(Path reportFile) Specifies the XML report file.Methods inherited from class rife.bld.operations.AbstractProcessOperation
classpath, classpath, classpath, environment, environment, environment, errorProcessor, errorProcessor, executeStartProcess, javaOptions, javaOptions, javaTool, javaTool, mainClass, mainClass, module, module, modulePath, modulePath, modulePath, outputProcessor, outputProcessor, process, workDirectory, workDirectoryMethods inherited from class rife.bld.operations.AbstractOperation
executeOnce, executeOnce, silent, silent
-
Constructor Details
-
JUnitReporterOperation
public JUnitReporterOperation()
-
-
Method Details
-
execute
Preforms the operation.- Overrides:
executein classAbstractProcessOperation<JUnitReporterOperation>- Throws:
ExitStatusException- if the operation fails
-
executeConstructProcessCommandList
Constructs the command list to use for the operation.- Specified by:
executeConstructProcessCommandListin classAbstractProcessOperation<JUnitReporterOperation>- Returns:
- the command list
-
fromProject
Configures the operation from aBaseProject.If not set, the
report fileis set to the default location for JUnit reports.- Specified by:
fromProjectin classAbstractProcessOperation<JUnitReporterOperation>- Parameters:
project- the project to use as the context for this operation;- Returns:
- this operation
-
failOnSummary
Configures whether the operation should fail if the summary is printed.- Parameters:
failOnSummary-trueto fail on summary,falseto not fail- Returns:
- this operation
-
failOnSummary
public boolean failOnSummary()Returns whether the operation should fail if the summary is printed.- Returns:
trueif the operation should fail on summary,falseotherwise
-
reportFile
Returns the path to the report file.- Returns:
- the path
-
reportFile
Specifies the XML report file.- Parameters:
reportFile- the report file path- Returns:
- this operation
- See Also:
-
reportFile
Specifies the XML report file.- Parameters:
reportFile- the report file path- Returns:
- this operation
- See Also:
-
reportFile
Specifies the XML report file.- Parameters:
reportFile- the report file path- Returns:
- this operation
- See Also:
-