Test slowing down over time

I’m trying to enter some data from a file on a webpage. To do so, I’m using a loop

TestData td = TestDataFactory.findTestData(“Data Files/ReadThis”)
int currentRow = 1
int maxRows = td.getRowNumbers()

while(currentRow <= maxRows) {
WebUI.setText(findTestObject(‘Repo/TbObject’), td.getValue(‘ColumnName’, currentRow))
WebUI.sendKeys(findTestObject(‘Repo/TbObject’), Keys.chord(Keys.ENTER))

This is pretty straightforward and simple. However, if my td file has many rows, the test slows down dramatically. Starting from the row 50 and going beyond that, the tests that took maybe 2-3 seconds (tops) to go through one iteration of the loop start taking around 5-10 even 15 seconds (around rows 250).

Is this “slowing down” of the test due to a setting that I didn’t see, is it a malpractice in that bit of code or is it something from Katalon itself?

Here are some informations on the test
- Katalon Version: 5.5.0
- Browser: 67.0.3396.99 (64 bit)

Thanks a lot for your help,
If you need more information I’ll be happy to provide as much as I can.


Firstly, truly excellent and clear posting of a problem.

Second, you are, I assume, incrementing currentRow somewhere?

Lastly, try this:

while(...) {
  def to = findTestObject('Repo/TbObject')
  WebUI.setText(to, ...)
  WebUI.sendKeys(to, ...)

Also, do you need to pass an ENTER key?