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

No comments: