TestPlan Function Calls
Document

Function Calls

by Group Public on Thursday July 10 2008 @ 14:52:09 (1/1 Points)

Language ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It

A function can be called in three different manners

User defined functions may be defined in the Script.FunctionMap context item. These must be defined at startup, prior to any code execution.

Short-Names

Short-names are those names registered either in the startup properties files or as a local function. They usually have a series of parameters which undergo special expansion, or they can be called with a with clause.

Examples:

SetEmailResponse text/html
set %Group% as ECMCreateGroup with
  %Single% true
end

Set Short-Names

To be used as part of a Extended-RValue expansion, the name needs to be registered as Set.ShortName.

Parameter Expansion

Parameters can be expanded in more than the usual manner. The parameters are marked in the properties file (or in the local function declaration). The various expansion are as follows:

  • Standard-RValue expansion a string or object is created, and it may not be null
  • Object Expansion the result of the expansion may be null
  • XPath Expansion like Standard-RValue but does proper quoting on expansion of strings
  • No Expansion no expansion of the parameter is done, the string is passed as-is
  • Condition Expansion a condition is expected at this point, the result of which will be passed to the function
© 2008-2010 edA-qa mort-ora-y
Using Persephone and TestPlan
Tag: