Working with .xlsx files in Azure Load Testing with JMeter based test

Jakob Dahl 0 Reputation points
2024-12-27T11:20:35.07+00:00

Greetings!

I am trying to understand whether there are some constraints with Azure Load Testing or I am doing something wrong.

I am using Azure Load Testing with JMeter test. The test itself is pretty basic as I am editing a single cell of .xlsx file with JSR223 sampler and Groovy script using Apache POI.

In Azure Load Testing, I upload my .jmx test, all .jar files necessary for proper POI functionality and Book1.xlsx file for editing.

On my local computer with JMeter, everything works as expected: the script opens the file, edits it and saves it correctly. However, the same Azure Load Testing test returns ERROR o.a.j.p.j.s.JSR223Sampler: Problem in JSR223 script Excel Edit JSR223 Sampler, message: javax.script.ScriptException: java.io.FileNotFoundException: File not found at: Book1.xlsx

In Azure Load Testing documentation, I can see that
"To read data from an external file in Azure Load Testing, you have to upload the external file alongside the JMeter test script in your load test."
Also

"Azure Load Testing uploads the JMX file and all related files in a single folder. When you reference an external file in your JMeter script, verify that you have no file path references in your test script."

I cannot understand why the error logs are saying that the file is not found as I added the file and am referencing it without a specific file path.

I am doing this as Proof Of Concept to find out whether Azure Load Testing is capable of resolving this kind of scenarios and the end goal is to try to download, edit and upload .xlsx files from my application within the scope of a JMeter performance test. Kindly help me understand whether it is possible to do so.

Your answers and suggestions are very much appreciated.

Thanks.

EDIT:

Extending description for sake of clarity. I'm using following .jar files in lib/ext folder for local set up

"commons-collections4-4.4.jar"

"commons-compress-1.26.2.jar"

"commons-io-2.18.0.jar"

"poi-5.3.0.jar"

"poi-ooxml-5.3.0.jar"

"poi-ooxml-lite-5.3.0.jar"

"poi-ooxml-schemas-4.1.2.jar"

"SparseBitSet-1.3.jar"

"xmlbeans-5.2.1.jar"

Also it won't work if I won't replace

"commons-io-2.15.1.jar" which is packaged with the latest JMeter version available for download for

"commons-io-2.18.0.jar" in lib folder.

I am using Book1.xlsx file with "test" A1 cell which would change for "Hello, Apache POI!" inside bin folder as it's default working directory for JMeter.

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
2,075 questions
Azure Load Testing
Azure Load Testing
An Azure service that enables developers and testers to generate insights on how to improve the performance, scalability, and capacity usage of their application
71 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.