Data Driven | Katalon refuses to bind half of variables

I have unbelievable problem with @Katalon_Studio again which drives me crazy… I’m using data driven testing with binding variables from Excel on test suite level. So far I’ve used a lot of sources and mapped more than 300 variables on different test cases.

Now when I’m on 98% of my POC and after I’ve downloaded latest version of @Katalon_Studio variable binding is not working as expected anymore!

I’m trying to bind variables on test suite level and only half of them get bindings and half doesn’t without any information, error or reason why!

Can someone please help me, any idea is appreciated I’m desperate with this…

This is happening only with 1 Excel file, since it’s downloaded as template I’ve tried to create new clean excel file but again without success.

Looks like something with name of variables are causing this issue…

Can you provide us your exel file containing variable names? @Luka_Mlikota

I have to ask client first, I will have this information in 1 hour. I can help you with variable names in meanwhile if that can help…

@Loan_Tran Excel file attached.

Prerequistes:

  1. To have test case with variables from template defined as: Type = String and Default value = “”
  2. To have test suite with test case assigned

Steps to reproduce:

  1. Create new Excel data source in Katalon
  2. Add attached Excel file
  3. Open test suite from prere’s step 2
  4. Select test case from prereq’s step 1
  5. Click on test case
  6. Click on ‘Show data binding’
  7. Click on ‘Add’
  8. Select data source from step 1
  9. Click on ‘Map all’
  10. Observe UI

Expected result:

  1. Info message with text: ‘Found 23 match(es)’

Actual result:

  1. Info message with text: ‘Found 15 match(es)’. Other variables are not matched and no error was thrown.

Export_Circuit
main_BASE.7z|attachment
(7.5 KB)

@Loan_Tran Please consider the fact I don’t have problem with any other binding except this particular case and this project has more than 300 variables which were auto mapped without any issue.

hi @Luka_Mlikota,
I’ve tried with latest version but no issue found.

Can you send us your log file?

Unbelievable :slight_smile: :thinking:

You will find 3 logs, latest was few minutes ago.

.metadata.7z (55.2 KB)

@Luka_Mlikota,
Please create a new project, then try to map variables again. If you still meet the issue, please click Help -> Error then save the whole log and send it to us.

@Loan_Tran I’m still experiencing the same issue with new project.

.log.7z (29.6 KB)

@Luka_Mlikota,
I’ve found no error in the log file. Can you send us the project you’ve just created?

@Loan_Tran Sure Test variables.7z (22.6 KB)

@Loan_Tran Thank you for you effort, my college tried on his Windows10 machine and it’s working! It’s still not working from my side which is unbelievable.

I’m desperate so I will restart my PC maybe that helps, I see there are pending Windows updates… If that fixes my issue I will let you know and buy myself a Mac.

Screen Recording_Katalon issue with variable mapping on Win10 x64.7z (1.5 MB)

Nope, still not working on my machine after restart.

Hi @Luka_Mlikota

I downloaded and opened your project to reproduce this. The problem is not in your Test Data, but in your test case variables.

When I switch to tab Variables (Script mode) in a Test Case, I see this:

Blue marks a variable that is mapped successfully, and red marks a variable that is not.

Notice that in the case of variable description, it has a newline character, when Katalon read its value, the value will be “description\n”, which will not map to column with name “description” in your Test Data. This also applies for other mapped and unmapped variables.

Please try to delete the new line characters ( you could perhaps use an online XML formatter). Could you also verify that on your colleague’s machine to see if it’s any different, and also on the previously working version.

Thanks for reporting !

1 Like

@ThanhTo Thank you for you effort. I’m copying variables sometimes using script mode.

Issue probably happen during copy/paste from one test case to another or from Katalon to Notepad++ and back to Katalon.

If you wonder why I’m copy/pasting code from Katalon to Notepad++ and back that’s because of another issue with Katalon removing parens when moving from script view to manual view after a change in manual view, this is still not fixed in latest version even though release notes state it is:

I will report this issue with all details as soon as I find time, probably today. I have a video of the problem.

Related issues to parens problem:





@devalex88 @ThanhTo

Hi @Luka_Mlikota

The error you said was about the Script mode of a test case, but the variables are in a separate Script tab. Could you elaborate more, since I am failing to see the connection between the paren problem with the variables.

@ThanhTo The connection is I have to use external text editor because of another issue with parens. So in other words if I wasn’t forced to use external editor I would never bumped into issue with ‘\n’ character in variables :shushing_face:

I can confirm removing ‘\n’ character in variables script mode resolved issues with variables, they are mapped now.

Thanks again for resolving this mystery @ThanhTo.

My college didn’t copy variables in script mode he inserted them manually hence he didn’t experience this issue.