Class CsvTag

  extended by org.apache.commons.jelly.TagSupport
      extended by net.sf.jameleon.LocationAwareTagSupport
          extended by net.sf.jameleon.JameleonTagSupport
              extended by
                  extended by
                      extended by net.sf.jameleon.AbstractCsvTag
                          extended by net.sf.jameleon.CsvTag
All Implemented Interfaces:
DataDrivable, BreakPoint, Attributable, DataDrivableResultRecordable, FunctionResultRecordable, SessionResultRecordable, DynaTag, LocationAware, Tag

public class CsvTag
extends AbstractCsvTag

Iterates over all nested tags one time per row of a CSV file. The name of the CSV file is based on the testEnvironment, organization, and the name attributes. The directory structure, then follows the testEnvironment then inside that directory the organization if set. The file name matches the name set in the csv attribute. For example, to execute the opening of an application and doing something n number of times:

 <testcase xmlns="jelly:jameleon">
   <csv name="some_file_name_without_extension">
     <some-session application="someApp" beginSession="true">
           functionId="Verify successful navigation, using a different variable."/>
Maybe opening the application n number of times takes too long, but each of the scenarios still need to be executed. Try putting the csv tag inside the session tag:

 <testcase xmlns="jelly:jameleon">
   <some-session application="someApp" beginSession="true">
     <csv name="some_file_name_without_extension">
           functionId="Verify successful navigation, using a different variable."/>
All values that are not defined in a CSV file will be considered 'null'. To define an empty String, simply define the value as "". For example:

In the above example, var2 will be an empty string and var3 will be null.

Tag Name: <csv>

Field Summary
Fields inherited from class net.sf.jameleon.AbstractCsvTag
csv, csvFileName, name
Fields inherited from class
charset, dataDir, fileName
Fields inherited from class
addt, breakPoint, countRow, dataDrivableRowResult, executer, failedOnCurrentRow, log, numOfRowFailures, parentFailed, previousStateDir, resultContainer, resultRecorder, rowData, stateStorer, stopTestExecutionOnFailure, tct, vars, xmlOut
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
Method Summary
protected  org.apache.log4j.Logger getLogger()
          Gets the logger used for this tag
 String getTagDescription()
          Describe the tag when error messages occur.
protected  String getTagTraceMsg()
          Gets the trace message when the execution is beginning and ending.
Methods inherited from class net.sf.jameleon.AbstractCsvTag
getCsvCharset, getCsvDir, getCsvFile, getCsvFileName, getCsvValueSeparator, getDataDriver, getDataExceptionMessage, getName, getNewStateStoreLocation, setCsvCharset, setCsvDir, setCsvFileName, setCsvValueSeparator, setName, setupDataDriver
Methods inherited from class
getDataDir, getDataDir, setCharset, setDataDir, setFile
Methods inherited from class
addVariablesToRowData, createNewResult, destroyVariables, doTag, executeDrivableRow, getDataDrivableRowResult, getFailedOnCurrentRow, getKeyMapping, getResultContainer, getRowData, getTestCaseTag, getTraceKeyValuePairs, init, isBreakPoint, isCountRow, mapKeys, recordDataDrivableResult, recordFunctionResult, recordResult, recordSessionResult, recordThisResult, removeChildlessResult, setBreakPoint, setCountRow, setFailedOnCurrentRow, setResultError, setStopTestExecutionOnFailure, setUpDataDrivable, setVariablesInContext, 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

Constructor Detail


public CsvTag()
Method Detail


protected org.apache.log4j.Logger getLogger()
Gets the logger used for this tag

Specified by:
getLogger in class AbstractDataDrivableTag
the logger used for this tag.


protected String getTagTraceMsg()
Gets the trace message when the execution is beginning and ending. The message displayed will already start with BEGIN: or END:

Specified by:
getTagTraceMsg in class AbstractDataDrivableTag
the trace message when the execution is just beginning and ending.


public String getTagDescription()
Describe the tag when error messages occur. The most appropriate message might be the tag name itself.

Specified by:
getTagDescription in class AbstractDataDrivableTag
A brief description of the tag or the tag name itself.

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