org.jenkinsci.plugins.cucumber.jsontestsupport
Class DefaultTestResultParserImpl

java.lang.Object
  extended by hudson.tasks.test.TestResultParser
      extended by org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl
All Implemented Interfaces:
hudson.ExtensionPoint, Serializable
Direct Known Subclasses:
CucumberJSONParser

public abstract class DefaultTestResultParserImpl
extends hudson.tasks.test.TestResultParser
implements Serializable

Default partial implementation of 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.

Since:
1.343
Author:
Kohsuke Kawaguchi, James Nord
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static boolean IGNORE_TIMESTAMP_CHECK
           
 
Constructor Summary
DefaultTestResultParserImpl()
           
 
Method Summary
protected abstract  hudson.tasks.test.TestResult parse(List<File> reportFiles, hudson.model.TaskListener listener)
          This method is executed on the slave that has the report files to parse test reports and builds TestResult.
 hudson.tasks.test.TestResult parse(String testResultLocations, hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.TaskListener listener)
           
 
Methods inherited from class hudson.tasks.test.TestResultParser
all, getDisplayName, getTestResultLocationMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IGNORE_TIMESTAMP_CHECK

public static final boolean IGNORE_TIMESTAMP_CHECK
Constructor Detail

DefaultTestResultParserImpl

public DefaultTestResultParserImpl()
Method Detail

parse

protected abstract hudson.tasks.test.TestResult parse(List<File> reportFiles,
                                                      hudson.model.TaskListener listener)
                                               throws InterruptedException,
                                                      IOException
This method is executed on the slave that has the report files to parse test reports and builds TestResult.

Parameters:
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.
Throws:
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.

parse

public hudson.tasks.test.TestResult parse(String testResultLocations,
                                          hudson.model.AbstractBuild build,
                                          hudson.Launcher launcher,
                                          hudson.model.TaskListener listener)
                                   throws InterruptedException,
                                          IOException
Specified by:
parse in class hudson.tasks.test.TestResultParser
Throws:
InterruptedException
IOException


Copyright © 2013-2014. All Rights Reserved.