Groovy Script Naming Convention


I’ve noticed that the test case groovy scripts have some arbitrary naming convention. Upon some research, it is said that the groovy scripts name is the time stamp. Is it possible to change that name, i.e. from Script1581698522961 to Test1Script, or will changing the name cause any issues?

If you copy an existing testCase, the groovy script name will have the same value, causing issues in debug mode. If two scripts have the same Scriptxxxxxxxxxxx name, and you breakpoint in the one that alphabetically comes 2nd, then debug will load the first one which is wrong.

I got a list of all my Scriptxxxxxxxxxx.groovy files and their paths, loaded into a spreadsheet, sorted by the script name, This will show you all the ones with duplicate script names. I then change the number for the duplicates to an unused number on the filesystem while the project was closed. When I then opened the project, everything works file and no more debug issues.

I would take this to mean that the Script name could be almost anything, as long as it ends in “.groovy”

You could give it a try with a test testcase.