Ask a Question

[Resolved] Status returned as UNKNOWN

SKoneru
Contributor

[Resolved] Status returned as UNKNOWN

Hi,

I created a simple Http Test step and did provide a Http Get Request. Also noticed the GET call is made and the response status is returned as 200 (OK). But the report that is generated by SOAPUI shows the status as UNKNOWN. Why should the status return as UNKNOWN when it's OK(as response returned HTTP success code 200).

Please refer to the attached file.

I am concerned about this because I wrote a Custom report and I did code if the status of a test step is anything other than "OK" then it should report failure. Now the above example that I quoted should provide status as "OK" rather it shows "UNKNOWN" due to with the test case is listed as FAILED.

Any suggestions will be helpful.

Thanks
7 REPLIES 7
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

Could you perhaps share your project file? That would help investigate what's going on here. Here's an old thread that's discussing a similar issue, but in that case there seems to be an empty response so I'm not sure it applies here.

Regards,
Arian
SmartBear Sweden

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
SKoneru
Contributor

This is simple to create, just create a "Http test step" and provide the end point URL as "http://www.google.com".
Response is returned and also you will notice in the Raw tab of the response the status is displayed as "Http/1.1 200 OK". But the result of this test step in SOAPUI is shown as "UNKNOWN".
SmartBear_Suppo
SmartBear Alumni (Retired)

In your steps you didn't define any assertions - http://www.soapui.org/Functional-Testin ... tions.html

Without a failed/passed assertion the status is unknown, by design. Looks like at the very least you want to add "Valid HTTP Status Codes" assertion for code 200.

Thanks,
Michael Giller
SmartBear Software

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
SKoneru
Contributor

Thanks for the suggestions. It works after I added an assertion to validate valid HTTP response codes.

Interesting I didn't realize till now that UNKNOWN is returned when we don't provide any assertions. But at-least by looking at the HTTP response code, the SOAPUI can provide status as OK(if code is 200) or UNKNOWN(code other than 200). Can this be treated as enhancement?
SmartBear_Suppo
SmartBear Alumni (Retired)

Glad to hear test case works with the assertion. As far as the suggested enhancement, it would restrict all use cases to expecting your tests to come back as 200. The reason HTTP status code can be configured in the assertion is so that we can accommodate anyone who want to do any type of test, including negative tests.

So if you want to test for unauthorized call, then "Valid HTTP Status Codes" can be set for 401. This enhancement would limit the use case of the assertion.

Thanks,
Michael Giller
SmartBear Software

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

It worked for myself too. Thanks for writing this.

sonya_m
SmartBear Alumni (Retired)

Hi @ddineesh, thank you for leaving the comment. I am glad to hear the solution worked for you! Have a great day. 


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: