|
DeveloperGuide
Setup Instructions for Development
Featured Developer setup instructions are the same as described in the InstallGuide. Take special note of the instructions below if you wish to run the unit tests, or build. For a quick description of SubEtha's architecture, see this blog entry written by Scott Ferguson (of Caucho). Eclipse SetupThe core developers use Eclipse as their IDE (some would say for lack of something better). SVN CheckoutIn order to setup Eclipse, you should first make sure to install the Subclipse plugin. Once you have installed that plugin. Select File->Import->Checkout projects from SVN. Select "Create a new repository location". Enter the URL for SubEtha's repository: http://subetha.googlecode.com/svn/trunk Resin User LibrarySubEtha trunk does not actually include the Resin appserver jars - this would be cumbersome. SubEtha uses an Eclipse User Library, called something like "Resin 4.0.8" (the # changes version to version). When you first open the SubEtha project in Eclipse you will get errors because you haven't defined this User Library yourself yet. You should be able to do this in the Preferences->Java->Build Path->User Libraries section. Note that the naming of the user library must be exactly the same as what is (currently) configured in the project. Add all the jars in ${resin.home}/lib. BuildingThe next step is to build SubEtha. From the Java perspective, select Window->Show View->Ant. Right click in the Ant view and Add buildfiles. Then look for the top level SubEtha build file and add it. Once that is done, you can double click the 'deploy' target which will build SubEtha and install it in the right deployment directory location. Startup
The default web interface is http://localhost:8080/se/
When SubEtha runs for the first time, it creates a site administrator account named root@localhost, with the password password. You can login with these credentials initially. Directory LayoutThe subdirectories correspond to various components:
TestingThere are a number of tests that can run against subetha to verify the installation and to help with developement. All of these tests require that you run subetha while testing; we suggest not using it during tests as some site wide changes are made during the tests. Running Regression TestsHow to run the JUnit regression tests from ant:
Running Load TestsYou can run a test to put a little stress on your server. It will send a continuous stream of messages, and then count the number of recipients whom receive them. It is a not a scientific load test, but shows that the system can handle many concurrent requests.
<property name="from" value="root@localhost"/> <property name="to" value="load@localhost"/> <property name="attachmentFilePath" value="/tmp/attachment.dat"/>
Interactive TestingIt is easy to interactively test SubEtha by injecting email from your mail client directly into an instance of SubEtha. The way to do it is to setup a mail account in your client with a From: address of a subscriber on the list, the To: address is an existing list email. Make sure the outgoing mail server is the SubEtha server and that it is running on port 2500. It is also very easy to connect to port 2500 and just talk to the mail server! In rtest/testsmtpconv.txt you will find a simple text file containing the client conversation which can be easy pasted into an open (telnet) connection. telnet localhost 2500 <paste contents of file> |