# API/Web Service Testing Response Text/Value

**URL:** <https://forum.katalon.com/t/api-web-service-testing-response-text-value/26752>\
**Category:** API Testing\
**Tags:** api-testing, katalon-studio\
**Created:** [May 31, 2019, 2:30pm UTC](https://forum.katalon.com/t/api-web-service-testing-response-text-value/26752 "2019-05-31T14:30:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeneralChingChicken](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/generalchingchicken/32/1398_2.png) [@GeneralChingChicken](https://forum.katalon.com/u/GeneralChingChicken)\
**Post date:** [May 31, 2019, 2:30pm UTC](https://forum.katalon.com/t/api-web-service-testing-response-text-value/26752/1 "2019-05-31T14:30:41Z")

</div>

Is there a way for Katalon Studio to look for a defined TEXTVALUE in an API Web service call?  
I try using the: “WS.verifyElementPropertyValue”  
It works if I use it like this : WS.verifyElementPropertyValue(response, ‘[9].config.viewDescriptors[4].buttons[0].navigationValue’, “TEXTVALUE”)

However, I can’t reuse this script because of the JSON Path is Dynamic, (“[9].config.viewDescriptors[4].buttons[0].navigationValue”) I kind don’t want to parametrize them.

any ideas?

---

<div class="post-metadata">

**Author:** ![discover.selenium](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/discover.selenium/32/522_2.png) [@discover.selenium](https://forum.katalon.com/u/discover.selenium)\
**Post date:** [June 4, 2019, 3:51am UTC](https://forum.katalon.com/t/api-web-service-testing-response-text-value/26752/2 "2019-06-04T03:51:32Z")

</div>

Hi there, try the below …

// Response body: Containing String  
assertThat(response.getResponseText()).contains(‘TEXTVALUE’)

The dynamic json path can be handled using external jar i.e. Jayway JsonPath

---

<div class="post-metadata">

**Author:** ![GeneralChingChicken](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/generalchingchicken/32/1398_2.png) [@GeneralChingChicken](https://forum.katalon.com/u/GeneralChingChicken)\
**Post date:** [June 4, 2019, 5:38pm UTC](https://forum.katalon.com/t/api-web-service-testing-response-text-value/26752/3 "2019-06-04T17:38:17Z")

</div>

Please explain 🙂

---

<div class="post-metadata">

**Author:** ![discover.selenium](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/discover.selenium/32/522_2.png) [@discover.selenium](https://forum.katalon.com/u/discover.selenium)\
**Post date:** [June 12, 2019, 12:11pm UTC](https://forum.katalon.com/t/api-web-service-testing-response-text-value/26752/4 "2019-06-12T12:11:31Z")

</div>

Kindly check the below post by @kazurayam for more details

> [@Using JsonPath to read Web Service Response](http://forum.katalon.com/t/using-jsonpath-to-read-web-service-response/19040):
>
> I made a demo project on GitHub: [GitHub - kazurayam/UsingJsonPathToReadWebServiceResponse](https://github.com/kazurayam/UsingJsonPathToReadWebServiceResponse) This project was developed to propose a solution to a discussion [“Get json value with skipping 1st and 2nd level of dynamic value”](http://forum.katalon.com/t/get-json-value-with-skipping-1st-and-2nd-level-of-dynamic-value/18972) in the Katalon Forum. Problem to solve The questioner has a JSON text as follows: { "-1": [ { "-1": { "build": "", "createdDate": "", "description": "", "endDate": "", "e…

> **[GitHub - json-path/JsonPath: Java JsonPath implementation](https://github.com/json-path/JsonPath)**
>
> Java JsonPath implementation

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:48am UTC](https://forum.katalon.com/t/api-web-service-testing-response-text-value/26752/5 "2022-08-08T07:48:36Z")

</div>

Archived on August 8, 2022, 7:48am UTC


