|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.TagSupport net.sf.jameleon.LocationAwareTagSupport net.sf.jameleon.JameleonTagSupport net.sf.jameleon.SessionTag net.sf.jameleon.plugin.httpunit.HttpUnitSessionTag
public class HttpUnitSessionTag
This is a HttpUnit implementation of the @see SessionTag. It basically starts the application in the state provided by the baseUrl and beginAt variables and creates a new session for the function points to share. There is an extra property for this session to enable proxy support
Field Summary | |
---|---|
protected boolean |
acceptCookies
|
protected boolean |
acceptGzip
|
protected String |
applicationCodeName
|
protected String |
applicationName
|
protected String |
applicationVersion
|
protected boolean |
autoRedirect
|
protected boolean |
autoRefresh
|
protected int |
availableScreenWidth
|
protected int |
availHeight
|
protected boolean |
cookieDomainMatchingStrict
|
protected boolean |
enableHttpUnitProxy
Enables proxy support. |
protected boolean |
enableScripting
|
protected boolean |
exceptionsThrownOnScriptError
|
protected WebConversation |
httpSession
The session of the function points being tested. |
protected boolean |
iframeSupported
|
protected String |
platform
|
protected StateStorer |
state
|
protected String |
userAgent
|
Fields inherited from class net.sf.jameleon.SessionTag |
---|
addt, application, beginSession, log, organization, postcondition, props, sessionDelay, sessionResults, tc |
Fields inherited from class net.sf.jameleon.JameleonTagSupport |
---|
attributes, broker, contextVars, fp, unsupportedAttributes |
Fields inherited from class net.sf.jameleon.LocationAwareTagSupport |
---|
columnNumber, elementTagName, lineNumber, scriptFileName |
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
HttpUnitSessionTag()
|
Method Summary | |
---|---|
protected void |
enableProxyServer()
enables proxy support if the parameters have been filled |
boolean |
getExceptionsThrownOnScriptError()
Tells whether scripting exceptions are thrown on errors. |
WebConversation |
getHttpSession()
|
boolean |
isEnableHttpUnitProxy()
Query whether proxy support is enabled. |
boolean |
isEnableSslCertCheck()
Query whether SSL cert validity checking is enabled. |
boolean |
isScriptingEnabled()
Tells whether scripting is enabled or disabled |
void |
setAcceptCookies(boolean acceptCookies)
Sets the attribute to accept cookies or not.. |
void |
setAcceptGzip(boolean acceptGzip)
Enables or disables gzip |
void |
setApplicationCodeName(String applicationCodeName)
Sets the application code name. |
void |
setApplicationName(String applicationName)
Sets the application name. |
void |
setApplicationVersion(String applicationVersion)
Sets the application version. |
void |
setAutoRedirect(boolean autoRedirect)
Enables or disables auto-redirect. |
void |
setAutoRefresh(boolean autoRefresh)
Enables or disables autorefresh. |
void |
setAvailableScreenWidth(int availableScreenWidth)
Sets the available screen width. |
void |
setAvailHeight(int availHeight)
Sets the available height. |
void |
setBaseUrl(String baseUrl)
Sets the base url to where the application begins. |
void |
setBeginAt(String beginAt)
Sets the ending path of the url to start at. |
protected void |
setClientProperties()
|
void |
setCookieDomainMatchingStrict(boolean cookieDomainMatchingStrict)
Sets cookie domain matching strict option to true or false |
void |
setEnableHttpUnitProxy(boolean enable)
this field can enable and dissable proxy support. |
void |
setEnableScripting(boolean enableScripting)
Enables or disables scripting support for HttpUnit. |
void |
setEnableSslCertCheck(boolean enable)
Enable or disable validity checking of SSL certificates. |
void |
setExceptionsThrownOnScriptError(boolean exceptionsThrownOnScriptError)
Enables or disables scripting exceptions on errors. |
void |
setHttpUnitBasicPassword(String httpUnitBasicPassword)
Sets the password required for basic authentication |
void |
setHttpUnitBasicUsername(String httpUnitBasicUsername)
Sets the username required for basic authentication |
void |
setHttpUnitProxyHost(String httpUnitProxyHost)
Sets the host name of the proxy used to intercept requests and responses. |
void |
setHttpUnitProxyPassword(String httpUnitProxyPassword)
Sets the password of the proxy used to intercept requests and responses. |
void |
setHttpUnitProxyPort(String httpUnitProxyPort)
Sets the port of the proxy used to intercept requests and responses. |
void |
setHttpUnitProxyUser(String httpUnitProxyUser)
Sets the user of the proxy used to intercept requests and responses. |
void |
setIframeSupported(boolean iframeSupported)
Enables or disables iframe support. |
void |
setPlatform(String platform)
Sets the platform. |
void |
setUpSession()
|
void |
setUserAgent(String userAgent)
Sets the user agent. |
void |
startApplication()
Used for the plug-in to implement if something special is required during the session setup. |
void |
store(String fName,
int event)
|
void |
tearDownSession()
|
Methods inherited from class net.sf.jameleon.SessionTag |
---|
delaySession, doTag, findParentTestCase, getApplication, getOrganization, getSessionResult, getStoreToFileName, init, recordDataDrivableResult, recordFunctionResult, recordResult, removeChildlessResult, setOrganization, setSessionDelay, tearDown, trace, traceMsg |
Methods inherited from class net.sf.jameleon.JameleonTagSupport |
---|
cleanVariablesInContext, createAttributes, describeAttributes, getAttributeBroker, getAttributes, getAttributeType, getClassAttributes, getFunctionalPoint, getUnsupportedAttributes, loadFunctionalPoint, resetFunctionalPoint, setAttribute, setVariableInContext, testForUnsupportedAttributesCaught |
Methods inherited from class net.sf.jameleon.LocationAwareTagSupport |
---|
getColumnNumber, getElementName, getFileName, getLineNumber, setColumnNumber, setElementName, setFileName, setLineNumber |
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.jelly.Tag |
---|
getBody, getContext, getParent, invokeBody, setBody, setContext, setParent |
Field Detail |
---|
protected WebConversation httpSession
protected boolean enableHttpUnitProxy
protected StateStorer state
protected boolean enableScripting
protected boolean acceptCookies
protected boolean autoRefresh
protected boolean exceptionsThrownOnScriptError
protected boolean acceptGzip
protected String applicationCodeName
protected String applicationName
protected String applicationVersion
protected boolean autoRedirect
protected boolean cookieDomainMatchingStrict
protected int availableScreenWidth
protected int availHeight
protected boolean iframeSupported
protected String platform
protected String userAgent
Constructor Detail |
---|
public HttpUnitSessionTag()
Method Detail |
---|
public WebConversation getHttpSession()
public void setUpSession()
setUpSession
in class SessionTag
protected void setClientProperties()
public void tearDownSession()
tearDownSession
in class SessionTag
public void startApplication()
startApplication
in class SessionTag
public void store(String fName, int event) throws IOException
store
in interface Storable
store
in class SessionTag
IOException
public void setAcceptCookies(boolean acceptCookies)
acceptCookies
- - Set to false to ignore all cookies.This attribute is recognized by Jameleonpublic void setAutoRefresh(boolean autoRefresh)
autoRefresh
- - set to "true" or "yes" to enable autorefresh.This attribute is recognized by Jameleonpublic void setAcceptGzip(boolean acceptGzip)
acceptGzip
- - set to "false"to disable gzip.This attribute is recognized by Jameleonpublic void setApplicationCodeName(String applicationCodeName)
applicationCodeName
- - the application code name.This attribute is recognized by Jameleonpublic void setApplicationName(String applicationName)
applicationName
- - the application name.This attribute is recognized by Jameleonpublic void setApplicationVersion(String applicationVersion)
applicationVersion
- - the application version.This attribute is recognized by Jameleonpublic void setAutoRedirect(boolean autoRedirect)
autoRedirect
- - set to "false" to disable auto-redirect.This attribute is recognized by Jameleonpublic void setAvailableScreenWidth(int availableScreenWidth)
availableScreenWidth
- - The available screen width of the browser.This attribute is recognized by Jameleonpublic void setAvailHeight(int availHeight)
availHeight
- - The available height of the browser,This attribute is recognized by Jameleonpublic void setCookieDomainMatchingStrict(boolean cookieDomainMatchingStrict)
cookieDomainMatchingStrict
- - set to false to disable cookie domain matching,This attribute is recognized by Jameleonpublic void setIframeSupported(boolean iframeSupported)
iframeSupported
- - set to "false" to disable iframe support.This attribute is recognized by Jameleonpublic void setPlatform(String platform)
platform
- - the platform,This attribute is recognized by Jameleonpublic void setUserAgent(String userAgent)
userAgent
- - the user agent.,This attribute is recognized by Jameleonpublic void setBeginAt(String beginAt)
beginAt
- - the ending path of the url to start at. For example,
if the URL to start at is http://sf.net/projects/jameleon,
then the baseUrl would be http://sf.net/ and the beginAt
would be /projects/jameleon. This variable is optional
This value is set and used from the context. In other words,
this value can be set via an Applications.properties file or
a CSV file.This attribute is recognized by Jameleonpublic void setBaseUrl(String baseUrl)
baseUrl
- - protocol, and hostname of the URL. For example,
if the URL to start at is http://sf.net/projects/jameleon,
then the baseUrl would be http://sf.net/ and the beginAt
would be /projects/jameleon.
This value is set and used from the context. In other words,
this value can be set via an Applications.properties file or
a CSV file.This attribute is recognized by Jameleonpublic void setHttpUnitProxyHost(String httpUnitProxyHost)
httpUnitProxyHost
- - the host name of the proxy used to intercept requests and responses.This attribute is recognized by Jameleonpublic void setHttpUnitProxyPort(String httpUnitProxyPort)
httpUnitProxyPort
- - the port of the proxy used to intercept requests and responses.This attribute is recognized by Jameleonpublic void setHttpUnitBasicUsername(String httpUnitBasicUsername)
httpUnitBasicUsername
- - the username required for basic authenticationThis attribute is recognized by Jameleonpublic void setHttpUnitBasicPassword(String httpUnitBasicPassword)
httpUnitBasicPassword
- - the password required for basic authenticationThis attribute is recognized by Jameleonpublic void setHttpUnitProxyUser(String httpUnitProxyUser)
httpUnitProxyUser
- - the user of the proxy used to intercept requests and responses.This attribute is recognized by Jameleonpublic void setHttpUnitProxyPassword(String httpUnitProxyPassword)
httpUnitProxyPassword
- - the user of the proxy used to intercept requests and responses.This attribute is recognized by Jameleonpublic void setEnableHttpUnitProxy(boolean enable)
enable
- - set to "true" or "yes" to enable proxy support,
set to "yes" or "no" to disable proxy. Defaults to "false"This attribute is recognized by Jameleonpublic void setEnableScripting(boolean enableScripting)
enableScripting
- - set to "true" or "yes" to enable scripting support,
set to "false" or "no" to disable scripting. Defaults to "true"This attribute is recognized by Jameleonpublic void setExceptionsThrownOnScriptError(boolean exceptionsThrownOnScriptError)
exceptionsThrownOnScriptError
- - set to "true" or "yes" to enable exceptions
on script errors. Set to "false" or "no" to disable exceptions on script errors.
Defaults to "true".This attribute is recognized by Jameleonpublic boolean getExceptionsThrownOnScriptError()
public boolean isScriptingEnabled()
public boolean isEnableHttpUnitProxy()
public boolean isEnableSslCertCheck()
public void setEnableSslCertCheck(boolean enable)
enable
- - If "true", an exception will be thrown when an invalid SSL cert is encountered.
If "false", invalid SSL certs will be accepted. If not set, the default is "true".This attribute is recognized by Jameleonprotected void enableProxyServer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |