hudson.tasks.junit
Class JUnitParser

java.lang.Object
  extended by hudson.tasks.test.TestResultParser
      extended by hudson.tasks.junit.JUnitParser
All Implemented Interfaces:
ExtensionPoint

@Extension
public class JUnitParser
extends TestResultParser

Parse some JUnit xml files and generate a TestResult containing all the results parsed.


Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
JUnitParser()
          Deprecated. 
JUnitParser(boolean keepLongStdio)
           
 
Method Summary
 String getDisplayName()
          Returns a human readable name of the parser, like "JUnit Parser".
 String getTestResultLocationMessage()
          This text is used in the UI prompt for the GLOB that specifies files to be parsed by this parser.
 TestResult parse(String testResultLocations, AbstractBuild build, Launcher launcher, TaskListener listener)
          Parses the specified set of files and builds a TestResult object that represents them.
 
Methods inherited from class hudson.tasks.test.TestResultParser
all
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitParser

@Deprecated
public JUnitParser()
Deprecated. 

XXX TestResultParser.all does not seem to ever be called so why must this be an Extension?


JUnitParser

public JUnitParser(boolean keepLongStdio)
Parameters:
keepLongStdio - if true, retain a suite's complete stdout/stderr even if this is huge and the suite passed
Since:
1.358
Method Detail

getDisplayName

public String getDisplayName()
Description copied from class: TestResultParser
Returns a human readable name of the parser, like "JUnit Parser".

Overrides:
getDisplayName in class TestResultParser

getTestResultLocationMessage

public String getTestResultLocationMessage()
Description copied from class: TestResultParser
This text is used in the UI prompt for the GLOB that specifies files to be parsed by this parser. For example, "JUnit XML reports:"

Overrides:
getTestResultLocationMessage in class TestResultParser

parse

public TestResult parse(String testResultLocations,
                        AbstractBuild build,
                        Launcher launcher,
                        TaskListener listener)
                 throws InterruptedException,
                        IOException
Description copied from class: TestResultParser
Parses the specified set of files and builds a TestResult object that represents them.

The implementation is encouraged to do the following:

Specified by:
parse in class TestResultParser
Parameters:
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.
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.
AbortException - If you encounter an error that you handled gracefully, throw this exception and Hudson will not show a stack trace.


Copyright © 2004-2013. All Rights Reserved.