Ошибка тестирования GWT - PullRequest
       1

Ошибка тестирования GWT

0 голосов
/ 06 августа 2011

Итак, я пытаюсь написать свой первый тест gwt. Я понял, что мне нужно добавить gwt-dev.jar в файл maven pom, но теперь, когда я запускаю тест, я получаю эту ошибку:

testSimple(com.karq.tvkava.client.TelekanalServiceImplTest)  Time elapsed: 3.809 sec  <<< ERROR!
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
    at com.google.gwt.dev.cfg.ModuleDef.checkForSeedTypes(ModuleDef.java:518)
    at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:327)
    at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1342)
    at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1309)
    at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:650)
    at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:441)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:296)
    at junit.framework.TestSuite.runTest(TestSuite.java:232)
    at junit.framework.TestSuite.run(TestSuite.java:227)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

А вот и мой тестовый файл

public class TelekanalServiceImplTest extends GWTTestCase {

    @Override
    public String getModuleName() {
        return "com.karq.tvkava.tvkavaJUnit";
    }

    public void testSimple(){
        boolean isSaved = true;
        assertTrue(isSaved);
    }
}

1 Ответ

0 голосов
/ 07 августа 2011

Вы включили

<inherits name="com.google.gwt.junit.JUnit" />

в свой файл * .gwt.xml?

Если это не исправит вашу ошибку, возможно, вы захотите взглянуть на UnitТестирование приложений GWT с JUnit .

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...