Forum Discussion

cstott1's avatar
cstott1
Occasional Contributor
10 years ago
Solved

XPATH assertion for an expression containing another value, field length, field type and is not NULL

Hi,

 

I have used a JDBC driver to run a SQL query. The below is the result

 

<Results>
    <ResultSet fetchSize="128">
        <Row rowNumber="1">
            <PIECEID>1820480</PIECEID>
            <CONSIGNMENTID>1166645</CONSIGNMENTID>
            <TRACKINGNUMBER>907598985733</TRACKINGNUMBER>
            <BARCODE>001390759898573373</BARCODE>
            <ISBILLABLE>1</ISBILLABLE>
            <ISCANCELLED>0</ISCANCELLED>
        </Row>
    </ResultSet>
</Results>

 

I am trying to setup 4 assertions for the below but am struggling with what to put in the expected result.

 

1) <BARCODE> contains the <TRACKINGNUMBER>

2) <ISCANCELLED> is not NULL

3) <PIECEID> is 7 digits long

4)  <ISBILLABLE> is numerical

 

Also being very new to  XPATH where is the best place to learn it for the purposes of expected results in SOAPUI