Forum Discussion

Bibu_Philip's avatar
Bibu_Philip
New Contributor
2 years ago
Solved

Unable to write to excel using groovy script in Test Engine

Hi,

 

I am trying to read/write to an excel file using Groovy script.

It works perfectly in my local ReadyAPI.

However, when I run it on Test Engine, I get the below error:

Error. java.security.AccessControlException: access denied ("java.io.FilePermission" "\Data\XXXXX_E2E_Functional_003.xls" "read")

 

I get this error on the below line of code:

Workbook wb = Workbook.getWorkbook(new File("\\Data\\XXXXX_E2E_Functional_003.xls"));
 
I updated the ReadyAPITestEngine.vmoptions file in Test Engine and added the line at the end: "-Dgroovy.allow.all=true" as mentioned in the documentation link below:
 However, I still get the access denied error.
Appreciate any help or lead into fixing this error.
 
Thanks!
B Philip