Hitachi

JP1 Version 11 JP1/Performance Management - Agent Option for Service Response Description, User's Guide and Reference


8.5.2 Format and definition of the Web transaction measurement conditions

Organization of this subsection

(1) <TRANSACTION_PARAM> tag

The <TRANSACTION_PARAM> tag specifies settings related to the measurement conditions for the Web transaction.

(a) Format

<TRANSACTION_PARAM>
  <TRANSACTION_NAME>Web-transaction-name</TRANSACTION_NAME>
  <TRANSACTION_COMMENT>comment</TRANSACTION_COMMENT>
  <DEFAULT_CHARSET>character-set</DEFAULT_CHARSET>
  <HTML_OUT></HTML_OUT>
  <IGNORE_EMBEDDED_RESOURCE></IGNORE_EMBEDDED_RESOURCE>
  <NO_CACHE></NO_CACHE>
  <KEEP_ALIVE></KEEP_ALIVE>
  <DEFAULT_PROXY>
    <PROXY_HOSTNAME>connection-target-proxy-host-name-or-IP-address</PROXY_HOSTNAME>
    <PROXY_PORT>connection-target-proxy's-port-number</PROXY_PORT>
    <PROXY_USERNAME>user-name-used-for-proxy-authentication</PROXY_USERNAME>
    <PROXY_PASSWORD>password-used-for-proxy-authentication</PROXY_PASSWORD>
  </DEFAULT_PROXY>
  <SSL_AUTH_IGNORE></SSL_AUTH_IGNORE>
  <CLIENT_AUTH>
    <CLIENT_CERT_FILE>client-certificate-file-name</CLIENT_CERT_FILE>
    <CLIENT_CERT_PASSWORD>private-key-password</CLIENT_CERT_PASSWORD>
  </CLIENT_AUTH>
  <USER_AGENT>user-agent-name</USER_AGENT>
</TRANSACTION_PARAM>

(b) Definition

Table 8‒25: Definition of <TRANSACTION_PARAM>

XML tag

Mandatory

Role of tag and value to be specified

<TRANSACTION_NAME>... </TRANSACTION_NAME>

((1 to 255 bytes of character string))

Y

Specifies the Web transaction name. Each Web transaction must have a unique name within the same Web transaction file.

A Web transaction name cannot contain the vertical bar (|) character.

<TRANSACTION_COMMENT>... </TRANSACTION_COMMENT>

((0 to 255 bytes of character string))

--

Specifies a comment for the transaction.

<DEFAULT_CHARSET>... </DEFAULT_CHARSET>

((Shift_JIS|EUC-JP|ISO-2022-JP|UTF-8|GB18030#8))

--

Specifies the default character set for an HTML file that is acquired by this transaction. The specifiable values are Shift_JIS, EUC-JP, ISO-2022-JP, UTF-8, and GB18030. The character set specified in the <DEFAULT_CHARSET> tag is assumed for HTML acquired by a step in this transaction for which the <CHARSET> tag is not specified.

When the character set does not specified in the <DEFAULT_CHARSET> tag, Shift_JIS is assumed for Japanese OS, GB18030 is assumed for Chinese OS and US-ASCII is assumed for other OS.

<HTML_OUT> </HTML_OUT>#1

--

Specifies that you output the HTTP header and HTML acquired by this transaction to a file.

The output data can be used as a reference when you specify the response determination and definition of variable strings.

The system outputs only HTML acquired by a step for which the <STEP_ID> tag is specified within the <STEP> tag. HTML acquired by a step for which the <STEP_ID> tag is omitted will not be output.

If the attribute of the acquired file is not HTML, then the file is not output.

The following shows the output destination folder and the file name:

The output destination folder:

  • When the file is output by Probe Daemon

    installation-folder\agtv\probe\probedata\webtrans

  • When the file is output by the test command (jpcvtest)

    installation-folder\agtv\probe\probedata\webtrans_cmd

The file name (for HTML):

step-identifier.html

The file name (for HTTP header):

step-identifier.hdr

If the same file name already exists, that file will be overwritten unconditionally.

When you specify the <HTML_OUT> tag, you must be careful to treat the output data because it may contain personal information.

<IGNORE_EMBEDDED_RESOURCE> </IGNORE_EMBEDDED_RESOURCE>#1

--

Specifies that resources embedded in the acquired page are to be ignored.

<NO_CACHE> </NO_CACHE>#1

--

Specifies that the cache is not to be referenced in HTTP(S) requests.

<KEEP_ALIVE> </KEEP_ALIVE>#1

--

Specifies that the keep alive mode is to be used in HTTP(S) requests.

<DEFAULT_PROXY>... </DEFAULT_PROXY>

--

Specifies that a proxy is to be used. This tag contains the <PROXY_HOSTNAME>, <PROXY_PORT>, <PROXY_USERNAME>, and <PROXY_PASSWORD> tags. This tag is used to specify the default proxy settings for the overall transaction. To omit the specification, omit the <DEFAULT_PROXY> tag and all the tags contained in it.

<PROXY_HOSTNAME>...</PROXY_HOSTNAME>

((1 to 255 bytes of character string))#2

--#3

Specifies the default proxy server's host name or IP address.

<PROXY_PORT>... </PROXY_PORT>

((1 to 65535))

--#3

Specifies the default proxy server's port number.

<PROXY_USERNAME>... </PROXY_USERNAME>

((1 to 64 bytes of character string))

--#4

Specifies the user name when proxy authentication is to be performed at the default proxy server.

Omitting this tag means that proxy authentication is not to be performed.

<PROXY_PASSWORD>... </PROXY_PASSWORD>

((0 to 64 bytes of character string))

--#5

Specifies the password when proxy authentication is to be performed at the default proxy server.

Specifying a character string with a length of 0 bytes means that the null character string is to be used as the password. Omitting this tag means that the password set by the password utility is to be used.

<SSL_AUTH_IGNORE></SSL_AUTH_IGNORE>#1

--

Specifies that measurement is to continue if SSL server authentication fails when an HTTPS request is issued. To terminate measurement when SSL server authentication fails, omit this tag.

<CLIENT_AUTH>...</CLIENT_AUTH>

--

Specifies that client authentication is to be performed when an HTTPS request is issued. Use the <CLIENT_CERT_FILE> and <CLIENT_CERT_PASSWORD> tags to specify the settings related to client authentication. To omit the specification, omit the <CLIENT_AUTH> tag and all the tags contained in it.

<CLIENT_CERT_FILE>...</CLIENT_CERT_FILE>

((1 to 255 bytes of character string))

--#6

Specifies the file in which the client certificate and private key are stored. Specify the name of a file that is stored in installation-folder\agtv\probe\cert. Do not include the path. The file must be converted to Base64-encoded X.509 format.

<CLIENT_CERT_PASSWORD>...</CLIENT_CERT_PASSWORD>

((0 to 1,023 bytes of character string))

--#7

Specifies the private key password for the client certificate when client authentication is performed. If you specify this item, we recommend that you have registered a password by using the password utility.

Specifying a character string with a length of 0 bytes means that the null character string is to be used as the password. Omitting this tag means that the password set by the password utility is to be used.

<USER_AGENT>... </USER_AGENT> ((1 to 255 bytes of character string)) <<PFM - Agent for Service Response (Windows)>>

--

Specifies the user agent name. Use this tag when accessible user agent names are limited.

Legend:

Y: Mandatory item

--: Optional item

(( )): Specifiable value range of the tag.

<< >>: Default value

#1

You cannot specify any elements (including spaces or line breaks) within tags. If elements are specified within tags, the Web Recorder cannot open the Web transaction file.

#2

To specify an IPv4 address for the host name, use dotted-decimal format (for example: 172.16.233.12). To specify an IPv6 address, use hexadecimal format, using colons as separators (for example: ACE6:45:75:91::1).

#3

This is a mandatory item when a proxy is to be used.

#4

This is a mandatory item when proxy authentication is to be performed with a proxy.

#5

This is a mandatory item when proxy authentication is to be performed and the password has not been registered by the password utility.

#6

This is a mandatory item when client authentication is to be performed.

#7

This is a mandatory item when client authentication is to be performed and a password has not been registered by using the password utility.

#8

GB18030 supports only in Chinese OS and you cannot use the 4 bytes characters.

(2) <STEP> tag

The <STEP> tag specifies step information for the Web transaction.

(a) Format

<STEP>
  <STEP_ID>step-identifier</STEP_ID>
  <TITLE>page-title</TITLE>
  <FRAME_NAME>frame-name</FRAME_NAME>
  <CHARSET>character-set</CHARSET>
  <REQUEST>
    <REQUEST_CHARSET>character-set</REQUEST_CHARSET>
    <URL>URL-to-be-accessed</URL>
    <POST>
      <CONTENT_TYPE>
 
        When sending the message body as:
        application/x-www-form-urlencoded
        <FORM_URLENCODED></FORM_URLENCODED>
 
        When sending the message body as:
        text/plain
        <TEXT_PLAIN></TEXT_PLAIN>
 
         When sending the message body as:
        multipart/form-data
        <MULTIPART_FORM_DATA>
          <BOUNDARY>separator-for-message-body</BOUNDARY>
        </MULTIPART_FORM_DATA>
 
         When sending the message body as:
         a value other than the above
        <OTHER>Content-Type</OTHER>
 
      </CONTENT_TYPE>
      <MESSAGE_BODY>message-body</MESSAGE_BODY>
    </POST>
    <COOKIE>Cookie-header</COOKIE>
  </REQUEST>
  <WEB_AUTH>
    <WEB_USERNAME>user-name-used-for-Web-authentication</WEB_USERNAME>
    <WEB_PASSWORD>password-used-for-Web-authentication</WEB_PASSWORD>
  </WEB_AUTH>
  <PROXY>
 
    When a proxy is not used:
    <PROXY_NOUSE></PROXY_NOUSE>
 
    When using a non-default proxy:
    <PROXY_HOSTNAME>connection-target-proxy-host-name-or-IP-address</PROXY_HOSTNAME>
    <PROXY_PORT>connection-target-proxy's-port-number</PROXY_PORT>
    <PROXY_USERNAME>user-name-used-for-proxy-authentication</PROXY_USERNAME>
    <PROXY_PASSWORD>password-used-for-proxy-authentication</PROXY_PASSWORD>
 
  </PROXY>
  <RESPONSE_PATTERN>condition-used-for-response-determination</RESPONSE_PATTERN>
  <VARIABLE>
    <!--VARIABLE -->
  </VARIABLE>
  <START_SCOPE>start-scope-name</START_SCOPE>
  ...
  <END_SCOPE>end-scope-name</END_SCOPE>
  ...
</STEP>

(b) Definition

Table 8‒26: Definition of <STEP>

XML tag

Mandatory

Role of tag and value to be specified

<STEP_ID>... </STEP_ID>

((1 to 255 bytes of alphanumeric characters, hyphen, underscore, and space))

--

Defines a unique step identifier for identifying the step. This item must be specified if the HTML acquired by the step contains a substitute string for a variable string in the message body, and for the URL for the subsequent step; or if HTML is to be output to a file, and the HTML acquired by this step is to be output.

If HTML is to be output to a file, this identifier is used in the file name; therefore, make sure that the specified step identifier is unique in all the defined transactions.

<TITLE>...</TITLE>

((0 to 1,023 bytes of character string))

--

Defines the title for the page that is acquired by this step.

<FRAME_NAME>... </FRAME_NAME>

((0 to 1,023 bytes of character string))

--

Defines the frame name for the page that is acquired by this step.

<CHARSET>... </CHARSET>

((Shift_JIS|EUC-JP|ISO-2022-JP|UTF-8|GB18030#13))

--

Specifies the character set for the HTML file that is acquired by this step. The specifiable values are Shift_JIS, EUC-JP, ISO-2022-JP, UTF-8, and GB18030. If this item is omitted, the default character set for this transaction is used. If the character set name is not specified correctly, substitute string search and response determination may fail.

<REQUEST>... </REQUEST>

Y

Specifies the request-related settings for this step. Use the <REQUEST_CHARSET>, <URL>, <POST>, and <COOKIE> tags.

<REQUEST_CHARSET>... </REQUEST_CHARSET>

((Shift_JIS|EUC-JP|ISO-2022-JP|UTF-8|GB18030#13))

--

Specifies the character set of request information sent at this step (URL, message body, cookie). The specifiable values are Shift_JIS, EUC-JP, ISO-2022-JP, UTF-8, and GB18030.

The request information is encoded to send by the character set specified in this tag, not the character set specified in the XML declaration. If all the request information is defined by the ASCII code, you do not need to specify this item. If this tag is omitted, the request information is encoded by Shift_JIS on Japanese OS, GB18030 on Chinese OS, or US-ASCII on the other OS and sent.

If you specify ISO-2022-JP in this item, you cannot specify the multibyte characters in the <URL> tag of the <STEP> tag. You cannot specify the variable strings.

<URL>...</URL>

((1 to 2,083 bytes of character string))#1

Y

Specifies the URL to be acquired by this step. This URL specification must include the protocol identifier (http:// or https://).

<POST>...</POST>

--

Specifies that the POST method is to be used. Use the <CONTENT_TYPE> and <MESSAGE_BODY> tags to specify the settings needed for using the POST method. When this item is omitted, the GET method is used.

<CONTENT_TYPE>... </CONTENT_TYPE>

--#2

Specifies Content-Type for using the POST method. For the element, specify one of the <FORM_URLENCODED>, <TEXT_PLAIN>, <MULTIPART_FORM_DATA>, or <OTHER> tag.

<FORM_URLENCODED> </FORM_URLENCODED>#3

--#4

Specifies that the message body is to be notified as application/x-www-form-urlencoded when the POST method is used.

<TEXT_PLAIN> </TEXT_PLAIN>#3

--#4

Specifies that the message body is to be notified as text/plain when the POST method is used.

<MULTIPART_FORM_DATA>... </MULTIPART_FORM_DATA>

--#4

Specifies that the message body is to be notified as multipart/form-data when the POST method is used. If you specify this item, you must use the <BOUNDARY> tag to specify the separator for the message body.

<BOUNDARY>...</BOUNDARY>

((1 to 255 bytes of character string))

--#5

Specifies the separator for the message body that is to be notified as multipart/form-data.

<OTHER>...</OTHER>

((1 to 255 bytes of character string)

--#4

Specifies a desired Content-Type when the Content-Type of the message body to be notified by the POST method is neither application/x-www-form-urlencoded, nor text/plain, nor multipart/form-data.

<MESSAGE_BODY>... </MESSAGE_BODY>

((0 to 512,000 bytes of character string))

--#2

Specifies the message body to be notified by the POST method.

<COOKIE>... </COOKIE>

((0 to 1,023 bytes of character string))

--

Specifies that a specific cookie is to be set for this step's request. Normally, there is no need to specify this item.

Specify the value in the format variable-name=value. To define multiple cookies, specify as many <COOKIE> tags as there are cookies, up to a maximum of eight.

<WEB_AUTH>... </WEB_AUTH>

--#14

Specifies that Web authentication is to be performed during acquisition of this step. Use the <WEB_USERNAME> and <WEB_PASSWORD> tags to specify the settings related to Web authentication. To omit the specification, omit the <WEB_AUTH> tag and all the tags contained in it.

<WEB_USERNAME>... </WEB_USERNAME>

((1 to 64 bytes of character string))

--#6

Specifies the user name when Web authentication is to be performed.

<WEB_PASSWORD>... </WEB_PASSWORD>

((0 to 64 bytes of character string))

--#7

Specifies the password needed for Web authentication.

Specifying a character string with a length of 0 bytes means that the null character string is to be used as the password. Omitting this tag means that the password set by the password utility is to be used.

<PROXY>...</PROXY>

--

Specifies the proxy settings to be used by this step. There are two ways to specify the proxy settings: using the <PROXY_NOUSE> tag; and, using the <PROXY_HOSTNAME>, <PROXY_PORT>, <PROXY_USERNAME>, and <PROXY_PASSWORD> tags. If this item is omitted, the default proxy settings for the transaction are used. To omit the specification, omit the <PROXY> tag and all the tags contained in it.

<PROXY_NOUSE> </PROXY_NOUSE>#3

--

Specifies that a proxy is not to be used in the measurement in this step.

<PROXY_HOSTNAME>... </PROXY_HOSTNAME>

((1 to 255 bytes of character string))#8

--#9, #10

Specifies the proxy server's host name or IP address when non-default proxy settings are to be used in the measurement in this step.

<PROXY_PORT>... </PROXY_PORT>

((1 to 65535))

--#9, #10

Specifies the proxy server's port number that is to be used in the measurement in this step.

<PROXY_USERNAME>... </PROXY_USERNAME>

((1 to 64 bytes of character string))

--#11

Specifies the user name when proxy authentication is to be performed at the proxy server that is used for this step measurement.

Omitting this tag means that proxy authentication is not to be performed.

<PROXY_PASSWORD>... </PROXY_PASSWORD>

((0 to 64 bytes of character string))

--#12

Specifies the password when proxy authentication is to be performed at the proxy server that is used for this step measurement. If the password has already been registered by the password utility, there is no need to specify this tag.

Specifying a character string with a length of 0 bytes means that the null character string is to be used as the password. Omitting this tag means that the password set by the password utility is to be used.

<RESPONSE_PATTERN>... </RESPONSE_PATTERN >

((0 to 1,023 bytes of character string))

--

Specifies the condition to be used for response determination in this step according to the following rules:

  • Permitted operators are * (AND) and + (OR).

  • A permitted character string must be enclosed by { and }.

  • A character string that is not permitted must be enclosed by !{ and }.

  • Parentheses (( )) may be used to indicate that * (AND) takes precedence over + (OR).

  • A set of parentheses (( )) indicating priority must contain at least one operator.

  • It is not permissible to specify multiple consecutive left parentheses (() to indicate priority.

  • Define a condition that does not satisfy the condition in the parentheses (( )) indicating priority as shown below:

    Example 1: Condition that does not satisfy ({aaa}*{bbb}):

    (!{aaa}+!{bbb})

    Example 2: Condition that does not satisfy ({aaa}+{bbb}):

    (!{aaa}*!{bbb})

Specification example:

Success is included, but Error is not included:

{Success}*!{Error}

<VARIABLE>... </VARIABLE>

--

Specifies the variable string settings if you use the variable string at this step. Use the following tags to specify the variable string:

  • <VARIABLE_TARGET> tag

  • <SUBSTITUTE_TARGET> tag or <SUBSTITUTE_COMMAND> tag

  • <SUBSTITUTE_FORCE_URLENCODE> tag

To specify multiple variable strings, use multiple <VARIABLE> tags. If you omit the specification, you omit the <VARIABLE> tag and all the tags contained in it. When you omit the specification, no variable string is set in this step.

For details about <VARIABLE> tag, see (3) <VARIABLE> tag within a <STEP> tag.

<START_SCOPE>... </START_SCOPE>

--

Specifies the scope name to be used for a scope start point. The scope name must be one of the following: SCOPE1, SCOPE2, SCOPE3, SCOPE4, SCOPE5, SCOPE6, SCOPE7, or SCOPE8. To specify multiple starting scope names, use multiple <START_SCOPE> tags.

<END_SCOPE>... </END_SCOPE>

--

Specifies the scope name to be used for a scope end point. The scope name must be one of the following: SCOPE1, SCOPE2, SCOPE3, SCOPE4, SCOPE5, SCOPE6, SCOPE7, or SCOPE8. To specify multiple ending scope names, use multiple <END_SCOPE> tags.

Legend:

Y: Mandatory item

--: Optional item

(( )): Specifiable value range of the tag.

<< >>: Default value

#1

To use an IP address to specify the host name, use an IPv4 dotted-decimal address (for example: 172.16.233.12/example.html) or an IPv6 hexadecimal address enclosed in square brackets, using colons as separators (for example: [ACE6:45:75:91::1]/example.html).

Note that monitoring HTTPS pages is not supported in environments that use IPv6 for communications. For this reason, when monitoring HTTPS pages, you cannot specify an IPv6 address for the host name.

#2

This is a mandatory item when the POST method is to be used.

#3

You cannot specify any elements (including spaces or line breaks) within tags. If elements are specified within tags, the Web Recorder cannot open the Web transaction file.

#4

When the POST method is to be used, specify one of the <FORM_URLENCODED>, <TEXT_PLAIN>, <MULTIPART_FORM_DATA>, or <OTHER> tags.

#5

This is a mandatory item when <MULTIPART_FORM_DATA> is specified.

#6

This is a mandatory item when Web authentication is to be performed.

#7

This is a mandatory item when Web authentication is to be performed, but the password has not been registered by the password utility.

#8

To specify an IPv4 address for the host name, use dotted-decimal format (for example: 172.16.233.12). To specify an IPv6 address, use hexadecimal format, using colons as separators (for example: ACE6:45:75:91::1).

Note that monitoring HTTPS pages is not supported in environments that use IPv6 for communications. For this reason, when monitoring HTTPS pages, you cannot specify an IPv6 address for the host name.

#9

This item cannot be specified when you have specified the <PROXY_NOUSE> tag.

#10

This is a mandatory item when you use a specific proxy instead of the default proxy.

#11

This is a mandatory item when proxy authentication is to be performed without using the default proxy.

#12

This is a mandatory item when proxy authentication is to be performed without using the default proxy, but the password has not been registered by the password utility.

#13

GB18030 supports only in Chinese OS and you cannot use the 4 bytes characters.

#14

If multiple steps exist for accessing a Web server that requires Web authentication, each step requires a setting for Web authentication.

(3) <VARIABLE> tag within a <STEP> tag

The <VARIABLE> tag sets a variable string and substitute string in step information for the Web transaction. The substitute string is specified in the <SUBSTITUTE_TARGET> tag within the <VARIABLE> tag.

(a) Format

<VARIABLE> tag format

<VARIABLE>
  <VARIABLE_TARGET>
    <VARIABLE_TYPE>location-of-variable-string</VARIABLE_TYPE>
    <VARIABLE_PART>variable-part</VARIABLE_PART>
  </VARIABLE_TARGET>
 
If the received data contains the substitute string:
  <SUBSTITUTE_TARGET>
    <!-- SUBSTITUTE_TARGET -->
  </SUBSTITUTE_TARGET>
 
If you execute the command to acquire the substitute string:
  <SUBSTITUTE_COMMAND>
    <TARGET_COMMAND_LINE>executing-command-line</TARGET_COMMAND_LINE>
    <TARGET_COMMAND_ARG>
      <SUBSTITUTE_TARGET>
        <!-- SUBSTITUTE_TARGET -->
      </SUBSTITUTE_TARGET>
    </TARGET_COMMAND_ARG>
    ...
  </SUBSTITUTE_COMMAND>
 
  <SUBSTITUTE_FORCE_URLENCODE></SUBSTITUTE_FORCE_URLENCODE>
 
</VARIABLE>

<SUBSTITUTE_TARGET> tag format

  <SUBSTITUTE_TARGET>
    <TARGET_STEP_ID>step-specification</TARGET_STEP_ID>
 
If the acquired HTML contains the substitute string:
    <TARGET_ELEMENT>
      <TARGET_ELEMENT_NAME>name-of-element-containing-substitute-string </TARGET_ELEMENT_NAME>
      <TARGET_ELEMENT_ATTRIBUTE>
attribute-of-element-containing-substitute-string
      </TARGET_ELEMENT_ATTRIBUTE>
      ...
      <TARGET_ELEMENT_CONTENT>
character-string-in-contents-of-element-that-contains-substitute-string
      </TARGET_ELEMENT_CONTENT>
      ...
      <TARGET_ELEMENT_POSITION>
        location-of-element-from-beginning-when-multiple-elements-match-the-above-condition
      </TARGET_ELEMENT_POSITION>
    </TARGET_ELEMENT>
    <SUBSTITUTE_TYPE>
 
      When the substitute string is contained in the element's contents
      <TYPE_CONTENT></TYPE_CONTENT>
 
      When the substitute string is contained in the element's attribute value
      <TYPE_ATTRIBUTE>name-of-attribute-containing-substitute-string</TYPE_ATTRIBUTE>
 
    </SUBSTITUTE_TYPE>
 
If the acquired HTML header contains the substitute string:
  <TARGET_HEADER>
    <TARGET_HEADER_NAME>
      name-of-header-containing-substitute-string
    </TARGET_HEADER_NAME>
    <TARGET_HEADER_VALUE>
      value-of-header-containing-substitute-string
    </TARGET_HEADER_VALUE>
  </TARGET_HEADER>
    <SUBSTITUTE_RANGE>
      <BEFORE_RANGE>character-string-just-before-substitute-string</BEFORE_RANGE>
      <AFTER_RANGE>character-string-just-after-substitute-string</AFTER_RANGE>
  </SUBSTITUTE_RANGE>
</SUBSTITUTE_TARGET>

(b) Definition

Table 8‒27: Definition of <VARIABLE>

XML tag

Mandatory

Role of tag and value to be specified

<VARIABLE_TARGET>... </VARIABLE_TARGET>

Y

Specifies a variable string. This tag contains the <VARIABLE_TYPE> tag and <VARIABLE_PART> tags.

The variable string specified in this tag cannot even partially duplicate the variable string specified in the <VARIABLE_TARGET> tag contained in any other <VARIABLE> tag defined in this step.

<VARIABLE_TYPE>... </VARIABLE_TYPE>

((URL | MESSAGE_BODY | COOKIE))

Y

Specifies either URL, MESSAGE_BODY, or COOKIE as the value of the variable string.

<VARIABLE_PART>... </VARIABLE_PART>

((1 to 4095 bytes of character string))

Y

Specifies the variable part. This must be a variable string during recording that is in the value specified in <VARIABLE_TYPE> tag. If there are multiple applicable character strings, the search is conducted from the beginning, and only the first matching character string becomes the variable string during recording.

Example: Dynamic session management is performed, and during recording, the session ID (variable string) is 0123456789 and the recorded URL is as follows:

http://www.jp1.hitachi.co.jp/sample.cgi?id=0000&sessionid=0123456789

In this example, specify 0123456789 in <VARIABLE_PART> tag.

Hitachi recommends that you should replace the variable string in the URL or message body with $VAR1$ or $VAR2$ in the following case:

  • To replace multiple character strings.

  • A variable string is multibyte characters.

  • You specify the character code other than Shift_JIS (in a Japanese environment) or GB18030 (in a Chinese environment) in the <REQUEST_CHARSET> tag at same <STEP> tag.

  • In this case, if the multibyte characters are specified in the <VARIABLE_PART> tag, the variable strings may not be recognized correctly.

<SUBSTITUTE_TARGET>... </SUBSTITUTE_TARGET>

--#1

Specifies a substitute string. This tag contains the <TARGET_STEP_ID>, <TARGET_ELEMENT>, <SUBSTITUTE_TYPE>, <TARGET_HEADER>, and <SUBSTITUTE_RANGE> tags. For details, see Table 8-28.

<SUBSTITUTE_COMMAND>... </SUBSTITUTE_COMMAND>

--#1

Specifies the command to be executed for acquiring the substitute strings. This tag contains the <TARGET_COMMAND_LINE> and <TARGET_COMMAND_ARG> tags.

<TARGET_COMMAND_LINE>... </TARGET_COMMAND_LINE>

((1 or greater bytes of character string))

--#2

Specifies the command line to be executed for acquiring the substitute strings. You can specify the command to be executed and the arguments that do not change dynamically. The return value (exit code) of the command must be 0, if the command successfully terminates. If the return value (exit code) is other than 0, it is judged that the command terminates abnormally.

If the command terminated abnormally or failed to be executed, the variable string specified by using the <VARIABLE_PART> tag is replaced with a null character.

Hitachi recommends that the path to the command is surrounded by &quot;.

If the path to the command is not surrounded by &quot; and contains the spaces, the command may fail to be executed.

<TARGET_COMMAND_ARG>... </TARGET_COMMAND_ARG>

--

Specifies this tag when you add the arguments to the command line specified by the <TARGET_COMMAND_LINE> tag. This tag contains the <SUBSTITUTE_TARGET> tag.

The arguments to be added are cut down from the data received by using the <SUBSTITUTE_TARGET> tag. The character string cut down is surrounded by the double quotation marks (") and added to the command line as an argument.

To add multiple arguments, specify multiple <TARGET_COMMAND_ARG> tags.

<SUBSTITUTE_FORCE_URLENCODE> </SUBSTITUTE_FORCE_URLENCODE>#3

--

Specifies this tag if you URL encode all the character string (including the characters used as delimiters in the URL) when the variable string is replaced with the substitute string. When you specify this tag, the characters are URL encoded as follows:

Alphanumeric characters, *, -, ., @, _

Not encoded.

Space

Encoded to +.

Other characters listed above

Encoded into three characters in the format of "%xy " for each byte (x and y are the hex numbers with each one representing 4-bit).

Legend:

Y: The item is mandatory when the <VARIABLE> tag is specified.

--: The item is optional when the <VARIABLE> tag is specified.

(( )): Specifiable value range of the tag.

#1

Specify either the <SUBSTITUTE_TARGET> tag or the <SUBSTITUTE_COMMAND> tag.

#2

The item is mandatory when you specify the <SUBSTITUTE_COMMAND> tag.

#3

You cannot specify any elements (including spaces or line breaks) within tags. If elements are specified within tags, the Web Recorder cannot open the Web transaction file.

Table 8‒28: Definition of <SUBSTITUTE_TARGET>

XML tag

Mandatory

Role of tag and value to be specified

<TARGET_STEP_ID>... </TARGET_STEP_ID>

((1 to 255 bytes of alphanumeric characters, hyphen, underscore, and space))

Y

Specifies the identifier of the step that acquires an HTML file containing the substitute string. The specified step identifier must be defined in the step preceding this step.

<TARGET_ELEMENT>... </TARGET_ELEMENT>

--#1

Identifies the element containing the substitute string within the HTML file that is acquired by the step specified in <TARGET_STEP_ID> tag. This tag contains the <TARGET_ELEMENT_NAME>, <TARGET_ELEMENT_ATTRIBUTE>, <TARGET_ELEMENT_CONTENT>, and <TARGET_ELEMENT_POSITION> tags.

If the element cannot be identified by the <TARGET_ELEMENT_NAME> tag, you must specify all or some of the <TARGET_ELEMENT_ATTRIBUTE>, <TARGET_ELEMENT_CONTENT>, and <TARGET_ELEMENT_POSITION> tags so that the element that contains the substitute string can be identified.

<TARGET_ELEMENT_NAME>... </TARGET_ELEMENT_NAME>

((1 to 1023 bytes of character string))

--#2

Specifies the name of the element that contains the substitute string. This name is not case sensitive. The system does not check whether or not the specified element name is a valid HTML element; the system assumes that the specified character string is an element name.

Example: To specify an INPUT element (<INPUT ... />), specify INPUT in the <TARGET_ELEMENT_NAME> tag.

<TARGET_ELEMENT_ATTRIBUTE>... </TARGET_ELEMENT_ATTRIBUTE>

((1 to 1023 bytes of character string))

--

Specifies a single attribute of the element that contains the substitute string.

This item is specified when the element cannot be identified by <TARGET_ELEMENT_NAME> tag alone (such as when multiple elements have the value specified in <TARGET_ELEMENT_NAME> tag), but when specifying the element's attribute can identify or narrow down the target element. Do not specify an attribute that changes dynamically. Note that validity checking is not performed on the specified attribute name and value.

Specify the value in the format attribute-name=attribute-value. attribute-name is not case sensitive, but attribute-value is case sensitive. To specify multiple attributes, specify multiple <TARGET_ELEMENT_ATTRIBUTE> tags.

<TARGET_ELEMENT_CONTENT>... </TARGET_ELEMENT_CONTENT>

((1 to 1023 bytes of character string))

--

Specifies the character string in the contents of the element that contains the substitute string.

This item is specified when the element cannot be identified by <TARGET_ELEMENT_NAME> tag alone (such as when multiple elements have the value specified in <TARGET_ELEMENT_NAME> tag), but when specifying the element's contents can identify or narrow down the target element. Do not specify element contents that change dynamically.

To specify multiple character strings that are in the contents of the element, specify multiple <TARGET_ELEMENT_CONTENT> tags.

<TARGET_ELEMENT_POSITION>... </TARGET_ELEMENT_POSITION>

((1 to 1023)) <<1>>

--

When multiple elements satisfy the conditions specified in all or some of the <TARGET_ELEMENT_NAME>, <TARGET_ELEMENT_ATTRIBUTE>, and <TARGET_ELEMENT_CONTENT> tags, this tag specifies the location from the beginning of the element that contains the substitute string.

<SUBSTITUTE_TYPE>... </SUBSTITUTE_TYPE>

--#2

Specifies the value that contains the substitute string. Specify the <TYPE_CONTENT> tag or the <TYPE_ATTRIBUTE> tag.

<TYPE_CONTENT> </TYPE_CONTENT>#3

--#4

Specifies that the substitute string is contained in the element's contents.

<TYPE_ATTRIBUTE>... </TYPE_ATTRIBUTE>

((1 to 1023 bytes of character string))

--#4

When the substitute string is contained in the element's attribute value, this tag specifies the name of that attribute. The equal sign (=) must not be specified. The specified attribute name is not case sensitive.

<TARGET_HEADER>... </TARGET_HEADER>

--#1

Specify this tag to identify the element containing the substitute strings in the HTTP header that is responded at the step specified by <TARGET_STEP_ID> tag. This item contains the <TARGET_HEADER_NAME> and <TARGET_HEADER_VALUE> tags.

If the header cannot be identified by the <TARGET_HEADER_NAME> tag alone, you specify the <TARGET_HEADER_VALUE> tag to identify the header containing the substitute strings.

If the header cannot be identified by the <TARGET_HEADER_NAME> and <TARGET_HEADER_VALUE> tags, among the matched headers the first received header is treated as the specified header.

<TARGET_HEADER_NAME>... </TARGET_HEADER_NAME>

((1 or greater bytes of character string))

--#5

Specifies the name of the header that contains the substitute strings. The specified name is not case sensitive. Note that the validity of the specified value is not checked. The specified character string is treated as a header name. The header that matches completely the specified header name is searched in the received HTTP header.

For example, to specify the Set-Cookie header (Set-Cookie: ...), you specify Set-Cookie in the <TARGET_HEADER_NAME> tag.

<TARGET_HEADER_VALUE>...</TARGET_HEADER_VALUE>

((1 or greater bytes of character string))

--

Specifies the character string that partially matches the value of the header containing the substitute strings.

This item is specified when the header cannot be identified by <TARGET_HEADER_NAME> tag alone (such as when headers have the value specified in <TARGET_HEADER_NAME> tag) but when specifying the header's value can identify or narrow down the target header. Do not specify header values that change dynamically.

<SUBSTITUTE_RANGE>... </SUBSTITUTE_RANGE>

--

Specifies that only a part of the value specified in <SUBSTITUTE_TYPE> tag is to be treated as the substitute string. This item contains the <BEFORE_RANGE> and <AFTER_RANGE> tags. To omit the specification, omit the <SUBSTITUTE_RANGE> tag and all the tags contained in it. Omitting this item means specifying the entire value specified in <SUBSTITUTE_TYPE> tag.

<BEFORE_RANGE>... </BEFORE_RANGE>

((1 to 255 bytes of character string))

--#6

Specifies that the beginning of the value specified in <SUBSTITUTE_TYPE> tag is to be excluded from the substitute string. This item specifies the character string just before the substitute string (excluding the substitute string). If there are multiple identical character strings in the value specified in <SUBSTITUTE_TYPE> tag, the search is conducted from the beginning, and only the first matching character string is specified. If this item is omitted or if the specified character string is not found, the character string from the beginning of the value specified in <SUBSTITUTE_TYPE> tag is assumed to be the substitute string.

If <TYPE_ATTRIBUTE> tag is specified in <SUBSTITUTE_TYPE> tag, neither double nor single quotation marks (", ') can be specified to indicate a range of attribute values.

<AFTER_RANGE>... </AFTER_RANGE>

((1 to 255 bytes of character string))

--#6

Specifies that the end of the value specified in <SUBSTITUTE_TYPE> tag is to be excluded from the substitute string. This item specifies the character string just after the substitute string (excluding the substitute string). If there are multiple identical character strings in the value specified in <SUBSTITUTE_TYPE> tag, the search is conducted from the end of the character string specified in <BEFORE_RANGE> tag and only the first matching character string is specified. If this item is omitted or the specified character string is not found, the character string through the end of the value specified in <SUBSTITUTE_TYPE> tag is assumed to be the substitute string.

If <TYPE_ATTRIBUTE> tag is specified in <SUBSTITUTE_TYPE> tag, neither double nor single quotation marks (", ') can be specified to indicate a range of attribute values.

Legend:

Y: The item is mandatory when the <SUBSTITUTE_TARGET> tag is specified.

--: The item is optional when the <SUBSTITUTE_TARGET> tag is specified.

(( )): Specifiable value range of the tag.

#1

Specify either the <TARGET_ELEMENT> tag or the <TARGET_HEADER> tag.

#2

The item is mandatory when the <TARGET_ELEMENT> tag is specified.

#3

You cannot specify any elements (including spaces or line breaks) within tags. If elements are specified within tags, the Web Recorder cannot open the Web transaction file.

#4

Specify either the <TYPE_CONTENT> tag or the <TYPE_ATTRIBUTE> tag.

#5

The item is mandatory when the <TARGET_HEADER> tag is specified.

#6

If the <SUBSTITUTE_RANGE> tag is specified, one or both must be specified.

(4) Examples

The following are examples of Web transaction files:

<?xml version="1.0" encoding="US-ASCII" standalone="no"?>
<!DOCTYPE TRANSACTION_LIST SYSTEM "espwebtrans.dtd">
<TRANSACTION_LIST>
<TRANSACTION>
  <TRANSACTION_PARAM>
    <TRANSACTION_NAME>transaction-in-email-system</TRANSACTION_NAME>
    <IGNORE_EMBEDDED_RESOURCE></IGNORE_EMBEDDED_RESOURCE>
    <NO_CACHE></NO_CACHE>
    <KEEP_ALIVE></KEEP_ALIVE>
  </TRANSACTION_PARAM>
 
  <STEP>
    <TITLE>login-window</TITLE>
    <REQUEST>
      <URL>http://www.xxx.co.jp/login.jsp</URL>
    </REQUEST>
    <START_SCOPE>SCOPE1</START_SCOPE>
  </STEP>
 
  <STEP>
    <FRAME_NAME>subframe</FRAME_NAME>
    <REQUEST>
      <URL>http://www.xxx.co.jp/subframe.html</URL>
    </REQUEST>
    <END_SCOPE>SCOPE1</END_SCOPE>
  </STEP>
 
  <STEP>
    <TITLE>login-success-window</TITLE>
    <REQUEST>
      <URL>http://www.xxx.co.jp/login_exec.jsp</URL>
      <POST>
        <CONTENT_TYPE>
          <FORM_URLENCODED></FORM_URLENCODED>
        </CONTENT_TYPE>
        <MESSAGE_BODY>login_name=hoge&amp;password=hogehoge</MESSAGE_BODY>
      </POST>
    </REQUEST>
    <RESPONSE_PATTERN>{successful-login}*(!{failure}*!{error})</RESPONSE_PATTERN>
  </STEP>
 
</TRANSACTION>
</TRANSACTION_LIST>