Forum Discussion

sdeevers's avatar
4 years ago

ReadyAPI header exists assertion failures

Hey all,

Noticed something a little strange with the ReadyAPI "Header Exists" assertion.

Having a specific header checked to exist seems to be giving me mixed results between test run.


We have a data driven test and need to validate specific header information is returned in the header response.  Therefore, we are using the "Header Exists" assertion to ensure that information is returned in the header response.


The test will fail on one (or more) of the "Header Exists" assertions, yet when I view that response in Splunk, I see the expected response header information of that assertion which failed in the Splunk log, thus it should not have failed.
Executing the same test again, the same request might successfully assert the previously failed header exists assertions, yet fail on one (or more) of those "Header Exists" assertions for a different request which passed all header exists assertions in the previous test. Once again, checking the Splunk log for those which failed, shows the header information was in the header response for that request.


Has anyone else had this issue or seen something similar for the "Header Exists" assertion during test execution?

Thanks in advance !


  • The issue with the header exists was on our side as when a specific query parameter was used in the request, the header information was not returned. The assertion helped us be able to narrow down the exact query parameter in the request which was failing he assertion. Once the updated code was in place, the header exists assertion was successful.
    Just another example of how useful the header exists assertion can be in finding an internal issue. 

7 Replies

  • richie's avatar
    Community Hero
    Hey sdeevers

    Can you provide a bit more about your issue?
    What sort of executable request is it? REST or SOAP or HTTP?
    What sort of header are you checking it a typical environmental one or is it a custom functional parameter instead?
    Ive never used Splunk so cant comment on that, but are you saying if you check the RAW details of the response you can see the relevant header present, but the Header Exists assertion is intermittently failing despite the fact the header is actually present?


  • Rich,

    This is a REST request where we are checking the header response. In the RAW response you will not get the specific header information in the response, yet run that same request again and the information to be asserted will be present. Using different information in the same REST request (the test being data driven), I may or may not get the header information to be evaluated. In each of the scenarios, the response is successful.

    • TanyaYatskovska's avatar
      SmartBear Alumni (Retired)

      Hi sdeevers,

      Which ReadyAPI version are you using? The latest product version is 3.5 - could you please check if you see the same behavior in this version? If you do, please submit a ticket to our ReadyAPI Support Team.

      • sdeevers's avatar

        Currently using the 3.4.5 release.
        After further in-depth investigation of our request, the issue is not with the header exists assertion, but the assertion failure helped us immensely identify where our problem was.