Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2022.2

...


Adding Regression Controls

You can add a regression control using the XPath values you extracted or altered. Right-click the SOAP Client node that contains an XML Transformer and select Create Regression Control from the shortcut menu.  A Transformed XML> Diff node appears underneath the XML Transformer node. If you select this node, you will see the XPaths you added to the Selected XPaths list in the XML Transformer tool.

Parameterizing XPaths

You can parameterize XPaths to reference testtest reference test or Responder suiteResponder suite variables, environment variables, and data source values.  The syntax to reference variables is ${myVariableName}. The syntax to reference XML Data Bank values and Data Source Values is: ${myColumnName}. 

For example, if ${XPath Key} is a data source column name, you could use

/*[local-name(.)="bookstore" and namespace-uri(.)=""]/*[local-name(.)="book" and

namespace-uri(.)=""][child::node()[local-name(.)="title" and text()="${XPath Key}"]]

Handling Empty Elements to Maintain the Integrity of the XML Response
Anchor
Handling Empty Elements to Maintain the Integrity of the XML Response
Handling Empty Elements to Maintain the Integrity of the XML Response

By default, empty elements will not be extracted.  This could impact the integrity of the XML response for use in a Writable Data Source. For instance,

Code Block
<e>5</e>
<e/>
<e>6</e>
would produce a Writable Data Source that looks like


Code Block
ROW 1 = 5
ROW 2 = 6
If you prefer to have all nodes—including empty elements—represented in the extraction:
  1. Enable Extract empty elements as.
  2. (Optional) If you want a "placeholder" value to be added for every empty extracted element, indicate the desired placeholder string in the adjacent text field.


     
  3. Select one of the XPaths that specifies what to extract, then click Modify.
  4. Ensure that the Extract option is set to Content only.
  5. Delete the /text() at the end of the related XPath(s) For example, if the current XPath is 

    Code Block
    /*[local-name(.)="Envelope" and namespace-uri(.)="http://schemas.xmlsoap.org/soap/envelope/"]/.../*[local-name(.)="i" and namespace-uri(.)=""][1]/text()

    Edit it to

    Code Block
    /*[local-name(.)="Envelope" and namespace-uri(.)="http://schemas.xmlsoap.org/soap/envelope/"]/.../*[local-name(.)="i" and namespace-uri(.)=""][1]




  6. Repeat steps 3-5 for additional XPaths as needed.