org.jenkinsci.plugins.cucumber.jsontestsupport
Class CucumberJSONParser

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

@Extension
public class CucumberJSONParser
extends DefaultTestResultParserImpl

Parser that understands Cucumbers JSON notation and will generate TestResult so that Jenkins will display the results.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class org.jenkinsci.plugins.cucumber.jsontestsupport.DefaultTestResultParserImpl
IGNORE_TIMESTAMP_CHECK
 
Constructor Summary
CucumberJSONParser()
           
 
Method Summary
 String getDisplayName()
           
protected  CucumberTestResult 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.
 CucumberTestResult parse(String testResultLocations, hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.TaskListener listener)
           
 
Methods inherited from class hudson.tasks.test.TestResultParser
all, getTestResultLocationMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CucumberJSONParser

public CucumberJSONParser()
Method Detail

getDisplayName

public String getDisplayName()
Overrides:
getDisplayName in class hudson.tasks.test.TestResultParser

parse

protected CucumberTestResult 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.

Specified by:
parse in class DefaultTestResultParserImpl
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 CucumberTestResult parse(String testResultLocations,
                                hudson.model.AbstractBuild build,
                                hudson.Launcher launcher,
                                hudson.model.TaskListener listener)
                         throws InterruptedException,
                                IOException
Overrides:
parse in class DefaultTestResultParserImpl
Throws:
InterruptedException
IOException


Copyright © 2013-2014. All Rights Reserved.