Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In Manual View

Follow the steps below in order to use web service object

...

in Manual

...

 view:

  1. Open a test case in Manual view, then select

...

  1. the option to

...

  1. add a Web Service Keyword from command toolbar.
    Image Modified

  2. A Web Service step is added to the test case. 
    To send a request to Web Service, you need to

...

...

  1.  keyword. Select

...

  1. the Send Request keyword now.

...

  1. Image Added

  2. Double click on object cell to specify the web service object

...

...

  1. Info
    titleVariables for Web Service Test Object

    When you modify the variables of a Web Service Test Object in a test case, the values will ONLY apply to that particular test case. If you reuse that Test Object in another test case, Katalon Studio will get the original values that were defined in the Test Object view


    Image Added

  2. The output of Send Request keyword could be validated if needed using

...

  1. different Verify...

...

  1.  keywords depending on your situation.

...


In Scripting View

You can use

...

...

 keyword for Web Service object and the Verify... keywords to verify the web service response. You may want to refer

...

to Handle Response messages for more details

...

regarding Element Locator:

Code Block
languagegroovy
themeRDark
//Send a SOAP request and returns its response
def response = WS.sendRequest(findTestObject([the ID of Web Service object]))

//Verify if a value at a specific location in response is as expected
WS.verifyElementPropertyValue(response, <Element Locator>, <expected value>)

For example:

Image Modified

The following API docs may prove useful when working with web service objects:

ClassDescription
Request ObjectDescribe all available methods for Request Object
Response ObjectDescribe all available methods for Response Object

Table of Contents
classkat_toc