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

public class KlarosTestResultPublisher
extends hudson.tasks.Recorder

Klaros 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)

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 env, java.lang.String sut, java.lang.String type, java.lang.String pathTestResults, java.lang.String url, java.lang.String username, java.lang.String password)
          Instantiates a new klaros test result publisher.
 
Method Summary
static KlarosTestResultPublisher.DescriptorImpl descriptor()
          Descriptor.
 java.lang.String getConfig()
          Gets the config.
 hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> getDescriptor()
          
 java.lang.String getEnv()
          Gets the env.
 java.lang.String getPassword()
          Gets the password.
 java.lang.String getPathTestResults()
          Gets the path test results.
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
          
 java.lang.String getSut()
          Gets the sut.
 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 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 config.
 void setEnv(java.lang.String value)
          Sets the env.
 void setPassword(java.lang.String value)
          Sets the password.
 void setPathTestResults(java.lang.String value)
          Sets the path test results.
 void setSut(java.lang.String value)
          Sets the sut.
 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, 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, prebuild
 

Constructor Detail

KlarosTestResultPublisher

@DataBoundConstructor
public KlarosTestResultPublisher(java.lang.String config,
                                                      java.lang.String env,
                                                      java.lang.String sut,
                                                      java.lang.String type,
                                                      java.lang.String pathTestResults,
                                                      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 to use
env - the Klaros test environment to use
sut - the Klaros system under test to use
type - the type of test result to import
pathTestResults - the path to the test results
url - the Klaros application url
username - the optional Klaros login user name
password - the optional Klaros login password
Method Detail

descriptor

public static KlarosTestResultPublisher.DescriptorImpl descriptor()
Descriptor.

Returns:
the descriptor implementation

getConfig

public java.lang.String getConfig()
Gets the config.

Returns:
the config

setConfig

public void setConfig(java.lang.String value)
Sets the config.

Parameters:
value - the new config

getEnv

public java.lang.String getEnv()
Gets the env.

Returns:
the env

setEnv

public void setEnv(java.lang.String value)
Sets the env.

Parameters:
value - the new env

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 sut.

Returns:
the sut

setSut

public void setSut(java.lang.String value)
Sets the sut.

Parameters:
value - the new sut

getPathTestResults

public java.lang.String getPathTestResults()
Gets the path test results.

Returns:
the path test results

setPathTestResults

public void setPathTestResults(java.lang.String value)
Sets the path test results.

Parameters:
value - the new path test results

getUrls

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

Returns:
the urls

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()


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-2010 verit Informationssysteme GmbH. All Rights Reserved.