Cannot import all classes of package to a test case

Steps to reproduce:

Open a test case

Use import statement to import all classes of a packet. Ex: com.abc.pack.*

Expected: Can import successfully
Actual: Cannot run the script or switch to manual mode. It keeps saying:
11%20PM

I don’t think the star import will work in a groovy script.
So you have to import each class from the package, one by one

Star import works in pure Groovy as documented below:

https://groovy-lang.org/structure.html#_star_import

But, as far as I know, Star import does not work in a Test Case scripts of Katalon Studio.

Test Case syntax of Katalon Studio is a Groovy-flavored language but is NOT 100% pure Groovy. It is parsed by KS to generate a pure Groovy code. Apparently by design, KS does not support the Star import syntax in a test case script.

Same issue as this:

Hi @phuonglam, @Ibus, @kazurayam,
We have fixed this issue in recent releases. Please download the latest version and try again.
Regards.

1 Like