google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

Exception while running gwt test #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using gwt-test-utils-0.27
2.
3.

What is the expected output? What do you see instead?
Exception when running junit:
java.lang.RuntimeException: Error while loading JavaScriptObject subclass and 
Patcher instances
    at com.octo.gwt.test.internal.ConfigurationLoader.<init>(ConfigurationLoader.java:83)
    at com.octo.gwt.test.internal.ConfigurationLoader.createInstance(ConfigurationLoader.java:49)
    at com.octo.gwt.test.GwtClassLoader.<init>(GwtClassLoader.java:74)
    at com.octo.gwt.test.GwtClassLoader.get(GwtClassLoader.java:46)
    at com.octo.gwt.test.GwtRunnerBase.<init>(GwtRunnerBase.java:31)
    at com.octo.gwt.test.GwtRunner.<init>(GwtRunner.java:25)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
    at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
    at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:32)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:41)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:31)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

What version of the product are you using? On what operating system?
gwt-test-utils-0.27
windows xp

Please provide any additional information below.
Tests are run on eclipse 3.6
Attached is the demo test.

Thanks

Original issue reported on code.google.com by sandeep....@gmail.com on 31 Mar 2011 at 10:16

Attachments:

GoogleCodeExporter commented 9 years ago
What is the lastest version our test was successfully running with ? 

Did you follow all steps of the migration guide ? 
(http://code.google.com/p/gwt-test-utils/wiki/HowToMigrateToLastestVersion)

Original comment by gael.laz...@gmail.com on 31 Mar 2011 at 10:28

GoogleCodeExporter commented 9 years ago
Hello, i got the same issue, but only when using sonar or cobertura maven 
plugins.

Did you already succeed to run gwt-test-util with coverage tools ??

Thanks

Original comment by ave...@octo.com on 8 Apr 2011 at 3:32

GoogleCodeExporter commented 9 years ago
Here is the root exception : 

Caused by: java.lang.RuntimeException: The @PatchClass annotated class 
'com.octo.gwt.test.patchers.AutomaticPropertyContainerPatcher' must implements 
Patcher interface and provide an empty constructor
    at com.octo.gwt.test.internal.ConfigurationLoader.treatPatchClass(ConfigurationLoader.java:313)
    at com.octo.gwt.test.internal.ConfigurationLoader.loadPatchersAndJavaScriptObjects(ConfigurationLoader.java:190)
    at com.octo.gwt.test.internal.ConfigurationLoader.<init>(ConfigurationLoader.java:81)

Original comment by ave...@octo.com on 8 Apr 2011 at 3:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This error message wasn't very explicit, so I modified this portion of code to 
have a finer reports in 0.28-SNAPSHOT

By the way, I added cobertura to the pom configuration and the test coverage 
reports are well generated.

Does it work with the lastest snapshot available ?

Original comment by gael.laz...@gmail.com on 2 May 2011 at 9:35

GoogleCodeExporter commented 9 years ago
Hello,
I upgraded to 0.28-SNAPSHOT to figure it out.
So, I got the following issue, but only with sonar (I attached the full trace):

...
Caused by: com.octo.gwt.test.exceptions.GwtTestConfigurationException: The 
@PatchClass annotated class 
'com.octo.gwt.test.internal.patchers.CookiesPatcher' must implements Patcher 
interface and provide an empty constructor
at 
com.octo.gwt.test.internal.ConfigurationLoader.treatPatchClass(ConfigurationLoad
er.java:299)
at 
com.octo.gwt.test.internal.ConfigurationLoader.loadPatchersAndJavaScriptObjects(
ConfigurationLoader.java:197)
at 
com.octo.gwt.test.internal.ConfigurationLoader.<init>(ConfigurationLoader.java:8
5)
at 
com.octo.gwt.test.internal.ConfigurationLoader.createInstance(ConfigurationLoade
r.java:47)
at com.octo.gwt.test.internal.GwtClassLoader.<init>(GwtClassLoader.java:77)
at com.octo.gwt.test.internal.GwtClassLoader.<clinit>(GwtClassLoader.java:39)

Thanks

Original comment by fma...@octo.com on 3 May 2011 at 4:09

Attachments:

GoogleCodeExporter commented 9 years ago
It probably is a classloading issue. I'll try to get gwt-test-utils working 
with sonar before releasing the 0.28 version.

Original comment by gael.laz...@gmail.com on 4 May 2011 at 7:03

GoogleCodeExporter commented 9 years ago
Sonar reports generation is working fine with gwt-test-utils-0.28. It should be 
a configuration problem in your project.

gwt-test-utils documentation has been updated. You should have a look to it. If 
possible, you also may provide your application project so I could check what's 
wrong.

Original comment by gael.laz...@gmail.com on 11 May 2011 at 10:41

GoogleCodeExporter commented 9 years ago
I found the cause, i used the *useManifestOnlyJar* with false value in the
surefire configuration.
It is working now.

Original comment by ave...@octo.com on 11 May 2011 at 5:08

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 26 May 2011 at 12:40

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 9 Jun 2011 at 3:30