Cross Column

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

Wednesday, December 24, 2014

OATS: How to Fix Quarter-Crossing Issue for a Benchmark

In [1], we have described how to record a load testing script using OpenScript for CRM Fuse. In the click path, it includes one of the following step:
  • [4] Select_Quarter_3_2013
After setting up a benchmark, we tend to use it for a long time. Step 4 actually causes an issue which we call it "Quarter-Crossing" issue. What happens is that CRM Fuse is live and advance its list by adding current quarter to the list and removing the last entry from the list.

When that happens (i.e., at end of each fiscal quarter), our Oracle Load Testing (OLT) scenario will fail with validation error as:
ERROR [1] Iteration 1 failed at line (script.java:300). Failed in finding component with xpath=//AdfRichTable[@fullId='atkfr1:0:r22:1:r1:0:pt1:t1']//AdfRichCommandLink[@partialSubmit='true'], no matching pathSegment=/
Basically, ADF internal state[2] will change and the xpath used to retrieve the list item "Quarter 3, 2013" will fail.

In this article, we will discuss how to work around this if it happens.


Quarter Crossing Events


At the end of each quarter, we need to maintain our benchmark CRM Fuse because of the quarter-crossing event. As shown above, "Quarter 3, 2013" is the only list item with seeded data for CRM testing. In other words, "Pinnacle Server Sales per test0000001" will be shown only when "Quarter 3, 2013" is selected. However, at the end of each quarter, the position of it will be shifted down one place on the list. This will cause the validation step in OLT scenario to fail. In addition, "Quarter 3, 2013" eventually will be moved out of the list.

SQL Statements


Whenever scuh events happen, it means you need to recreate OLT scenario by following the steps described in [3]. In addition, you need to update Fusion table (i.e., moo_opty) with new effective date. So, here we show the SQL statements needed for that purpose.

$ORACLE_HOME/bin/sqlplus fusion/fusion

select effective_date from moo_opty where name like 'Pinnacle Server Sales Test%';

EFFECTIVE_DATE
--------------
03-JUN-13

As shown above, "Quarter 3, 2013" is associated with an EFFECTIVE_DATE of "03-JUN-13". On a future date, say, "Quarter 3, 2014", "Quarter 3, 2013" may be shifted out of the list and no longer available for selection. That's why you want to update the above moo_opty table in addition to recreate OLT scenario at each quarter-crossing event.

For demonstration, we have updated the above EFFECTIVE_DATE (of type DATE) column with a new value 01-JUN-14:

update moo_opty set effective_date = to_date('06/01/2014', 'MM/DD/YYYY') where name like 'Pinnacle Server Sales Test%';
commit;


1,000 rows updated.

After the above update, the seed data with "Pinnacle Server Sales per test0000001" will be associated to a new quarter (e.g., Quarter 2, 2014).  But, eventually you may need to update EFFECTIVE_DATE to a later date than 01-JUN-14 if time moves on further.

References

  1. How to Create Load Testing Scripts Using OpenScript
  2. Oracle Application Development Framework - Oracle ADF
  3. OATS: Tie All Processes Together — from OpenScript to Scenario

OATS: All Things about OLT Sessions

Oracle Load Testing(OLT)[1] is a component of Oracle Application Test Suite (OATS), which can simulate hundreds of virtual users accessing the application simultaneously and measures the effect of the load on application performance.

The results of load tests are grouped by sessions which are stored in Oracle database.  Oracle Load Testing then allows you to create customized post-run reports on the results of your load tests.



ORA-01654


After you've run many load tests, eventually you could run into:
ORA-01654: unable to extend index OLT.COUNTERRUN_IDX by 1024 in tablespace USERS
OLT comes with a Session Manager which allows you to manage session data in the database:
  • Edit
    • Displays the Edit Session dialog box for changing the name and description of the session.
  • Delete
    • Deletes the entire selected session data from the database.
  • Delete Virtual User Logs
    • Deletes only the VU log data for the selected sessions. 
The easiest solution to the ORA-01654 is to delete old session data as shown below:



On the other hand, if you are using Oracle EE[2,3] and have enough disk space, all you need to do is:
Use ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the tablespace indicated.

Note that if you are currently using XE, we would recommend you use a dedicated machine for database and use Oracle EE.

Attach to Session


Read [4] for how to set up autopilot.  After setting up the parameters of autopilot, you can run scenarios from the command line.[4]  Assuming you have done that, then you can monitor load test session by attaching to it in OLT.  This enables a tester to share real-time test results and to collaborate with team members during testing.

From menu Session, select Attach.... The current running session as below should be listed.



You can then select how you want to attach to the session:

Wednesday, July 2, 2014

OATS: How to Export and Import Scripts from Windows to Linux

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 scripts in OpenScript (running on Windows only) and use it in OLT[2] running on Linux.

Export Scripts


In [3], we have shown how to create load testing scripts using OpenScript.  However, our Oracle Load Testing (OLT) will be run from Linux systems. So, we need to export script, copy it to Linux, and import it to OLT.

To export the script, you select File tab and Export Scripts... 


All the exported files are essentially zip files and can be opened with any unzip tool.  For example, here is the script named FUSE_Saleopty_july_1_wrk.zip we have exported.  Within folder FUSE_Saleopty_july_1_wrk.All, there is a subfolder named databanks which hold input data that can be automatically fed into your Web application during Load Testing.[4] Besides folders, the script also holds other script assets.[6]



Import Scripts


After copying the load testing script to your Linux system, you can import it to OLT.  To import scripts, select Tools tab and Import... .

A file-upload wizard allows you to select the script (i.e., zip file) to OLT. Note that we have copied the script to our home directory. You should NOT copy it to the Default repository (i.e. /OFT) which will be the final destination of import.


When the script is imported into OLT (by default, the destination of import is the Default repository), it renames the file as FUSE_Saleopty_july01_wrk.openScriptZip.  It then unzips the imported script.



For example, a new folder named FUSE_Saleopty_july01_wrk.All was created in the Default repository:
  • ${OATS_HOME}/OFT
In the next OATS article, we will show how to create a scenario from the imported load testing script.

References

  1. Oracle Application Testing Suite (OATS)
  2. Oracle Load Testing (OLT)
  3. How to Create Load Testing Scripts Using OpenScript
  4. How to Configure Scripts to use Databanks in OATS 
  5. Oracle Application Testing Suite (OATS): Few Tips & Tricks
  6. Best approaches to script assets
    • Do not use Absolute Paths when referring to assets or saving assets. Oracle Load Testing does not support absolute paths.
    • OpenScript, Oracle Test Manager, Oracle Load Testing, and all command-line agents should all use the same shared repository names and paths.
    • Do not refer to an asset in another repository by a relative path.
  7. OATS: Tie All Processes Together — from OpenScript to Scenario (Xml and More)