Why when programming in Java in Script View does the code not need a main method to execute? All katalon needs is a step to run a method, it doesn’t matter if the method is called main or not. Sorry for this rather strange question, it’s been bugging me.
Your script, “My Test Case script” is a Script Class. Behind the scenes, it looks like this:
http://groovy-lang.org/structure.html
Your Test Case code lives inside the run()
method.
1 Like
Thanks for the great answer. Am I right in thinking this affects scope of classes and methods as well e.g. public, private, protected?
1 Like
Pretty much everything is public by default in Groovy. You need to opt-out by declaring items private et al.
1 Like