Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9067883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:03:14+00:00 2026-06-16T17:03:14+00:00

i had a GWT composite component, with two textBox, want to write test cases

  • 0

i had a GWT composite component, with two textBox, want to write test cases for it. Each of them had change handler, i want to know how can i fire a change event to exact component in the composite component class.

EDITED:
my test code looks like this,

    @Test
    public void testValueChangesToOutOfRange(){
        DvCountUI count = new DvCountUI(15, "place holder", true);
        count.specifyNormalRange(10, 30);
        TextBox magnitude =  GwtReflectionUtils.getPrivateFieldValue(count, "magnitude");
        assertTrue(true);

    }

and when i run it with GWT Junit Test am getting ERROR:
in console

Validating units:
   Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[ERROR] Errors in 'file:/D:/TRANSFER/asclepian/workspace/UIBuilder/src/com/rubirules/uibuilder/client/DvCountUITest.java'
   [ERROR] Line 65: No source code is available for type com.googlecode.gwt.test.utils.GwtReflectionUtils; did you forget to inherit a required module?
[ERROR] Unable to find type 'com.rubirules.uibuilder.client.DvCountUITest'
   [ERROR] Hint: Previous compiler errors may have made this type unavailable
   [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly

and in junit

JUnitFatalLaunchException

my gwt.xml file looks like:

<module rename-to='uibuilder'>
    <inherits name='com.google.gwt.user.User' />
    <inherits name='com.google.gwt.user.theme.clean.Clean' />
    <entry-point class='com.rubirules.uibuilder.client.UIBuilder' />
    <source path='client' />
    <source path='shared' />
</module>

whats wrong here?
also i added gwt-test-utils jar in project library.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:03:15+00:00Added an answer on June 16, 2026 at 5:03 pm

    I am not sure whether your approach towards unit testing widget is correct.

    In this scenario you should ideally be setting value (triggering the internal change event) and testing whether the code written in the change handler get executed.

    Example – TextBoxBaseTestBase.java
    public void testValueChangeEvent() {} in
    http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/test/com/google/gwt/user/client/ui/TextBoxBaseTestBase.java

    If you insist on firing change event you can refer to GWT sample CreateEventTest.java

    public void testTriggerChangeEvent() {} in
    http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/test/com/google/gwt/user/client/ui/CreateEventTest.java

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write test case for GWT composite component i created, I had
Is it possible in GWT to had a handler that detects that the knob
Has anyone had any luck rolling a custom GWT jar for Google Collections /
Had a page that was working fine. Only change I made was to add
I've recently started using GWT in one of my applications. I had a doubt
Now i had 2 set of logging framework in my GWT APP, gwt log
In a GWT application i'm trying to use this component: http://keith-wood.name/datepick.html In their page
I am coding in GWT 2.3 using Eclipse. While I have had coding experience,
To each problem I had encountered earlier I was able to find a solution
I want to embed a VLC player in my webapp build with Google's GWT.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.