Questions tagged [gwttestcase]

45 questions
2
votes
3 answers

gwt-log and gwt-test-utils not playing nice together

I've got a project that has gwt-log logging lines scattered throughout. Now I'm trying to write some unit tests and nothing seems to be working. Any class I test that uses the gwt-log facility causes the following exception to be raised: Caused by:…
holocron
  • 312
  • 1
  • 3
  • 12
1
vote
1 answer

GWT: The test class 'com.myco.clearing.commons.xml.XMLNodeTest' was not found in module

I have a Maven (3.0.3) / GWT (2.4) project. I'm trying to write some JUnit test cases but running into issues. All my test cases extend GWTTestCase and include this code ... @Override public String getModuleName() { return…
Dave
  • 15,639
  • 133
  • 442
  • 830
1
vote
0 answers

TimeoutException during test that extends GWTTestCase class

I have test class that extends GWTTestCase.class. When I am trying to debug my test - I can't even go through first line at my test class, because my class extends GWTTestCase and during test time some proccess inside it throws next…
Andrew
  • 591
  • 2
  • 12
  • 33
1
vote
1 answer

Is GWTTestCase obsolete? Are there better alternatives?

Trying to figure out what's the status of GWTTestCase suite/methodology. I've read some things which say that GWTTestCase is kind of obsolete. If this is true, then what would be the preferred methodology for client-side testing? Also, although I…
Andrei
  • 1,613
  • 3
  • 16
  • 36
1
vote
2 answers

Do i need to prefix 'test' to every unit test method i create with GWTTestCase?

I am learning how to perform unit testing in GWT. So i create a class which extends the GWTTestCase class and write test methods inside it. The problem is that if i don't prefix the word 'test' to even one function in this class(public or private)…
Jobin Jose
  • 184
  • 1
  • 2
  • 14
1
vote
1 answer

Does History.back() work in a GWTTestCase?

Does History.back() work in a GWTTestCase? I have tried verifying the current token immediately after History.back() call and also after a delay using a Timer but it doesn't seem to change. The onValueChange() method doesn't seem to be called…
uncaught_exception
  • 1,068
  • 6
  • 15
1
vote
1 answer

GWT unit test case

I was planning to write a unit test case for one of my helper methods in GWT. Am getting error saying that ERROR: GWT.create() is only usable in client code! It cannot be called, for example, from server code. If you are running a unit test, check…
LPD
  • 2,833
  • 2
  • 29
  • 48
1
vote
2 answers

How to use Jackson inside GwtTestCase tests

Hi I am making some GwtTestCase tests. I want to use Jackson ObjectMapper in the test, however I am getting following error [ERROR] Line 48: No source code is available for type org.codehaus.jackson.map.ObjectMapper; did you forget to inherit a…
MrProper
  • 1,500
  • 5
  • 19
  • 25
1
vote
1 answer

how to mock/make available different event class in my test case in gwt mvp app testing?

i'm using gwtp and i'm writing some tests on my view,i have some events like ChangeEvent, clickEvent in my view so how can i obtain these objects i tried by mocking but it is not working. the code in my view is `@UiHandler("submit") void…
SKM
  • 71
  • 1
  • 10
0
votes
1 answer

GWTTestCase invocation causing ReferenceError

Case i'm trying to write a GWTTestCase for a certain class, used as a presenter for a history-browsing toolbar component i'm building. Problem one (or more) of the scripts apparently not being loaded for the jUnit testing environment. it all works…
Eliran Malka
  • 15,821
  • 6
  • 77
  • 100
0
votes
1 answer

How to test gwtgl code using GWTTestCase in eclipse

I'm trying to create a test (GWTTestCase) for code that uses e.g. ArrayBuffer or Int32Array from gwtgl, but when running it from eclipse I get an exception and a stack trace. test method: public void testArray() { Int32Array ia =…
claesv
  • 2,075
  • 13
  • 28
0
votes
1 answer

GWTTestCase fails with Guava 10.0.1 - stack traces complain about javax.annotation.Nullable

I'm writing code using ImmutableCollections. I've included gwt-guava, guava and jsr305 jars in my classpath. I'm using ant to compile and run the tests. I consistently get run time errors from the GWT/Junit test execution phase. Besides the stack…
Andy Glick
  • 96
  • 1
  • 6
0
votes
0 answers

GWTTest java.lang.NullPointerException cannot invoke because "this.service" is null

I've a problem with GWT unit test, this is the code StudenteServiceAsync service; public void gwtSetUp(){ // Create the service that we will test. service = GWT.create(StudenteService.class); ServiceDefTarget target…
Mr Alsi
  • 37
  • 6
0
votes
1 answer

Test JsonUtils in GWTTestCase

I want to create some testcase to see if my JSON parsing classes work correct. Therefore I want to instantiate them with a JavaScript object which I create form a JSON String throw the JsonUtils. My problem now is that, JsonUtils is a native method,…
Stefan
  • 14,826
  • 17
  • 80
  • 143
0
votes
1 answer

GWT RPC GWTTestCase + GUICE 2.0

Im trying to create an app with the GWT on the front end and GUICE on the backend served on the Google App Engine. I have created a very simple app using the example setup…