Announcement

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

    Writing Unit test cases for SmartGWT components

    Hi,

    In our application we were trying to setup the Unit tests for client code. We were using GWTMocktio version 1.1.6.

    While mocking the ListGrid, we faced issue :

    “java.lang.ClassFormatError: Invalid method Code length 284070 in class file com/smartgwt/client/widgets/grid/ListGrid”.

    We also tried to mock the ListGrid object using Powermock+EasyMock+Junit. Even this gave the same issue.

    We have also gone through the current forum posts, and though similar queries are there we could not find any answer to the same.

    We use GWT version 2.8, SmartGWT version 6.1p.

    Please help.



    #2
    We do not use mocking tools in our testing.

    Some users have reported success with Powermock.

    Comment


      #3
      Hi,

      We had seen the last post in the link you mentioned (https://forums.smartclient.com/forum...ut-gwttestcase). It's the same error that we are getting.

      BTW, we are able to mock the other UI components like ButtonItem, RadioGroupItem, DynamicForm etc using PowerMock +EasyMock. The only problem is ListGrid (uptil now).

      If mocking tools are not used, then could you please tell us as to how do we go ahead with writing Unit Tests for client-side code.

      Comment


        #4
        See the Automated Testing overview - JUnit is discussed.

        Comment

        Working...
        X