10Usage Pattern Tracking and Conversion to Keyword Scripts
Usage Pattern Tracking and Conversion to Keyword Scripts
This chapter includes information about usage pattern tracking (UPT) in Siebel Business Applications. It includes the following topics:
About Usage Pattern Tracking
Usage pattern tracking allows administrators to review details about when, and how often, users’ access features in a Siebel application. To capture this information, administrators configure a component job to run at a scheduled date and time, or at time intervals that they specify.
For more details, refer to About Usage Pattern Tracking in Siebel Applications Administration Guide.
Setting Up the Automation Adapter
Before you get started with the task of recording a functional flow, you must complete the procedure in this topic to set up the system preferences for Usage Pattern Tracking.
To set the system preferences for Usage Pattern Tracking
Navigate to the Administration - Application screen, then the System Preferences view.
Set the system preferences in the following table:
Name | Value |
---|---|
Enable UPT |
True |
Enable UPT Context |
True |
UPTMax Record Cache |
100 |
To set the profile configuration parameters for Usage Pattern Tracking
Navigate to the Administration - Server Configuration screen, then the Enterprises view.
In the Enterprises Server applet, select the enterprise server you want to configure.
Click the Profile Configuration tab. Query for the profile AutomationSubSys.
Name | Alias | Datatype | Value |
---|---|---|---|
Class Path |
CLASSPATH |
String |
|
Container URL |
CONTAINERURL |
String |
The value for the jbs CONTAINERURL=http://localhost:<ContainerPort>/siebel/jbs <ContainerPort> value should be taken from file:<Siebel Install Location>\ses\applicationcontainer\conf\server.xml <Connector port="4730" protocol="HTTP/1.1" For Example: http://localhost:4730/siebel/jbs |
To implement the system preferences and profile configuration changes, you must restart the Siebel Gateway and Siebel Services.
As an alternate option, you can configure the profile for AutomationSubSys via server manager command:-
change param CONTAINERURL=http://localhost:<ContainerPort>/siebel/jbs for named subsystem AutomationSubSys
The following table lists the Runtime events configured out of the box.
Sequence | Object Type | Object Name | Event | Sub Event | Action Set Name | Conditional Expression |
---|---|---|---|---|---|---|
2 |
Application |
|
ViewActivated |
|
KWD |
GetProfileAttr("Enable Recording") = "True" AND GetProfileAttr("RecordingOn") = "True" |
2 |
Application |
|
ViewDeactivated |
|
KWD |
GetProfileAttr("Enable Recording") = "True" AND GetProfileAttr("RecordingOn") = "True" |
2 |
Application |
|
WebLogin |
|
KWD |
GetProfileAttr("Enable Recording") = "True" AND GetProfileAttr("RecordingOn") = "True" |
2 |
Application |
|
WebLogout |
|
KWD |
GetProfileAttr("Enable Recording") = "True" AND GetProfileAttr("RecordingOn") = "True" |
2 |
Applet |
|
PreInvokeMethod |
|
KWD |
GetProfileAttr("Enable Recording") = "True" AND GetProfileAttr("RecordingOn") = "True" |
2 |
Application |
|
Recording |
|
KWD |
GetProfileAttr("Enable Recording") = "True" |
2 |
Application |
|
InvokeServiceMethod |
|
KWD |
GetProfileAttr("Enable Recording") = "True" AND GetProfileAttr("RecordingOn") = "True" |
2 |
Application |
|
UPTClientScript |
|
KWD |
GetProfileAttr("EnableRecording") = "True" AND GetProfileAttr("RecordingOn") = "True" |
2 |
Application |
|
InvokeMethod |
|
KWD |
GetProfileAttr("EnableRecording") = "True" AND GetProfileAttr("RecordingOn") = "True" |
Configuring the UPT and KWD Log Directory for Multiple Servers
This topic provides you with the information on configuring the UPT and KWD log directory for multiple servers.
The following procedure shows you how to configure Automation Application Directories in a multiple server or hybrid environment (for example, Microsoft Windows and UNIX).
To configure the UPT and KWD log directory
Create a shared Common Internet File System (CIFS) between the Windows and Unix servers.
In Windows for example, a folder called automation need to be created on the "c:\ drive (c:\automation) and the Siebel Servers are installed in <Siebel Install Location>\ses\siebsrvr.
In UNIX for example, a folder called automation mounted as /somepath/automation (which points to the Windows folder)and Siebel Servers are installed under <Siebel Install Location>\ses\siebsrvr.
Create two subfolders for UPT and KWD.
mkdir c:\automation\upt
mkdir c:\automation\kwd
Use the mklink in Windows to link the siebsrvr\upt & siebsrvr\kwd to the shared folder. c:\automation\upt & c:\automation\kwd respectively as follows:
mklink /D <Siebel Install Location>\ses\siebsrvr\upt c:\automation\upt
mklink /D <Siebel Install Location>\ses\siebsrvr\kwd c:\automation\kwd
In UNIX, link the siebsrvr/upt & siebsrvr/kwd to the shared folder /somepath/automation/upt & /somepath/automation/kwd by using the following commands:
ln -s /somepath/automation/upt <Siebel Install Location>/ses/siebsrvr/automation/upt
ln -s /somepath/automation/kwd <Siebel Install Location>/ses/siebsrvr/automation/kwd
Using the Automation Toolbar
The test automation framework provides the ability to record a functional flow in Siebel using Automation Toolbar. The toolbar features buttons for each of the following actions:
Start Recording,
Pause/Resume Recording,
Stop Recording,
Generating the KWD Script.
Impact of Usage Pattern Tracking Enhancements in Siebel CRM 18.9 Update
If the usage pattern tracking enhancements in the Siebel CRM 18.9 Update are applied via Repository Upgrade, then please make note of the following:
Based on Unit Mode and Bulk Mode settings, the user may or may not see the Recorder button on the Application Tool bar.
If the 'Input Capture' Action is set to False to mask sensitive information, KWD scripts will be generated without any input values, causing them to fail on play back. Input values can be added in Test Script View.
For more details, refer to About Usage Pattern Tracking in Siebel Applications Administration Guide.
Recording the Functional Flow
The test automation framework provides the ability to record a functional flow in Siebel using Automation Toolbar. Ensure that the Siebel Application is in the AutoOn mode before recording a functional flow as specified in the following sample URL: https://<URL>:<port>/siebel/app/callcenter/enu?SWECmd=AutoOn.
To record a functional flow
Click the Camcorder on the toolbar to open the recording panel.
Click Start to record.
The Camcorder turns red when the recording is in progress.
When you click Pause, the script recording is paused. To resume recording, click Resume.
Click Stop to end the recording session. The recorded script is generated when you click the Generate button.
The Generate button will be in the enable mode after you click the Stop button.
Click Scripts on the Toolbar to open the scripts pane. This script pane contains the list of scripts generated.
Renaming the Scripts
After generating the scripts, you can rename the scripts in the script pane.
To rename the script
Open the Script Pane
Update the File name field of the script to rename it.
Save the record.
You can also choose to delete the scripts if that are not required.
To delete the script
Open the Script Pane
Select script o be deleted.
Click Delete.
Setting Up DISA
You must download and install the latest version of DISA before proceeding with the task of playing the recorded scripts. For more information on installing and configuring DISA, refer to Desktop Integration Siebel Agent Guide.
Plugin Configurations
After installing the Plugin for Siebel Automation with DISA , you must update the unitconfig.xml file. The unitconfig.xml file will be available in the following location:
<DISA Installation Location>\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\unitconfig.xml
Update the following XML tags under Mandatory_Params
XML Tag | Description |
---|---|
URL |
Fully qualified URL of the application should be run while playing the script. [AutoOn mode is not required here.] For example: the URLs will be similar to: http://xyzcjzg.us.oracle.com:14440/siebel/app/fins/enu This URL will be prepopulated (in the Popup) when you click the Play button. |
USERNAME |
User name to login to the application URL provided in the URL xml tag. |
APPLICATIONTYPE_BROWSER |
Different types of plaftforms and the supported browser versions for playing the Desktop_FireFox : Playback will be on Windows platform with Firefox browser are listed below. Desktop_Chrome : Playback will be on Windows platform with Chrome browser. Desktop_IE : Playback will be on Windows platform with IE browser. Mobile_Safari : Playback will be on MAC IOS simulator platform with mobile safari browser. You must enter the optional Parameters in the unitconfig.xml. Mobile_Chrome : Playback wil be on the Android device with chrome browser. You must enter the optional Parameters in the unitconfig.xml. Mobile_SM_IOS : Playback will be on MAC IOS simulator platform with siebel mobile client. You must enter the optional Parameters in the unitconfig.xml. Mobile_NativeBrowser: Playback will be on Android emulator with default native browser. You must enter the optional Parameters in the unitconfig.xml scripts. |
To play the functional flow in Mobile or Simulators
Download the java-client-4.1.1.jar (https://search.maven.org/#search|gav|1|g%3A%22io.appium%22%20AND%20a%3A%22java-client%22 download version 4.1.1) and copy it to <DISA Installation Location>\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Framework\lib folder.
Download the plink.exe and pscp.exe and copy it to <DISA Installation Location>\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Framework\exe folder.
Add the appropriate values for the OPTIONAL_PARAMS parameter in the unitconfig.xml file.
MOBILE-IP : IP address of Android device, simulator, emulator
MOBILE-OS :Android or iOS based upon browser.
MOBILE-PORT: 4444 (The port number specified here is for example purpose).
MAC-USERNAME : Mac Machine User Name
MAC-PASSWORD : Mac Machine Password
Browser Configuration Settings
The following browsers are supported for running recorded scripts: Firefox, Chrome, and Internet Explorer. It is recommended that you use the latest version of one of these browsers for which a compatible Web driver is available.
To run the recorded scripts in different types of browsers (Chrome, Firefox, or Internet Explorer), you must update the browser settings.
Chrome Browser
To run the recorded scripts using Chrome, download the chromedriver.exe file from https://sites.google.com/a/chromium.org/chromedriver/downloads
and copy it to the following location: <DISA Installation Location>\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Drivers
.
Internet Explorer
To run the recorded scripts in Internet Explorer (IE), download the IEdriverserver.exe and copy it to the following location: <DISA Installation Location>\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Drivers
. You must disable the Drag and Drop option, update the Compatibility View settings and Security Settings.
To disable the Drag and Drop option
Navigate to the Internet Options in IE 11.
Navigate to the Security tab.
Click Custom Level.
Navigate to Miscellaneous Section and Disable Allow dragging of content between domains into separate windows.
Disable Allow dragging of content between domains into the same window.
To update the Compatibility View Settings
Navigate to Compatibility View Settings option in IE 11.
Uncheck the Display intranet sites in compatibility View checkbox.
Uncheck the Use Microsoft compatibility lists checkbox.
Click Close.
To update the Security Settings
Navigate to the Internet Options in IE 11.
From the Tools Menu, click Internet Options.
Click Security Tab.
Choose Internet Zone and select Enable Protected Mode.
Choose Local Internet Zone and select Enable Protected Mode.
Choose Trusted Sites Zone and select Enable Protected Mode.
Choose the Restricted Sites Zone and select Enable Protected Mode.
Click OK after selecting Enable Protected Mode option for each of the zones.
Note: Copy the latest IE Driver "IEDriverServer" fromhttp://www.seleniumhq.org/download/
and place it in the<DISA Installation Location>\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Drivers
folder.
Firefox
Before playing the recorded scripts in the Firefox browser, you must add the Security Exception window in the Location field and add the following address: https://localhost:18443
.
Validating the Scripts
Script validation is done before you can start playing the scripts from the Scripts Pane. Script validation ensures that all the steps in the script file are syntactically correct and the required attributes of the keyword are recorded properly.
If there are any attributes missing in the script step, the validation fails and an error message is displayed along with validation log file name.
The Validation log file contains the list of errors. Each line in the validation log file has the following details.
Line Number. This is line number in a script file.
Missing attributes. Comma separated list of attributes which are missing in Action, Target object Input or End Action.
The Validation log file will be created in the following location:
<SIEBEL_INSTALLATION_PATH>\ses\siebsrvr\log
Playing the Scripts
The scripts that are generated after recording are available in the Scripts Pane. You must download and install DISA (Desktop Integration for Siebel Applications) on the client machine to play the scripts.
To play a recorded script from the Scripts Pane:
Click on the CamCorder icon on the toolbar, then the Scripts button.
The generated scripts are available in the Scripts Pane.
Select the script you want to play and click the Play button.
Note: You can play only one script at a time. The Play button will be disabled if you select multiple scripts simultaneously or if there is some issue with the DISA setup.The Play Status will be updated as Success or Fail based upon the play result.
Note: If a script is renamed while playing it, the play status will not be reflected.
The play process is initiated in a separate browser window and the results are displayed after the play process is completed. The same script can be played more than once instead of using the replay process.
To play a imported or modified script from the Release Screen
Navigate to Sitemap -> Release Screen -> Test Scripts.
Drill down to script.
The play button will be available in the Form Applet.
Select the script you want to play and click the Play Button
The play process is initiated in a separate browser window and the results are displayed after the play process is completed.
Enabling Automation for Developer Web Client
Automation is available only for Developer Web Clients. Automation is not supported in Mobile Web clients. While installing, you must select the developer web client option only if automation is needed.
After installing the Developer Web Client,Tomcat will be automatically deployed in the <webclient install location>\applicationcontainer. The CONTAINERURL for AutomationSubSys section gets updated with the HTTP port provided during the Developer Web Client installation.
Enable the system preference by navigating to Administration - Application screen, then the System Preference.
Name Value Enable UPT
TRUE
Enable UPT Context
TRUE
UPT Max Record Cache
100
Make the the following changes to the DWC's cfg files:
Updated the AutomationSubSys sections.
[AutomationSubSys]
CONTAINERURL = http://localhost:<Connector Port>/siebel/jbs
#Port number as seen in below section of C:\Siebel\Client\applicationcontainer\conf\server.xml <Connector port="9001" protocol="HTTP/1.1"
InfraUIFramework needs to be updated for Automation to be enabled as below:
[InfraUIFramework]
EnableAutomation=TRUE
Playing the script through Developer Web Client is supported. Use the Siebel Thin Client URL to play back the script.
Multiple users using the same User ID is not supported, since it brings in ambiguity during conversion.
A case where recording is started and is not stopped, the session is logged out. Stop Recording is injected and considered for conversion.
Sticky sessions are not supported.
A functional flow is considered for conversion only with the confines of Start and Stop Recording.
Single users spanned across sessions are supported.
Approach for generating the Script involving switching of users on Portal and consumer applications
Start the UPT-KWD recording of new user registration as an anonymous user. Proceed with the recording till a registration followed by login as a newly registered user and if there are any further scenarios for a newly registered user.
Note: At this point, since there is a user switch (due to new user login), a anonymous user UPT csv file will be generated in a <anonymous_username> folder under "<SiebelServerBuild>\ses\siebesrvr\UPT" older. Copy this anonymous UPT csv based on timestamp.Stop the UPT-KWD recording as a new user and log out of the application.
Note: Since the new user has logged out of the application, the new user UPT csv file will be generated in <NewUsername> folder under <SiebelServerBuild>\ses\siebesrvr\UPT" folder.Now paste the anonymous UPT csv copied in Step 1 into the SiebelServerBuild>\ses\siebesrvr\UPT\<NewUsername>" folder. The <NewUsername> folder will now have the 'anonymous user UPT csv' nd the 'new user UPT csv file'.
Log in to the Siebel application as a new user and generate the KWD Script. This script will have both steps involving anonymous user followed by the new user registration or login and further steps as applicable.
Exporting the Test Scripts
You can export the generated scripts into an xml file.
To export the test scripts
Navigate to Sitemap -> Release -> Test scripts view.
Query for the test script to be exported.
Click the Export button.
Importing the Test Scripts
Activating the Workflow for Importing Test Scripts
You can follow the procedure in this topic to activate the workflow for importing Test Scripts.
To activate the workflow for importing test scripts
Navigate to the Administration - Business Process screen, Workflow Deployment, and then the Active Workflow Processes view.
In the Repository Workflow Processes list, select the Testscript Import Workflow.
Click Activate.
To import the test scripts from Script Pane to Database
You can import the generated scripts into the database from the Script pane or from the Release Screen.
Click the Camcoder icon on the toolbar, then the script button.
Select the scripts to be imported from the Script pane.
You can choose to select a single script or multiple scripts to import them into the database.
Click Import.
A pop up message is displayed with the the number of scripts that were imported successfully and the scripts that were not imported successfully.
Note: The import process will fail when you try to import a script with the same name if it is already available in the database. The log details of a failed import process will be available in the Siebel Logs folder.
To export and import the test scripts from Release Screen
Navigate to Sitemap -> Release -> Test scripts view
Query for the test script to be exported.
Click the Export button.
The test script is downloaded in the download folder in the xml format. You can use this xml file to import a test script into the database.
Navigate to Sitemap -> Release -> Test script view.
Click the Import button on the Test script list applet.
Select the xml file to be imported from the file upload popup window.
Click Load.
The script will be imported into the database. If you have a script with the same name in the database, it will be replaced with the existing script. In this way the scripts can be exported and imported to different environments.
Post Import Options
You can perform the following tasks after importing the scripts from the Script Pane:
You may choose to add verification points to the existing scripts and use the play option to playback the edited script from the Sitemap-> Release-> Test Scripts View Screen.
You can export the script as an xml to import it to a different environment from the Sitemap-> Release -> Test Scripts View screen.
Associate test scripts to Test sets.