I’ve tried numerous things in the Katalon interface and searched the internet and this forum. I’ve found some answers, but I must be too dumb to understand what to do. ¯ \ _ (ツ) _ / ¯
I’m currently evaluating Katalon Studio for potential integration into our production environment. I’ve been running a lot of small tests to figure things out.
Here’s my situation:
The test case TC0503 has two variables: usernameTC and passwordTC. These variables are mapped to a Data File TC0503 which contains two corresponding columns: username and password.
Login is another test case. It also has its variables and dataset with a specific Data File. Login includes several Custom Keywords methods, one of which is used to input login credentials into the application:
TC0503 starts by calling the Login test case. I’m trying to figure out how to specify to Login that I want to send it the contents of the TC0503 variables usernameTC and passwordTC.
I checked if my TC_05_03_03 variables have any values and they do.
I get this error which makes no sense to me as I do have TCLogin variables listed as in use, as shown above:
2024-04-25 15:24:23.> 443 ERROR c.k.katalon.core.main.TestCaseExecutor - Test Cases/ActuBu/TC_05_03_03 FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: TCLogin_username for class: Script1713517697054
The above error is indicating something is incorrect with “TCLogin_username”. Perhaps a spelling error? You can use CTRL + C to copy the reference in one location and then CTRL + V (paste) on all the other same references to ensure they are all spelled the same.
Or your TC has come upon “TCLogin_username” with no initialization of what data type the variable is.
Many thanks for your answer. I followed your advice and met another wall. Then I decided to recreate the same situation with two new test cases: anoLogin and anoTC05.
My goal: to pass TC05’s variables values to anoLogin’s variables. Both tests have variables mapped to different test data sets.
DEBUG testcase.anoTC05 - 4: callTestCase(findTestCase("anoLogin/anoLogin"), [anoTCLogin_username:anoTC05_username, anoTCLogin_password:anoTC05_password], STOP_ON_FAILURE)
2024-04-29 17:44:19.884 ERROR c.k.katalon.core.main.TestCaseExecutor - ❌ Test Cases/anoActubu/anoTC05 FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: anoTCLogin_username for class: Script1714124675762
at anoTC05.run(anoTC05:24)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
at com.kms.katalon.core.main.TestCaseBindingExecutor.accessTestCaseBindingMainPhase(TestCaseBindingExecutor.java:67)
at com.kms.katalon.core.main.TestCaseBindingExecutor.execute(TestCaseBindingExecutor.java:44)
at com.kms.katalon.core.main.TestCaseMain.startTestCaseBinding(TestCaseMain.java:185)
at TempTestCaseBinding1714405450835.run(TempTestCaseBinding1714405450835.groovy:25)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)