hudson.plugins.seleniumhq
Class SeleniumhqBuilder

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Builder
          extended by hudson.plugins.seleniumhq.SeleniumhqBuilder
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Builder>, hudson.tasks.BuildStep

public class SeleniumhqBuilder
extends hudson.tasks.Builder

Sample Builder.

When the user configures the project and enables this builder, Descriptor.newInstance(StaplerRequest) is invoked and a new SeleniumhqBuilder is created. The created instance is persisted to the project configuration XML by using XStream, so this allows you to use instance fields (like #name) to remember the configuration.

When a build is performed, the perform(Build, Launcher, BuildListener) method will be invoked.

Author:
Pascal Martin

Nested Class Summary
static class SeleniumhqBuilder.DescriptorImpl
          Descriptor for SeleniumhqBuilder.
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
static SeleniumhqBuilder.DescriptorImpl DESCRIPTOR
          Descriptor should be singleton.
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
SeleniumhqBuilder(java.lang.String browser, java.lang.String startURL, java.lang.String suiteFile, java.lang.String resultFile, java.lang.String other)
           
 
Method Summary
 java.lang.String getBrowser()
          We'll use this from the config.jelly.
 hudson.model.Descriptor<hudson.tasks.Builder> getDescriptor()
           
 java.lang.String getOther()
          We'll use this from the config.jelly.
 java.lang.String getResultFile()
          We'll use this from the config.jelly.
 java.lang.String getStartURL()
          We'll use this from the config.jelly.
 java.lang.String getSuiteFile()
          We'll use this from the config.jelly.
 boolean isFileSuiteFile()
          Check if the suiteFile is a file
 boolean isURLSuiteFile()
          Check if the suiteFile is a URL
 boolean perform(hudson.model.Build build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 
Methods inherited from class hudson.tasks.Builder
getProjectAction, 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, perform, prebuild
 

Field Detail

DESCRIPTOR

public static final SeleniumhqBuilder.DescriptorImpl DESCRIPTOR
Descriptor should be singleton.

Constructor Detail

SeleniumhqBuilder

@DataBoundConstructor
public SeleniumhqBuilder(java.lang.String browser,
                                              java.lang.String startURL,
                                              java.lang.String suiteFile,
                                              java.lang.String resultFile,
                                              java.lang.String other)
Method Detail

getBrowser

public java.lang.String getBrowser()
We'll use this from the config.jelly.


getStartURL

public java.lang.String getStartURL()
We'll use this from the config.jelly.


getSuiteFile

public java.lang.String getSuiteFile()
We'll use this from the config.jelly.


getOther

public java.lang.String getOther()
We'll use this from the config.jelly.


getResultFile

public java.lang.String getResultFile()
We'll use this from the config.jelly.


isURLSuiteFile

public boolean isURLSuiteFile()
Check if the suiteFile is a URL

Returns:
true if the suiteFile is a valid url else return false

isFileSuiteFile

public boolean isFileSuiteFile()
Check if the suiteFile is a file

Returns:
true if the suiteFile is a filePath else return false

perform

public boolean perform(hudson.model.Build build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws java.io.IOException,
                       java.lang.InterruptedException
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Throws:
java.io.IOException
java.lang.InterruptedException

getDescriptor

public hudson.model.Descriptor<hudson.tasks.Builder> getDescriptor()


Copyright © 2009. All Rights Reserved.