org.apache.jmeter.functions

Class XPath

Implemented Interfaces:
Function

public class XPath
extends AbstractFunction

The function represented by this class allows data to be read from XML files. Syntax is similar to the CVSRead function. The function allows the test to line-thru the nodes in the XML file - one node per each test. E.g. inserting the following in the test scripts : ${_XPath(c:/BOF/abcd.xml,/xpath/)} // match the (first) node ${_XPath(c:/BOF/abcd.xml,/xpath/)} // Go to next match of '/xpath/' expression NOTE: A single instance of each different file/expression combination is opened and used for all threads.

Constructor Summary

XPath()

Method Summary

String
execute(SampleResult previousResult, Sampler currentSampler)
List
getArgumentDesc()
String
getReferenceKey()
void
setParameters(Collection parameters)

Methods inherited from class org.apache.jmeter.functions.AbstractFunction

checkMinParameterCount, checkParameterCount, checkParameterCount, execute, execute, getReferenceKey, getVariables, setParameters

Constructor Details

XPath

public XPath()

Method Details

execute

public String execute(SampleResult previousResult,
                      Sampler currentSampler)
            throws InvalidVariableException
Specified by:
execute in interface Function
Overrides:
execute in interface AbstractFunction

getArgumentDesc

public List getArgumentDesc()
Specified by:
getArgumentDesc in interface Function

getReferenceKey

public String getReferenceKey()
Specified by:
getReferenceKey in interface Function
Overrides:
getReferenceKey in interface AbstractFunction

setParameters

public void setParameters(Collection parameters)
            throws InvalidVariableException
Specified by:
setParameters in interface Function
Overrides:
setParameters in interface AbstractFunction

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.