Sto eseguendo il test gwt per la mia applicazione, è come un incubo, ho problemi uno dopo l'altro, non sono sicuro di cosa stia andando male.test gwt: impossibile trovare sample.gwt.xml sul classpath
In primo luogo, ho creato un banco di prova manichino:
public class ListItemTest extends GWTTestCase {
/**
* Specifies a module to use when running this test case. The returned
* module must include the source for this class.
*
* @see com.google.gwt.junit.client.GWTTestCase#getModuleName()
*/
@Override
public String getModuleName() {
return "com.dyihi.services.sample.Sample";
}
/**
* Add as many tests as you like
*/
public void testSimple() {
assertTrue(true);
}
}
Quando ho eseguito 'test mvn' questo semplice test fallito. Il messaggio di errore è:
initializationError0
java.lang.NoClassDefFoundError: com/google/gwt/dev/cfg/Condition
Googled intorno e ho scoperto che ho bisogno di includere GWT-dev nel mio pom, e l'ho fatto, corse di nuovo il test, ora si gettò di errore:
[ERROR] Unable to find 'Sample.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?