hudson.plugins.testlink.result
Class TestResultSeeker<T>

java.lang.Object
  extended by hudson.plugins.testlink.result.TestResultSeeker<T>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbstractJUnitTestResultSeeker, AbstractTestNGTestResultSeeker, TAPTestResultSeeker

public abstract class TestResultSeeker<T>
extends java.lang.Object
implements java.io.Serializable

Seeks for Test Results.

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

Field Summary
protected  br.eti.kinoshita.testlinkjavaapi.model.TestCase[] automatedTestCases
           
protected  java.lang.String includePattern
           
protected  java.lang.String keyCustomFieldName
           
protected  hudson.model.BuildListener listener
           
 
Constructor Summary
TestResultSeeker(java.lang.String includePattern, br.eti.kinoshita.testlinkjavaapi.model.TestCase[] automatedTestCases, java.lang.String keyCustomFieldName, hudson.model.BuildListener listener)
          Default constructor.
 
Method Summary
protected  java.lang.String getBase64FileContent(java.io.File file)
          Retrieves the file content encoded in Base64.
protected  br.eti.kinoshita.testlinkjavaapi.model.CustomField getKeyCustomField(java.util.List<br.eti.kinoshita.testlinkjavaapi.model.CustomField> customFields)
          Gets the key custom field out of a list using the key custom field name.
protected  java.lang.String[] scan(java.io.File directory, java.lang.String includes, hudson.model.BuildListener listener)
          Scans a directory for files matching the includes pattern.
abstract  java.util.Map<java.lang.Integer,TestCaseWrapper<T>> seek(java.io.File directory)
          Seeks for Test Results in a directory.
protected  java.lang.String[] split(java.lang.String input)
          Splits a String by comma and gets an array of Strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

includePattern

protected final java.lang.String includePattern

automatedTestCases

protected final br.eti.kinoshita.testlinkjavaapi.model.TestCase[] automatedTestCases

keyCustomFieldName

protected final java.lang.String keyCustomFieldName

listener

protected final hudson.model.BuildListener listener
Constructor Detail

TestResultSeeker

public TestResultSeeker(java.lang.String includePattern,
                        br.eti.kinoshita.testlinkjavaapi.model.TestCase[] automatedTestCases,
                        java.lang.String keyCustomFieldName,
                        hudson.model.BuildListener listener)
Default constructor.

Parameters:
includePattern - Include pattern.
report - TestLink report.
keyCustomFieldName - Name of the Key Custom Field.
listener - Hudson Build listener.
Method Detail

seek

public abstract java.util.Map<java.lang.Integer,TestCaseWrapper<T>> seek(java.io.File directory)
                                                                  throws TestResultSeekerException
Seeks for Test Results in a directory. It tries to match the includePattern with files in this directory.

Parameters:
directory - Directory to look for 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

split

protected java.lang.String[] split(java.lang.String input)
Splits a String by comma and gets an array of Strings.


scan

protected java.lang.String[] scan(java.io.File directory,
                                  java.lang.String includes,
                                  hudson.model.BuildListener listener)
                           throws java.io.IOException
Scans a directory for files matching the includes pattern.

Parameters:
directory - the directory to scan.
includes - the includes pattern.
listener - Hudson Build listener.
Returns:
array of strings of paths for files that match the includes pattern in the directory.
Throws:
java.io.IOException

getKeyCustomField

protected br.eti.kinoshita.testlinkjavaapi.model.CustomField getKeyCustomField(java.util.List<br.eti.kinoshita.testlinkjavaapi.model.CustomField> customFields)
Gets the key custom field out of a list using the key custom field name.



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