Questions tagged [gwttestcase]
45 questions
4
votes
3 answers
GWT TestCase: Simulating clicking a button on my page
I'm using GWT 2.4 with JUnit 4.8.1. When writing my class that extends GWTTestCase, I want to simulate clicking on a button on the page. Currently, in my onModuleLoad method, this button is only a local field ...
public void onModuleLoad() {
…

Dave
- 15,639
- 133
- 442
- 830
4
votes
1 answer
How Can I Make and Run GWTTestCase Based Tests with Intellij 12?
I've tried multiple times over a few months now to do this, but I haven't had any luck. I've found Google's documentation about how to setup GWTTestCase tests via the command line and Eclipse, but nothing about how to do it with IntelliJ. When I…

HappyCoder86
- 2,267
- 3
- 25
- 40
3
votes
1 answer
How do I get server side initialization code to run when building GWT Test Cases?
I'm using GWT 2.4. I have a number of test files that extend GwtTestCase. My question is, how and where do I place code so that the server side initializes some data before my tests run?
I tried creating a simple servlet ...
public class…

Dave
- 15,639
- 133
- 442
- 830
3
votes
1 answer
GWT test case: no compilation unit for that type was seen ... why?
I'm using GWT 2.4. I having trouble running some GWTTestCase files that I recently created in a new package. I have files correctly running in an existing package and I can't figure out why tests like the below are failing. I'm using Maven 3.0.3…

Dave
- 15,639
- 133
- 442
- 830
3
votes
1 answer
GWT: getting 404 in GWTTestCase when trying to make an Ajax call
I'm using GWT 2.4. I'm trying to write a test case where I make an Ajax call, but I'm getting a 404. Here is how I define the service in my .gwt.xml file ...
…

Dave
- 15,639
- 133
- 442
- 830
3
votes
3 answers
Unable to debug gwt test for gwt 2.8 and java 1.8 version
I have upgraded gwt version to 2.8 and java 1.8. Test is running fine with gwt 2.7 and java 1.7. Do I need to add extra configurations in gwt.xml or any dependency in pom
pom :
com.google.gwt
…

komal_sonigra
- 75
- 8
3
votes
2 answers
How configure GWTTestCase extended class
I want to write test case for GWT composite component i created, I had class Count which extends com.google.gwt.user.client.ui.Composite and in this Count i had a text box and some handler for this to display labels according to the values.
Now i…

Dipak
- 6,532
- 8
- 63
- 87
2
votes
2 answers
GWTTestCase: JUnit Assertions within callback raises JavaScriptException
So if I call any JUnit assertion which fails from inside a callback method I get this exception:
Mar 12, 2012 11:24:41 AM
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl runJob
SEVERE: Job run failed with unexpected…

Andrew Nguyen
- 591
- 6
- 13
2
votes
1 answer
GWT: Getting 404 when submitting AJAX request in my GWTTestCase
I'm using Eclipse Indigo on win XP and trying to write a GWT test case for my GWT 2.4 application. Specifically, I'm trying to test an AJAX request, but I'm getting a 404. I thought GWT will spin up its own server in hosted mode? My code…

Dave
- 15,639
- 133
- 442
- 830
2
votes
1 answer
GwtTestCase and Spring
So I managed to create a GWT-SpringMVC setup. Wasn't easy (not too many resources), but possible. I even autowired and stuff. It even works :)
However, I can't figure out how to make the GwtTestCase run. Obviously it needs the "server" to be up, and…

Ran Biron
- 6,317
- 5
- 37
- 67
2
votes
0 answers
Test GWT composite component with ui binder using GwtTestCase?
I'm writing a simple test class extending GwtTestCase for a component created with UiBinder, and running with mvn gwt:test fails as below.
The problem seems similar to: How to test a gwt composite component with ui binder using GwtTestCase?; other…

ameliab
- 21
- 2
2
votes
1 answer
Creating WeakMap wrapper implementation in GWT -- getting errors
I have been recently looking at the upcoming js (harmony) weakmap support that would solve a number of complex problems I currently have. Luckly there is a shim (https://github.com/Benvie/WeakMap) with pretty good browser support which led me to…

Casey Jordan
- 1,204
- 1
- 20
- 39
2
votes
0 answers
GWTTestCase with Database not working
how do i create integration tests that use the services (requestfactory) and also the JDO-persistancemanager to save and retrieve data.
the GWTTestCase + requestfactory is working just fine.
normal JUnitTests also work with the database but are…

headgrowe
- 529
- 1
- 5
- 17
2
votes
2 answers
GWTTestCase: Testing a Private Method
I am new to GWT / Java and need some ideas on how to solve this (seems like it should be) simple problem.
I have a GWT object and I am trying to test a private method:
public class BarChart extends FlowPanel {
public BarChart() {
…

user2271612
- 23
- 2
2
votes
1 answer
Sharing JUnit tests between client and server
Hello fantastic people!
I am developing a java module which will be used both on the server, and on the client (GWT).
I want to write a library of unit tests, and then simply create wrappers to run the tests on the client and on the server. This…

Casey Jordan
- 1,204
- 1
- 20
- 39