Other functions
The following describes the remaining functions that are available in IBM® Rational® Integration Tester.
For more information, see Database resources, connections, and bindings.
Function | Example | Description |
---|---|---|
|
|
Runs a SQL query against a configured database, returning the value from the first column of the first row of the result set. The function is typically used to request singular elements of data. |
|
|
Runs an update-based SQL statement against a configured database, returning the number of rows that are affected by the statement. |
|
|
Combines the listed arguments into a single string by using the specified delimiter. For example, join(;,2,3,4) returns 2;3;4. You can use the function to store a list of values into a single tag. |
|
|
Provides keyed access to a data set. This
function works the same way as the Lookup Test Data test
action, except that matching results are returned to the function
rather than mapped to a tag. Test data sets must be specified by
using the proper extension, according to the following data set types:
|
|
|
Returns the current time in the specified
date and time pattern. For more information, see Formatting and parsing date-time patterns. The
output of the function can be used in two ways:
|
|
|
Returns a null value, which you can use to set tag values or to compare to a database query result. |
|
|
Replaces tags that are used in other tags
with their value in the current tag store. The contents of the tag
(by using the replaced values) can then be stored in a new tag. For example, consider the following tags and their
default values:
The value of %%replaced%% is "A comes before B". |
|
|
Resets all tags that match a stated pattern
to their default values. Use regular expressions to create the pattern
that the tags must match. In the example shown, all tags that begin with the word "stress" followed by two digits, such as %%stress01%%, are reset. |
|
|
Determines a working date that is a defined number of days from a start date. The function counts working days only, ignoring weekends and holidays according to the local calendar. Holidays are configured by using a simple text file that contains a list of dates. |
|
|
Replaces the contents of an existing tag
with a function, expression, or constant specified by "value". You
can also do this by using the store operation functionality from within
the Function action. The specified tag must already exist. Do not include beginning and ending percent signs (%%). |
|
|
Reads and returns the contents of a text
file in a specified location. The file contents can be stored in a
tag for use in other phases of the test. The full location of the file can be specified as a local or UNC path. |
|
|
Determine whether an XML document (xml)
is valid in terms of the provided schemas (dtdURL or schemaURL). The
functions behave differently depending on context:
|
|
|
Runs a query-based SQL statement against
a configured database. The result set of this query is then encoded
as XML and provided as the return value from the function. The XML
fragment that is returned conforms to the following schema:
The example shown returns the following
output:
|
Example: For example, (detailed previously). |
|
Returns the result of performing an XPath
query (xpath) on some XML source that is to be validated (xml). you
can get the same result by using the store operation functionality
from within the Function action. The example shown returns the number of rows that are provided in the output from the execution of an xmlDbQuery() function. Rational Integration Tester uses the XPATH 2.0 draft standard. Therefore, the fully qualified node name, including the namespace, must be used when matching nodes. If
attributes are included in the XML, the XML must be quoted and the
quotes that surround the attribute must be escaped. The following
example illustrated this requirement:
|