RemoteTestNG starting
org.testng.TestNGException:
An error occurred while instantiating class aaa.bbb.Cccc$6. Check to make
sure it can be accessed/instantiated.
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:348)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:89)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:107)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:117)
at org.testng.TestRunner.initMethods(TestRunner.java:394)
at org.testng.TestRunner.init(TestRunner.java:228)
at org.testng.TestRunner.init(TestRunner.java:198)
at org.testng.TestRunner.<init>(TestRunner.java:154)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:139)
at
org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at
org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:542)
at org.testng.SuiteRunner.init(SuiteRunner.java:142)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:106)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1051)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1037)
at org.testng.TestNG.runSuitesLocally(TestNG.java:877)
at org.testng.TestNG.run(TestNG.java:820)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:110)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:174)
My class looks something like that :
public void testAAA()
{
new FacesRequestLocal("blabla") { ... }
}
It is working fine with Maven
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.14.2</version>
<scope>test</scope>
</dependency>
Is it a bug or an expected (new) behaviour ?
Thanks
--
View this message in context: http://old.nabble.com/Error-instanciating-an-inner-class-%28eclipse-plugin-5.14%29-tp30354626p30354626.html
Sent from the testng-users mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
hi,
investigating further, I found the problem. I created a really small project
(attached) to demonstrate this behaviour. If you launch "Test
embedded.launch" which use "allTests-embedded.xml" only, it works fine, but
if you launch "Test all.launch" which use "allTests-embedded.xml" AND
"allTests-standalone.xml", it does not work (with the aforementioned
exception)
so there is something wrong, one way or another (isn't it?)
thanks for developping testng, anyway !
David
--
View this message in context: http://old.nabble.com/Error-instanciating-an-inner-class-%28eclipse-plugin-5.14%29-tp30354626p30362883.html
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
but there is something i cannot find in the documentation :
<test name="Standalone">
<groups>
<run>
<include name="standalone" />
</run>
</groups>
<packages>
<package name="test" />
</packages>
</test>
is it running all classes in test package ***AND*** belong to the
"standalone" group,
or
is it running all classes in test package ***OR*** belong to the
"standalone" group
i see "OR" happening, but i always thought it was "AND" ???
thanks for your time
David
--
View this message in context: http://old.nabble.com/Error-instanciating-an-inner-class-%28eclipse-plugin-5.14%29-tp30354626p30363298.html
ok, i think it's a little weird to run nested classes, but if this is the
expected behaviour... if you have some time, why is that ?
but there is something i cannot find in the documentation :
<test name="Standalone">
<groups>
<run>
<include name="standalone" />
</run>
</groups>
<packages>
<package name="test" />
</packages>
</test>
is it running all classes in test package ***AND*** belong to the
"standalone" group,
or
is it running all classes in test package ***OR*** belong to the
"standalone" group
i see "OR" happening, but i always thought it was "AND" ???
well, i may miss something really obvious but in the new test case attached,
running "standalone" raises:
"An error occurred while instantiating class test.TestClassEmbedded$1. Check
to make sure it can be accessed/instantiated."
<test name="Standalone">
<groups>
<run>
<include name="standalone" />
</run>
</groups>
<packages>
<package name="test" />
</packages>
</test>
@Test(groups = { "embedded" })
public class TestClassEmbedded {}
@Test(groups = { "standalone" })
public class TestClassStandalone {}
--
View this message in context: http://old.nabble.com/Error-instanciating-an-inner-class-%28eclipse-plugin-5.14%29-tp30354626p30363505.html
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
First thanks to Cedric who takes time to answer our questions, since i know
some forums where it's very rarely the case...
I think, indeed, that before that the error was swallowed: i saw somewhere
else that "if(result==null)throw" was added.
1. I now understand why I have "An error occurred while instantiating class
test.TestClassEmbedded$1" when I run my "standalone" test suite
2. Is there a way to exclude all inner classes then?
Thanks
David
> testng-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/testng-users?hl=en.
>
>
>
--
View this message in context: http://old.nabble.com/Error-instanciating-an-inner-class-%28eclipse-plugin-5.14%29-tp30354626p30394685.html
<packages>
<package name="test.tmp.a">
<exclude name=".*\$.*" />
</package>
</packages>
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
Hi Cédric,
Thank you so much for the detailed explanation of what's going on and
the rationale for the change.
I haven't tried your solution at testng.org/beta yet but I will try
it.
In answer to your curiosity about whether Gordon and I got the code
straight from Github: no, we used Eclipse's "Check for Updates"
feature. It found the new version of TestNG at http://beust.com/eclipse.
The date stamp on the newest version there is 20101203, so it's after
the date you made the change on Github.
Your suggestion for excluding nested classes is helpful. I wasn't
aware that nested classes include a $ sign and that non-nested classes
don't.
You asked for feedback on the solution you tried out a few days ago. I
don't think I quite understood the description of how someone used a
class hierarchy to eliminate the need for the @Test annotation, but
maybe it would help to state some general goals:
- I would like to not have to maintain a lengthy testng.xml file,
adding new lines to it whenever I add new test classes or nested
classes (that don't contain tests). I strongly prefer a simple
testng.xml file with a couple of rules that never have to change when
tests are added or deleted.
- I don't mind adding @Test to each test method. It doesn't feel
intrusive to me. But I also wouldn't mind if TestNG followed a naming
convention. E.g., all public methods whose name starts with "test" are
considered test methods and all classes whose name starts with "Test"
are considered test classes. The important thing would be that it can
find the test methods very quickly.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
RemoteTestNG starting
java.lang.NullPointerException
at
org.testng.internal.TestNGClassFinder.isTestNGClass(TestNGClassFinder.java:217)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:104)
at org.testng.TestRunner.initMethods(TestRunner.java:394)
at org.testng.TestRunner.init(TestRunner.java:228)
at org.testng.TestRunner.init(TestRunner.java:198)
at org.testng.TestRunner.<init>(TestRunner.java:154)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:139)
at
org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at
org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:542)
at org.testng.SuiteRunner.init(SuiteRunner.java:142)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:106)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1051)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1037)
at org.testng.TestNG.runSuitesLocally(TestNG.java:877)
at org.testng.TestNG.run(TestNG.java:820)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:110)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:174)
Hi Brian,
I just pushed a new version of the Eclipse plug-in that contains the new
TestNG version.
--
Cédric
--
View this message in context: http://old.nabble.com/Error-instanciating-an-inner-class-%28eclipse-plugin-5.14%29-tp30354626p30400749.html
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.