Filus
unread,Nov 7, 2011, 10:01:15 AM11/7/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to testng-users
Hi,
In nowadays I'm using TestNg very often with Groovy code. In general
it is brilliant combination, but lately I've been bad surprised by the
way TestNg find classes when package is specified instead of every
single class in xml suite and version newer than 6.0 is used.
Problem is that if in this specified package any Groovy interface is
present, private method registerClass() of
org.testng.internal.ClassInfoMap class throws
java.lang.NoClassDefFoundError: package_name/InterfaceName$1
throwable. As I found out it is Groovy issue with getClasses() method
for instance Class object which always throws that error.
Anyway, of course I have a some workarounds - stay with 6.0 or specify
test classes for packages with Groovy interfaces instead of package
tag in xml suite. But I've looked into TestNg code and I have question
or maybe even small request:
In mentioned above ClassInfoMap.registerClass() method there is local
variable includeNestedClasses, and it's tested in if statement some
lines below. But it is always set to true. Is it possible to make this
behavior/variable somehow parametrized? Or it doesn't make sense and
define this variable to false will made some other issues? (To be
honest I haven't analized TestNg internal construction deeply, I've
only found this difference between 6.0 and newer versions).
Of course, I am aware that the best solution is Groovy team fix their
issues, so I'm only asking without any pressure. :)
--
Filus