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
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
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!