SetParsedResponseby Group Public on Wednesday November 18 2009 @ 13:16:52 (1/1 Points) |
|
| API ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It |
SetParsedResponse converts a string, or data, into a usable XML model. That is, it takes a bit of data loaded from a file, remotely, or constructed, and makes it the current response.
SetParsedResponse DataType Content
Load from a file
The following example shows how to load a CSV from a file and make it the current response. This example then extracts the values in the named columns and outputs them.
set %Data% as readTextFile seed_data.csv SetParsedResponse text/csv %Data% foreach %Line% in %Response://line% set %Name% as selectIn %Line% value[@name='Group'] set %ID% as selectIn %Line% value[@name='Group ID'] Notice %Name% %ID% end
TestPlan SetParsedResponse
