Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Saving Decompression Results

bryancox
bryancox Posts: 15

Hey Parasoft,

I am testing a REST client that is returning a zip file that I need to use later to verify results. I am trying to use the Decompression Tool. So how do I save the files that the Decompression Tool extracts?

Thanks,

Bryan Cox

Comments

  • bryancox
    bryancox Posts: 15

    I ideally I would like SOAtest to:
    For each file in the zip file (they will be csv) -> save the info in each file to a varable.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited August 2018

    The Decompression tool can decompress a document that's compressed with gzip, zip, or deflate compression methods. It can not be used to extract files from a zip archive. For that, you could consider using the External tool to execute an unzip command. For Linux that could be "/usr/bin/unzip" and for Windows that could be something else, like 7-zip. The "jar" command from the java runtime can also be used to extract files from zip archives.

  • bryancox
    bryancox Posts: 15

    Hey Parasoft,

    Thanks for the quick feedback.

    So where do the results of the Decompression tool go?

    Thanks,

    Bryan

  • jakubiak
    jakubiak Posts: 795 admin

    To get the results, you need to attach a tool to the output of the Decompression Tool. In this case you can attach a Write File tool to write the decompressed content to disk. But as @benken_parasoft said, if it's a zip file you probably should use an External Tool to decompress the zip file. Once the csv files are in a directory, then you can put them into a File Data Source to enable parameterizing tests with the data.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    I'm saying you can't use the Decompression tool. It is not used to extract files from a zip archive. You need to use some other tool to do that, like one of the ones I mentioned.