Cross Column

Showing posts with label Oracle Application Testing Suite. Show all posts
Showing posts with label Oracle Application Testing Suite. Show all posts

Friday, October 3, 2014

OATS: Tie All Processes Together — from OpenScript to Scenario

We have been blogging different topics on OATS since 2013.  In this article, we'll tie all processes together.

In [1], we have demonstrated how to create an open script for load testing using CRM FUSE (i.e. a Fusion application).  Assume you have done that, the next step will be testing by clicking on the  Playback button:


If the test succeeds, you should see Passed status in the Results.  Since we have hard coded user name (i.e., SALESREPUSER00001) in the Post Data step, the next step will be setting up databanks in OpenScript and then configuring scripts to use databanks.  See [2] for details.

But, before we do that,  I usually clean up steps a bit by removing steps that loaded cookies or images (i.e., png files).  In my experience, they were not useful.  Since we will migrate OpenScript file from Windows to Linux, the cookie recorded might be useless.  Also, we would like the whole zip file self-contained.  By removing image files, we don't need to worry about the dependency of script to the images (i.e., where to load them from).  Anyway, before you remove anything from the project.  Save the project and make a backup first.



After deleting steps involving either cookie or images, you need to playback steps to make sure everything still works OK.  You then proceed to iterate the test using multiple unique users.  To create databanks needed for the test, we have copied it from a previous project.  Noted there is a new folder named databanks in our new project folder (i.e., FUSE_Saleopty_oct01_wrk).



Inside the databanks folder, there are two files:
  • UserName.csv
  • UserName.csv.index3

You may delete the index file (i.e., UserName.csv.index3) because it will be re-generated by OpenScript later.  Inside UserName.csv, you will find the following entries:

UserName
SALESREPUSER00002
SALESREPUSER00003
SALESREPUSER00004
SALESREPUSER00005
SALESREPUSER00006


Then you follow [2] to substitute a variable for the hard coded user name (i.e., SALESREPUSER00001).  Make sure you have selected the correct csv file (i.e., the one under your new project folder).   Note that we have set up all users to share the same password in WebLogic Server. 

Now, we can test the script with multiple virtual users by clicking on "Iterate (Alt+I)" button:


Let's iterate the test for no more than 3 times:


After the testing, you then export a self-contained zip file (note that we have excluded some unnecessary data from the export):


Read [3] for more details on how to export and import scripts from Windows to Linux.  To import OpenScript into Oracle Load Testing (OLT which is run on Linux in our case), you start up OLT and select Tools > Import...


Note that when you migrate OpenScript zip file from Windows to Linux, copy it somewhere outside the $installDir/OFT folder. On the Import File dialog, open it and specify Default Repository as  your destination which is the OFT folder.


After import the OpenScript, you can find it from the Default folder (highlighted on the diagram).  If not, exit OLT and restart it.  Clicking on the script named FUSE_Saleopty_oct01_wrk, this will allow you start building a new scenario.  However, with the default setup, you can submit the scenario and start a test immediately:


Let the test run for a while and then click the same button to stop it.  Note that it will take a while before the test fully stops.  If you don't see any Failed transaction, it means your script is OK.  Then the next step is to configure parameters by selecting "Build Scenarios" tab.  This will bring you back to the window before you started the test.  For advanced editing, you can click on the "Configure all parameters" icon.  This allows you to edit scenario details.


For our tests, we have set the following:
  • # VUs: 200
  • VU Pacing (Think Time): Recorded/Random
    • Lower: 15 (percent)
    • Upper: 185 (percent)
which mean OLT will generate 200 virtual users using recorded delays, but with some variations (i.e., randomly ranged from 15% to 185% of the original delay time).  The next step is to "Set up Autopilot".  After clicking on the tab, this will allow you to control the timing and other advanced features:


In our tests, we only need to set up stop time (i.e., after 3 hours and 20 minutes).  Note that our benchmark utilizes this new scenario in a refworkload framework, which is composed of a few Linux shell scripts that drive the whole process.  For this reason, we didn't use other advanced features such as ServerStats or Scenario Profiles as shown above.

Finally, to save your new scenario, select Scenario > Save as.  Be warned that this writing is based on an old installation (i.e., OATS 12.3.0.1 Build 376) and might be a bit different from newer versions.[4]

References

  1. How to Create Load Testing Scripts Using OpenScript (Xml and More)
  2. How to Configure Scripts to use Databanks in OATS (Xml and More)
  3. OATS: How to Export and Import Scripts from Windows to Linux
  4. Oracle Application Testing Suite
  5. Auto-Correlating Session IDs in Oracle Application Test Suite (Xml and More)

Monday, July 7, 2014

OATS: How to Create a Scenario for Oracle Load Testing

This article is one of the Oracle Application Test Suite (OATS)[1] series published on Xml and More, which includes the following:
In this article, we will show how to create scenarios for Oracle Load Testing (OLT).


Oracle Load Testing


What is Oracle Load Testing?   Oracle Load Testing is a component of OATS, the centerpiece of the Oracle Enterprise Manager solution for comprehensive testing of Web applications.  It allows you to validate the performance and scalability of your Web applications. It can simulate hundreds of virtual users accessing the application simultaneously and measures the effect of the load on application performance.  Oracle Load Testing's virtual users can generate multithreaded browser requests while performing rigorous functional validation under load conditions.

Here is the typical workflow. For the sake of understanding, assume that script is created on machine A and OLT is on machine B.  In [2], we have shown how to export and import scripts to OLT.  Here we will show how to create scenarios using imported scripts for OLT.

Scenario


What is a scenarioScenario in OLT is an entity for configuring and simimulating virutal users.  Once you have defined a scenario and set the profile parameters, you submit the scenario to the Oracle Load Testing Autopilot. There are two ways to submit Scenarios to Autopilot:
  1. Submit without Starting the Scenario
    • This allows you to specify the start and stop times for running the scenario profiles.
  2. Submit and Start the Scenario
    • OLT automatically opens the Autopilot tab with the scenario loaded.
To submit a Scenario and start the scenario (i.e., 2nd approach), you can click on the "Submit and start test" button (see below).  Here we will focus only on the 1st approach.  After saving parameters to a scenario, later you can start it from a command line.




To add Profiles to a Scenario, you click the Scenario Detail button to display the Edit Scenario Details dialog box.


The most important parameters are shown at the top-level of Build Scenarios tab.  For example, we have configured 200 virtual users, selected "Recorded/Random" for Think Time, and chose "OLT Server" (default) to run the virtual users.  Since we have added "Random" modifier in the Think Time, we need to go down to the detail-level to specify the lower and upper limits (i.e., 15% to 185% of the original recorded time).



Set up Autopilot


As mentioned before, we are taking the 1st approach to save settings to a scenario and sumbit it to Autopilot for future running.  In this case, we need to set up the parameters of autopilot by selecting the "Set up Autopilot" tab.


Here you can specify how virtual users will be ramped up and when to start or stop the load test.  In our case, we didn't use OLT ServerStats and it was not set up here. 

ServerStats lets you monitor a variety of server-side application, database, system, and Web server statistics. You can configure OLT ServerStats to display real-time performance statistics for the various hosts and services available from the server, such as percentage of CPU usage, memory usage, Web server statistics, etc.

Running Scenarios from the Command Line


You can run and stop scenario files using the command line Java file OLTCommandLine.jar located in the /lib directory under the installation directory. Use the following command syntax to start a scenario:

cd ${OATS_HOME}/lib
OLTCommandLine.jar -run -session=sessionName 
  -scenarioFile=${OLT_SCENARIO_DIR}/scenarioFile.scn 
  -OLTServer=hostName:portnumber
  -user=username -password=password [-log=logfilename]

Use the following command syntax to stop a scenario:

cd ${OATS_HOME}/lib

OLTCommandLine.jar -stop -session=sessionName -OLTServer=hostName:portnumber 
-user=username -password=password

The following are the command parameters:
  • run
    • Executes the selected scenario until the stop command is issued or the stop conditions specified in the scenario are reached.
  • session
    • Specifies the name to use for the session. If you do not do not provide a session name, Oracle Load Testing generates a session name.
  • scenarioFile
    • The scenario file to load. Specify the full path and file name of the scenario file. Scenario files have a .scn extension.
  • stop
    • Shuts down the specified session.
    • The Stop command is not required if the specified Scenario being run has a Stop condition of some defined time or number of iterations saved in the Autopilot settings.
    • You can not use both "-Run" and "-Stop" in the same command.
  • session
    • Specify the session to be shut down. The session name is automatically generated when you run the scenario. You can get the session name from the console or the log file specified with the scenario run command line parameters.
  • OLTServer
    • Specify the Weblogic server name which hosts OLT. The port number is required.
  • user
    • Specify the admin user name of the Weblogic server. The default username is "oats".
  • password
    • Specify the admin user password of the Weblogic server.
  • log
    • (Optional) Redirects console output to logfilename.
    • Specify the path and file name to use for the log file.

References

  1. Oracle Application Testing Suite (OATS)
  2. OATS: How to Export and Import Scripts from Windows to Linux

Tuesday, November 12, 2013

How to Restart OATS Services

This article is one of the Oracle Application Test Suite (OATS)[1] series published on Xml and More, which includes the following:
In this article, we will show how to restart OATS services on the Linux system. The Linux system referenced here is Oracle Linux:[2]

$ cat /etc/*-release

Enterprise Linux Enterprise Linux Server release 5.8 (Carthage)
Oracle Linux Server release 5.8
Red Hat Enterprise Linux Server release 5.8 (Tikanga)

/sbin/service


Red Hat (i.e., RHEL 5) includes the service utility to help you manage your start up scripts and save you a lot of typing. This is handy when you're managing the already existing services (e.g., OATS services). /sbin/service is just a shell script (see Appendix) that comes as part of Red Hat's initscripts package.[4]


OATS Services


There are three OATS services running on Linux.[5] To restart them, you use the following commands:

# /sbin/service OracleATSAgent [start|stop]
# /sbin/service OracleATSServer [start|stop]
# /sbin/service OracleATSHelper [start|stop]

There is also a command option (i.e., "status") that allows you to check their current status:

#/sbin/service OracleATSHelper status
OATS Helper Service is running

Note that you need to be the superuser to run the above commands. Also, if you install OATS database on the same server, you need to start your DB first before you restart OATS services.

Appendix


cat /sbin/service
#!/bin/sh

. /etc/init.d/functions

VERSION="`basename $0` ver. 0.91"
USAGE="Usage: `basename $0` < option > | --status-all | \
[ service_name [ command | --full-restart ] ]"
SERVICE=
SERVICEDIR="/etc/init.d"
OPTIONS=

if [ $# -eq 0 ]; then
   echo "${USAGE}" >&2
   exit 1
fi

cd /
while [ $# -gt 0 ]; do
  case "${1}" in
    --help | -h | --h* )
       echo "${USAGE}" >&2
       exit 0
       ;;
    --version | -V )
       echo "${VERSION}" >&2
       exit 0
       ;;
    *)
       if [ -z "${SERVICE}" -a $# -eq 1 -a "${1}" = "--status-all" ]; then
          cd ${SERVICEDIR}
          for SERVICE in * ; do
            case "${SERVICE}" in
              functions | halt | killall | single| linuxconf| kudzu)
                  ;;
              *)
                if ! is_ignored_file "${SERVICE}" \
                    && [ -x "${SERVICEDIR}/${SERVICE}" ]; then
                  env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" status
                fi
                ;;
            esac
          done
          exit 0
       elif [ $# -eq 2 -a "${2}" = "--full-restart" ]; then
          SERVICE="${1}"
          if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
            env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" stop
            env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" start
            exit $?
          fi
       elif [ -z "${SERVICE}" ]; then
         SERVICE="${1}"
       else
         OPTIONS="${OPTIONS} ${1}"
       fi
       shift
       ;;
   esac
done

if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
   env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
else
   echo $"${SERVICE}: unrecognized service" >&2
   exit 1
fi

References

  1. Oracle Application Testing Suite
  2. Oracle Linux
    • Oracle Linux, formerly known as Oracle Enterprise Linux, is a Linux distribution based on Red Hat Enterprise Linux (RHEL), repackaged and freely distributed by Oracle, available under the GNU General Public License (GPL) since late 2006
  3. How To Install Services on Linux
  4. Understanding your (Red Hat Enterprise Linux) daemons
  5. OpenScript Functional Testing Introduction
    • Services installed by ATS Setup on Linux:
      • Oracle ATS Agent: Remote Agent Service used for Load testing
      • Oracle ATS Helper: OpenScript Helper Service.
      • Oracle ATS Server: Oracle Load Testing & Oracle Test Manager Console. (Weblogic server)
  6. OATS: Tie All Processes Together — from OpenScript to Scenario (Xml and More)

Thursday, November 7, 2013

ORA-01691: unable to extend lob segment

This article is one of the Oracle Application Test Suite (OATS)[1] series published on Xml and More, which includes the following:
Today, I have seen the following message:
ORA-1691: unable to extend lobsegment OLT.SYS_LOB0000079598C00002$ by 128 in tablespace USERS
from alert/log.xml, which was reported by the Oracle DB of OATS.[1]

In this article, we will show:
  1. How to investigate
  2. How to provide the solution

ORA-01691


If you see "ORA-01691" error, normally this means that the tablespace is full or that there is not an extent (aka chunk) available that fits the size needed.[2]

To investigate further, you can query the DB with the following SQL commands:[2]

SQL> set long 100000
SQL> select dbms_metadata.get_ddl('TABLESPACE','USERS') from dual;

DBMS_METADATA.GET_DDL('TABLESPACE','USERS')
--------------------------------------------------------------------------------

  CREATE TABLESPACE "USERS" DATAFILE
  '/scratch/aime1/app/oracle11.2.0.3.0/oradata/ps6stg7/users01.dbf' SIZE 5242880

  AUTOEXTEND ON NEXT 1310720 MAXSIZE 32767M
  LOGGING ONLINE PERMANENT BLOCKSIZE 8192
  EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT
NOCOMPRESS  SEGMENT SPACE MANAGEMENT AUTO
   ALTER DATABASE DATAFILE
  '/scratch/aime1/app/oracle11.2.0.3.0/oradata/ps6stg7/users01.dbf' RESIZE 34359
214080

When I checked the used% of tablespace USERS, it showed that it's almost 100% full. So, the error is due to the tablespace being full.

SQL>  select * from dba_tablespace_usage_metrics order by used_percent desc;

TABLESPACE_NAME                USED_SPACE TABLESPACE_SIZE USED_PERCENT
------------------------------ ---------- --------------- ------------
USERS                             4194128         4194302   99.9958515

The Solution


You can find out what schema (or user) uses tablespace USERS by issuing the following SQL command:

SQL> select owner, table_name,tablespace_name from dba_tables where tablespace_name='USERS';

From the output, we know tablespace USERS is shared by the following users:
In our environment, we have used OLT to run load tests. For OLT, typically it is the session data that is taking most of the space in the DB. As an immediate workaround, you can try removing sessions from OLT Controller UI. However, it may run very slowly because tablespace USERS has already run out of space. To facilitate the session-removing task from OLT Controller UI, I have added 100MB to the tablespace USERS by giving it a second datafile:

SQL> ALTER TABLESPACE users ADD DATAFILE '/scratch/aime1/app/oracle11.2.0.3.0/oradata/ps6stg7/users02.dbf' size 100m;

Tablespace altered.

By adding some space to the tablespace, it helped smooth out the task of session removing. Admittedly, it was still a slow process. But, the solution worked.

References

  1. Oracle Application Testing Suite
  2. ORA-01691: unable to extend lob segment (OTN)
  3. Administering Tablespaces
  4. SQL Purge command
  5. Folllow @OracleAskTom
  6. Oracle Load Testing Overview
  7. Oracle Test Manager Overview

Saturday, November 2, 2013

How to Create Load Testing Scripts Using OpenScript

This article is one of the Oracle Application Test Suite (OATS)[1] series published on Xml and More, which includes the following:

In this article, we will show:
  • How to create load testing scripts using OpenScript[2]

Introduction to OpenScript


Application Testing Suite (OATS) is comprised of several tightly integrated products.[1] The script designer —OpenScript—only runs on Windows, but all the runtime components are available for both Linux and Windows. OpenScript is a scripting platform for creating automated test scripts in Java.

You can use OpenScript to create scripts for different testings. For example, OATS supports
  • Functional Testing
  • Load Testing
In this article, we will show you how to create load testing scripts in OpenScript.

The Platform


Scripting platform is based upon the Eclipse open source development environment. Initial OpenScript product provides access to a limited set of the Eclipse development environment.

The workbench is the base layer of software and code that provide the foundation on which the OpenScript Modules and Application Programming Interfaces (APIs) operate. Each Workbench window contains one or more perspectives. OpenScript Workbench provides the following perspectives:
  • Tester perspective
  • Developer perspective
  • Reset perspective
Workspaces are created in Oracle OpenScript. Workspaces store project-related script files and Results Log files. You can use them to organize your various testing projects. Three levels of management are provided:
  • Scripts (lowest)
  • Folders
  • Repositories (highest)
You can download OATS from [3]. The version used in this demonstration is
Version: 12.3.0.1 Build 376

Cheat Sheet


Like every recording task, you need to rehearse and make sure all glitches are resolved before the final recording. If you have decided the click path, prepare a cheat sheet like below:

[1] Bring_up_FUSE_URL
[2] Login_SALESREPUSER00001_Welcome1
[3] Click_the_Opportunities_Card
[4] Select_Quarter_2_2013
[5] Drilldown_on_Pinnacle_Server
[6] Click_on_Sales_Account_Picker
[7] Search_for_CUSTOMER_101328336
[8] Click_Cancel
[9] Click_Add_Revenue_Item
[10] Select_Type_Item
[11] Click_Product_LOV_and_Search
[12] Search_for_Elite_Pro_DG_452
[13] Select_Product_and_click_Ok
[14] Click_Cancel
[15] Logout

The numbering of step is for human readers and can help the recording. Each row on the list corresponds to a click in your click path and will become the title of step group in OpenScript recording.

OpenScript Preferences


Before recording, there are some preferences you want to set. To set them, you click on View and then OpenScript Preferences. For example, we would like to control the grouping, naming and numbering of step groups by ourselves (see "Cheat Sheet"). So, set your "ADF Load" preferences as below:


Creating a New Project


In this demonstration, we will create an open script for load testing (File > New...). Our web application is CRM FUSE. So, we have selected "Oracle Fusion/ADF" wizard from the New Project (see above).
  • Oracle Fusion/ADF
    • This option lets you create a new script for load testing of Oracle Application Development Framework (ADF)-based applications and other applications that utilize HTTP and ADF protocols at the protocol level.

At the next step, you are asked to provide a Script Name. So, we set them as follows:
  • Create script as a Function Library (unchecked)
  • Script Name: FUSE_Saleopty_oct07_wrk
Finally click Finish to create a new script. The resulting script will contain the Initialize, Run, and Finish nodes. The Run node will contain recorded HTTP protocol navigations based upon the defined Step Group preferences and the navigations and ADF protocol for actions performed during recording. You can edit the script tree or Java code to customize the script.[4]

In the following sections, we will demonstrate how to create:
  • First step group
  • Remaining step groups

Creating First Step Group


Creating the first step group is a bit different from the rest. So, we describe it separately. Note that we have NOT clicked on the record button yet.

Before we click on the record button (i.e., red circle), create the first message group as shown below:
Open your notepad and copy the first row into the title field as shown below. Then click OK.

Note that we have chosen "No delay" for the first step. But, for other steps, we will specify "Delay 44 secs."

Start Recording


Now click the record button. Your chosen browser (for our demonstration, it's Firefox) will be brought up. Copy your URL:
http://www.mycompany.com:9006/customer/faces/CrmFusionHome
into the address field and hit Enter. This finishes the recording of the first step group.

Next repeat the following subtasks for the remaining groups until it finishes:
  1. Creating a new step group in OpenScript
    • Right select previous Step Group to bring up context menu and select New > Step Group
  2. Copying the next row of click path from Notepad
  3. Clicking next step in your Browser


Finally, don't forget to stop the recorder.

Exporting Script


If your runtime environment is Linux, you need to export script created in OpenScript as follows:
File > Export Script...

For example, a new zip file was created in our default repository:
D:\OracleATS\OFT\FUSE_Saleopty_oct07_wrk.zip
You can then copy it to your Linux box:
scp FUSE_Saleopty_Server1_wrk.zip aime1@mylinuxserver:/scratch/aime1/work

References

  1. Oracle Application Testing Suite
  2. OpenScript for Load Testing Script Troubleshooting (Tutorial)
    • Version: 12.3.0.1 Build 376 was used in this article.
    • This version requires Firefox 10.0 ESR (Windows download).
  3. Oracle Application Testing Suite Downloads
  4. Oracle Application Testing Suite 12.x: Oracle Load Testing Overview
  5. OATS: Tie All Processes Together — from OpenScript to Scenario (Xml and More)

Tuesday, October 8, 2013

How to Configure Scripts to use Databanks in OATS

This article is one of the Oracle Application Test Suite (OATS)[1] series on Xml and More, which began with the following articles:
In this article, we will show you:
  • How to set up databanks in OpenScript[4]
  • How to configure scripts to use databanks

Databanks


Databanks are used to hold input data that can be automatically fed into your Web application during Load Testing[5].  In this article, we have created a new script in OpenScript using ADF Load Test Module for the load testing of CRM FUSE (i.e., Fusion CRM with FUSE interface).
At the login step (i.e., step 2), we have used the following credentials:
  • SALESREPUSER00001 /Welcome1
during script recording in OpenScript.  To do load testing, we need to use different users to drive our Web application .  In the following, we will show you how to achieve that.

Substitute Variables


After clicking the Post Data node, list of parameters used in HTTP Post is displayed.  As you can see that the value of userid was recorded as SALESREPUSER00001.  So, we need to configure it to use a databank.
After clicking on Edit..., it brings up the Parameter message box.  Let's click on the second Substitute button next to the Value field.

This brings up Substitue Variable window.  Next we need to add new databank before we can use it for variable substitution.

Note that before we started OpenScript, we have copied an existing databank named UserName.csv in the the subfolder of our workspace (i.e., FUSE_Saleopty_oct07_wrk).  Therefore, you have seen it appearing in the right panel.  For our script, we have chosen to store our databank "Relative to current script".

If you open the databank, you can see different user names are stored in it.  Note that all users will use the same password in our case.

After adding new databank, the value of userid has been updated to:

Finishing variable substitution, a new node (i.e., GetNextDatabankRecord) was shown next to "Run" node.


You can click on the new node to edit it.  But, the default (i..e, Next Record) works for us.


After we have configured our script to use databank, we can test it using "Iterate" playback.


Clicking on the Iterate button, this allows you to specify how many iterations you want to test.  In the following example, we have set it to be three times.


Next Steps


After testing our script running OK in the OpenScript (which runs on Windows only), we proceed with the following steps:
  • Export script to a ZIP archive (i.e., FUSE_Saleopty_oct08_wrk.zip)
  • Copy the ZIP archive file to the Oracle Load Testing (OLT) server (which runs on Linux)
  • In OLT, we have imported the OpenScript ZIP to a scenario.
  • After setting up Autopilot, we have run load testings using the databank to feed CRM FUSE with different users.
A new article describing the above steps will be posted in the future given time permitted.

Monday, October 7, 2013

Removing "Compatibility setting is not supported" Warning before You Do OpenScript Recording

This article is one of the Oracle Application Test Suite (OATS)[1] series on Xml and More, which began with the following article:
In this article, we will show one of the warnings that you may want to remove before recording your scripts using OpenScript [3]in OATS[1]:

Compatibility Setting


You can use either Firefox or Internet Explorer to record scripts. In this example, we used IE8. The application we are recording with is Fusion CRM with FUSE interface.

After provided home page URL and logged in, we have seen the above warning. Don't know exactly how OATS records this Message box. But, this is not the regular step of the application task flows.[5] So, you should remove this issue before any recording.

The Solution


In IE8, you select:
  • Tools > Compatibility Setting

Then the following Compatibility View Settings will be shown:
To fix the compatibility warning, you just uncheck the following item:
  • Display intranet sites in Compatibility View

References

  1. Oracle Application Testing Suite (a comparable product to LoadRunner)
  2. Auto-Correlating Session IDs in Oracle Application Test Suite (OATS)
  3. OpenScript for Load Testing Script Troubleshooting (Tutorial)
  4. Turn off Compatibility View
  5. Oracle ADF Task Flow in a Nutshell (Xml and More)
  6. How to Configure Scripts to use Databanks in OATS (Xml and More)

Saturday, March 2, 2013

Managing OATS Services Manually

Similar to LoadRunner[1], OATS (Oracle Application Testing Suite)[2] provides solution enables you to define and manage your application testing process, validate application functionality, and ensure that your applications will perform under load.

At the time of installation, there are three OATS services
  • OracleATSAgent
  • OracleATSHelper
  • OracleATSServer
deployed in the /etc/rc[0-6].d hierarchy and configured to start in runlevels 3, 4, and 5 automatically. In this article, we will show how to manage them using the following Linux commands
  • chkconfig[3]
  • service[4]

Checking Current Status and Startup Information



To list the current status of services, you can do:

# /sbin/service --status-all | grep OATS
OATS Agent Manager is running
OATS Helper Service is running

To list the current startup information for services, you can do:

bash-3.2# /sbin/chkconfig --list | grep OracleATS
OracleATSAgent  0:off   1:off   2:off   3:on    4:on    5:on    6:off
OracleATSHelper 0:off   1:off   2:off   3:on    4:on    5:on    6:off
OracleATSServer 0:off   1:off   2:off   3:on    4:on    5:on    6:off

Managing OATS Services Manually


You use chkconfig to disable starting services at boot time. By default, OATS services are configured to start in runlevels 3, 4 and 5 automatically.

To disable OATS init scripts, do the following
# chkconfig --level 345 OracleATSHelper off
# chkconfig --level 345 OracleATSServer off
# chkconfig --level 345 OracleATSAgent off
After you disable all OATS services, you can confirm the results with:

bash-3.2# /sbin/chkconfig --list | grep OracleATS
OracleATSAgent  0:off   1:off   2:off   3:off   4:off   5:off   6:off
OracleATSHelper 0:off   1:off   2:off   3:off   4:off   5:off   6:off
OracleATSServer 0:off   1:off   2:off   3:off   4:off   5:off   6:off

Then you can manage them with "service [start|stop]" command manually:

bash-3.2# /sbin/service OracleATSAgent status
OATS Agent Manager is running

bash-3.2# /sbin/service OracleATSAgent stop
Shutting down oats-am:                                     [  OK  ]

bash-3.2# /sbin/service OracleATSAgent status
OATS Agent Manager is not running

bash-3.2# /sbin/service OracleATSAgent start
Starting oats-am:                                          [  OK  ]

bash-3.2# /sbin/service OracleATSServer start
Starting OracleATSServer:Server is starting in running mode...

bash-3.2# /sbin/service OracleATSHelper start
Starting oats-hs:                                          [  OK  ]

Final Words


Be warned that OATS support team recommends you to use the original way of service set up, not this manual way of starting or stopping services.