MAVEN EJB I testy

0

Witam,
mam nastepujacy problem. Napisałem sobie plugin maven który zapina sie na faze package i kopiuje wytworzony jar/ear do katalogu JBOSS(deploy). I wszystko jest fajnie...ale mam problem z testami które zawierają testy tych wlasnie ejb. I teraz pytanie jak mam stworzyć jar/ear i wrzucic na serwer skoro testy nie przechodza tzn napisane testy chca testowac ejb ktore nie zostaly jeszcze zadeployowane

Pozdrawiam

0

Małe przypomnienie faz:

  • validate - validate the project is correct and all necessary information is available
    • compile - compile the source code of the project
    • test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
    • package - take the compiled code and package it in its distributable format, such as a JAR.
    • integration-test - process and deploy the package if necessary into an environment where integration tests can be run
    • verify - run any checks to verify the package is valid and meets quality criteria
    • install - install the package into the local repository, for use as a dependency in other projects locally
    • deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

W fazie pre-integration-test powinieneś przygotować środowisko (serwer, przegrać ear/war/jar).
W fazie integration-test wykonają się testy, a w fazie post-integration-test należy posprzątać.

Najlepiej wykonywać od razu mvn verify.

Można to zrobić na kilka sposobów:
http://jakarta.apache.org/cactus/integration/maven2/index.html
http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing

P.S.
Nawet jeżeli chcesz kopiować pliki, to nie musisz do tego tworzyć własnego plugina.
Wystarczyło użyć maven-antrun-plugin z zadaniem Copy (http://maven.apache.org/plugins/maven-antrun-plugin/usage.html)
albo maven-resources-plugin (http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html).

0

Możesz spróbować jeszcze http://www.jboss.org/arquillian

1 użytkowników online, w tym zalogowanych: 0, gości: 1