public abstract class DefaultTestResultParserImpl extends TestResultParser implements Serializable
TestResultParser
that handles GLOB dereferencing
and other checks for user errors, such as misconfigured GLOBs, up-to-date checks on test reports.
The instance of the parser will be serialized to the node that performed the build and the parsing will be done remotely on that slave.
Modifier and Type | Field and Description |
---|---|
static boolean |
IGNORE_TIMESTAMP_CHECK |
Constructor and Description |
---|
DefaultTestResultParserImpl() |
Modifier and Type | Method and Description |
---|---|
protected abstract TestResult |
parse(List<File> reportFiles,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
This method is executed on the slave that has the report files to parse test reports and builds
TestResult . |
TestResult |
parse(String testResultLocations,
hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
Parses the specified set of files and builds a
TestResult object that represents them. |
all, getDisplayName, getTestResultLocationMessage
protected abstract TestResult parse(List<File> reportFiles, hudson.Launcher launcher, hudson.model.TaskListener listener) throws InterruptedException, IOException
TestResult
.reportFiles
- List of files to be parsed. Never be empty nor null.launcher
- Can be used to fork processes on the machine where the build is running. Never null.listener
- Use this to report progress and other problems. Never null.InterruptedException
- If the user cancels the build, it will be received as a thread interruption. Do not catch
it, and instead just forward that through the call stack.IOException
- If you don't care about handling exceptions gracefully, you can just throw IOException
and let the default exception handling in Hudson takes care of it.hudson.AbortException
- If you encounter an error that you handled gracefully, throw this exception and Hudson
will not show a stack trace.public TestResult parse(String testResultLocations, hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.TaskListener listener) throws InterruptedException, IOException
TestResultParser
TestResult
object that represents them.
The implementation is encouraged to do the following:
parse
in class TestResultParser
testResultLocations
- GLOB pattern relative to the workspace that
specifies the locations of the test result files. Never null.build
- Build for which these tests are parsed. Never null.launcher
- Can be used to fork processes on the machine where the build is running. Never null.listener
- Use this to report progress and other problems. Never null.InterruptedException
- If the user cancels the build, it will be received as a thread interruption. Do not catch
it, and instead just forward that through the call stack.IOException
- If you don't care about handling exceptions gracefully, you can just throw IOException
and let the default exception handling in Hudson takes care of it.hudson.AbortException
- If you encounter an error that you handled gracefully, throw this exception and Hudson
will not show a stack trace.Copyright © 2014. All rights reserved.