Monday, March 23, 2009

Driver Script

Typically when doing simulation (irrespective of tools used) for performance testing, maintaining mix is very important. Usually performance performance testing can’t simulate 100% of production workload. Typically performance tester will choose few test cases and mix for simulation which can put system under test(SUT) to 80% of production workload. Letz take a banking example. Say for example xx bank wanted to test their new core banking application for performance.

We can’t simulate all test cases for testing performance. So choose the test case which user does it often. As a performance tester, I would choose the following test cases and mix as follows.
1. Login/Logout – 85%
a. View account balace - 80
b. Mini statement – 5
c. Detailed statement - 3
d. Fund Transfer - 10
e. Add payee - 2
2. Casual browsing without login -15%

Choosing wrong mix/test case might screw the entire engagement

In loadrunner, simulating the above test case is very easy using groups. In webload, the same can be simulated by using multiple agenda. I usually do that writing driver script which I am more comfortable with. Here is how skeleton driver script might look like.

function InitAgenda()
{
IncludeFile(“alltransactions.js”);
}
wlLocals.globalMix=getMix(); // Get Mix function has to return 1 for 85% and 2 for 15% of time when it is called.
switch(wlLocals.globalMix){
case 1:
wlLocals.innerMix=getMix1() //getMix1 function has to return 1 for 80%, 2 for 5%, 3 for 3%, 4 for 10%, 5 for 2 of time when it is called
Login();
switch(wlLocals.innerMix)
{
case 1: ViewAccountsStatement();
break;
case 2: MiniStatement();
break;
case 3: DetailedStatement();
break;
case 4: FundTransfer();
break;
case 5: AddPayee();
break;
default: ErrorMessage(“Invalid inner mix : “ + wlLocals.innerMix);
}
Logout();
  break;
case 2:
casualBrowsingTestcase();
break;
default:
ErrorMessage(“Invalid global mix” + wlLocals.globalMix);
}


In real testing, the driver script will be much more complex then above. Also getMix and getMix1 function has to be implemented properly and it has to tested carefully or else it will screw the entire test.

4 comments:

  1. Hey very nice blog!!
    Hi there,I enjoy reading through your article post, I wanted to write a little comment to support you and wish you a good

    continuationAll the best for all your blogging efforts.
    Appreciate the recommendation! Let me try it out.
    Keep working ,great job!


    http://www.sqlservermasters.com/

    ReplyDelete
  2. At Coepd - (Center of Excellence for Professional Development) Manual & Selenium testing training program is designed to give participants the skills & knowledge to gain a competitive advantage in starting/enhancing a career in software testing. We provide the attendee's software testing service which is required to ensure that tested applications meet all application requirements. Participants receive up-to-date training in multiple areas in Software Testing and a thorough understanding of real-world projects. Our collaborative ecosystem comprising of Partnerships with Software Companies enables real time software test life cycle experience.

    http://coepd.com/TestingTraining.html

    ReplyDelete
  3. This particular is usually apparently essential and moreover outstanding truth along with for sure fair-minded and moreover admittedly useful My business is looking to find in advance designed for this specific useful stuffs… hazard perception test practice

    ReplyDelete
  4. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. dkt test

    ReplyDelete