I have create one test case with more than 100 test data for different condition/scenario in DataSource.
At test step 3, i have add an assertion "Json_status" and "Json_statusMsg" to validate the test result in rest response..
So, how to add the test result (passed/failed) for each row test data based on status of assertion in test step 3 to property "finalTestResults" in DataSink.
I'm struggling to understand your description. You state you have one test case and 100 testdata files covering the different tests you want to exercise - so this is a looping test case - right?
you state "at test step 3 you have add an assertion "json_status" and "json_statusMsg" to validate the response - but we don't know the significance of test step 3 - nor what "json_status" or "json_statusMsg" actually means.
Q1. What is test step 3?
Q2. is this a REST/SOAP request?
Q3. are json_status and json_statusMsg 2 attributes in the requests response?
next you state "how to add the test result(passed/failed) for each for testdata based on status of assertion in step 3 to property "finalTestResults" in DataSink
Q4. Is DataSink test step, step4 in your test?
Q5. Are you saying you have you want to write out the results of each of the test case loop's results (either pass or fail) to the property setup via the DataSink?
Basically my idea as below, i try to automate it to avoid manual work but I was new to soapUI and 0 knowledge in writing the script. Sorry if i asking a silly question.
My test step as below:
testCase Ccy Tenor Expected_Status Expected_statusMsg
TC_01 GBPUSD SPOT OK
TC_02 EURUSD SPOT ERROR No rate available
TC_03 AUDUSD SPOT OK
TC_04 USDCAD TODAY ERROR Currency holidays
3. Rest Request 1
This step will send the request to get market rate.
I have add and group this 2 assertion ("Json_status" and "Json_statusMsg") to validate the response with the expected result in step 1. If both match, then return PASSED to "finalTestResults" in DataSink else FAILED.
4. Data Sink
In this step i want to write out results for each test case loops to excel.
testCase Ccy Tenor finalTestResults
TC_01 GBPUSD SPOT PASSED
TC_02 EURUSD SPOT FAILED
TC_03 AUDUSD SPOT PASSED
TC_04 USDCAD TODAY PASSED
5. DataSource Loop
Thank for you help.