Forum Discussion

ItP_1's avatar
ItP_1
Occasional Contributor
10 years ago

Validate an XML response against 3 different datasources

Hi Experts,
I want to validate an XML response against 3 different excel datasource. I know its very straight forward, but the problem I face is, the excel data sources are not properly aligned and our validation is against a tree type structure in excel which are not aligned. I have attached my xml response along with the data sources which needs to be validated against.

Exact scenario:
I want to fetch the Account id from the attached xml response and validate it in the excel data source. Based on the Account id, there are devices, services, emails etc...and for each set of data I have to refer the appropriate datasource and find the entry and validate it. The excel data sources are not properly aligned as well.

Please someone in the forum help me get this resolved.

PFA xml response, datasources

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    This doesn't seem too far fetched. All you have to do is add the excel file using Datasource step(if more than one file, use more Datasource steps). You will have to create a property against each column in the Datasource. Now that you have a property for each column, you can easily assert against a particular value,once you have a valid response go to the outline view>right click on the node that you want to validate against>click on add assertion>For content. In the expected value below Remove what in there already> right click>Click on Get Date> and point to the property you want to validate against within the Datasource Step.

    More info on Point and click testing(Get Data):
    http://www.soapui.org/Working-with-soap ... sting.html

    More on Property expansion:
    http://www.soapui.org/Scripting-Propert ... nsion.html

    Let me know if you need anything else.

    Regards,
    Temil