hudson.plugins.testlink.result
Class TestResultsCallable

java.lang.Object
  extended by hudson.plugins.testlink.result.TestResultsCallable
All Implemented Interfaces:
hudson.FilePath.FileCallable<java.util.Map<java.lang.Integer,TestCaseWrapper>>, java.io.Serializable

public class TestResultsCallable
extends java.lang.Object
implements hudson.FilePath.FileCallable<java.util.Map<java.lang.Integer,TestCaseWrapper>>

Uses test results seekers to find results.

Since:
2.1
Author:
Bruno P. Kinoshita - http://www.kinoshita.eti.br
See Also:
Serialized Form

Constructor Summary
TestResultsCallable()
          Default constructor.
 
Method Summary
 void addTestResultSeeker(TestResultSeeker<?> testResultSeeker)
          Adds a test result seeker.
protected  java.lang.String getBase64FileContent(java.io.File file)
          Retrieves the file content encoded in Base64.
 java.util.List<TestResultSeeker<?>> getTestResultSeekers()
          Gets test result seekers.
 java.util.Map<java.lang.Integer,TestCaseWrapper> invoke(java.io.File f, hudson.remoting.VirtualChannel channel)
           
 java.util.Map<java.lang.Integer,TestCaseWrapper> seekTestResults(java.io.File directory)
          Seeks test results in a given directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestResultsCallable

public TestResultsCallable()
Default constructor.

Method Detail

addTestResultSeeker

public void addTestResultSeeker(TestResultSeeker<?> testResultSeeker)
Adds a test result seeker.


getTestResultSeekers

public java.util.List<TestResultSeeker<?>> getTestResultSeekers()
Gets test result seekers.


seekTestResults

public java.util.Map<java.lang.Integer,TestCaseWrapper> seekTestResults(java.io.File directory)
                                                                 throws TestResultSeekerException
Seeks test results in a given directory. It will seek for JUnit, TestNG and TAP test results.

Parameters:
directory - directory to seek for test results.
Returns:
list of test results.
Throws:
TestResultSeekerException

getBase64FileContent

protected java.lang.String getBase64FileContent(java.io.File file)
                                         throws java.io.IOException
Retrieves the file content encoded in Base64.

Parameters:
file - file to read the content.
Returns:
file content encoded in Base64.
Throws:
java.io.IOException

invoke

public java.util.Map<java.lang.Integer,TestCaseWrapper> invoke(java.io.File f,
                                                               hudson.remoting.VirtualChannel channel)
                                                        throws java.io.IOException,
                                                               java.lang.InterruptedException
Specified by:
invoke in interface hudson.FilePath.FileCallable<java.util.Map<java.lang.Integer,TestCaseWrapper>>
Throws:
java.io.IOException
java.lang.InterruptedException


Copyright © 2010-2011 the Jenkins TestLink plug-in team-2011 Jenkins. All Rights Reserved.