Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openqa.selenium.server.ant
Class SeleneseAntTask

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.openqa.selenium.server.ant.SeleneseAntTask

All Implemented Interfaces:
  java.lang.Cloneable

    public class SeleneseAntTask

extends org.apache.tools.ant.Task

An Ant task to run a suite of HTML Selenese tests.

Use it like this (for example):

> `<taskdef resource="selenium-ant.properties">
> <classpath>
> <pathelement location="selenium-server.jar"/>
> </classpath>
> </taskdef>
> <selenese
> suite="c:\absolute\path\to\my\HTMLSuite.html"
> browser="*firefox"
> results="c:\absolute\path\to\my\results.html"
> multiWindow="true"
> timeoutInSeconds="900"
> startURL="http://www.google.com" />`

### Parameters

Attribute | Description | Required
suite | The suite file to run. (Note that you cannot run a single test with this Ant task.) | Yes
browser | The browser name to run; must be one of the standard valid browser names (and must start with a *), e.g. *firefox, *iexplore, *custom. | Yes
startURL | The base URL on which the tests will be run, e.g. http://www.google.com. Note that only the hostname part of this URL will really be used. | Yes
results | The file to which we'll write out our test results. | No, defaults to "results-@{browser}-@{options}-@{suite}" where @{options} may include "-multiWindow" and/or "-slowResources"
outputDir | The directory in which we'll create the test results file. Ignored if "results" is absolute. | No, defaults to "."
haltonfailure | Stop the build process if a test fails. | No, defaults to true
failureproperty | The name of a property to set in the event of a failure. | No
port | The port on which we'll run the Selenium Server | No, defaults to 4444
timeoutInSeconds | Amount of time to wait before we just kill the browser | No, defaults to 30 minutes (1800 seconds)
javaScriptCoreDir | The directory containing Selenium Core, if you want to use your own instead of the baked-in version. You can also specify the property "selenium.javascript.dir" to override this setting | No
multiWindow | true if the application under test should run in its own window, false if the AUT will run in an embedded iframe | No, defaults to false
slowResources | A debugging tool that slows down the Selenium Server. (Selenium developers only) | No, defaults to false

TODO: more options! fork=true? singleTest?

Author:
  Dan Fabulich

Field Summary

Fields inherited from class org.apache.tools.ant.Task
`target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`description, location, project`

Constructor Summary
`SeleneseAntTask()`

Method Summary
`void` | `execute()`
`void` | `setBrowser(java.lang.String browser)`
`void` | `setFailureProperty(java.lang.String failureProperty)`
`void` | `setHaltOnFailure(boolean haltOnFailure)`
`void` | `setJavaScriptCoreDir(java.io.File coreDir)`
`void` | `setMultiWindow(boolean multiWindow)`
`void` | `setOutputDir(java.io.File outputDir)`
`void` | `setPort(int port)`
`void` | `setResults(java.io.File results)`
`void` | `setSlowResources(boolean slowResources)`
`void` | `setStartURL(java.net.URL u)`
`void` | `setSuite(java.io.File suite)`
`void` | `setTimeoutInSeconds(int timeoutInSeconds)`

Methods inherited from class org.apache.tools.ant.Task
`bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SeleneseAntTask

    public SeleneseAntTask()

Method Detail

### execute

    public void execute()

  Overrides:
    `execute` in class `org.apache.tools.ant.Task`

### setBrowser

    public void setBrowser(java.lang.String browser)

### setMultiWindow

    public void setMultiWindow(boolean multiWindow)

### setPort

    public void setPort(int port)

### setResults

    public void setResults(java.io.File results)

### setSlowResources

    public void setSlowResources(boolean slowResources)

### setStartURL

    public void setStartURL(java.net.URL u)

### setSuite

    public void setSuite(java.io.File suite)

### setTimeoutInSeconds

    public void setTimeoutInSeconds(int timeoutInSeconds)

### setJavaScriptCoreDir

    public void setJavaScriptCoreDir(java.io.File coreDir)

### setHaltOnFailure

    public void setHaltOnFailure(boolean haltOnFailure)

### setFailureProperty

    public void setFailureProperty(java.lang.String failureProperty)

### setOutputDir

    public void setOutputDir(java.io.File outputDir)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.