Outbounde Exception the second time that I try to read an Excel with SoapUI
I'm trying to read the datas of an excel with the objects
wb = Workbook.getWorkbook(new File('C:/Users/Franciscog/Desktop/papageno1.xls'))
It works fine the first time that I use, but the second time, I get this message:
java.lang.ArrayIndexOutOfBound.Exception:0error at line: 12
I have to add new rows and columns to the excel in order to make it works again. Any idea of why is it?
Thanks a lot in advance
Solved! Go to Solution.
If you could provide more details and/or your groovy script, it would help to troubleshoot.
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Thanks for your answer.
I'm trying to read the datas from an excel. I have tried with this code that I found in Internet, but it is quite strange, because when I execute it for the first time, it works fine, but the second time, I get the error and the creation of the 'getWorkbook' line. However, if I add another row or column to the excel, it works again the first time but in the second fails again.
I have attached the code and the excel (97), I hope it is going to help.
Thanks a lot again.
The idea would be to take the datas from the excel in order to put it as the values of different fields for a testing of "allowed values". I'm looking for a way to do that and I found this code.
Thanks in advance.
You also have some xml, I was not sure why was that.
Have you tried data driven test?
How are you going to use the data that is read? (otherwise you do not do this exercise right?) That would help understand the use case.
Really, I would not need anything of xml, it is just the code that I found for reading datas from an Excel. Now I got this new one that is better.
I need this because I should send messages of vehicles that has some of their fields with just some allowed values, for example, odometer unit: Milles, Hours or Kilometres. Then, I would like to put all those values in an excel and take them for each message (I should send the same number of messages as possible values).
Thanks you and best regards.