Finding Test Data Error when Test Data is not being used

Hello,

Win8, Katalon v5.10.0

I have deleted an internal test data file that is not in use anywhere else in my project or at my test case level but I’m receiving the following:

java.lang.IllegalArgumentException: Cannot find test data with id ‘Data Files/Promo Data Sheet’ because (of) ‘java.lang.IllegalArgumentException: Test data with id ‘Data Files/Promo Data Sheet’ does not exist’

I have checked the references of this data file if I add it back in but it shows nothing. This error is showing up before the driver window even opens and is preventing my tests from running unless I add in this blank internal data object that I’d rather not have.

Hi @Tyler_Prada

This seems weird. The error seems to indicate that somewhere there exists a reference to this Test Data. If this is not the case then this is indeed a bug. Please provide us with the log file to get to the root of this behavior, it’s available in \config\metadata.log file

Regards !

Hey there,

Here is my log file you requested-

KS.txt (843.9 KB)

also thank you for the quick response, I really appreciate it!

Hi @Tyler_Prada

I opened the file log with Notepad and Ctrl + F to find the text “IllegalArgumentException” but there seems to be no such error message in this log file. Could you reproduce this problem and then send the file log ?

This way the log is guaranteed to capture the error messages, otherwise since every time you open Katalon Studio the log gets rewritten (memory-convenient) and the error may have been wiped away because of your recent usages.

Thanks !

Oh this is very strange…

I closed and reopened Katalon, re-ran the test, got the error, and then checked the log file again like you have done and it’s not showing up for me either.

Here is my actual Katalon output:

Not sure if this will help but this is the full error output I’m getting:

02-06-2019 10:12:21 AM Test Cases/AutoBlocks Modules/Attendee Modules/Attendee Modular Template

Elapsed time: 6.545s

Test Cases/AutoBlocks Modules/Attendee Modules/Attendee Modular Template FAILED.
Reason:
java.lang.IllegalArgumentException: Cannot find test data with id 'Data Files/Promo Data Sheet' because (of) 'java.lang.IllegalArgumentException: Test data with id 'Data Files/Promo Data Sheet' does not exist'
	at com.kms.katalon.core.testdata.TestDataFactory.findTestData(TestDataFactory.java:122)
	at com.kms.katalon.core.testdata.TestDataFactory$findTestData.callStatic(Unknown Source)
	at internal.GlobalVariable.<clinit>(GlobalVariable.groovy:109)
	at Landing.run(Landing:12)
	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:328)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)
	at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)
	at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)
	at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)
	at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:80)
	at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:44)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
	at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)
	at Attendee Modular Template.run(Attendee Modular Template:20)
	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:328)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1549465938716.run(TempTestCase1549465938716.groovy:22)

I tried running both from debug and the actual run to see if the log would spit it out but nothing.

Hi @Tyler_Prada

The thing with the log is strange. But anyway, are you completely positive that Test Cases/AutoBlocks Modules/Attendee Modules/Attendee Modular Template does not contain any reference (explicit or implicit) to Data Files/Promo Data Sheet ?

By implicit reference, I am talking about the possibility is that in the test case above you use a profile execution which contains a global variable that references the already deleted test data. Could you check for me this possibility also ?

Thanks !

I feel like a goof now :sweat_smile:

I had a global var referencing this data object still which was causing my issues. I re-ran the test and the error never came up. That was certainly the problem!

I appreciate your time and I apologize for taking it for something trivial-

2 Likes

No problem mate. Glad that I could be of help !

2 Likes