Recently I upgraded to GWT 2.8 from GWT 2.6.1. Now all of my GWTTestCases fail where they were all passing with GWT 2.6.1.
I've written a simple test case fails. This test case calls new SmartGwtEntryPoint().onModuleLoad(),
I run this test using the Eclipse Run as/GWT Junit Test
Here is the resulting test log:
Here is the GWT module referred to in the test:
Here is JUnit.html
Here is the stack trace of the failure:
I've written a simple test case fails. This test case calls new SmartGwtEntryPoint().onModuleLoad(),
Code:
[B]public[/B] [B]class[/B] BasicGWTTest [B]extends[/B] GWTTestCase { [B]public[/B] [B]void[/B] testBasic() [B]throws[/B] Exception { [B]new[/B] SmartGwtEntryPoint().onModuleLoad(); } @Override [B]public[/B] String getModuleName() { [B]return[/B] "com.cedarcone.Orchestrate.OrchestrateJUnit"; } }
Here is the resulting test log:
Code:
Mar 13, 2017 1:01:26 PM java.util.prefs.WindowsPreferences <init> WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5. log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log). log4j:WARN Please initialize the log4j system properly. Compiling module com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit Ignored 420 units with compilation errors in first pass. Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. Compiling 1 permutation Compiling permutation 0... Compile of permutations succeeded Compilation succeeded -- 18.057s Linking into P:\Git\CedarCone\Orchestrate\www-test\com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit Link succeeded Linking succeeded -- 19.029s Ignored 420 units with compilation errors in first pass. Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. Starting http://localhost:59705/com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit/junit.html on browser FF38 200 - GET /com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit/junit.html (127.0.0.1) 200 - GET /com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit/com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit.nocache.js (127.0.0.1) 200 - GET /com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit/2381ECD98107A199E2092EE7746E7EB5.cache.js (127.0.0.1) 200 - GET /com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit/gwt/standard/standard.css (127.0.0.1) 200 - POST /com.cedarcone.Orchestrate.OrchestrateJUnit.JUnit/junithost (127.0.0.1) 219 bytes
Code:
<?xml version=[I]"1.0"[/I] encoding=[I]"UTF-8"[/I]?> <module> <inherits name=[I]"com.google.gwt.logging.Logging"[/I]/> <inherits name=[I]"com.google.gwt.core.Core"[/I]/> <inherits name=[I]'com.cedarcone.Orchestrate.OrchestrateCommon'[/I] /> <inherits name=[I]"com.smartgwtee.SmartGwtEENoScript"[/I] /> <source path=[I]'test'[/I] /> <entry-point class=[I]'com.cedarcone.Orchestrate.test.client.ExampleTest'[/I] /> </module>
Code:
<!doctype html> <!-- Copyright 2008 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta charset=[I]"utf-8"[/I]> <meta name=[I]'gwt:onLoadErrorFn'[/I] content=[I]'junitOnLoadErrorFn'[/I]> <meta name=[I]'gwt:onPropertyErrorFn'[/I] content=[I]'junitOnPropertyErrorFn'[/I]> </head> <body> <script> [B]function[/B] junitOnLoadErrorFn(moduleName, e) { junitLaunchError('Failed to load module ' + moduleName + ': ' + e); } [B]function[/B] junitOnPropertyErrorFn(propName, allowedValues, badValue) { [B]var[/B] msg = 'While attempting to load the module, property "' + propName; [B]if[/B] (badValue != [B]null[/B]) { msg += '" was set to the unexpected value "' + badValue + '"'; } [B]else[/B] { msg += '" was not specified'; } msg += 'Allowed values: ' + allowedValues; junitLaunchError(msg); } [B]function[/B] junitLaunchError(msg) { junitError("/launch", msg); } [B]function[/B] junitError(type, msg) { [B]var[/B] xmlHttpRequest = [B]new[/B] XMLHttpRequest(); xmlHttpRequest.open('POST', 'junithost/error' + type, [B]true[/B]); xmlHttpRequest.setRequestHeader('Content-Type', 'text/x-gwt-rpc; charset=utf-8'); xmlHttpRequest.send(msg); [B]if[/B] (window.console && window.console.log) { window.console.log(type + " error: " + msg); } } [B]function[/B] loadSelectionScript() { [B]var[/B] moduleName = location.pathname; [B]var[/B] pos = moduleName.lastIndexOf('/'); moduleName = moduleName.substr(0, pos); pos = moduleName.lastIndexOf('/'); moduleName = moduleName.substr(pos + 1); document.write('<script language="javascript" src="' + encodeURIComponent(moduleName) + '.nocache.js"><\/script>'); } loadSelectionScript(); </script> </body> </html>
Code:
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property "Dialog" from undefined at com.smartgwt.client.util.I18nUtil.initMessages(I18nUtil.java:168) at com.smartgwt.client.util.I18nUtil.init(I18nUtil.java:32) at com.smartgwt.client.SmartGwtEntryPoint.$onModuleLoad(SmartGwtEntryPoint.java:431) at com.cedarcone.Orchestrate.test.gwt.BasicGWTTest.testBasic(BasicGWTTest.java:20) at Unknown.anonymous(GWTTestMetadataImpl.java:8) at com.google.gwt.junit.client.impl.GWTTestAccessor.$invoke(GWTTestAccessor.java:35) at com.google.gwt.junit.client.impl.GWTRunner.$executeTestMethod(GWTRunner.java:226) at com.google.gwt.junit.client.GWTTestCase.$doRunTest(GWTTestCase.java:157) at com.google.gwt.junit.client.GWTTestCase.$runBare(TestCase.java:59) at com.google.gwt.junit.client.GWTTestCase.$__doRunTest(GWTTestCase.java:115) at com.google.gwt.junit.client.impl.GWTRunner.$runTest(GWTRunner.java:302) at com.google.gwt.junit.client.impl.GWTRunner.$doRunTest(GWTRunner.java:235) at com.google.gwt.junit.client.impl.GWTRunner$TestBlockListener.$onSuccess(GWTRunner.java:106) at com.google.gwt.junit.client.impl.GWTRunner$InitialResponseListener.$onSuccess(GWTRunner.java:61) at com.google.gwt.junit.client.impl.GWTRunner$InitialResponseListener.onSuccess(GWTRunner.java:59) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.$onResponseReceived(RequestCallbackAdapter.java:232) at com.google.gwt.http.client.Request.$fireOnResponseReceived(Request.java:250) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412) at Unknown.anonymous(XMLHttpRequest.java:329) at com.google.gwt.core.client.impl.Impl.apply(Impl.java:239) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:298) at Unknown.anonymous(Impl.java:77)
Comment