Hey AAB
aah - I made a mistake - I wasn't concentrating - those additional datasources can be used to inject testdata - but personally I think they rock after generating a response - and this was what I was talking about - so don't bother looking for the ResponseAsXML option because you won't find it if you're trying to source a file from your harddrive.
In regards to your use of the JSON datasource - I'm not a groovy scripter - but looking at the groovy and what youre trying to do wiht the JSON datasource - you're trying to grab specific json attributes from the 'result' variable of the groovyscript - right?
Yeah - I don't think that'll work - all your groovy is doing is pointing to a testdata file and the 'results' of your script (which you are using as the source property in your JSON datasource step) is being passed to the 'results' variable on the groovy script. The trouble is - and I'm not sure - I'm not a scripter - but I don't believe the contents of the file you are passing equates to the 'results'
Hence the reason why I don't think the jsonpath is working in your JSON Datasource.
This is just what "I think" - I'm learning groovy slowly myself.
As an aside = I understand using groovy shortcuts a lot - but is there a reason why you're not using say a file or directory datasource rather than the groovy to load in the file?
Also - is it a GET or a POST REST request?
can you confirm what you're actually passing to the REST request step? are you passing the whole .json file's content or just a couple of parameters?
If you're just passing a couple of parameters - are you talking about URI/Template, Header or Query parameters or are you talking about parameters within a payload body? (hence my question about GET or POST or whatever)
If you can provide the above details we should be able to sort you out - I'm not understanding why you're doing a couple of things - (e.g. like using groovy to load in the file, etc.) and this is confusing me
Thanks man,
richie