
In order to manage files Upload and Download we will be using the core JAX-RS API and Rest Easy implementation, along with IOUtil class from Apache Commons IO library. Paste the following code into newly created teststep. In your testcase, add a Groovy Script teststep and name it as Groovy Script DataSource. public static Workbook getWorkbook(java.io.InputStream is) throws java.io.IOException, A factory method which takes in an excel file and reads in the contents. i.e., using few set of Groovy script lines.
#GROOVY JXL API PRO#
Yes, you read it right without procuring soapUI Pro License. To get started we recommend this tutorial: RESTEasy tutorial Here is how you can also do it without procuring soapUI Pro license. Uploading and Downloading files using a REST Service Copy the below code in the GroovyScript // IMPORT THE LIBRARIES WE NEED import .XmlHolder import jxl. Name the step as GroovyScript This groovy script will have the logic of reading the excel file.
#GROOVY JXL API HOW TO#
On the top of that, we will show how to build a JUnit Test to test files uploading using RESTEasy Client API. Right-click on the test case again and this timeAdd StepCreate Groovy Script. We will demonstrate with a rest service sample how to upload and download files using JAX-RS API with different front ends (AngularJS and JSP). This rest service tutorial is a quick guide for handling files upload and download using REST Services.
