public class SeleneseAntTask
extends org.apache.tools.ant.Task
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" />
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 |
Constructor and Description |
---|
SeleneseAntTask() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
void |
setBrowser(String browser) |
void |
setFailureProperty(String failureProperty) |
void |
setHaltOnFailure(boolean haltOnFailure) |
void |
setJavaScriptCoreDir(File coreDir) |
void |
setMultiWindow(boolean multiWindow) |
void |
setOutputDir(File outputDir) |
void |
setPort(int port) |
void |
setResults(File results) |
void |
setSlowResources(boolean slowResources) |
void |
setStartURL(URL u) |
void |
setSuite(File suite) |
void |
setTimeoutInSeconds(int timeoutInSeconds) |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public void execute()
execute
in class org.apache.tools.ant.Task
public void setBrowser(String browser)
public void setMultiWindow(boolean multiWindow)
public void setPort(int port)
public void setResults(File results)
public void setSlowResources(boolean slowResources)
public void setStartURL(URL u)
public void setSuite(File suite)
public void setTimeoutInSeconds(int timeoutInSeconds)
public void setJavaScriptCoreDir(File coreDir)
public void setHaltOnFailure(boolean haltOnFailure)
public void setFailureProperty(String failureProperty)
public void setOutputDir(File outputDir)
Copyright © 2012. All Rights Reserved.