[Mono-devel-list] [Mono-devel-list][Mono-hackers-list] Tests for System.DirectoryServices

Boris Kirzner borisk at mainsoft.com
Mon Apr 4 07:46:19 EDT 2005

Hello Sebastian,
While working on the tests for System.DirectoryServices I found that we 
need the tests to use more that single parameter for LDAP server.
As I can see this at this point, it should be at least two parameters 
fro LDAP servers :
- First,  for "usual" server, the tests should interact with
- Second, the "default" server, for testing methods and properties that 
assume system knowledge about existing LDAP server on the network 
(RootDSN, default constructors, etc.)
and, probably, each of this servers should also hold port number( or, 
alternatively, we can embed the port number into server root).

So my suggestion is to store server names inside application settings 
and not into environment variables, so the tests will be more portable 
and independent from testing environment.

What is our opinion on this issue?

Thank you in advance,

Sébastien Pouliot wrote:

>Hello Boris,
>Nice tests :-)
>I would suggest a few things...
>1. Network tests generally takes a long time to execute. Such (or most) test
>in other assemblies have been given a
>[Category ("InetAccess")]
>either on the [Test]ed method or on the class (the [TestFixture]) if all
>tests requires network access.
>2. Hardcoding the LDAP server seems a bad idea as it will requires anyone
>using the tests to make local modifications to many source files.
>What about keeping the server name in an environment variable ? e.g.
>3. Another advantage of using an environment variable is that it would be
>possible to ignore all the tests (or some of them) if the environment
>variable isn't present. I'm doing something similar for the CAS tests - i.e.
>if the security manager is not enabled then all CAS tests are ignore.
>This can be put the [SetUp] or [TestFixtureSetUp]
>LDAPServer = Environment.GetVariable ("MONO_LDAP_TEST_SERVER");
>if (LDAPServer == null) {
>	Assert.Ignore ("No LDAP test server configured with
>	return;
>Sebastien Pouliot
>home: spouliot at videotron.ca
>blog: http://pages.infinit.net/ctech/poupou.html
>>-----Original Message-----
>>From: mono-devel-list-admin at lists.ximian.com
>>[mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Boris
>>Sent: 17 mars 2005 04:20
>>To: mono-devel-list at lists.ximian.com; mono-hackers-list at ximian.com
>>Subject: [Mono-devel-list] [Mono-devel-list][Mono-hackers-list] Tests
>>for DirectoryServices
>>Hello all
>>Attached is the test for DirectoryServices.DirectoryEntry class.
>>I tried to make the test self-contained as possible, but it still
>>assumes OpenLDAP server is up and running.
>>Note - for the test to run you need to change the server name in the
>>test body.
>>Additionally attached is a slapd.conf of the OpenLDAP server.
>>If no one objects, I'm going to commit.
>>Boris Kirzner
>>Mainsoft Corporation

Boris Kirzner
Mainsoft Corporation

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050404/df4d8f2d/attachment.html 

More information about the Mono-devel-list mailing list