The Ensure XML Validation assertion lets you validate an XML document. You can verify whether the XML document is well-formed, you can validate against a Document Type Definition (DTD), or you can validate against one or more schemas. If you have an XML fragment, you can specify to have DevTest add the XML declaration tag. You can also specify that DevTest reports warnings as errors. You enter the XML to validate as a property.
Complete the following fields:
Defines the name of the assertion.
Specifies the behavior of the assertion from the drop-down list.
Specifies the step to which to redirect if the assertion fires.
Identifies event text to print if the assertion fires.
The property that contains the XML. If this field is left blank, the last response is used.
Multiple validation options can be selected:
Check that XML is well-formed.
Check conformance with a DTD.
Check conformance with one or more schemas.
If XML is a fragment, an XML declaration is added to the top of the XML fragment.
Warnings are reported as errors.
If you have multiple imports for the same namespace, this option opens each schema location instead of only the first one.
Click Run Assertion to execute the assertion.
Validation Tab
You can run the validation by clicking the Run Validation button. Any resulting validation errors are displayed in the Validation Error List. You can use the Validation Type option buttons to select how to handle the errors:
The validation fails on any error.
Errors can be marked to be ignored in the validation. If you select this option, you can select the errors to ignore in the Validation Error List.
Schemas Tab
Enter the information for each schema you want to use in the validation. You can also specify the default schema:
Optionally, specify the default URL of the schema.
Optionally, specify a URL of a WSDL.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|