hudson.plugins.klaros
Class KlarosTestResultPublisher

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.tasks.Recorder
              extended by hudson.plugins.klaros.KlarosTestResultPublisher
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep, java.io.Serializable

public class KlarosTestResultPublisher
extends hudson.tasks.Recorder
implements java.io.Serializable

Klaros-Testmanagement test result publisher class. When a publish is performed, the perform(AbstractBuild, Launcher, BuildListener) method will be invoked.

Author:
Caroline Albuquerque (albuquerque@verit.de), Torsten Stolpmann (stolpmann@verit.de)
See Also:
Serialized Form

Nested Class Summary
static class KlarosTestResultPublisher.DescriptorImpl
          Descriptor for KlarosImportPublisher class.
 
Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
KlarosTestResultPublisher(java.lang.String config, java.lang.String iteration, java.lang.String env, java.lang.String sut, boolean createTestSuite, java.lang.String type, java.lang.String pathTestResults, ResultSet[] resultSets, java.lang.String url, java.lang.String username, java.lang.String password)
          Instantiates a new Klaros test result publisher.
 
Method Summary
 KlarosTestResultPublisher.DescriptorImpl descriptor()
          Descriptor.
 java.lang.String getConfig()
          Gets the Klaros project id.
 hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> getDescriptor()
           
 java.lang.String getEnv()
          Gets the Klaros test environment id.
 java.lang.String getIteration()
          Gets the Klaros iteration i.
 java.lang.String getKlarosUrl(java.lang.String sourceURL)
           
 java.lang.String getPassword()
          Gets the password.
 java.lang.String getPathTestResults()
          Deprecated. use getResultSets() instead
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
 ResultSet[] getResultSets()
          Gets the result sets.
 java.lang.String getSut()
          Gets the Klaros system under test id.
 ResultFormat[] getTypes()
          Gets the valid result types.
 java.lang.String getUrl()
          Gets the url.
 java.lang.String getUrl(java.lang.String sourceURL)
          Gets the URL of the given name, or returns null.
 java.util.List<java.lang.String> getUrls()
          Gets the urls.
 java.lang.String getUsername()
          Gets the username.
 boolean isCreateTestSuite()
          Checks if the create test suite flag is set.
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          Runs the step over the given build and reports the progress to the listener.
 void setConfig(java.lang.String value)
          Sets the Klaros project id.
 void setCreateTestSuite(boolean createTestSuite)
          Sets the create test suite flag.
 void setEnv(java.lang.String value)
          Sets the Klaros test environment id.
 void setIteration(java.lang.String iteration)
          Sets the Klaros iteration id.
 void setPassword(java.lang.String value)
          Sets the password.
 void setPathTestResults(java.lang.String value)
          Deprecated. use setResultSets() instead
 void setResultSets(ResultSet[] values)
          Sets the result sets.
 void setSut(java.lang.String value)
          Sets the Klaros system under test id.
 void setTypes(ResultFormat[] types)
          Sets the valid result types.
 void setUrl(java.lang.String value)
          Sets the url.
 void setUsername(java.lang.String value)
          Sets the username.
 
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuild
 

Constructor Detail

KlarosTestResultPublisher

@DataBoundConstructor
public KlarosTestResultPublisher(java.lang.String config,
                                                      java.lang.String iteration,
                                                      java.lang.String env,
                                                      java.lang.String sut,
                                                      boolean createTestSuite,
                                                      java.lang.String type,
                                                      java.lang.String pathTestResults,
                                                      ResultSet[] resultSets,
                                                      java.lang.String url,
                                                      java.lang.String username,
                                                      java.lang.String password)
Instantiates a new Klaros test result publisher.

Parameters:
config - the Klaros project configuration id to use
iteration - the optional Klaros iteration id to use
env - the Klaros test environment id to use
sut - the Klaros system under test id to use
type - the type of test result to import
pathTestResults - the path to the test results
resultSets - the test result sets
url - the Klaros application url
username - the optional Klaros login user name
password - the optional Klaros login password
Method Detail

descriptor

public KlarosTestResultPublisher.DescriptorImpl descriptor()
Descriptor.

Returns:
the descriptor implementation

getConfig

public java.lang.String getConfig()
Gets the Klaros project id.

Returns:
the project id

setConfig

public void setConfig(java.lang.String value)
Sets the Klaros project id.

Parameters:
value - the new project id

getIteration

public java.lang.String getIteration()
Gets the Klaros iteration i.

Returns:
the iteration id

setIteration

public void setIteration(java.lang.String iteration)
Sets the Klaros iteration id.

Parameters:
iteration - the new iteration id

getEnv

public java.lang.String getEnv()
Gets the Klaros test environment id.

Returns:
the test environment id

setEnv

public void setEnv(java.lang.String value)
Sets the Klaros test environment id.

Parameters:
value - the new test environment id

getUrl

public java.lang.String getUrl()
Gets the url.

Returns:
the url

setUrl

public void setUrl(java.lang.String value)
Sets the url.

Parameters:
value - the new url

getUsername

public java.lang.String getUsername()
Gets the username.

Returns:
the username

setUsername

public void setUsername(java.lang.String value)
Sets the username.

Parameters:
value - the new username

getPassword

public java.lang.String getPassword()
Gets the password.

Returns:
the password

setPassword

public void setPassword(java.lang.String value)
Sets the password.

Parameters:
value - the new password

getSut

public java.lang.String getSut()
Gets the Klaros system under test id.

Returns:
the system under test id

setSut

public void setSut(java.lang.String value)
Sets the Klaros system under test id.

Parameters:
value - the new system under test id

isCreateTestSuite

public boolean isCreateTestSuite()
Checks if the create test suite flag is set.

Returns:
true, if set

setCreateTestSuite

public void setCreateTestSuite(boolean createTestSuite)
Sets the create test suite flag.

Parameters:
createTestSuite - the new create test suite flag

getTypes

public ResultFormat[] getTypes()
Gets the valid result types.

Returns:
the valid result types

setTypes

public void setTypes(ResultFormat[] types)
Sets the valid result types.

Parameters:
types - the new result types

getPathTestResults

@Deprecated
public java.lang.String getPathTestResults()
Deprecated. use getResultSets() instead

Gets the path test results.

Returns:
the path test results

setPathTestResults

@Deprecated
public void setPathTestResults(java.lang.String value)
Deprecated. use setResultSets() instead

Sets the path test results.

Parameters:
value - the new path test results

getResultSets

public ResultSet[] getResultSets()
Gets the result sets.

Returns:
the result sets

setResultSets

public void setResultSets(ResultSet[] values)
Sets the result sets.

Parameters:
values - the new result sets

getUrls

public java.util.List<java.lang.String> getUrls()
Gets the urls.

Returns:
the urls

getKlarosUrl

public java.lang.String getKlarosUrl(java.lang.String sourceURL)

perform

public boolean perform(hudson.model.AbstractBuild<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
Runs the step over the given build and reports the progress to the listener.

Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Parameters:
build - the current build
launcher - the launcher
listener - the listener
Returns:
null

getUrl

public java.lang.String getUrl(java.lang.String sourceURL)
Gets the URL of the given name, or returns null.

Parameters:
sourceURL - the URL of the klaros server import servlet
Returns:
the klaros server import servlet URL

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
Specified by:
getRequiredMonitorService in interface hudson.tasks.BuildStep

getDescriptor

public hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Publisher>
Overrides:
getDescriptor in class hudson.tasks.Recorder


Copyright © 2009-2016 verit Informationssysteme GmbH. All Rights Reserved.