[ 
https://issues.apache.org/jira/browse/MYFACES-3217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065702#comment-13065702
 ] 

Leonardo Uribe commented on MYFACES-3217:
-----------------------------------------

Thinking about this one, shouldn't we move the integration tests to 2.1.x, in 
this case current trunk? Since the intention is create new tests, shouldn't 
those tests be for 2.1.x branch? If we found a bug, we can solve in 2.0.x and 
2.1.x but sooner or later, the work here should be moved to that location 
anyway, and maintain two branches seems to be an unnecessary burden.

> Integration tests for MyFaces core
> ----------------------------------
>
>                 Key: MYFACES-3217
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3217
>             Project: MyFaces Core
>          Issue Type: Task
>    Affects Versions: 2.0.7, 2.1.1
>            Reporter: Jakob Korherr
>            Assignee: Jakob Korherr
>
> Some time ago we already talked about the need for integration tests for 
> MyFaces core in order to ensure the quality of MyFaces code, but we never 
> created something for this. Now after successfully releasing MyFaces CODI 
> v1.0.0 with a working integration-test concept, it is time to apply this 
> concept also on MyFaces core.
> The concept is simple: use an integration-test module that will be added to 
> the MyFaces core build via profile (-Pintegration-tests) and thus will not be 
> part of a release. This module consists of a support module containing 
> general integration-test support classes (e.g. an abstract 
> MyFacesIntegrationTest base class for all JUnit integration-tests) and 
> various war-modules that contain the actual integration-tests.
> The war modules use the cargo maven plugin to start and stop a specific 
> container (e.g. jetty or tomcat) and HtmlUnit to run tests against the 
> running server. The HtmlUnit tests are executed with the maven failsafe 
> plugin to ensure container shutdown in error cases.
> I already created three war-modules with the following configuration:
>   - servlet 2.5 and el 1.0 (jetty 7)
>   - servlet 2.5 and el 2.2 (jetty 6 and glassfish el)
>   - servlet 3.0 and el 2.2 (tomcat 7)
> These modules also already contain a very basic integration test, just as 
> reference.
> The plan is to put basic tests that do not need any special configuration 
> into these modules and to create new special war-modules for tests that need 
> a specific configuration (e.g. MyFaces core on tomcat 6 with bean validation 
> and client state saving enabled and ....). In addition, I plan to create an 
> archetype for these integration-test war-modules.
> The long-term plan would be to have an integration-test for every jira issue 
> on MyFaces core, thus implementing test-driven-development. With the complete 
> infrastructure in place, it should not be very hard to create a test case for 
> a jira issue (maybe even already by the user that reports the issue) and thus 
> being able to fix issues a lot quicker and to ensure that new code or changes 
> do not break anything.
> I will create a wiki page describing this stuff in more detail, also giving 
> examples on how to create modules and tests and on how to debug tests.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to