You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Alex Karasulu <ao...@bellsouth.net> on 2004/10/01 10:38:08 UTC

[tests] Several areas I know of for unit tests

Hi all,

Before I go forward, I wanted to say this topic is approach from the
things I personally know of.  So if I skip stuff others are working on
please forgive me.  I know I cannot speak for naming, janus and the
kerberos server.

Vince asked me on IM if there were any tests that he could write for the
server to start to get up to speed with it.  I thought I'd take this
opportunity to post to the list the various places where more unit tests
or some test refinement is needed.  Who am I kidding? Every line of code
needs to be tested! I've been a lazy bad boy.



Eve Server UnitTests (high priority)
====================================

In the server there are two areas proper that can be tested.  First is
the SEDA frontend's LDAP protocol provider which has yet to be factored
out of old frontend code.  Note that we just factored out from what used
to be the frontend this entirely new project called SEDA which is a
generalized SEDA frontend for any protocol server.  The second is the
backend code.  The Eve backend really is a LDAP namespace JNDI provider
however it does not go through the protocol but instead translates JNDI
calls to operations on a BTree based database on disk.  This covers the
server proper.  So Vince if you wanted to specifically write test cases
for the server code the best place would be the backend code.  

Vince note that I probably already have some test cases for some of this
stuff in the sandbox which I shall be moving into the trunc/core
shortly.  Here's the JIRA for that:

http://nagoya.apache.org/jira/browse/DIREVE-28

If you would like you can start after I do this in the next couple of
days or start this yourself.  Some of it will be throw away or saved for
use in Merlin wrapper project tests.  Once this is done basically any
red line of code in clover is fair game for a test I would imagine.

SEDA Framework UnitTests (high priority)
========================================

Unit tests can also be written for the SEDA framework that we factored
out of the original frontend.  There's a good amount of test cases here
but we're not even close to 100% and that's where we want to be. 
Furthermore Trustin will be agressively refactoring SEDA over the next
few weeks so these UnitTests may be moot for now.  I'd wait until
Trustin finishes the UDP and PIPE transports for protocol services.

Snickers UnitTests (highest priority)
=====================================

Snickers has some really good unit test coverage.  Probably the best
because this code is the nastiest of all.  These unit tests are great
with one exception.  The use Snacc4J generated protocol message images
(called PDUs) to test Snickers which is the library replacing Snacc4J. 
We really need to make this code load PDU's pregenerated by Snacc4J and
saved in files rather than creating them dynamically using Snacc4J. 
Basically this is the only reason why we have Snacc4J sticking around
and I would love to just get it completely out of the picture 100%. 
There is a JIRA about how this can be done here:

http://nagoya.apache.org/jira/browse/DIRSNICKERS-61

Who ever chooses to take up this task I can reassign it to you.  Wes was
going to try to do it but I don't think he's going to be around much
after speaking to him tonight.

LDAP Commons (higher priority)
==============================

This library is at the heart of everything that is LDAP/X.500.   It's
common code that is used by clients and by servers.   It contains
several things like a filter parser, LDAP message stubs (interfaces for
operations like AddRequest etcetera) and other useful classes.  This
code base is in dire need of being tested.

Since this code is used by almost everything tests here are the most
important because they can propagate bugs to so many dependees.  Plus
this code is the least tested of all.  Ironically its the most stable I
guess because I have used it so much already.

---o---

So that's the breakdown on what can be done with testing which is well,
quite a lot.  It can be daunting now that I think of it but with testing
you just do it cuz you really like to see clover light up green :).

FYI anyone interested in a getting their hands on our clover license for
the directory project let me know I have it in my home directory at the
moment.

Cheers,
Alex

P.S. I know I should have tested more than I have - forgive me!  Getting
better at it.  Snickers my last major thing was seriously tested and is
close to 100% covered.  FYI that was when I got the clover license btw.