[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-2371) Integration testing Seam components with Maven

Siarhei Dudzin (JIRA) jira-events at lists.jboss.org
Tue Apr 1 19:35:41 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-2371?page=all ]

Siarhei Dudzin updated JBSEAM-2371:
-----------------------------------

    Attachment: testproject-master-JBSEAM-2371.zip

Ok. Here is what I've come up with... Attached a multi module maven project (no ad-hoc ant scripts). The project consists of parent, ear, war and ejb modules.
This is in fact a booking demo with a number of tests (see in the web module).

What works:

* Generating an EAR via maven and dropping it to JBoss deploy dir

* Generating a WTP-2.0 eclipse project descriptors with "mvn eclipse:eclipse". No .project and .classpath files are in fact needed to get started! Everything comes from pom's (see note [1]).

* Performing (component, integration) tests via maven (see notes[2])

* Performing TestNG tests in eclipse with the TestNG eclipse plugin (see note [3])


Notes (or what doesn't work):

[1] JBossTools don't deploy it (WTP plugin as well as it's even older) due to the fact that in order to run integration tests web root dir should be in test resources (test classpath). This makes JBossTools think for some reason that test resources should never be a web root dir (even if I force warSourceDirectory) and thus doesn't explode them (no xhml files in the exploded dir). I still think a (ugly) workaround is possible however I would like to see this fixed on JBossTools side.

[2] Because integration tests require WEB-INF etc, it makes (actually) sense to keep component and integration tests in the web module (as implemented) and only pure unit tests can go to the ejb module.

[3] To perform TestNG test within eclipse the test classpath the test classpath in eclipse test configuration needs to be changed so that jboss-embedded-all, thirdparty-all and jboss-embedded-api come before the project. This is needed because if you generate eclipse project descriptors with maven-eclipse-plugin it generates classpath in alphabetic order (a classpath ordering bug which is fixed in maven 2.0.9). The fix for the maven-eclipse-plugin will come most likely in version 3.0 (http://jira.codehaus.org/browse/MECLIPSE-388).

This is still messy but might be a start... If this is getting accepted a JIRA issue needs to be created for JBoss Tools regarding [1].

> Integration testing Seam components with Maven
> ----------------------------------------------
>
>                 Key: JBSEAM-2371
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2371
>             Project: JBoss Seam
>          Issue Type: Task
>          Components: Build, Test Harness
>    Affects Versions: 2.0.0.GA
>         Environment: Maven 2.0.7
>            Reporter: Siarhei Dudzin
>            Priority: Critical
>             Fix For: 2.1.x
>
>         Attachments: testproject-master-JBSEAM-2371.zip
>
>
> Various users have reported integration testing with Seam is not working in 'Mavenized' projects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list