cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] Status returned as UNKNOWN

Highlighted
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
Highlighted

Re: Status returned as UNKNOWN

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. ⬇️⬇️⬇️Please mark my answer as a solution if it was helpful
Highlighted
Contributor

Re: Status returned as UNKNOWN

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".
Highlighted

Re: Status returned as UNKNOWN

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. ⬇️⬇️⬇️Please mark my answer as a solution if it was helpful
Highlighted
Contributor

Re: Status returned as UNKNOWN

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?
Highlighted

Re: Status returned as UNKNOWN

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. ⬇️⬇️⬇️Please mark my answer as a solution if it was helpful
Highlighted
New Contributor

Re: Status returned as UNKNOWN

It worked for myself too. Thanks for writing this.

Highlighted
Community Manager

Re: Status returned as UNKNOWN

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
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to change request body before sending it to the server for the TechCorner tag!


Scripts created in June:
- A script to generate a request body based on data from Datasource
- A script to go through all response nodes and check the value of the required field
- A Dispatching script to get responses based on the values in Request Body
- A script to add a new tag and assign it to all TestCases in a TestSuite
Top Kudoed Authors