When the autosuite scans a bundle/plugin for test classes it loads every class in the plugin's classpath. It event loads classes that are in third party jars that might be in the plugin.
Sometimes autosuite will encounter .class files which can't be loaded (NoClassDefFoundError) org/apache/log4j/Category.
I know this is caused by a third party jar I'm using that requires this class but the use I make of this third party jar does not trigger access to all the jars in this third party jar so all is ok.
However when autosuite scans this third party jar it loads every single class trying to see if it fits the regex for a test case.
I think autosuite should just continue if it encounters a class that it cannot define from a third party jar. I don't think it is autosuite's responsibility to validate the .class files.
What do you think?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This should be fixed in Head. Please try a nightly from http://autotestsuite.pluginbuilder.org/. You should see an entry "Bundle could not load class: " in the log for those classes.
Thanks for the report. Please let me know if the nightly works for you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
actually I downloaded the latest code and saw the checks for classnotfound and noclassdef but I think it should just catch the throwable. The scanning will fail if IllegalAccessError are thrown. There was another one as well but I forget.
Anyways I changed the code to catch throwable and it fix my issues with it. I think you should just catch throwable since it you have problems defining a class you just want to continue with the other ones.
BTW: thanks for developing pluginbuilder and autosuite I like these tools very much.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good to hear that you could fix the issue. Did you also add your test case to org.pluginbuilder.autotestsuite.tests? I would be interested in both a test scenario for your case and the fix (I guess in TestClassScanner). If you want to send it, simply zip the plugin or create a patch against svn trunk and send it to me.
thanks
Markus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
When the autosuite scans a bundle/plugin for test classes it loads every class in the plugin's classpath. It event loads classes that are in third party jars that might be in the plugin.
Sometimes autosuite will encounter .class files which can't be loaded (NoClassDefFoundError) org/apache/log4j/Category.
I know this is caused by a third party jar I'm using that requires this class but the use I make of this third party jar does not trigger access to all the jars in this third party jar so all is ok.
However when autosuite scans this third party jar it loads every single class trying to see if it fits the regex for a test case.
I think autosuite should just continue if it encounters a class that it cannot define from a third party jar. I don't think it is autosuite's responsibility to validate the .class files.
What do you think?
This should be fixed in Head. Please try a nightly from http://autotestsuite.pluginbuilder.org/. You should see an entry "Bundle could not load class: " in the log for those classes.
Thanks for the report. Please let me know if the nightly works for you.
actually I downloaded the latest code and saw the checks for classnotfound and noclassdef but I think it should just catch the throwable. The scanning will fail if IllegalAccessError are thrown. There was another one as well but I forget.
Anyways I changed the code to catch throwable and it fix my issues with it. I think you should just catch throwable since it you have problems defining a class you just want to continue with the other ones.
BTW: thanks for developing pluginbuilder and autosuite I like these tools very much.
Good to hear that you could fix the issue. Did you also add your test case to org.pluginbuilder.autotestsuite.tests? I would be interested in both a test scenario for your case and the fix (I guess in TestClassScanner). If you want to send it, simply zip the plugin or create a patch against svn trunk and send it to me.
thanks
Markus