Novell Home

Asgard: The IDM Integration Test Tool

Novell Cool Solutions: Feature
By Alfredo Luiz Santos

Digg This - Slashdot This

Posted: 15 Dec 2005
 

Introduction

As you develop with Novell Identity Manager, you may encounter the following issues:

  • Your IDM project has become very large.
  • You don't have a clear plan on how to test all the necessary integration.
  • You wonder if making a single change might stop all your integration.

This article demonstrates how to use the Asgard Test Tool, a method of quick tests to help assure your IDM project quality. The article is intended for IDM developers with intermediate-level experience, using IDM 2 or 3.

Automating tests is part of the Extreme Programming approach and can help your project succeed. The Asgard Test Tool is a test automation tool, simulating manual tasks in testing. It automates IDM tests without manual tasks, providing a sequence of automated tests to be executed many times in a day.

To download the Asgard Test Tool, see: http://www.novell.com/coolsolutions/tools/16548.html

Case Study from a Virtual Business

Suppose you have an IDM integration project using these connectors:

  • AD
  • eDir-eDir
  • Notes
  • Loopback
  • SAP User
  • JDBC Oracle

and these extra systems:

  • Novell Audit com Oracle
  • HelpDesk System with MySQL

with these project events:

  • Create/Grant access at AD, eDir, Notes, SAP User and Oracle
  • Remove access of AD, eDir, Notes, SAP User and Oracle
  • Block and unblock of connected systems users
  • Send events to Audit
  • Open a help desk ticket using JDBC

Problem Statement

For each rule included in the project, you risk damaging another item in the project. This condition necessitates a full test of the project. However, full project testing can be expend a lot of time of manual processing. For example, logging in to SAP to look for a user can be time-consuming.

Asgard Tool Architecture

Asgard has a layer of automation that allows you to define a sequence of tasks using XML and develop new modules using Java.

These are the default modules of Asgard:

  • LdapAdd - reates LDAP objects (eDir, AD, etc.)
  • LdapModify - modifies LDAP objects (eDir, AD, etc.)
  • LdapDelete - deleted LDAP objects (eDir, AD, etc.)
  • LdapQuery - queries LDAP objects (eDir, AD, Notes, etc.)
  • JDBCExecute - executes SQL Commands (DROP, Insert, Update, etc.)
  • JDBCQuery - executes SQL Select commands
  • SAPUserQuery - checks whether a user exist in SAP
  • SAPRolesQuery - queries Roles of a single user in SAP
  • SAPProfilesQuery - queries Profiles a single user in SAP

Asgard Tool Usage

Asgard can be used to automate tests in any IDM project. This is the command line to execute Asgard:

java -jar Asgard.jar -c ApplicationContext.xml

To use Asgard, you need to create an XML file as a test sequence. The following XML file has a block within its sequence for test execution:

	<bean id="runner" class="com.itt.asgard.impl.BasicRunner">
		<property name="actions">
			<set>
				<ref local="ldapadd"/>
				<ref local="ldapmodify"/>
				<ref local="ldapquery"/>
				<ref local="ldapdeleteentry"/>
				<ref local="dropuser"/>
				<ref local="createuser"/>
				<ref local="grantuser"/>
				<ref local="log"/>
				<ref local="sleep"/>
				<ref local="log"/>
				<ref local="selectuser"/>
				<ref local="sapuser"/>
				<ref local="sapuserroles"/>
				<ref local="sapuserprofiles"/>
			</set>
		</property>
	</bean>

Other blocks contain action configuration (for example, LDAP connection configuration and database connection).

LdapModify

Parameters

  • host = IP address of LDAP host
  • port = port number of LDAP server
  • adminDN = dn of LDAP administrator user
  • password = password of LDAP admin user
  • modifyAction = REPLACE, ADD or DELETE
  • entryDN = dn of user to be modified
  • attributeName = attribute to be modified
  • attributeValue = new value of attribute

Example

<bean id="ldapmodify" class="com.itt.asgard.modules.LdapModify" singleton="false">
<property name="host" value="192.168.56.129"/>
	        <property name="port" value="389"/>
	        <property name="adminDN" value="cn=admin,o=novell"/>
	        <property name="password" value="novell"/>
	        <property name="modifyAction" value="REPLACE"/>
	        <property name="entryDN" value="cn=admin,o=novell"/>
	        <property name="attributeName" value="l"/>
	        <property name="attributeValue" value="novell3"/>
</bean>	

LdapAdd

Parameters

  • host = IP address of the LDAP host
  • port = Port number of the LDAP server
  • adminDN = dn of the LDAP administrator user
  • password = password of the LDAP admin user
  • entryFile = file with user data

Example

<bean id="ldapadd" class="com.itt.asgard.modules.LdapAdd" singleton="false">
                  <property name="host" value="192.168.56.129"/>
	        <property name="port" value="389"/>
	        <property name="adminDN" value="cn=admin,o=novell"/>
	        <property name="password" value="novell"/>
	        <property name="entryFile" value="c:\usu1.data"/>
</bean>	

LdapDeleteEntry

Parameters

  • host = IP address of the LDAP host
  • port = Port number of the LDAP server
  • adminDN = dn of the LDAP administrator user
  • password = password of the LDAP admin user
  • entryDN = dn of object to be deleted

Example

<bean id="ldapdeleteentry" class="com.itt.asgard.modules.LdapDeleteEntry" singleton="false">
                  <property name="host" value="192.168.56.129"/>
	        <property name="port" value="389"/>
	        <property name="adminDN" value="cn=admin,o=novell"/>
	        <property name="password" value="novell"/>
	        <property name="entryDN" value="ou=test,o=novell"/>
</bean>	

LdapQuery

Parameters

  • host = IP address of the LDAP host
  • port = Port number of the LDAP server
  • adminDN = dn of the LDAP administrator user
    • password = password of LDAP admin user
  • searchBase = dn base to query
  • queryFilter = search filter
  • attributeValue = attribute to be returned

Example

<bean id="ldapquery" class="com.itt.asgard.modules.LdapQuery" singleton="false">
		    <property name="host" value="192.168.56.129"/>
	        <property name="port" value="389"/>
	        <property name="adminDN" value="cn=admin,o=novell"/>
	        <property name="password" value="novell"/>
	        <property name="searchBase" value="o=novell"/>
	        <property name="queryFilter" value="(cn=admin)"/>
	        <property name="attributeValue" value="l"/>
</bean>

DropUser

Parameters

  • driverClass = JDBC Class
  • url = connection url
  • user = db user
  • password = db password
  • sqlCommand = sql command (Drop, insert, update, grant, etc)

Example

<bean id="dropuser" class="com.itt.asgard.modules.JDBCExecute" singleton="false">
	        <property name="driverClass" value="oracle.jdbc.driver.OracleDriver"/>
	        <property name="url" value="jdbc:oracle:thin:@10.236.0.148:1521:cerbero"/>
	        <property name="user" value="admin"/>
	        <property name="password" value="novelladmin"/>
	        <property name="sqlCommand" value="DROP user ABOBRINHA"/>	
</bean>

Sleep

Parameters

timeToSleep = Time in seconds to Asgard wait

Example

<bean id="sleep" class="com.itt.asgard.modules.Sleep" singleton="false">
	        <property name="timeToSleep" value="60"/>
</bean>	

Log

Parameters

log = extra text log

Example

<bean id="log" class="com.itt.asgard.modules.TestLogWriter" singleton="false">
	        <property name="logText" value="Executando query"/>
</bean>

SelectUser

Parameters

  • driverClass = JDBC Class
  • url = connection URL
  • user = db user
  • password = db password
  • sqlCommand = sql command (Drop, insert, update, grant, etc.)
  • resultField = field to be returned
<bean id="selectuser" class="com.itt.asgard.modules.JDBCQuery" singleton="false">
	        <property name="driverClass" value="oracle.jdbc.driver.OracleDriver"/>
	        <property name="url" value="jdbc:oracle:thin:@10.236.0.148:1521:cerbero"/>
	        <property name="user" value="admin"/>
	        <property name="password" value="novelladmin"/>
	        <property name="resultField" value="total"/>
	        <property name="sqlCommand" value="select count(*) as total from dba_sys_privs 
where grantee = 'RDF' and privilege = 'CREATE SESSION'"/>	
</bean>	

QuerySapUser

Parameters

  • m_strHostName = IP of SAP Server
  • m_strSystemNumber = SAP System Number
  • m_strClientNumber = SAP Client Number
  • m_strLanguageCode = SAP Language Code (EN,PT, ETC)
  • m_strUserID = SAP Admin user
  • m_strUserIDPassword = SAP Admin password
  • m_strStructure = SAP Structure
  • m_strUserName = User to be queried
<bean id="sapuser" class="com.itt.asgard.modules.SAPUserQuery" singleton="false">
			<property name="m_strHostName" value="10.201.131.108"/>
			<property name="m_strSystemNumber" value="10"/>
			<property name="m_strClientNumber" value="021"/>
			<property name="m_strLanguageCode" value="EN"/>
			<property name="m_strUserID" value="dirxml_cpic"/>
			<property name="m_strUserIDPassword" value="cerbero"/>
			<property name="m_strStructure" value="ADDRESS"/>
			<property name="m_strUserName" value="SAPTEST08"/>
	

QuerySapUserRoles

Parameters

  • m_strHostName = IP of SAP Server
  • m_strSystemNumber = SAP System Number
  • m_strClientNumber = SAP Client Number
  • m_strLanguageCode = SAP Language Code (EN,PT, ETC)
  • m_strUserID = SAP Admin user
  • m_strUserIDPassword = SAP Admin password
  • m_strUserName = User to be queried
<bean id="sapuserroles" class="com.itt.asgard.modules.SAPUserRolesQuery" singleton="false">
			<property name="m_strHostName" value="10.201.131.108"/>
			<property name="m_strSystemNumber" value="10"/>
			<property name="m_strClientNumber" value="021"/>
			<property name="m_strLanguageCode" value="EN"/>
			<property name="m_strUserID" value="dirxml_cpic"/>
			<property name="m_strUserIDPassword" value="cerbero"/>
			<property name="m_strUserName" value="C05"/>
</bean>	

QuerySapUserProfiles

  • m_strHostName = IP of SAP Server
  • m_strSystemNumber = SAP System Number
  • m_strClientNumber = SAP Client Number
  • m_strLanguageCode = SAP Language Code (EN,PT, ETC)
  • m_strUserID = SAP Admin user
  • m_strUserIDPassword = SAP Admin password
  • m_strUserName = User to be queried
<bean id="sapuserprofiles" class="com.itt.asgard.modules.SAPUserProfilesQuery" singleton="false">
			<property name="m_strHostName" value="10.201.131.108"/>
			<property name="m_strSystemNumber" value="10"/>
			<property name="m_strClientNumber" value="021"/>
			<property name="m_strLanguageCode" value="EN"/>
			<property name="m_strUserID" value="dirxml_cpic"/>
			<property name="m_strUserIDPassword" value="cerbero"/>
			<property name="m_strUserName" value="C05"/>
</bean>

See Alfredo's Home Page here.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell