Maven gwt: тестирование ошибок для компиляции и запуска класса GWTTestCase - PullRequest
1 голос
/ 07 июля 2011

В нашем многомодульном проекте Maven у нас есть проект домена и проект веб-приложения.

Наш экземпляр GWTTestCase - GwtTestMultipleSelect.java доступен в каталоге src / test / java в пакете be.applusrtd.metis.client сссылка на имя модуля

@Override
public String getModuleName() {
    return "be.applusrtd.metis.Metis";
}

Наш Metis.gwt.xml доступен в каталоге src / main / java в пакете be.applusrtd.metis, и похоже, что этот файл модуля найден правильно (если мы изменим имя наэто несуществующее местоположение, в этом случае оно не выполняется).

Мы также можем выполнить наши тесты GWT из Eclipse (Helios), но выполнить их с помощью mvn gwt: test не удается со следующим журналом ошибок:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running be.applusrtd.metis.client.GwtTestMultipleSelect
[ERROR] log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext).
[ERROR] log4j:WARN Please initialize the log4j system properly.
[ERROR] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] Validating newly compiled units
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ClientFactory.java'
[INFO]       [ERROR] Line 14: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/test/java/be/applusrtd/metis/client/GwtTestMultipleSelect.java'
[INFO]       [ERROR] Line 12: No source code is available for type be.applusrtd.metis.domain.party.PartyType; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/activity/PartyDetailsActivity.java'
[INFO]       [ERROR] Line 27: No source code is available for type be.applusrtd.metis.client.Translations; did you forget to inherit a required module?
[INFO]       [ERROR] Line 31: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]       [ERROR] Line 55: No source code is available for type be.applusrtd.metis.domain.party.PartyType; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/activity/PartyListActivity.java'
[INFO]       [ERROR] Line 22: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]       [ERROR] Line 24: No source code is available for type be.applusrtd.metis.client.Translations; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/service/PartyServiceAsync.java'
[INFO]       [ERROR] Line 19: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ui/EnumRenderer.java'
[INFO]       [ERROR] Line 10: No source code is available for type be.applusrtd.metis.client.EnumTranslations; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ui/PartyDetailsView.java'
[INFO]       [ERROR] Line 13: No source code is available for type be.applusrtd.metis.domain.party.PartyType; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ui/desktop/DesktopClientFactoryImpl.java'
[INFO]       [ERROR] Line 27: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-webapp/src/main/java/be/applusrtd/metis/client/ui/desktop/party/PartyDetailsViewImpl.java'
[INFO]       [ERROR] Line 40: No source code is available for type     be.applusrtd.metis.domain.party.PartyType; did you forget to inherit a required module?
[INFO]    [ERROR] Errors in 'file:/Users/dave/Documents/metis_workspace/metis/metis-    webapp/src/main/java/be/applusrtd/metis/client/ui/desktop/party/PartyListViewColumnDefinitions.java'
[INFO]       [ERROR] Line 17: No source code is available for type be.applusrtd.metis.client.Translations; did you forget to inherit a required module?
[INFO]       [ERROR] Line 26: No source code is available for type be.applusrtd.metis.domain.party.Party; did you forget to inherit a required module?
[INFO] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 19.648 sec <<< FAILURE!
[INFO] testAddButtonClicked(be.applusrtd.metis.client.GwtTestMultipleSelect)  Time elapsed:     19.635 sec  <<< ERROR!
[INFO] com.google.gwt.junit.JUnitFatalLaunchException: The test classs 'be.applusrtd.metis.client.GwtTestMultipleSelect' had compile errors; check log for details
[INFO]  at     com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:743)
[INFO]  at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1346)
[INFO]  at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1309)
[INFO]  at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:650)
[INFO]  at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:441)
[INFO]  at junit.framework.TestCase.runBare(TestCase.java:134)
[INFO]  at junit.framework.TestResult$1.protect(TestResult.java:110)
[INFO]  at junit.framework.TestResult.runProtected(TestResult.java:128)
[INFO]  at junit.framework.TestResult.run(TestResult.java:113)
[INFO]  at junit.framework.TestCase.run(TestCase.java:124)
[INFO]  at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:296)
[INFO]  at junit.framework.TestSuite.runTest(TestSuite.java:243)
[INFO]  at junit.framework.TestSuite.run(TestSuite.java:238)
[INFO]  at org.codehaus.mojo.gwt.test.MavenTestRunner.doRun(MavenTestRunner.java:105)
[INFO]  at junit.textui.TestRunner.start(TestRunner.java:180)
[INFO]  at org.codehaus.mojo.gwt.test.MavenTestRunner.main(MavenTestRunner.java:63)

Любые идеи очень приветствуются.Заранее спасибо

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