Forum Discussion
MKV
8 years agoContributor
Hi,
I tried to use it as XML Datasource. I created the properties and executed it. But the data log doesn't seem to be displaying any data although it says Got 5 rows in 3ms.
1. Is there something that needs to be done, apart from providing the row Xpath, defining property?
2. Can i use the output data values to get stored in an array?
Please suggest.
groovyguy
8 years agoCommunity Hero
Can you share some details of what you have tried? Either your project or screen shots?
What I have done in the past is similar to this, as a high level view:
- Make a Read request that returns one object.
- Set up an XML datasource that uses XPATH to point to properties in the response from step 1.
- Example properties:
- UserName
- TimeStamp
- Identifier
- If you manually run the DataSource, you should see the data it returns in the data log window. If you do not see data, it is not configured correctly.
- Example properties:
- Set up furthe Read requests that use data from the XML Data Source
- Test steps would reference the data as ${XMLDataSource#PropertyName}
- ${XMLDataSource#UserName}
- ${XMLDataSource#TimeStamp}
- ${XMLDataSource#Identifier}
- Test steps would reference the data as ${XMLDataSource#PropertyName}
- An example test case would look like
- Read request to populate XML DataSource
- XML DataSource
- ReadRequest using Property1
- ReadRequest using Property2
- ReadRequest using Property3
- etc.
Hope that helps!