com.deepshiftlabs.nerrvana
Class NerrvanaPlugin

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Builder
          extended by com.deepshiftlabs.nerrvana.NerrvanaPlugin
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Builder>, hudson.tasks.BuildStep

public class NerrvanaPlugin
extends hudson.tasks.Builder

NerrvanaPlugin - remotely runs Selenium tests at Nerrvana cloud. For details see Nerrvana - GET STARTED How plugin works:

  1. Uploads Selenium tests to the Nerrvana cloud by FTPS.
  2. Starts tests using Nerrvana API.
  3. Polls Nerrvana for tests execution status until they're complete.
  4. Creates report with tests result. Report contains link to the test artifacts on Nerrvana side.
NOTE: plugin uses lftp application to upload tests to the Nerrvana cloud.

Version:
1.00, 1.01 added saveExecutionResults(AbstractBuild, Testrun), saveReportAggregated(AbstractBuild, String)
Author:
Deep Shift Labs, Victor Orlov

Nested Class Summary
static class NerrvanaPlugin.DescriptorImpl
          Descriptor for NerrvanaPlugin.
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 String loglevel
           Plugin configuration parameter 'logLevel'.
 String settingsXmlString
           Plugin configuration parameter 'settingsXmlString'.
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
NerrvanaPlugin(String settingsXmlString, String loglevel)
          Plugin constructor Fields in config.jelly must match the parameter names in the org.kohsuke.stapler.DataBoundConstructor
 
Method Summary
 NerrvanaPlugin.DescriptorImpl getDescriptor()
           Some Jenkins-specific mumbo-jumbo Overridden for better type safety.
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          Main plugin method
 
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, 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
 

Field Detail

settingsXmlString

public final String settingsXmlString

Plugin configuration parameter 'settingsXmlString'. This parameter is represented in config.jelly as TEXTAREA

Nerrvana user should generate settings XML in Nerrvana web interface and paste it into the plugin config field "Nerrvana plugin settings"

Parameter is initialized in plugin constructor.


loglevel

public final String loglevel

Plugin configuration parameter 'logLevel'. This parameter is represented in config.jelly as SELECT with two values (NORMAL and TRACE)

Parameter is initialized in plugin constructor

Constructor Detail

NerrvanaPlugin

@DataBoundConstructor
public NerrvanaPlugin(String settingsXmlString,
                                           String loglevel)
Plugin constructor Fields in config.jelly must match the parameter names in the org.kohsuke.stapler.DataBoundConstructor

Parameters:
settingsXmlString - Plugin settings generated by Nerrvana
loglevel - Log level for plugin operations
Method Detail

perform

public boolean perform(hudson.model.AbstractBuild<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
Main plugin method

Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Parameters:
build -
launcher -
listener -
Returns:
true if plugin successfully completed

getDescriptor

public NerrvanaPlugin.DescriptorImpl getDescriptor()

Some Jenkins-specific mumbo-jumbo

Overridden for better type safety. If your plugin doesn't really define any property on Descriptor, you don't have to do this.

Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Builder>
Overrides:
getDescriptor in class hudson.tasks.Builder


Copyright © 2004-2012 Deep Shift Labs. All Rights Reserved.