XML Scanner Test Parser

Download

Source Code: https://github.com/testify/XMLScannerTestParser.git

Latest Snapshot: Coming Soon

Latest Release: Coming Soon

Description

The XML Scanner Test Parser is a Testify Test Parser service registered for the test file extension .xml. It uses a Java Scanner to read in a file and then parses the file using element tags. Below is a list of required and optional tags for this test parser. Any additional tags included in the test file will be ignored.

Tag Info

Certain processors, assertions, etc may require sub element tags to be present within one of the parsed sections (see Jersey Test Processor for example). Consult the specific Testify service documentation to determine how content must be structured within one of the tags below.

Required Elements

Processor Type

Surrounded by element indicators: <type></type>

Endpoint

Surrounded by element indicators: <endpoint></endpoint>

Test

Surrounded by element indicators: <test></test>

Assertions

Surrounded by element indicators: <assertion></assertion>

Optional elements

Pre Test Setter Action

Surrounded by element indicators: <preTestSetterAction></preTestSetterAction>

Pre Test Processor Action

Surrounded by element indicators: <preTestProcessorAction></preTestProcessorAction>

Post Test Processor Action

Surrounded by element indicators: <postTestProcessorAction></postTestProcessorAction>

Example Test File

Test File Example
<type>
JWSDLTestProcessor
</type>
<endpoint>
http://${SITE_IP}/Ingest
</endpoint>
<test>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:java="java:webservice.ingest" xmlns:java1="java:webservice.data">
    <soapenv:Header/>
    <soapenv:Body>
        <java:createCatalogEntry>
            <java:entry>
                <java1:siteName>source</java1:siteName>
                <java1:id>192837465</java1:id>
                <java1:dataAccessDescriptor>
                    <java1:className>Class Name</java1:className>
                    <java1:uri>http://www.google.com</java1:uri>
                    <java1:id>12345</java1:id>
                    <java1:size>1000</java1:size>
                </java1:dataAccessDescriptor>
                <java1:dataAccessOptions>?</java1:dataAccessOptions>
                <java1:effectiveDate>2013-06-13T10:25:27.27Z</java1:effectiveDate>
                <java1:expirationDate>2100-06-13T10:25:27.27Z</java1:expirationDate>
                <java1:geometryWKT>POINT (0 0)</java1:geometryWKT>
                <java1:metadata>Information</java1:metadata>
                <java1:thumbnail></java1:thumbnail>
                <java1:createdDate>2014-06-13T10:25:27.27Z</java1:createdDate>
                <java1:modifiedDate>2014-06-13T10:25:27.27Z</java1:modifiedDate>
            </java:entry>
        </java:createCatalogEntry>
    </soapenv:Body>
</soapenv:Envelope>
</test>
<assertion>
NotSOAPFaultAssertion
XPathAssertion::count(//*[local-name()='id' and namespace-uri()='java:webservice.ingest'])=1
NotContainsAssertion::192837465
</assertion>
<postTestProcessorAction>
WaitAction::10000
</postTestProcessorAction>