Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #31
    Originally posted by mathew
    I get the following error when i try to run GWTTestCase within eclipse or even from command line. The smartgwt jars are already in the classpath.

    [ERROR] Unable to find 'isomorphic.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
    The development shell servlet received a request for 'skins/Enterprise/skin_styles.css' in module 'isomorphic.gwt.xml'
    [ERROR] Unable to find 'isomorphic.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
    [WARN] CSS error: null [1:22] Error in style rule. Invalid token "skins/Enterprise/skin_styles.css\' in the public path of module \'isomorphic". Was expecting one of: <S>, <LBRACE>, <COMMA>, <PLUS>, <GREATER>, <IDENT>, "*", <HASH>, ".", "[", ":".
    [WARN] CSS warning: null [1:22] Ignoring the following declarations in this rule.



    I am using GWT 2.0.4 with SmartGwt 2.2.
    Tried both "gwt-maven-plugin" as well as "gwt plugin for eclipse" but this error is consistent in these two environments.


    Here is how my module xml looks like;

    <module>
    <inherits name="com.google.gwt.user.User"/>
    <inherits name="com.smartgwt.SmartGwt"/>
    <entry-point class="com.arrisi.gwt.sample.stockwatcher.StockWatcher.client.StockWatcher"/>
    </module>

    Also tried to follow instructions posted in gwt websites, like
    http://code.google.com/webtoolkit/to..._testcase.html
    /**********************************************/
    do not know how to deal
    Last edited by lzynihao; 22 Feb 2012, 01:13.

    Comment


      #32
      Isomorphic,

      I tried writing a basic test case using GwtTestCase.

      Code:
      package com.smartgwt.sample.client;
      
      import com.google.gwt.junit.client.GWTTestCase;
      
      public class SampleTest extends GWTTestCase {
          @Override
          public String getModuleName() {
              return "com.smartgwt.sample.client.BuiltInDS";
          }
      
          public void testSimple() {
              assertTrue(true);
          }
      }
      and when I run the test I get:

      Code:
      Loading inherited module 'com.smartgwt.sample.client.BuiltInDS'
         [ERROR] Unable to find 'com/smartgwt/sample/client/BuiltInDS.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
      
      com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
      	at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:278)
      	at com.google.gwt.dev.cfg.ModuleDefLoader$2.load(ModuleDefLoader.java:217)
      	at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:324)
      	at com.google.gwt.dev.cfg.ModuleDefLoader.createSyntheticModule(ModuleDefLoader.java:107)
      	at com.google.gwt.junit.CompileStrategy.maybeCompileModuleImpl2(CompileStrategy.java:165)
      	at com.google.gwt.junit.CompileStrategy.maybeCompileModuleImpl(CompileStrategy.java:112)
      	at com.google.gwt.junit.SimpleCompileStrategy.maybeCompileModule(SimpleCompileStrategy.java:36)
      	at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1340)
      	at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1309)
      	at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:653)
      	at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:441)
      	at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:296)
      	at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139)
      	at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:202)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      
      
      Process finished with exit code -1
      I have created this testcase in the builtinds sample i downloaded today.

      gwt.xml file:

      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN"
          "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
      <module rename-to="builtinds">
          <inherits name='com.google.gwt.user.User'/>
          <inherits name="com.smartgwt.tools.SmartGwtTools"/>
          <inherits name="com.smartgwtee.tools.Tools"/>
          <inherits name="com.smartgwtee.SmartGwtEENoTheme"/>
          <inherits name="com.google.gwt.junit.JUnit"/>
          <entry-point class='com.smartgwt.sample.client.BuiltInDS'/>
      </module>
      What could be the reason for this.

      GWT version: 2.4
      SmartGWT version: smartgwt 3.0p downloaded today.

      Thanks.

      Comment


        #33
        Due to a bug in GWT Test case it's necessary to manually call SmartGWT's onModuleLoad():

        Code:
             	public void gwtSetUp() {
             		new SmartGwtEntryPoint().onModuleLoad();		
             	}
        Note we don't recommend GwtTestCase as your primary testing approach, or even for unit tests that involve network operations. It is not a real browser. Use Selenium.

        Comment

        Working...
        X