directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Tence <vte...@videotron.ca>
Subject Re: Test Design
Date Thu, 17 Mar 2005 20:22:04 GMT
> The thread on test naming got my memory jogged.  A number of the tests
> require a socket set up and things shoved through it to make it work.

Are you talking about the asn1 tests with Snacc4j dependency or something
totally different? I'm suspecting the later

> That is really integration testing, not unit testing.  Integration tests
> are important, but unit tests are what needs to be run as part of
> building a project.

I couldn't agree more

> Usually it consists of encoding a message, sending
> it over the wire and decoding it on the other side.
>
> What would be better is if we could compare the encoded set of bytes
> (using a ByteInputStream and a ByteOutputStream) and compare the set to
> what the properly encoded message should look like.  Similarly, on the
> decode side start out with the byte array of the encoded message and
> have the system decode it on the other side.
>
> If the code does not allow us to pass in our own streams then that would
> be a point for refactoring to make the system more friendly to testing.

+1

> That would also releave the need to poke holes in personal firewalls
> just so the test can run (something Linux developers need to do).  It
> also reduces the points of failure and makes it plainly obvious what is
> an accurately encoded messgae.  Hopefully it will also avoid the problem
> where the library is consistent with itself but not with production LDAP
> servers.

+1


Mime
View raw message