Downloading a JSON file after hitting soap UI https request
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020
09:13 AM
11-24-2020
09:13 AM
Downloading a JSON file after hitting soap UI https request
have one requirement to automate in SOAP UI Open source
Where I need to hit a https url and after hitting the url I need to download a json file for further use
I am able to login and browse the file location by using Basic Authorization.
In response, I can see the files name in html format.But further I wanted to download the file in local machine or to see a content of the file in the soap UI response so that assertions can be added.
Please suggest if there is any other approach in soap UI where we can download a file or see a content of file after hitting the https URL.
Where I need to hit a https url and after hitting the url I need to download a json file for further use
I am able to login and browse the file location by using Basic Authorization.
In response, I can see the files name in html format.But further I wanted to download the file in local machine or to see a content of the file in the soap UI response so that assertions can be added.
Please suggest if there is any other approach in soap UI where we can download a file or see a content of file after hitting the https URL.
11 REPLIES 11
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020
10:02 AM
11-24-2020
10:02 AM
Hey @sparrowenclave,
I havent tried this myself, but @nmrao posted a solution to doing this via groovy in ReadyAPI! so i'm assuming as its groovy you should be able to do it in open source SoapUI.
Nice one
Rich
I havent tried this myself, but @nmrao posted a solution to doing this via groovy in ReadyAPI! so i'm assuming as its groovy you should be able to do it in open source SoapUI.
Nice one
Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020
10:29 AM
11-24-2020
10:29 AM
Please have a look at
Note: Where I was used "REST" in above link, in your case it will be "HTTP".
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020
10:39 AM
11-24-2020
10:39 AM
Hi @richie
I saw the solution given by @nmrao
but got struck
after finding the particular file name in the response, do we need to add "/download" into our url for downloading?
If any of you can elaborate, it will be great help.
Because ,I can see in response html structure is coming with file name but how to download them or see the contents of file is the problem
Struck part
http://fsb-adm1-ta.names.belgium.be:XXXX/palngv3debug/download/" + it.text()
def url = "http://fsb-adm1-ta.names.belgium.be:XXX/palngv3debug/download/" + it.text()
I saw the solution given by @nmrao
but got struck
after finding the particular file name in the response, do we need to add "/download" into our url for downloading?
If any of you can elaborate, it will be great help.
Because ,I can see in response html structure is coming with file name but how to download them or see the contents of file is the problem
Struck part
http://fsb-adm1-ta.names.belgium.be:XXXX/palngv3debug/download/" + it.text()
def url = "http://fsb-adm1-ta.names.belgium.be:XXX/palngv3debug/download/" + it.text()
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020
10:42 AM
11-24-2020
10:42 AM
Hi
It will be helpful when I will receive attachment in the response, but in my case I need to download it from browser after hitting the API request.
Anyhow your solution may found helpful in future API testing
It will be helpful when I will receive attachment in the response, but in my case I need to download it from browser after hitting the API request.
Anyhow your solution may found helpful in future API testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020
04:57 PM
11-24-2020
04:57 PM
Hey @sparrowenclave
Apologies if my reaponse didnt actually give you a way of downloading a file from a webpage. I saw Rao had answered that particular post and he really knows his stuff, so i thought that was what you needed (i didnt actually check content of post).
I'll continue to look around cos i would like to know how to do this too (for possible future).
Cheers
Rich
Apologies if my reaponse didnt actually give you a way of downloading a file from a webpage. I saw Rao had answered that particular post and he really knows his stuff, so i thought that was what you needed (i didnt actually check content of post).
I'll continue to look around cos i would like to know how to do this too (for possible future).
Cheers
Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020
12:26 AM
11-25-2020
12:26 AM
As far as I understand, you need to access a file from an URL provided by the HTML response of your request.
I used to parse some HTML content with Jsoup to extract data or make some assertions.
Once you get the path you cab easily access the file or its content.
By the way could you provide an exemple of your HTML content so we could try to do something ?
Thanks.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020
09:57 AM
11-25-2020
09:57 AM
Hi @ZDGN
Manual Testing approach
I am hitting a request in soap UI, Soap UI is providing me some respone.
But internally API is creating 6 json file in the specific repository location with the current date and time name which looks like link, then I am clicking on file to download it and verifing the contents inside the file.
I wanted to automate this part through soap UI.
Hope I am able to explain you
Manual Testing approach
I am hitting a request in soap UI, Soap UI is providing me some respone.
But internally API is creating 6 json file in the specific repository location with the current date and time name which looks like link, then I am clicking on file to download it and verifing the contents inside the file.
I wanted to automate this part through soap UI.
Hope I am able to explain you
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2020
12:38 AM
11-27-2020
12:38 AM
You could try some groovy script to access your files if you already know the location.
By browsing the directory, just loop for opening each file and make assertion on the content.
Is that what you're looking for ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2020
08:25 AM
11-28-2020
08:25 AM
Yes ,
I am looking this solution, If you can help , It will be great help by providing some scripts.
I am looking this solution, If you can help , It will be great help by providing some scripts.
