Forum Discussion
Yes!
Sorry - I do get quite wordy don't i? :)
My request to the webservice (if successful) should result in a new row being added to the database. So after submitting the post request, essentially I need to extract the value of the RecordID attribute from the source data file and pass it to the JDBC Step where I will just have a simple query (select * from table where RecordID='RecordID value sourced from datafile';) to verify the row being added to the database.
So I was thinking my object hierarchy in my test case would be something like the following:
Datasource (specifying directory to source test data XML files from, Property= FileContent)
SOAP request (posts to web service - body of Soap request is the content of the test data XML files via the ${DataSource#FileContent})
Property Transfer (to pull RecordID from XML file in directory)
JDBC Step (select * from table where RecordID='value in testdata XML file')
I feel like I should apologise - I was a Java coder 15 years ago, but I've been testing since and I just cant remember anything to do with code anymore and this was why I got the licensed/Pro version of SoapUI so I wouldn't have to rely on groovy scripting!
Thanks again for any and all help!
Ok. Thank you for the clarification. Once you lost the touch with programming, difficult to remember suddenly unless one keeps practise it daily life. Of course, you should restart again, will be able to grasp it quickly.
Anyways, looks already Radford replied to your point to get the requested info in his solution. Please try that one.
- richie8 years agoCommunity Hero
Much thanks to go to nmrao & Radford for holding my hand until I sorted the problem.
I still haven't identified why it wasn't working other than copying and pasting the datasource details into the groovyscript didn't appear to pickup the Datasource's propertyname - I had to use GetData context menu before it would recognise my '${DataSource#FileContents}' property for some reason.
Anyway - success! so thanks again!
Related Content
- 4 years ago
- 5 years ago
- 5 years ago
Recent Discussions
- 22 days ago