RESTful Web Service Repo Item: Test Request and Verify is Passing (Should Fail) with Non-Existent Assertions

  • Katalon Studio Version: 8.3.5
  • OS Version: Windows 10 Pro Version 21H2 OS Build 19044.1706 Windows Feature Experience Pack 120.2212.4170.0
  • Browser Version: Version 102.0.5005.63 (Official Build) (64-bit)

We have open an API/Web Service Project
In this project, we have open a RESTful Web Service Request Repository item (Type=GET) which has been successfully integrated into one of our test cases

Problem: When Repository item has non-existent Verification Assertions, i.e., assertThat(response.getResponseText()).contains(‘Fake Data’), the result when clicking Test Request and Verify at top right is Status “200 OK”. It returns a full Response Body.

Thus, we get the same Status and Response Body as when valid, existent Assertions are in place.

Expected Behavior:

  • The Request should fail with the correct Status Code when Non-Existent Assertions are present.
  • With the ‘Fake Data’ Assertions in place, the Test Case that calls this Repo Item using Keyword “Send Request and Verify” will correctly Fail
  • With Valid Assertions in place, the Test Case that calls this Repo Item using Keyword “Send Request and Verify” will correctly Pass.

I have attachments to add, but cannot find a way of adding them to this post. There used to be a way of adding attachments to Bug Report posts like this.

1 Like

Not a bug.
You are a bit confused I suppose.
The ‘200 OK’ is the http response code you get for the API call.
It is ok because you receive a valid response.
But if you look at the Verification tab you should see the assertion is failing.
see:

Running it from a test case will also fail with the same assertion:

Running with valid assertion, both of them (the request from repository and the test case) will pass.