Zato apitest question

We are trying to test using zato api test, and want to create a condition where we just confirm a response is not empty, like this

eature: holo zato api tests

Scenario: *** Holo zato api tests ***

    Given address ""
    Given URL path "/zato/mypath"
    Given header "@KEY_HEADER" "@KEY"
    Given HTTP method "GET"
    Given format "JSON"

    When the URL is invoked

    Then status is "200"
    And header "Connection" is "keep-alive"
    And header "Server" is "Zato"

    And response is not equal to "{}"

The last line And response is not equal to "{}"

results in 9 steps passed, 0 failed, 0 skipped, 1 undefined

Zato apitest is confused about And response is not equal to "{}" and so calls it undefined

Is there a way to just test that response is not an empty json response ?

Hello Sam,

perhaps “And JSON response exists” could be the answer?

@dsuch “And JSON response exists” works ! thank you

Can we PR the documentation page to include that?


yes, if you would like to send a PR, the GitHub repository is here - please add it in the 3.1 directory: