SoapUI open source - How to extract XML response and use in next API request

SoapUI open source - How to extract XML response and use in next API request

Automation Step by Step

4 года назад

35,905 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Pieter Smuts
Pieter Smuts - 18.03.2023 02:22

So good, so well presented and easy to understand. Many thanks for your time!!

Ответить
HAZIM ABDOH
HAZIM ABDOH - 17.09.2022 15:48

Amazing tutorial!!!! So clear and easy to understand. thanks ,your brilliant .

Ответить
Aditi Patra
Aditi Patra - 15.09.2022 06:25

Would have been helpful if you had showed for REST services too

Ответить
rajendra prasad
rajendra prasad - 27.02.2022 05:41

Hello Sir, How I can test this type of Scenario using SoapUI : Verify XYZ Application receives data from the ABC via WebService

Ответить
Lorraine Danza
Lorraine Danza - 13.02.2022 04:04

Amazing tutorial!!!! So clear and easy to understand. I've watched other instructors that were confusing but this one is great. Thank You

Ответить
marksml74
marksml74 - 18.01.2022 10:10

Hi Raghav, very nice and clean how-to video. Helped me on the spot. Especially the live notes are a very nice service. Create more of it. You have a talent for these things I'd say. Thumbs up :-). Cheers, Michael

Ответить
Umakanth N
Umakanth N - 20.08.2021 22:04

it will be great if we get the count of nodes in Xml file for particular element from response

Ответить
Umakanth N
Umakanth N - 20.08.2021 21:56

def response = testRunner.testCase.getTestStepByName('test step name').getPropertyValue("response")
def object = new XmlSlurper().parseText(response)

def value = object.uhsResponse.hSs.hS.entity.id.text()

log.info(value)
xpath I'm getting in xml Grid = /soapenv:Envelope/soapenv:Body/ns3:uhsResponse/hSs/hS/entity/id"

when I try to print the value using log info...its printing blank. Please help me

Ответить
Иван Иванов
Иван Иванов - 22.06.2021 07:13

Very helpful video, thank you!

Ответить
Vikas Dhanorkar
Vikas Dhanorkar - 30.03.2021 19:58

Thanks for the video, i followed same steps but i am getting "no such property error" on XMLSlurper

def responseValue= testRunner.testCase.getTestStepByName('Add-Request 1').getPropertyValue("response")
def object1 = new XmlSlurper().parseText(response)
def value= object1.text()
testRunner.testCase.getTestStepByName('myProperty').getPropertyValue('addResult',value)

Error: groovy.lang.MissingPropertyException: No such property: response for class: Script2

Ответить
bhavyaparimi
bhavyaparimi - 03.12.2020 00:27

Hi, thanks for the video. I tried groovy script as shown in the video for passing the value of a SOAP response in to REST request but it didnt woek. I need to pass the value in to the REST GET endpoint. DO I need to do anything different from what is shown in the video?

Ответить
Tech in hindi
Tech in hindi - 26.06.2020 16:59

plz make a video how import .xsd file in soapui

Ответить
Zeeshan Naqvi
Zeeshan Naqvi - 19.05.2020 15:30

Hi Raghav,
Thank you so much for creating this series. I have a question on How can I use the property value as a parameter in the next step? Not in the body of the request but a parameter in the URI?

Ответить
Mohammed Zubair
Mohammed Zubair - 17.05.2020 16:47

Hi Raghav,
I have a REST API GET request, which returns a HTML response in XML tab. Tried using 'Property Transfer', firstly I am not able to add namespaces clicking on 'ns:' button, it says 'Error: Property Source is not a Request', so I just gave the XPath to extract a value from on of the input field, transfer log says- '[error: </HEAD> does not close tag <META>.].
When using Groovy, I see this error- "org.xml.sax.SAXParseException; lineNumber: 114; column number: 3; The element type "META" must be terminated by the matching end-tag"". error at line: 3"

Which seems to me like not to be using XML parser but some other parser, since the content-type in response is "text/html; character=UTF-8". Please suggest

Ответить
Mayank Jain
Mayank Jain - 24.04.2020 15:04

Nicely explained Thank you!!

Ответить
Phil B
Phil B - 03.04.2020 02:14

Next question if I may.

At work I make xml requests with a section of code that can be repeated to input different objects with the same attributes, each of which is surrounded by <row> and </row>. The response can also include multiple objects of the same type with unique values in their attributes.

Is there a way of cycling through the response and creating a set of properties contain values for the separate returned objects, or feed the repeated returns into repeated in puts of a second request?

Does that make sense and do you have a video about it? I'm guessing Groovy could come into this.

Ответить
Phil B
Phil B - 02.04.2020 12:18

I used this on my project at work and it did the job perfectly. I feared I would run into problems but it was pretty easy. Thank you.

Ответить
Brandon Steel
Brandon Steel - 25.03.2020 00:20

thank you! Worked first time!

Ответить
Johns Home
Johns Home - 28.01.2020 18:14

Thank you Raghav. Some great videos and training. I need to save the soap response to Excel. Is there a video for this? Thank you john

Ответить
Saadat Chowdhury
Saadat Chowdhury - 28.01.2020 08:31

Very clear and Nice explanation. I'm tryign to create a data driven framewrok from Excel file using the same WSDL as yours. I'm able to read the data from excel. I have 2 columns First_Num and Second_Num. Now i like to add one new column and write the reponse result. Could you plz help me with this

Ответить
WhaleHeda
WhaleHeda - 15.11.2019 19:13

very helpful thanks!

Ответить
VIPIN TEKADE
VIPIN TEKADE - 06.11.2019 21:13

Hi Raghav can you make any one project video on SOAP UI ?

Ответить
VIPIN TEKADE
VIPIN TEKADE - 06.11.2019 21:05

Hi Raghav this 23 video is sufficient to do any of the project task by client in the company ?

Ответить
sai krishna
sai krishna - 13.10.2019 23:50

iam the 1000 viewer and i am supposed to tell it is good explanation

Ответить
Deepak
Deepak - 02.09.2019 18:30

Thanks for the great explanation Sir.

Ответить