Forum Discussion

SKoneru's avatar
SKoneru
Contributor
11 years ago

[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

    • ddineesh's avatar
      ddineesh
      New Contributor

      It worked for myself too. Thanks for writing this.

      • sonya_m's avatar
        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. 

  • SmartBear_Suppo's avatar
    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
  • 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".
  • 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's avatar
    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