You are on page 1of 9

Framework for IDM Automated Tests (FIAT)

RUNBOOK
for Oracle Access Manager

REVISION HISTORY
Version

Date (mm/dd/yyyy)

Author

Description

0.1

01/04/11

Chanda Patel

Create FIAT runbook

Table of Contents
1. Introduction.................................................................................................................................................2
2. Setting up automation workspace...............................................................................................................2
3. Running FIAT/OAM locally from ADE workspace using ant ..................................................................3
4. Running FIAT/OAM using the block script ..............................................................................................3
5. How to run specific modules......................................................................................................................4
5.1 WLST Module......................................................................................................................................4
5.2 Policy Module......................................................................................................................................5
5.3 Webgate Module..................................................................................................................................5
5.4 RREG Module......................................................................................................................................5
5.5 IDStore Module....................................................................................................................................6
5.5 OAMTester Module.............................................................................................................................6
5.6 ASDK Module......................................................................................................................................6
5.7 IAP Module..........................................................................................................................................6
6. Interpretation of automation results............................................................................................................6
7. How to run FIAT in server farm.................................................................................................................7
8. Appendix.....................................................................................................................................................7

1. Introduction
This document can be used as a quick start guide to execute automation using FIAT. To
understand the framework in-depth, please read the FIAT Architecture document.
FIAT is a testng based testing framework written in JAVA and executed using ANT.
The following are the key features of FIAT:
Support for multiple products.
Component, modular and plug-gable design
No 3rd party licensed tools requirement
Unified framework (UI, API and CLI)
End to end testing, support for message and transport level security wherever
applicable
Grouping of testcases based on platform/functional
Platform/container agnostic
Self contained, no external dependencies
Follows maven guidelines

2. Setting up automation workspace


FIAT is checked in into the NGAM_MAIN_GENERIC label. The source code can be found
under ngamtest/fiat . ngamtest is sitting at the peer level of ngam source tree. In
order to run automated tests using FIAT, the source code for FIAT needs to be checked
out and certain property files need to be edited to run OAM product and specific module.
First check out the appropriate NGAM_MAIN_GENERIC label from ADE
Steps
ade createview -label NGAM_MAIN_GENERIC@@/LATEST <view_name>
ade useview <view_name>
ade begintrans <txn name>
cd $ADE_VIEW_ROOT/ngamtest
ade co -nc -recursive fiat
Now you can run FIAT tests, either from the workspace using ant or the using the
OAM11g_FIAT block script
Prerequiste to run automation :
OAM server is already configured. Any module specific dependency has already
been taken care of. Eg Webgate installation is ready before running the webgate
tests. RREG.tar.gz has been unzipped to run RREG module
am-admin.ear should contain webcli . Following are the steps:

ade createview -label NGAM_MAIN_GENERIC@@/LATEST <view_name>


ade useview <view_name>
ade begintrans <txn name>
cd $ADE_VIEW_ROOT/ngamtest
ade co -nc -recursive webcli
Copy am-admin.ear from <Oracle_HOME>/oam/server/apps/amadmin.ear to
the $ADE_VIEW_ROOT/ngamtest/webcli/orig_ear
Run ant command from $ADE_VIEW_ROOT/ngamtest/webcli
The new am-admin.ear will created created under
$ADE_VIEW_ROOT/ngamtest/webcli/ear
FIAT/OAM is currently tested with JDK 1.6 and ANT 1.7.1
OAM Server should be configured with external datastore.

3. Running FIAT/OAM locally from ADE


workspace using ant
Assuming you have followed the above steps in Step 2 and have the transaction
ready to be run, follow the below mentioned steps :
Create a folder under T_WORK
mkdir -p $T_WORK/OAM11g_FIAT/
Create the following file as per your view
Edit $T_WORK/OAM11g_FIAT/import.txt and provide the following properties.
Please refer to appendix for the details of import.txt
HOSTNAME=<OAM HOST_NAME>
AdminPassword=welcome1
WLS_DOMAIN=<WEBLOGIC_DOMAIN>
AdminUser=weblogic
WLS_CONSOLE_PORT=7001
ORACLE_HOME=<ORACLE_HOME>
FIAT_SOURCE_ZIP=%FIAT_SOURCE_ZIP%
WL_HOME=<WEBLOGIC_HOME>
Set environment variable WORKDIR
setenv WORKDIR $T_WORK/OAM11g_FIAT/
Set environment variable JDK16HOME
setenv JDK16HOME /usr/local/packages/jdk16
For 64bit JVM , setenv JDK16HOME

/net/stafas04/farm_fmwqa/java/linux64/jdk6
Set environment variable ANT17HOME
setenv ANT17HOME /usr/local/packages/ant_remote/1.7.1
Edit respective datastore file eg. oam/resources/config/IDStore_S1DS.properties,
build.properties, other module specific/needed files
Edit fiat/build.properties to specify oam as the product to be tested.
Fire ant from $ADE_VIEW_ROOT/ngamtest/fiat
${ANT17HOME}/bin/ant -DJAVACMD=${JDK16HOME} -lib common/lib/antcontrib-1.0b3.jar -DSERVER_NAME1=server1 -DWORKDIR=${WORKDIR} run

4. Running FIAT/OAM using the block script


Assuming you have followed the above steps in Step 2 and have the
transaction ready to be run, follow the below mentioned steps
Create a folder under T_WORK
mkdir -p $T_WORK/OAM11g_FIAT/
Set environment variable AUTO_HOME
setenv AUTO_HOME /usr/local/packages/aime/dte/DTE3
NOTE : In case your testing needs a newer version of the block script not
available in dte, then
create a AUTO_HOME dir, say /scratch/aime1/AUTO_HOME, and setenv
AUTO_HOME /scratch/aime1/AUTO_HOME
cd $AUTO_HOME/
cp -rf /usr/local/packages/aime/dte/DTE3/* .
Now copy the oam11g_fiat.pl from wherever into
$AUTO_HOME/scripts/as11_idm/11.1.1.4.0/
Create the dte related files import.txt, export.txt, runtime.txt,runBlock.cmd
under $T_WORK/OAM11g_FIAT/ .
Sample files can be found in the appendix section
Now Edit the above mentioned files for details related to your
setup/workspace/install
import.txt - HOSTNAME, AdminPassword, WLS_DOMAIN, AdminUser,
WLS_CONSOLE_PORT, FIAT_SOURCE_ZIP, WL_HOME
runtime.txt - Edit AUTO_HOME, WORKDIR, ENVFILE,
GlobalSettingPrpFile
env.txt - ADE_VIEW_ROOT, ADE_DEFAULT_VIEW_STORAGE_LOC
runBlock.cmd - In this file,edit the location of the import.txt,
runtime.txt, export.txt and also the oam11g_fiat.pl script location.
/usr/local/packages/perl_5.6.1/bin/perl

/scratch/aime/AUTO_HOME/scripts/as11_idm/11.1.1.4.0/oam11g_fiat.pl
/ade/aime1/oracle/work/OAM11g_FIAT/import.txt
/ade/aime1/oracle/work/OAM11g_FIAT/export.txt
/ade/aime1/oracle/work/OAM11g_FIAT/runtime.txt
Set the environment variable WORKDIR
setenv WORKDIR $T_WORK/OAM11g_FIAT/
From the $T_WORK/OAM11g_FIAT, execute runBlock.cmd

5. How to run specific modules


5.1 WLST Module
To run wlst module,
Edit fiat/oam/build.properties
<property name="EXECUTION_MODE" value="<idstore>"/>
<property name="TEST_MODULE" value="wlst"/>
The value of <idstore> can be either oid, s1ds,edir or ad based on which datastore the
user wants to run the automation.

5.2 Policy Module


To run policy module,
Edit fiat/oam/build.properties
<property name="EXECUTION_MODE" value="<idstore>"/>
<property name="TEST_MODULE" value="policy"/>
The value of <idstore> can be either oid, s1ds,edir or ad based on which datastore the
user wants to run the automation
The $ADE_VIEW_ROOT/ngamtest/fiat/oam/lib should contain nap-api.jar to run policy
module.nap-api.jar can be found under <oracle_home>/oam/server/rreg/lib/nap-api.jar

5.3 Webgate Module


To run webgate module,
Edit fiat/oam/build.properties
<property name="EXECUTION_MODE" value="<idstore>"/>
<property name="TEST_MODULE" value="agents"/>
The value of <idstore> can be either oid, s1ds,edir or ad based on which datastore the
user wants to run the automation
Edit fiat/oam/resources/agents/AgentAppDomainHostIdMapping.properties
Provide the webgate 10g or 11g details against which the agents automation needs to

be run
The OHS on which webgate is installed should be cgi-enabled. The resources for
webgate automation should be copied over from
/net/opensolaris2.us.oracle.com/export/htdocs to the htdocs directory of the OHS
instance.
/net/opensolaris2.us.oracle.com/export/htdocs/cgi-bin/headers.cgi should be copied over
to cgi-bin directory of webserver.

5.4 RREG Module


To run rreg module,
Unzip RREG.tar.gz from <Oracle_Home>/oam/server/rreg/client location and
edit oamreg.sh to give correct values for JAVA_HOME and RREG_HOME
Edit fiat/oam/build.properties
<property name="EXECUTION_MODE" value="<idstore>"/>
<property name="TEST_MODULE" value="rreg"/>
The value of execution mode can be either oid, s1ds,edir or ad based on which datastore
the user wants to run the automation
Edit $ADE_VIEW_ROOT/ngamtest/fiat/oam/resources/rregGlobal.properties
and specify the value for RREG_BIN parameter.
If running the automation locally from ADE workspace, specify
RREG_SCHEMA_LOCATION as part of ant task
${ANT17HOME}/bin/ant -DJAVACMD=${JDK16HOME} -lib common/lib/antcontrib-1.0b3.jar -DSERVER_NAME1=server1 -DWORKDIR=${WORKDIR}
-DRREG_SCHEMA_LOCATION=< val > run
If running the automation using the block script, specify
RREG_SCHEMA_LOCATION as part of import.txt
RREG_SCHEMA_LOCATION can be found under
<Middleware_HOME>/<Oracle_Home>/oam/server/rreg/config/RequestResp
onseSchema.xml

5.5 IDStore Module


To run idstore module,
Edit fiat/oam/build.properties
<property name="EXECUTION_MODE" value="<idstore>"/>
<property name="TEST_MODULE" value="idstore"/>
The value of <idstore> can be either oid, s1ds,edir or ad based on which datastore the
user wants to run the automation

5.5 OAMTester Module


To run oamtester module,
Edit fiat/oam/build.properties

<property name="EXECUTION_MODE" value="<mode>"/>


<property name="TEST_MODULE" value="oamtester"/>
The value of <mode> can be either open, simple or cert.
The $ADE_VIEW_ROOT/ngamtest/fiat/oam/lib should contain oamtest.jar to run
oamtester module. Oamtest.jar can be found under
<oracle_home>/oam/server/tester/oamtest.jar

5.6 ASDK Module


To run asdk module,
Edit fiat/oam/build.properties
<property name="EXECUTION_MODE" value="<idstore>"/>
<property name="TEST_MODULE" value="asdk"/>
The value of <idstore> can be either oid, s1ds,edir or ad based on which datastore the
user wants to run the automation
The $ADE_VIEW_ROOT/ngamtest/fiat/oam/lib should contain oamasdk-api.jar to run asdk
module. nap-api.jar should be removed from $ADE_VIEW_ROOT/ngamtest/fiat/oam/lib if
already existing. Oamasdk-api.jar can be found under
idm/shiphome/ofm_oam_sdk_generic_11.1.1.5.0_disk1_1of1.zip

5.7 IAP Module


To run IAP module,
Edit fiat/oam/build.properties
<property name="EXECUTION_MODE" value="<idstore>"/>
<property name="TEST_MODULE" value="iap"/>
The value of <idstore> can be either oid, s1ds,edir or ad based on which datastore the
user wants to run the automation

$ADE_VIEW_ROOT/ngamtest/oam/resources/iap/AgentAppDomainHostIdMapping.p
roperties should be editted based on the webgate configured with OAM server

Provide the IPLANET details in


$ADE_VIEW_ROOT/ngamtest/oam/resources/iap/AUTHENTICATOR_IP.properties

Provide the OID details in


$ADE_VIEW_ROOT/ngamtest/oam/resources/iap/AUTHENTICATOR_OID.properties

Enter the details of weblogic where the application is protected in


$ADE_VIEW_ROOT/ngamtest/oam/resources/iap/IAPData.properties

The weblogic should be configured to have both OID and IPLANET authenticators

The three applications client-app.war , basic.war and newapp.war should be


deployed on weblogic. These applications can be found under
/net/opensolaris2.us.oracle.com/export

The $ADE_VIEW_ROOT/ngamtest/fiat/oam/lib should contain nap-api.jar to run iap


module.nap-api.jar can be found under <oracle_home>/oam/server/rreg/lib/napapi.jar

6. Interpretation of automation results


After the automation execution is complete, Every testcase will have either a .dif (for
failure) or .suc file (for succes) created under $T_WORK/OAM11g_FIAT/
And also, the automation report can be found under
$T_WORK/OAM11g_FIAT/fiat/oam/server1/index.html
The test specification for automated tests can be found
under$T_WORK/OAM11g_FIAT/fiat/oam/server1/module_TestCases.html

7. How to run FIAT in server farm


TBD

8. Appendix
Sample Import.txt
HOSTNAME=adc2171260.us.oracle.com
AdminPassword=welcome1
WLS_DOMAIN=/scratch/aime1/AUTO_WORK/mw154/user_projects/domains/WLS_OAM
rreg_bin=RREG_BIN
AdminUser=weblogic
WLS_CONSOLE_PORT=20946
ORACLE_HOME=/scratch/aime1/AUTO_WORK/mw154/idm2642
FIAT_SOURCE_ZIP=/scratch/aime1/fiat/myfiat.zip
WL_HOME=/scratch/aime1/AUTO_WORK/mw154/wlserver_10.3.
ADE_VIEW_ROOT=/scratch/aime1/view_storage/aime1_NGAM_MAIN_GENERIC_101129
Sample runBlock.cmd
/usr/local/packages/perl_5.6.1/bin/perl
/scratch/aime1/AUTO_HOME/scripts/as11_idm/11.1.1.4.0/oam11g_fiat.pl
/ade/aime1_dte1051/oracle/work/OAM11g_FIAT/import.txt
/ade/aime1_dte1051/oracle/work/OAM11g_FIAT/export.txt
/ade/aime1_dte1051/oracle/work/OAM11g_FIAT/runtime.txt

Sample runtime.txt
AUTO_HOME=/scratch/aime1/AUTO_HOME
ENVFILE=/scratch/aime1/view_storage/aime1_NGAM_MAIN_GENERIC_101129/oracle/wor
k/OAM11g_FIAT/env.txt
GlobalSettingPrpFile=/scratch/aime1/view_storage/aime1_NGAM_MAIN_GENERIC_101129
/oracle/work/OAM11g_FIAT/runtimeGlobalSetting.prp
Sample env.txt
ADE_DEFAULT_VIEW_STORAGE_LOC=/net/adc2171260/scratch/aime1/view_storage
ADE_VIEW_ROOT=/ade/aime1_dte1051

You might also like