Friday, August 28, 2009

How to Clean IE Cache with Watir?

we need some sanity test from performance perspective,basically need to get end-end performance result on daily build automatically:

1. end-end response time
2. each page size info
3. clean cache between each test round

so the first item is relative easy to achieve and more straight forward by Watir

for second item, after checking out http://www.newsqa.com/delete-cache-and-cookies-in-ruby/, it works well on Windows XP_SP3+IE6 browser (did not try any other platform)

for the third item, current Iuse "ie.html.length" to get page size, any other better idea? I did not dig this deeper right now.

Or i may consider install a HTTPWatch +Watir to do all the things, haha :)

Wednesday, August 26, 2009

A bonus get from QA who helps us test website Performance

I always borrow our QA team to help us validate performance on staging env when they do release testing as a bonus, here is an example email I sent to the group:

Hi, All QA friends,
Once you find slowness on your side(for example 60 seconds to login, …), please do so :

1. Can you reproduce it? Or just randomly replicate?
2. Username/password/account
3. Which server are you touching? (you need some sniffer tools to determine this if there is a cluster on back-end)
4. Time stamp you encounter the problem(PST time preferred/Beijing time zone is also OK)
5. What steps you are following? (replicate steps if have)

Of course we need to set up some monitoring/profiling tools behind or run ping -t IP to guarantee Network is OK during testing phase.

Monday, August 24, 2009

Performance test scope requirement collection table

I would like to provide a table which include a relative simple and high level categories of performance factors to PM/Arch/Dev leader/(Func)QA leader/ module owner for collecting comments or requirements in numbers/priority from Func team point of view.

Here is an example(Click to view big):



So it can help you to filter some work easily this way :) and then prioritize other remaining tasks/user stories.

Tuesday, August 11, 2009

How to Create Date offset in LR

just for my work, i have to create Date offset in LR myself, hopefully it is helpful for you as well, it is just a simple example, you can use yours:)

lr_save_datetime("%d", DATE_NOW, "Day1");
lr_save_datetime("%m", DATE_NOW, "Mon1");
lr_save_datetime("%Y", DATE_NOW, "Year1");

if ((atoi(lr_eval_string("{Day1}"))+atoi(lr_eval_string("{round1}")))<= 29)

{


lr_save_int(atoi(lr_eval_string("{Day1}"))+atoi(lr_eval_string("{round1}")), "param1");
lr_save_int(atoi(lr_eval_string("{Mon1}")), "param2");
lr_save_int(atoi(lr_eval_string("{Year1}")), "param3");

lr_output_message("parameter is %s-%s-%s", lr_eval_string("{param3}"),lr_eval_string("{param2}"),lr_eval_string("{param1}"));


}

else if ((atoi(lr_eval_string("{Day1}"))+atoi(lr_eval_string("{round1}")))> 29 && atoi(lr_eval_string("{Mon1}"))<12)

{

lr_save_int(atoi(lr_eval_string("{Day1}"))+atoi(lr_eval_string("{round1}"))-29, "param1");
lr_save_int(atoi(lr_eval_string("{Mon1}"))+1, "param2");
lr_save_int(atoi(lr_eval_string("{Year1}")), "param3");

lr_output_message("parameter is %s-%s-%s", lr_eval_string("{param3}"),lr_eval_string("{param2}"),lr_eval_string("{param1}"));

}


else if ((atoi(lr_eval_string("{Day1}"))+atoi(lr_eval_string("{round1}")))> 29 && atoi(lr_eval_string("{Mon1}"))==12)

{

lr_save_int(atoi(lr_eval_string("{Day1}"))+atoi(lr_eval_string("{round1}"))-29, "param1");
lr_save_int(01, "param2");
lr_save_int(atoi(lr_eval_string("{Year1}"))+1, "param3");

lr_output_message("parameter is %s-%s-%s", lr_eval_string("{param3}"),lr_eval_string("{param2}"),lr_eval_string("{param1}"));

}