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 Harmeet <ha...@kodemuse.com> on 2002/01/18 05:10:16 UTC

testing was - Re: [PATCH] for LogEnabled James.

I can take up some tests.

I was thinking of writing tests with JPython. It seems to have pop3, smtp,
imap, nntp client libraries and can use Java mail classes if it needs to.
Python libraries seem to be close to the telnet level and also reasonable to
modify.

Harmeet
----- Original Message -----
From: "Darrell DeBoer" <li...@bigdaz.com>
>  I'm looking forward to having a few more automated tests, so that I can
> modify/refactor/improve without worrying that I might have broken
something.
>
> I reckon we need to work on 2 levels of testing.
> 1) Protocol tests.
> Simple protocol tests, which mimic what you would test using Telnet. These
> could be based on o.a.j.test.SimpleFileProtocolTest, like the
> TestAuthenticated test for IMAP. (There's also a very simple SMTP test in
> the IMAP proposal directory).
> These will tests the different server protocols (SMTP, POP3, NNTP, IMAP)
in
> a client-independent manner. The downside is that these are tedious to
> write, and very verbose.
>
> 2) Functional tests.
> These would mimic what you would test using an email client, but use
> JavaMail as the test client. (See o.a.j.imapserver.InitialMail for a
simple
> example).
> The upside to this type of testing is it's very easy to test lots of
> different combinations and permutations (eg Multipart messages, different
> encodings etc), but the downside is that they only test the protocol
> functionality that JavaMail uses.
>
> I'll probably keep working on the IMAP tests (even though they currently
> fail!) as I continue working on the IMAP server. Any volunteers for the
> other protocols?
>
> ciao
> Daz
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: testing was - Re: [PATCH] for LogEnabled James.

Posted by Harmeet <ha...@kodemuse.com>.
> Personally, I'd prefer if all of the code was in Java (fewer dependencies
> and less for me to learn ;) ), but I can see why these libraries would be
> helpful. It would be great if we had something similar written in Java.
(In
> fact, it probably wouldn't be *that* hard to write...)

Jython has some nice scripting capabilities. Probably not as suited to
larger projects as Java, but a lot easier to script with. Jython can can be
fun.

>
> As to doing up some tests using these libraries, go for it. If you can
make
> them JUnit tests, even better. (As long as I can run them automated from
> ant, reporting success/failure, I'll be happy.)

Jython does works nicely with JUnit.

>
> I'm not sure about the licencing issues though - is the Jython runtime
> Apache compatible? (I guess we can just make developers download it
> separately, anyhow).

I think so. There is no problem in packaging it. Check out
http://www.jython.org/license.html

Harmeet


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: testing was - Re: [PATCH] for LogEnabled James.

Posted by Darrell DeBoer <li...@bigdaz.com>.
Hi

> I can take up some tests.
>
> I was thinking of writing tests with JPython. It seems to have pop3, smtp,
> imap, nntp client libraries and can use Java mail classes if it needs to.
> Python libraries seem to be close to the telnet level and also reasonable
to
> modify.
>
> Harmeet

Hmmm. Looks interesting. The libraries would definitely make writing tests
easier, and seem pretty close to the wire. (compared to JavaMail, which is
fully abstracted).

Personally, I'd prefer if all of the code was in Java (fewer dependencies
and less for me to learn ;) ), but I can see why these libraries would be
helpful. It would be great if we had something similar written in Java. (In
fact, it probably wouldn't be *that* hard to write...)

As to doing up some tests using these libraries, go for it. If you can make
them JUnit tests, even better. (As long as I can run them automated from
ant, reporting success/failure, I'll be happy.)

I'm not sure about the licencing issues though - is the Jython runtime
Apache compatible? (I guess we can just make developers download it
separately, anyhow).

ciao
Daz


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>