10Usage Pattern Tracking and Conversion to Keyword Scripts

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

  1. Navigate to the Administration - Application screen, then the System Preferences view.

  2. 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

  1. Navigate to the Administration - Server Configuration screen, then the Enterprises view.

  2. In the Enterprises Server applet, select the enterprise server you want to configure.

  3. 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"

Note: Any other UPT Events should be disabled or inactivated before using the feature. Please refer to the UPT documentation for Event Details.
Note: If 18.9 UPT enhancements are applied via Repository Upgrade, refer to Siebel Applications Administration Guide for UPT enhancements.

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

  1. 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.

  2. Create two subfolders for UPT and KWD.

    • mkdir c:\automation\upt

    • mkdir c:\automation\kwd

  3. 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

  4. 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:

  1. Start Recording,

  2. Pause/Resume Recording,

  3. Stop Recording,

  4. 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

      1. Click the Camcorder on the toolbar to open the recording panel.

      2. Click Start to record.

      3. The Camcorder turns red when the recording is in progress.

        When you click Pause, the script recording is paused. To resume recording, click Resume.

      4. 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.

      5. Click Scripts on the Toolbar to open the scripts pane. This script pane contains the list of scripts generated.

      Note: The buttons in the toolbar are enabled or disabled based on the actions that you perform during a recording session. For example, when you click Start, the Pause and Stop buttons are enabled. When you click "Pause" , the "Resume" and "Stop" buttons are enabled. When you click "Stop", the "Start" and "Generate" buttons are enabled.

      Renaming the Scripts

      After generating the scripts, you can rename the scripts in the script pane.

      Note: You can provide any name to the generated scripts.

      To rename the script

      1. Open the Script Pane

      2. Update the File name field of the script to rename it.

      3. Save the record.

      You can also choose to delete the scripts if that are not required.

      To delete the script

      1. Open the Script Pane

      2. Select script o be deleted.

      3. 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.

      Note: For more information, refer to Desktop Integration Siebel Agent Guide on Siebel Bookshelf.

        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 table lists the different types of browsers and the supported versions for running the recorded scripts.

          Browser Supported Version

          FireFox

          31.4 ESR

          Chrome

          59

          Internet Explorer (IE)

          IE 11

          To run the recorded scripts in different types of browsers (Chrome, FireFox and Internet Explorer), you must update the browser settings.

          Note: Ensure to disable the "Touch" mode / feature for the targeted browser before proceeding with the automation.

          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 <DISA Installation Location>\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Drivers location.

          Note: It is recommended to download the driver file after checking the browser version.

          Internet Explorer

          To run the recorded scripts in Internet Explorer (IE), download the IEdriverserver.exe and copy it to <DISA Installation Location>\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Drivers location. You must disable the Drag and Drop option, update the Compatibility View settings and Security Settings.

          To disable the Drag and Drop option

          1. Navigate to the Internet Options in IE 11.

          2. Navigate to the Security tab.

          3. Click Custom Level.

          4. Navigate to Miscellaneous Section and Disable Allow dragging of content between domains into separate windows.

          5. Disable Allow dragging of content between domains into the same window.

          To update the Compatibility View Settings

          1. Navigate to Compatibility View Settings option in IE 11.

          2. Uncheck the Display intranet sites in compatibility View checkbox.

          3. Uncheck the Use Microsoft compatibility lists checkbox.

          4. Click Close.

          To update the Security Settings

          1. Navigate to the Internet Options in IE 11.

          2. From the Tools Menu, click Internet Options.

          3. 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.

          4. Click OK after selecting Enable Protected Mode option for each of the zones.

            Note: Copy the latest IE Driver "IEDriverServer" from http://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

          Note: The port 18443 must be changed to the port number which you configured for disa.exe in the config.properties file.

            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:

            1. Click on the CamCorder icon on the toolbar, then the Scripts button.

              The generated scripts are available in the Scripts Pane.

            2. 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.
            3. 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.

            1. 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

            2. 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

            1. Navigate to Sitemap -> Release -> Test scripts view.

            2. Query for the test script to be exported.

            3. 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

            1. Navigate to the Administration - Business Process screen, Workflow Deployment, and then the Active Workflow Processes view.

            2. In the Repository Workflow Processes list, select the Testscript Import Workflow.

            3. 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.

            1. Click the Camcoder icon on the toolbar, then the script button.

            2. 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.

            3. 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

            1. Navigate to Sitemap -> Release -> Test scripts view

            2. Query for the test script to be exported.

            3. 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.

            4. Navigate to Sitemap -> Release -> Test script view.

            5. Click the Import button on the Test script list applet.

            6. Select the xml file to be imported from the file upload popup window.

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