Manoj0516
8 years agoOccasional Contributor
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?
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.
<projectProperties>
<value>mytestproperty=${basedir}\DataSource\TestMyFile.xls</value>
</projectProperties>def projProp = testRunner.testCase.testSuite.project.getPropertyValue("mytestproperty")
log.info "$projProp"Workbook wb = Workbook.getWorkbook(new File("$projProp"))
Sheet Sh = wb.getSheet("Sheet1")