2012-04-12 1 views
0

은 내가 http://code.google.com/p/gwt-test-utils/wiki/HowToUseWithGIN의 단계를 사용하여 시도하고 난 TestNG를 사용하고 있지만 fallowing 오류를주고있다gwt-test-utils를 gin과 함께 사용하려면 어떻게해야합니까?

java.lang.ExceptionInInitializerError 
    at com.riskfocus.examples.JsonReaderWriterTest.setupGIN(JsonReaderWriterTest.java:59) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80) 
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:551) 
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213) 
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138) 
    at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175) 
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107) 
    at org.testng.TestRunner.privateRun(TestRunner.java:768) 
    at org.testng.TestRunner.run(TestRunner.java:617) 
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) 
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) 
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) 
    at org.testng.SuiteRunner.run(SuiteRunner.java:240) 
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) 
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87) 
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185) 
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1110) 
    at org.testng.TestNG.run(TestNG.java:1022) 
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109) 
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202) 
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173) 
Caused by: java.lang.UnsupportedOperationException: 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 that your test case extends GWTTestCase and that GWT.create() is not called from within an initializer or constructor. 
    at com.google.gwt.core.client.GWT.create(GWT.java:91) 
    at com.riskfocus.examples.client.model.StockPriceJsonReaderWriter.<clinit>(StockPriceJsonReaderWriter.java:12) 
    ... 25 more 
+0

당신이 제공 한 정보와 함께 당신을 도울하기 어려울 것이다. 작성한 코드의 작은 샘플을 –

답변

0

나는 당신이이 GwtTest 클래스 (대체 표준 GWTTestCase 클래스)를 확장 잊지 같아요.

GWT에서 테스트 - 유틸/GIN 통합 위키 페이지

이가 수정되었습니다, 그래서 (내 나쁜) 할 말하지 않았다 :

+0

mmmh 추가하면 너무 빨리 읽고 TestNG로 테스트를 시작하려한다는 것을 깨닫지 못했습니다. TestNG는 gwt-test-utils에서 지원하지 않습니다. http://code.google.com/p/gwt-test-utils/issues/detail?id=111 – Gael

관련 문제