Announcement

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

    SmartGwtEntryPoint not loaded when running a GWTTestCase

    SmartGWT 2.4, GWT 2.2.0. Gecko/2010031422 Firefox/3.0.19 (used by GWTTestCase as headless browser).

    I have some code that utilizes Criteria objects and have built a GWTTestCase for it. At first, testing this case failed with

    java.lang.Exception: com.google.gwt.core.client.JavaScriptException: (null): null

    After some research, I found out that, although it was referenced in my app's .gwt.xml, the SmartGwtEntryPoint class is not loaded (or its onModuleLoad() method is not called). This class contains vital code for, ultimately, Criteria.getValues().

    My workaround is to simply manually create the entry point and call onModuleLoad() before running the tests:

    Code:
    SmartGwtEntryPoint smartGwtEntryPoint = new SmartGwtEntryPoint();
    smartGwtEntryPoint.onModuleLoad();
    This is not so much of a problem or question, but wanted to share this case nevertheless.

    #2
    I never get it work. I don't think that SmartGWT is design to be tested, because SamrtGWT is not pure GWT framework. It means that SmartGWT has not be written in Java / GWT but in JS.

    Instead of running GWTTEstcase, you can have selenium testing. It looks to be supported but I'm not able to make it work correctly until now.

    I hope it would help.

    Regards,
    Victor

    Comment

    Working...
    X