cancel
Showing results for 
Search instead for 
Did you mean: 

Generate test step status to DataSink

New Contributor

Generate test step status to DataSink

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.

 

6 REPLIES 6
Highlighted
Community Hero

Re: Generate test step status to DataSink

Hi,

 

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?

 

Cheers,

 

rich

 

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Community Manager

Re: Generate test step status to DataSink

Hi @alvinkhow , please provide more details about your case as richie suggests so that the Community could help you more efficiently! 

 

Thank you. 



Sonya Mihaljova
Community and Education Specialist
Enroll at the SmartBear Academy today and learn our products via exclusive video courses.
New Contributor

Re: Generate test step status to DataSink

Hi Rich,

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:
1. DataSource

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

 

2. DataGen
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.

New Contributor

Re: Generate test step status to DataSink

Anyone can help? Much thank.

Community Manager

Re: Generate test step status to DataSink

Thank you for the details! 

 

@richie, any suggestions here? 

 

@nmrao, @jsheph01, @msiadak, what do you think? 



Sonya Mihaljova
Community and Education Specialist
Enroll at the SmartBear Academy today and learn our products via exclusive video courses.
Community Hero

Re: Generate test step status to DataSink

Hope this below video helps your query. Personally haven't used though.
https://www.youtube.com/watch?v=6g0uHvOy8BM


Regards,
Rao.