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 <bf...@brainlounge.de> on 2005/10/17 22:50:12 UTC

adding unit tests

Hi,

I'd like to get involved with James' development.

As a first step I wanted to do something non-intrusive, yet helpfull, 
where I would get to understand how James works.
So, I started by setting up Unit Testing.

A very simple first test case for SMTPServer is succeeding.

I'm using JUnit 3.8.1 and Ristretto 1.0 (MLP1.1).

Some details:

+ TestCase and Helpers go under src/test, currently with packages
  o.a.j.test.mock.avalon
  o.a.j.test.mock.james
  o.a.j.test.mock.mailet
  o.a.j.test.util
  o.a.j.test.smtpserver
+ Unit Test runs on a randomly chosen non-privileged port
+ TestCase mocks a Avalon environment
+ SMPTServerTest.testMail() fires up a SMTP Server and starts creating 
an email.
+ JUnit and Ristretto are filed under tools/lib
+ class-files go into build/testclasses
+ test reports go into build/testreports
+ unit tests are compiled by a separate ant-target and not mixed up with 
the other non-test classes
+ unit tests can be executed from ant

Please let me know if this is a usefull path to follow and what should 
be adjusted.

-- Bernd


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