net.sf.jameleon.plugin.jwebunit
Class HttpSessionTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by net.sf.jameleon.LocationAwareTagSupport
          extended by net.sf.jameleon.JameleonTagSupport
              extended by net.sf.jameleon.SessionTag
                  extended by net.sf.jameleon.plugin.jwebunit.HttpSessionTag
All Implemented Interfaces:
Attributable, DataDrivableResultRecordable, FunctionResultRecordable, Storable, DynaTag, LocationAware, Tag

public class HttpSessionTag
extends SessionTag

This is a JWebUnit implementation of the @see SessionTag. It basically, starts creates a new session for the function points to share.

Tag Name: <http-session>
Steps:
  1. If beginSession is set to true, then start the application at the URL provided by baseUrl + beginAt

Field Summary
protected  net.sourceforge.jwebunit.WebTester httpSession
          The session of the function points being tested.
 
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
HttpSessionTag()
           
 
Method Summary
protected  String getBaseUrl()
           
protected  String getBeginAt()
           
 net.sourceforge.jwebunit.WebTester getHttpSession()
           
 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.
 void setUpSession()
           
 void startApplication()
           
 void tearDownSession()
           
 
Methods inherited from class net.sf.jameleon.SessionTag
delaySession, doTag, findParentTestCase, getApplication, getOrganization, getSessionResult, getStoreToFileName, init, recordDataDrivableResult, recordFunctionResult, recordResult, removeChildlessResult, setOrganization, setSessionDelay, store, 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

httpSession

protected net.sourceforge.jwebunit.WebTester httpSession
The session of the function points being tested. This gives full access to the JWebUnit API.

Constructor Detail

HttpSessionTag

public HttpSessionTag()
Method Detail

setBeginAt

public void setBeginAt(String beginAt)
Sets the ending path of the url to start at.

Parameters:
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 Jameleon
Required: false

setBaseUrl

public void setBaseUrl(String baseUrl)
Sets the base url to where the application begins.

Parameters:
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 Jameleon
Required: false

getHttpSession

public net.sourceforge.jwebunit.WebTester getHttpSession()
Returns:
the session which is shared among all HttpFuntionTags encapsulated inside this testcase

setUpSession

public void setUpSession()
Overrides:
setUpSession in class SessionTag

tearDownSession

public void tearDownSession()
Overrides:
tearDownSession in class SessionTag

startApplication

public void startApplication()
Overrides:
startApplication in class SessionTag

getBaseUrl

protected String getBaseUrl()

getBeginAt

protected String getBeginAt()


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.