Skip to main content

Digging IDMUnit - IdMUnit a must-have automated testing tool that integrates with Designer for Novell Identity Manager





Good news, The IDMUnit 2.0 is out (http://www.idmunit.org/web/guest/idmunit20)!.. and I just couldn't wait to try the tool and do some hands on with it. Now it comes with a documentaiton and a WebMinar which helps a lot to understand how it works and how it integerates with the Novell Designer.

The Webminar is encoded with the "G2M3" encoding, so you need a decoder in order to see both video and audio. I downloaded it from the web : https://www2.gotomeeting.com/codec




I started with installing the tool on my PC Windows Vista 32bit OS. I have the following setup:

Novell Designer Version: 3.5, Build id: 20090916
Novell Identity Manager 3.6.1 Windows Server 2003 SP3
Novell eDirectory 8.8.x

The first thing the IDMUnit documentation says to apply so called "Eclipse Overlay", i downloaded "Eclipse IDE for Java Developers (92 MB)" that from the URL "http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-java-galileo-SR1-win32.zip"

After applying the "Eclipse Overlay" on my existing Novell Designer installation i started Novell Designer, which started normally. I imported a IDM project from a test lab into it and started created a IDMUnit project by going through "Windows/Open Perspective/Java".

Created a Java project with following folder structure:

the idm-runtime must be in your classpath and all the required libs.

under the src directory, i have my testJava classes and the .xls excel workbook (testCases) into it.

Under IdMUnitProperties folder i have "idmunit-defaults.properties" file and log4J configuration files.

Under IDMUnitProfiles folder i have the "idmunit-config.xml" profile file which has the connection information for different sources like AD , LDAP and SQL etc.

Remember in order to store password into the profile file you need to use EncTool which comes with the IDMUnit runtime. I executed the tool from Netbeans by doing:

org.idmunit.EncTool encTool = new org.idmunit.EncTool("IDMUNIT1") ;
System.out.println(encTool.encryptCredentials("myPasswordString"));



The folder "IDMUnitProperties" is in my Build Path, and the file "idmunit-defaults.properties" in this folder has following content:

ConfigLocation=./IDMUnitProfiles/idmunit-config.xml
ApplySubstitutionsToOperations=true
ApplySubstitutionsToData=true

After settingup the project, you are just ready defining your testCases in the .xls files. The .xls file name should be the same as your java testClass name.

and the finally creating some testCases, i tried my tests using IDMUnit, and it worked superbly by failing the tests first!

TDD (test driver design principals)

1. Add a test

2. Run all tests and see if the new one fails

3. Write some code


4. Run the automated tests and see them succeed

5. Refactor code





finally after doing some trials, i managed to run the IDMUnit with Novell Deisnger, and now my test bar is green!

"Keep the bar green to keep the solution clean"


Comments

Hello.

Great post. I have a question though.
How did you apply the eclipse overlay to Designer 3.5? The IdMUnit documentation specifies that the Designer/eclipse dir should be substituted by the new eclipse overlay, but Designer 3.5 does not have an specific eclipse dir.

Anyway, thanks for your help!

Popular posts from this blog

Experience writing a Java based DirXML Driver

Based on the customer project, I wrote a DirXML driver which provision users through Novell Identity Manager 3.5.1 to their company intranet portal ( A Plone System). The portal exposed the RESTful API interfaces. So I started looking first at the Novell SOAP driver to see if it fit our needs. But while reading the driver documentation i felt it required too much XSLT knowledge + more customization and testing on the driver. And again it used the Apache HttpClient, Which is more a HttpClient rather then it targets to any specific protocol implementation. So If you could build SOAP messages at your own so it would help you in transporting these message back and forth between IDM and Application. The Novell SOAP driver comes up with two built in configurations "SPML and DSML", but in my case none of them were suitable. I had always wished to write my own DirXML driver at my own, so I thought why not just take this opportunity to fulfill my wish and at the same time get s...

NetIQ IDM - Adding operation-data to subscriber command transformaiton custom commands

Recently i had to execute EOL cmdlets using psexecute though new NetIQ azure ad driver, since this operation is fire and forget in nature, i would like to track whole request and response for my own generated commands from subscriber command transofrmaiton policy, so i solved it by following policy: < do-set-dest-attr-value direct = "true" name = "psexecute" > < arg-association > < token-resolve datastore = "src" > < arg-dn > < token-text xml:space = "preserve" > {userref} </ token-text > </ arg-dn > </ token-resolve > </ arg-association > < arg-value type = "string" > < token-local-variable name = "cmdlet" /> </ arg-value > </ do-set-dest-attr-value > < do-append-xml-element expression = "../modify[@direct]" na...