Contributions
Re: View a PDF in SOAPUI?
Hi, I found this topic few days ago because I had similar problem. Now I'm happy to have solution for this kind of case, but with some req. like: - you also recived your response as a JSON, and it is encoded in Base64 then you can use this kind of script in assertion for your request: import org.apache.commons.codec.binary.Base64; import groovy.json.JsonSlurper //grab the response def content = messageExchange.response.responseContent def jsonSlurper = new JsonSlurper().parseText(content) assert !(jsonSlurper.isEmpty()) document_content = jsonSlurper.fileContent def fileName = messageExchange.modelItem.testStep.testCase.getPropertyValue("DOC") + '_.pdf' new File( "F:\\Testing\\Testing1\\$fileName").bytes = document_content.decodeBase64() log.info fileName as a result you should recive ready pdf file.5.7KViews0likes0CommentsRe: How to get data from raw response and set it as property for test case by groovy
Thank You SorinC, This solution is fine when we are using 'groovy script' as a next test step. I was trying to achive this option as a assertion script in my first request which produce this cartId.3.4KViews0likes0CommentsHow to get data from raw response and set it as property for test case by groovy
Hi Bears, From my request I'm only able to receive RAW response with data: HTTP/1.1 201 Date: Thu, 06 Jun 2019 23:02:56 GMT Content-Length: 0 Connection: keep-alive Location: https://xyz.yoyo.bro/3999a180baa54dd68a627d2ed1b16500 cartId: 3999a180baa54dd68a627d2ed1b16500 X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block Cache-Control: no-cache, no-store, max-age=0, must-revalidate Pragma: no-cache Expires: 0 X-Frame-Options: DENY I would like to take this cartId, and set it as a property for next steps from my test case. I was trying with testRunner etc. but it gaves me only a lot of errors. If anybody have some idea, I will be very grateful for answers and tips.Solved3.4KViews0likes2CommentsRe: How to get vale for this kind of response and pass it to another request ?
It was good prompt but as answer i still received [null] Now i have something like that: //*:Parameters/*:Parameter[@name='RECEIPT_ID'] and it gives me correct number :) but anyway thanks for response !1.1KViews0likes0CommentsHow to get vale for this kind of response and pass it to another request ?
Hi, I'm trying to get specific value from response via 'property transfer' but i don't have any idea how to take it from it, I will be very grateful for help. This is my response: <InvokeSBSEventRs xmlns="xyz"> <EventType>Receipt</EventType> <Parameters> <Parameter name="PROCEDURE_RESULT" type="java.lang.String">OK</Parameter> <Parameter format="0.#########################" name="RECEIPT_ID" type="oracle.jbo.domain.Number">54326</Parameter> <Parameter format="0.#########################" name="PAYMENT_ID" type="oracle.jbo.domain.Number">54326</Parameter> <Parameter name="APPLSRC" type="java.lang.String">GEN</Parameter> <Parameter name="RETURN_STATUS" type="java.lang.String">F</Parameter> </Parameters> </InvokeSBSEventRs> I'm trying to get RECEIPT_ID and i received null as a result my path looks like that //*:Parameters//*:Parameter/*:Parameter[Parameter="RECEIPT_ID"]1.1KViews0likes2Comments