11Siebel Test Automation Execution

Setting Up the Jenkins Server

The Siebel Test Execution process is performed on the Jenkins server using the custom plugin designed for this process.

To install the Jenkins Server

  1. Navigate to Jenkins webpage.

  2. In the LTS release section, select the drop down next to the war name, then select Windows.

  3. The Jenkins zip file will be downloaded.

  4. Extract the Jenkins.msi file from the zip file.

  5. Double click the .msi file to launch the Jenkins installer and follow the instructions to complete the installation.

  6. Click Finish.

    Jenkins will be launched in your default browser.

  7. After completing the installation, copy the Administrator password from the path.

    c:\Users\intbuild\.jenkins\secrets\initialAdminPassword
  8. Click Skip Plugin Installations.

  9. Enter the field name and values as shown in the table below:

  10. Click Save and Finish.

    The Jenkins setup is ready.

  11. Click Start to use Jenkins.

    The following welcome message is displayed - “Welcome to Jenkins!” Your Jenkins server is up and running.

Once the Jenkins setup is done, the Jenkins application will be launched by default on port 8080. However, if some other application is already running on this port, then you must change the port number in the jenkins.xml file.

For example, if the installed location of Jenkins is : C:\Program Files (x86)\Jenkins\ then change the port number to 8090 (it could be any port number) in the xml file and restart the Jenkins server.

You can start or stop the Jenkins server is using the Windows service running by name 'Jenkins'

Setting Up and Configuring the Siebel Test Execution Plugin

The Jenkins custom plug-in allows the user to interact with Siebel Master Server. Follow the procedure below to setup and configure the Siebel Test Execution plugin.

Prerequisites:

  • Before installing the Siebel Test Execution (STE) plugin, you must set up the proxy server configuration. The STE.hpi plugin is available in the following location SIEBEL_SERVER_ROOT/plugins

  • You must install the Node and Label Parameter Plugin from Manage Jenkins -> Manage Plugins -> Available tab.

To set up the proxy server configuration

  1. Navigate to Manage Jenkins -> Manage Plugins, then select Advanced tab and add the following proxy server settings.

    Note: You can check with your IT administrator for the proxy settings.

    HTTP Proxy Configuration

    Server

    www.<your company proxy server>.com

    Port Number

    <NN>

To install the custom plugin

  1. From the Upload Plugin pane, navigate to the plugin location, select the STE plugin and click Upload.

    The status of the STE plugin installation is displayed in the screen.

  2. Click Installed to check if the STE plugin has been installed successfully.

Setting up the Jenkins Secondary Nodes

Before setting up the Jenkins secondary nodes, you must configure the Master or primary server.

To configure the Master or primary server

  1. In the Jenkins home page, click Manage Jenkins, and select Manage Nodes.

  2. Click Master Node, click Configure, and then set the fields shown in the following table.

    Field Name Value

    Labels

    Master

    Usage

    It is recommended to use this node to the maximum extent.

  3. Navigate to Jenkins, click Manage Jenkins, and select Configure Global Security.

  4. Check the Enable Security option in the Configure Global Security applet and set TCP Port for JNLP Agents to Random.

To append the secondary node machines

  1. Navigate to Manage Jenkins, Manage Nodes, and select New Node from the Jenkins home page.

  2. Enter the Node name [machine_name.domainname.com] and check the Permanent Agent option.

  3. Click OK and then set the fields shown in the following table.

    Field Name Value

    Name

    machine_name.domainname.com

    Description

    N/A

    Remote Root Directory

    C:\jenkins-slave

    Labels

    STEDemo

    Usage

    It is recommended to utilize this node to the maximum extent.

    Launch Method

    Launch the secondary node agents via Java Web Start.

    Availability

    Keep this secondary node online.

  4. Click Save.

  5. Copy the Slave.jar file to any folder in the client machine.

  6. From the destination folder, run the following command from the command line.

    java -jar slave.jar -jnlpUrl 
    http://machinename_domainname:NN/computer/machinename_domainname/slave-agent.jnlp-secret <hexadecimal key for the node>

Configuring the Siebel Test Execution Job

You can configure the Siebel Test Execution job from the Configuration Screen.

To create a job to be executed on single machine, you must select the Freestyle project and create one job.

You can configure the Siebel Test Execution job from the Configuration Screen.

Select the following check box: "Restrict where this project can be run and provide the label expression similar to the one that was defined while configuring the secondary node machine, e.g. STEDemo"

To configure the STE Job

  1. Navigate to Build, then Add build Setup.

    Note: The Siebel Test Execution option will be automatically displayed if the custom plugin provided by Siebel is already installed.
  2. Select the Siebel Test Executor from the dropdown list.

    The Build Test Execution screen is displayed with the fields listed in the following table.

    Field Name Value

    DISA Location

    c:\DISA

    Siebel Server URL

    http://xyzmlb.domainname.com/1660/Siebel/

    User Id

    SADMIN

    Password

    *******.

    When you install the STE custom plugin, the command field value is populated by default (java -jar %DISA_DIR%\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Framework\KWDPresetup.jar)

  3. Click the help text shown against each field. Enter the details for all the fields.

Note: Enter https://xyx.udomainname.com:16660/siebel as the field value for the Siebel Server URL.

Configuring Multiple Jobs

To execute a job on multiple nodes (client machines), you must create two Jenkins jobs - one with the Freestyle Project and the other one with the MultiJob Project.

To create a MultiJob project, you must install the MultiJob plugin which is available by default in the Jenkins repository. The Siebel Test Execution job will be executed from the Siebel Test Executor Job.

You can define Master in the label expression to restrict the job to run on the Master with same configurations specified above.

In a MultiJob operation, you need to add a build step and name it MultiJob Phase.

Update the following settings:

  • Phase Name : Enter the <Phase Name>.

  • Phase Job : Enter the <Name of the Siebel Test Execution Job created above>.

  • Advanced Button :

    • Kill the phase on : Select the Never option.

    • Uncheck all the selected check box options.

    • From the Add Parameters dropdown list, select NodeLabel Parameter and Predefined Parameters options.

    • Provide the same Name and Node as the label names defined for the secondary machines.

    • In Predefined Parameters, set the value as follows: DISA_DIR=C:\\DISA.

  • Job Execution Type : Select Running phase jobs in parallel.

  • Continuation condition to next phase : Select Always.

Executing the Siebel Test Jobs

You can execute a single job or run mutilple jobs simultaneously.

  • To execute a single job, with a (Siebel RUN-ID), you must select the STE Job Freestyle project.

  • To execute mutilple jobs with (Siebel-RUN-IDs), you must select the the STEJobExecutor Multijob Project.

    This will internally execute the STEJOB on various nodes including the client machines simultaneously.

Executing the Automation Batch Run

This topic describes the steps involved in executing the automation batch run. You can proceed with this task after adding the recorded scripts to the test sets and creating a Master Suite with the test scripts.

To execute the batch run

  1. Navigate to Sitemap, Release screen, then the Test Execution view.

  2. Click New (or the plus (+) icon) on the Form applet.

    The Test Run # field value is auto populated and the default value for the Status field is Hold.

  3. Select the Master Suite using the Master Suite Id field and select the Application Version.

  4. Save the record.

  5. Check if the values for the Server Credentials and User List are populated.

  6. Select Windows as the Client Operating system (if this is a normal desktop run).

  7. Enter the Client IP address if you have chosen the operating system as iOS.

    1. If the Operating System (OS) is iOS, enter the value for the Client IP Address, MAC Machine Username, MAC Machine Password and Mobile Port fields.

    2. Before running the scripts on a Mobile platform, ensure that the plink.exe and psexec.exe files are available in the following location: "..\DISA\DesktopIntSiebelAgent\plugins\SiebelTestAutomation\Framework\exe".

    3. After running the scripts, the results will be displayed in the Firefox browser. The recommended version of Firefox browser is the latest version for which a compatible Web driver is available.

  8. Update the Application Type, OS and URL in the Server Credentials applet.

  9. Update the password in the User List applet.

  10. Review the record.

  11. Click Schedule Run.

    After you click the Scheduled Run button, the record status will change to Requested and the following files will be available in the Attachments applet:

    • batchconfig.xml

    • MasterSuite.csv

    • Resources.zip (if the Resources.zip is available in the Master Suite Attachments applet).

    Once the scheduled run is completed, the Siebel Test Execution records are updated with the appropriate status and the resulting xml files are added as attachments.

Note: You can use the Master Suite and Test Scripts available in the sample database for a batch run. For more information about the scripts available in the sample database and the actions performed by the scripts in the sample database, see Sample Database Test Scripts.

You can now proceed with the task of updating the other fields.

  • Client Operating System: Windows (if it is a desktop run).

  • Client Operating System: iOS (if it a mobile iOS run).

  • Client Operating System: Android (if it is a mobile Android run).

  • If the Master Suite contains Invokeperl and Serverconfig as keywords, then the Perl Path is mandatory (for example: c:\\perl\\bil\\perl.exe).

  • If the Master Suite contains the Toolsconfig keyword, then update the following fields:

    Field Description Sample Value

    Siebel Tools Machine

    Machine Name

    slcxxxxxx.domain.com

    Siebel Tools Path

    Tools install folder path

    C:\Siebel\Tools

    Siebel Tools Machine Username

    Login id for machine

    Domain/User1 or just user name

    Siebel Tools Machine Password

    Password for machine

    <xyzabc>

    Siebel Tools DSN

    DSN name

    SiebelDSN

    Siebel Tools User

    Tools user id

    sadmin

    Siebel Tools Password

    Tools password

    <xyz>

  • If the Master Suite contains the Inboundwebservicecall keyword, then update the following fields:

    Field Description Sample Value

    EAI Machine Name

    Machine Name

    slcxxxxxx.domain.com

    EAI Port Number

    HTTPS Port Number

    16661

    EAI Server User

    EAI user name

    user123

    EAI Server Password

    Password for EAI user

    <abcxyz>

  • If the Master Suite contains the ServerConfig keyword, then you must update the following fields in the Server Credentials applet.

    Field Description Sample Value

    Server Home Path

    Siebel Server install folder path.

    C:\Siebel\

    Siebel Server Machine

    Siebel Server machine name.

    slcxxxxxx.domain.com

    Siebel Server User

    Server machine user name.

    user123

    Siebel Server Password

    Password for Server machine user.

    <abcxyz>

    Siebel Gateway Machine

    Siebel Gateway machine name.

    slcxxxxxx.domain.com

    TLS Port

    TLS port number.

    443

    AI Server Port

    HTTPS port number

    16661

Note: If you receive the error message, HTTP Status 405: Method not allowed, this could be due to a required Business Service not having the required access permission in Siebel. To resolve this issue, navigate to the Administration Application screen, then the Business Service Access view, create a record selecting Automation Rest Service, provide the access permissions, and then restart the Siebel Server.

Automated Rerun of Test Scripts

After a batch run has finished and it is found that some of the test scripts failed due to test environment issues, then it may be useful to rerun only the failed scripts, the predecessor scripts they depend on (Skip-on-prior-abort in Test Sets), and the non-executed scripts.

After such a rerun, all the test results from prior runs are consolidated with the rerun results. You use the Rerun button in the Test Execution view to perform reruns.

To rerun test scripts

  1. From the Site Map, navigate to the Release screen, then the Test Execution view.

  2. Select a Test Execution record, with a Status of Completed, that you want rerun.

    Note that when a batch run is completed, the Test Execution record is updated as follows:

    • A Reports zip and XML file are autmatically created and uploaded Attachments applet of the Test Execution record.

    • The Status of the Test Execution record automatically changes to Completed.

    • The Rerun button in the UI is enabled.

  3. Click Rerun in the Test Execution view.

    • The Status of the selected Test Execution record changes to Requested.

    • When a Siebel Test Execution job is invoked on the Jenkins server, the Test Execution record with Status of Requested is picked up and run on an available DISA client.

  4. After the rerun completes:

    • The rerun results are consolidated with that of prior runs, and the overall consolidated test results are uploaded to the Test Execution record.

    • The Status of the Test Execution record changes to Completed.

    • The Runs Completed field in the Test Execution record increments by 1. For example, the value in the Runs Completed field would be 2 after the first rerun completes.

    • An XML file (with a <Runs Completed> suffix) containing a summary of the results is attached to the Attachments applet of the Test Execution record. For example:

      <Test Run ID>_<Mastersuite Name>_MasterSuite_2<Runs completed>.xml
      

      You must select this attachment record to Create Test Passes - for more information, see Creating Test Results.

Creating Test Results

After the batch run finishes for a Master suite, the results will be updated as an Attachment for each Test Run Id in the Release Screen, Test Execution view.

The Attachment name will begin with the Test Run number (#) mentioned in the parent list applet. Once this file is available, you can select the attachment record and click Create Test Passes to create the test results in Siebel.

The prerequisites for Create Test Passes to be successful are as follows:

  • The LOV value Completed must be available for the Status field in the Test Pass view.

  • Test Sets must be associated with Test Plans.

If these conditions are not present, then Create Test Passes will not be successful (and will fail). Also, note the following:

  • If reruns are done, an XML file will be available in the Attachments applet for each rerun with a suffix indicating the number of runs. For example: 88-1WCI9B_MS1_MasterSuite_2.xml.

  • The naming convention for XML files is:

    <Test Run ID>_<Mastersuite Name>_MasterSuite_<nth Runs>.xml
  • Select the appropriate XML file before clicking Create Test Passes.

The following procedure shows how to Create Test Passes.

To Create Test Passes

  1. From the Site Map, navigate to the Release screen, then the Test Execution view.

  2. Select a Test Execution record, with a Status of Completed.

  3. Go to the Attachments applet and select the appropriate XML file for which you want to create test passes.

  4. Click the Create Test Passes button to create the test results in Siebel.

    After the test results are successfully created, the following message appears:

    Test Pass Created Successfully. You can query in the Test Pass view starting with <Test Run #>.

    Test Pass records are created with the prefix Test Run #.

  5. In the Test Pass view, query for the Test Run # in the Test Pass # field, then drill down on each Test Pass record to view the test results for the respective test run.

Viewing Test Results

After the Test pass is created successfully, you can view the test results. The following procedure shows how to view the test results.

To view the test results

  1. Navigate to the Release screen, then the Test Pass view.

  2. Query for a Test Run # in the Test Pass # field to get the results for that particular test run.

    The results that appear show the number of test cases that passed, failed, were aborted, or not executed.

    Note: For data driven test script results, the Iteration number indicates the corresponding Sequence number of the Data Set row. The default value is 1 for all other test script results.