Forum Discussion

Manoj0516's avatar
Occasional Contributor
7 years ago

How to access xls files under resources folder in a Maven Project that's integrated with SOAPUI

I have integrated Maven Project with SOAPUI and there are some excel sheets present in a resources folder in my MAVEN project. How can I access or read the file from my SOAPUI groovy step?
  • Manoj0516's avatar
    7 years ago

    Created a new folder under base directory as DataSource and moved my input XLS file.




    Added following to my pom.xml and corresponding groovy statements in my groovy test step.




    def projProp = testRunner.testCase.testSuite.project.getPropertyValue("mytestproperty") "$projProp"

    Workbook wb = Workbook.getWorkbook(new File("$projProp"))
    Sheet Sh = wb.getSheet("Sheet1")