You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Bernd Fondermann (JIRA)" <se...@james.apache.org> on 2005/10/23 01:35:03 UTC

[jira] Created: (JAMES-427) [PATCH] Introduce Unit Testing

[PATCH] Introduce Unit Testing
------------------------------

         Key: JAMES-427
         URL: http://issues.apache.org/jira/browse/JAMES-427
     Project: James
        Type: New Feature
    Reporter: Bernd Fondermann
    Priority: Minor


Patch, which incorporates Unit Testing into James project infrastructure.
Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.

I think unit testing could become vital for 
+ helping QA
+ supporting refactorings (e.g. relaxing avalon dependencies)
+ testing while implementing new features (like IMAP)
+ reproducing bugs
+ testing fixes

I know that it's a long way to go to reach very good test-coverage.
But there is no risk in starting.
My determination would be to add 2 to 3 test methods per week.

It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.

The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.

tests are compiled and run invoking > build run-unit-tests

I'd feel more than happy about comments how to improve this testing infrastructure.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12361454 ] 

Bernd Fondermann commented on JAMES-427:
----------------------------------------

Stefano, your worthwhile Mail/MailImpl refactoring broke the patch.
Nevertheless, I expect that it will ease unit testing a lot.
I'll refactor and resubmit the patch.


> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Bernd Fondermann updated JAMES-427:
-----------------------------------

    Attachment: unittest4.0.patch

some more tests


> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch, unittest4.0.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Assigned: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Stefano Bagnara reassigned JAMES-427:
-------------------------------------

    Assign To: Stefano Bagnara

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Bernd Fondermann updated JAMES-427:
-----------------------------------

    Attachment: unittest5.0.patch

changed the assignment of tests ports from random to incremental

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature

>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch, unittest4.0.patch, unittest5.0.patch, website.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Bernd Fondermann updated JAMES-427:
-----------------------------------

    Attachment: website.patch

adds info to the website, how to execute the tests (but we still need to give information about the not contained libraries)

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch, unittest4.0.patch, website.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Bernd Fondermann updated JAMES-427:
-----------------------------------

    Attachment: unittest3.0.patch

+ fixed/improved existing tests
+ added new tests
+ added tools/lib/commons-net-1.4.1.jar, _not_ included in this patch (used for Telnet-ing into RemoteManager)
+ changed build.xml to continue running remaining tests on error/failures
+ all tests pass, except MailServerTestAllImplementations.testGetNonexistingUserInbox()

note: detailed test reports can be found in build/test/reports after running the tests

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12383385 ] 

Stefano Bagnara commented on JAMES-427:
---------------------------------------

Bernd, I have a question (curiosity): have you considered the usage of commons-net objects (there are SMTPClients, POP3Clients and more) instead of the LGPL ristretto library for the protocol tests?


> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature

>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>      Fix For: 2.3.0a2
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch, unittest4.0.patch, unittest5.0.patch, unittest6.0.patch, website.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Bernd Fondermann updated JAMES-427:
-----------------------------------

    Attachment: unittest6.0.patch

MailetLoader unit tests

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature

>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch, unittest4.0.patch, unittest5.0.patch, unittest6.0.patch, website.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12362081 ] 

Stefano Bagnara commented on JAMES-427:
---------------------------------------

I fixed the NPE in James (I think we want to return null instead of NPE) and fixed the non working test according.
Thank you again,
Stefano

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Bernd Fondermann updated JAMES-427:
-----------------------------------

    Attachment: unittest2.0.patch

fixed and extended unit tests.
this attachement replaces all prev attached files.

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12361550 ] 

Bernd Fondermann commented on JAMES-427:
----------------------------------------

Wow. Thank you, Stefano.

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12402314 ] 

Stefano Bagnara commented on JAMES-427:
---------------------------------------

Maybe I will look at the conversion later: if it is easy I would like to reduce our dependencies to commons-net. Commons-net is an Apache project, so if features are similar we should try to stick to it.
Thank you for the informations!

PS: If I fail to find the time for this we'll follow the ibiblio way!

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature

>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>      Fix For: 2.3.0a2
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch, unittest4.0.patch, unittest5.0.patch, unittest6.0.patch, website.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]
     
Stefano Bagnara resolved JAMES-427:
-----------------------------------

    Fix Version: 2.3.0a2
     Resolution: Fixed

Aplplied patches from 1 to 6.
Next works by Bernd will be direclty committed, so this issue is no more needed.

I have not committed website.patch because it was altering a 2_1 documentation file.
We should create the new files for 2_2/2_3 before.


> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature

>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>      Fix For: 2.3.0a2
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch, unittest4.0.patch, unittest5.0.patch, unittest6.0.patch, website.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12402291 ] 

Bernd Fondermann commented on JAMES-427:
----------------------------------------

good question. I considered it but it seemed to me that ristretto is more complete/heayweight and thus less coding than commons-net. later when I did the RemoteManagerTest, I had to introduce commons-net anyway to use its telnet features.

do you tend to migrate? i would not be oppose this.

since you explicitly refer to the LGP license: I would propose (asking Columba develepors for) putting ristretto into ibiblio and download using maven.

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature

>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>      Fix For: 2.3.0a2
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch, unittest3.0.patch, unittest4.0.patch, unittest5.0.patch, unittest6.0.patch, website.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12361432 ] 

Stefano Bagnara commented on JAMES-427:
---------------------------------------

Cool, I was just looking at your work, trying to change the build.xml to automatically download the junit and ristretto jars so we can avoid to commit them and re-distribute them.

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12361544 ] 

Stefano Bagnara commented on JAMES-427:
---------------------------------------

I commited your 2.0 patch plus a few tests from me. I haven't committed the required libraries by now because I'm not sure about the licensing issues, but I wanted to commit the tests so we finally start writing more of them!
IMHO tests are a major requirement to move safely to James 3.0.


> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch, unittest2.0.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-427?page=comments#action_12361363 ] 

Stefano Bagnara commented on JAMES-427:
---------------------------------------

junit is licensed under the CPL
ristretto is licensed under the MPL/GPL/LGPL triple license.

Does anyone know wether we can add them to our james repository or not?

If not, what should we do?

I really like this effort to start testing james.

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Bernd Fondermann updated JAMES-427:
-----------------------------------

    Attachment: unittest1.2.patch

some more tests. it replaces the last attachment.


> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Assignee: Stefano Bagnara
>     Priority: Minor
>  Attachments: unittest.txt, unittest1.2.patch
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-427) [PATCH] Introduce Unit Testing

Posted by "Bernd Fondermann (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-427?page=all ]

Bernd Fondermann updated JAMES-427:
-----------------------------------

    Attachment: unittest.txt

> [PATCH] Introduce Unit Testing
> ------------------------------
>
>          Key: JAMES-427
>          URL: http://issues.apache.org/jira/browse/JAMES-427
>      Project: James
>         Type: New Feature
>     Reporter: Bernd Fondermann
>     Priority: Minor
>  Attachments: unittest.txt
>
> Patch, which incorporates Unit Testing into James project infrastructure.
> Since there was no reaction on the dev-list since I proposed it a few days ago, I'm uncertain if this is appreciated at all.
> I think unit testing could become vital for 
> + helping QA
> + supporting refactorings (e.g. relaxing avalon dependencies)
> + testing while implementing new features (like IMAP)
> + reproducing bugs
> + testing fixes
> I know that it's a long way to go to reach very good test-coverage.
> But there is no risk in starting.
> My determination would be to add 2 to 3 test methods per week.
> It already helped me a lot understanding how parts of James work, although this is only my first test for this codebase.
> The patch utilizes JUnit 3.8.1 (junit.jar) and Ristretto (ristretto-1.0-all.jar, can be found under http://columbo.sourceforge.net) which the build script expects to find under /tools/lib but which are not attached here in the first place.
> tests are compiled and run invoking > build run-unit-tests
> I'd feel more than happy about comments how to improve this testing infrastructure.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org