How to validate binary response having multiple zip files which intern has json files within zip using karate
I have a scenario, where the response is a binary file. This response has multiple zip files and each zip file has one or more json files within. Can anyone suggest how to verify this response?. Thanks in advance.
I tried karate.write(response,"response.zip") to store the re开发者_StackOverflowsponse in a zip file. Zip file is getting created but when i try to unzip it has only one zipped record(where as it should have had all the zip files available in response) which is in corrupted form or with 0kb.
Note: response header: Contenty-Type: application/octet-stream
Karate does not have support for ZIP files.
If you found only one zipped record maybe it is an actual bug.
I have 2 suggestions:
Maybe if you just run some commands on the command-line, you can achieve what you want. Karate has good support for that: https://stackoverflow.com/a/62911366/143475
Write a custom Java utility and integrate it: https://stackoverflow.com/a/62826394/143475
精彩评论