When debugging a testsuite, with a breakpoint set in one of the testcases, the break occurs, but it opens a completely unreferenced testcase source file.
No errors are thrown, and I can continue execution, but I cannot debug.
Is there anything non-standard about your test case(s)?
I can’t break at ANY step in ANY of my test cases - but I know why, they’re very non-standard:
import ...
public class Test extends com.me.basePage {
Test() {
// test steps here
// No breakpoints work here
}
}
try {
// Breakpoints work here
new Test()
passThisTest()
} catch(Exception e) {
// Breakpoints work here
failThisTest(e.message)
}
Does Katalon always load the same erroneous TC? What does it do if you rename it? Remove it?
Ok, I did some digging, and this occurs if the groovy file has the same Scriptname.
For example. I had a test case called “testlong”, who had the goovy file named Script1561547807805.groovy. I then copied the testcase to the same directory which it called “testlong - copy” I then renamed it “testshort” and made edits. When I debug “testshort” it opens “testlong”. So I looked at the Script file for “testshort”, and it was also called Script1561547807805.groovy.
So I searched for all files named Script*.groovy and sorted them. All the ones that have a duplicate Script name have issues when debugging.
Further too this. I found that the test case name has much to do with this. If I create a folder called “mytests” then inside create a test cases called “testa”. Then copy that test case to the same folder called “testb” and another copy called “testc”.All thee test cases have the same Script###.groovy filename on the filesystem. Now make minor changes to “testb” and “testc”. Any debugging of “testb” or “testc” will open “testa”. If I rename “testa” to “testd”, then debugging “testb” is ok, but degugging “testc” or “testd” opens “testb”.
I think you can see where I am going. The path and sort order of folders seems to play a part. It will open the first file with the Script####.groovy that it finds.