Gzip level does impact our performance, because itself is a conflicting stuff—-consuming CPU% to reduce the file size in order to reduce the long duration network time.
so we need take these three things into consideration:
1.Network speed
2.Apache http Server capacity,especially CPU
3.File Compression ratio(.js, .Css, .html,.xml)
I did a quick testing charts based on different Gzip level and high speed Network:
Chart1—response time under different Gzip level
Gzip level | response time | Apache CPU%
Level 9 | 0.85s | 98%
Level 7 | 0.60s | 97%
Level 6 | 0.53s | 96%
Level 5 | 0.45s | 95%
Level 3 | 0.42s | 93%
Level 2 | 0.40s | 93%
Level 1 | 0.38s | 93%
Chart2—X.js Compression ratio under different Gzip level
orginal size of X.js=140K
Gzip level | After compression size
Level 9 | 30.1K
Level 7 | 30.1K
Level 6 | 30.3K
level 5 | 31.2K
Level 4 | 33K
I choose:
DeflateCompressionLevel 6
so from testing result, we can see level 9 is not always right :) just for your reference, make your own Gzip level.
Tuesday, February 24, 2009
Friday, February 20, 2009
Apache Http server Cache
I did some investigation on our web server after looking at the Content Caching mechanism.
there are several thing to confirm:
1. using Gzip or not?
2. What kind of files should we cache?
3. Which Cache method should i choose?
4. What kind of configurations to each Cache method?
Testing preparation: prepare one simple web page and Jmeter as load generating tool
Disk cache config:
IfModule mod_cache.c
IfModule mod_disk_cache.c
CacheRoot c:/cacheroot
CacheEnable disk /
CacheDirLevels 3
CacheDirLength 2
/IfModule
/IfModule
Mem cache config:
IfModule mod_cache.c
IfModule mod_disk_cache.c
CacheDefaultExpire 86400
CacheEnable mem /
MCacheSize 100000
MCacheMaxObjectCount 10000
MCacheMinObjectSize 100
MCacheMaxObjectSize 6400000
MCacheRemovalAlgorithm LRU
/IfModule
/IfModule
we just want to cache some static files on web server, like .js,.css and some images, which are not modified often.
First, we confirm to use Gzip to improve our web site performance(even if there is some bugs on it). If only apply Cache on Apache http server, the response time is not good if you have a few large static file to load...
Disable Gzip:
1> with Mod_mem_cache: 4160ms in average response time
2> with Mod_disk_cache: 4185ms in average response time
Enable Gzip without any Apache cache:
3> 2885ms in average response time, however, the CPU% is almost 90% with highest Gzip level(Level 9)
Note: To enable Gzip, add Accept-Encoding: gzip,deflate into JMeter header manager;
So I intent to use both Apache cache and Gzip to see any great improvement on response time and CPU% on web server.
But,finding that we using Mod_mem_cache, while Gzip can not be effected... do not know why
For Mod_disk_cache, it can be living with Gzip, and more important, it will reduce CPU% of apache server! that is great!
So, it might do a pre-Gzip job first, then cache it into the cache root directive, here is the result data for your reference:
Enable Gzip:
1> with Mod_disk_cache: 2793ms in average response time
CPU%=15%
if you want to see if Mod_disk_cache works or not, one way is to look at the cache root directive folder, if there is some strange files created after or during testing, then it works!
for Mod_disk_cache configration: you have to adjust these two interesting items:
CacheDirLevels
CacheDirLength
because different combination can give different numbers, more info please see http://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html
one reminder, htcacheclean is used to keep the size of mod_disk_cache's storage within a certain limit.
you can use cmd command line to run it as a daemon mode:
C:/AppServ/Apache2.2/bin/htcacheclean -t -i -d30 -pD:/cacheroot -l1M
or
create a .bat then add a schedule task:
C:/AppServ/Apache2.2/bin/htcacheclean -t -n -v -pD:/cacheroot -l1M
In one word: we want to enable mod_disk_cache+Gzip on apache http server, currently :)
there are several thing to confirm:
1. using Gzip or not?
2. What kind of files should we cache?
3. Which Cache method should i choose?
4. What kind of configurations to each Cache method?
Testing preparation: prepare one simple web page and Jmeter as load generating tool
Disk cache config:
IfModule mod_cache.c
IfModule mod_disk_cache.c
CacheRoot c:/cacheroot
CacheEnable disk /
CacheDirLevels 3
CacheDirLength 2
/IfModule
/IfModule
Mem cache config:
IfModule mod_cache.c
IfModule mod_disk_cache.c
CacheDefaultExpire 86400
CacheEnable mem /
MCacheSize 100000
MCacheMaxObjectCount 10000
MCacheMinObjectSize 100
MCacheMaxObjectSize 6400000
MCacheRemovalAlgorithm LRU
/IfModule
/IfModule
we just want to cache some static files on web server, like .js,.css and some images, which are not modified often.
First, we confirm to use Gzip to improve our web site performance(even if there is some bugs on it). If only apply Cache on Apache http server, the response time is not good if you have a few large static file to load...
Disable Gzip:
1> with Mod_mem_cache: 4160ms in average response time
2> with Mod_disk_cache: 4185ms in average response time
Enable Gzip without any Apache cache:
3> 2885ms in average response time, however, the CPU% is almost 90% with highest Gzip level(Level 9)
Note: To enable Gzip, add Accept-Encoding: gzip,deflate into JMeter header manager;
So I intent to use both Apache cache and Gzip to see any great improvement on response time and CPU% on web server.
But,finding that we using Mod_mem_cache, while Gzip can not be effected... do not know why
For Mod_disk_cache, it can be living with Gzip, and more important, it will reduce CPU% of apache server! that is great!
So, it might do a pre-Gzip job first, then cache it into the cache root directive, here is the result data for your reference:
Enable Gzip:
1> with Mod_disk_cache: 2793ms in average response time
CPU%=15%
if you want to see if Mod_disk_cache works or not, one way is to look at the cache root directive folder, if there is some strange files created after or during testing, then it works!
for Mod_disk_cache configration: you have to adjust these two interesting items:
CacheDirLevels
CacheDirLength
because different combination can give different numbers, more info please see http://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html
one reminder, htcacheclean is used to keep the size of mod_disk_cache's storage within a certain limit.
you can use cmd command line to run it as a daemon mode:
C:/AppServ/Apache2.2/bin/htcacheclean -t -i -d30 -pD:/cacheroot -l1M
or
create a .bat then add a schedule task:
C:/AppServ/Apache2.2/bin/htcacheclean -t -n -v -pD:/cacheroot -l1M
In one word: we want to enable mod_disk_cache+Gzip on apache http server, currently :)
Wednesday, February 18, 2009
Content check for Web_service_call's response XML in Loadrunner
You never know what you gonna get if you do not have a content check for your response data.
If only it is a non-manual test---automation test, UI based performance test or web service call performance test and something else, you need to do validation for each response data!
A simple example for your reference, hope you can have a better solution to check the response data:
Note: in following web_service_call request, i have changed "<" into "{" and ">" into "}" due to some display issue by this blog:
web_service_call( "StepName=get****ByID_101",
"SOAPMethod=******",
"ResponseParam=response_1",
"Service=VendorServiceService",
"Snapshot=t1234933987.inf",
BEGIN_ARGUMENTS,
"xml:arg0="
"{arg0}"
"{externalID}2{/externalID}"
"{uniqueID}{/uniqueID}"
"{/arg0}",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
find_cnt =lr_xml_find("XML={response_1}",
"Query=//meetingRoomSetups[2]/name",
"Value=banquet",
"IgnoreCase=Yes",
"NotFound=error",
LAST);
if (find_cnt ==0) {
lr_out_message(...);
lr_exit(...);
}
So you can simply use lr_xml_find()to check the critical or unique value in the response XML,just like web_reg_find() to do content check for Web requests.
of Course you can use Checkpoint for content check, it is easy to fill in the expect result in Checkpoint tab from tree view in Vugen
If only it is a non-manual test---automation test, UI based performance test or web service call performance test and something else, you need to do validation for each response data!
A simple example for your reference, hope you can have a better solution to check the response data:
Note: in following web_service_call request, i have changed "<" into "{" and ">" into "}" due to some display issue by this blog:
web_service_call( "StepName=get****ByID_101",
"SOAPMethod=******",
"ResponseParam=response_1",
"Service=VendorServiceService",
"Snapshot=t1234933987.inf",
BEGIN_ARGUMENTS,
"xml:arg0="
"{arg0}"
"{externalID}2{/externalID}"
"{uniqueID}{/uniqueID}"
"{/arg0}",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
find_cnt =lr_xml_find("XML={response_1}",
"Query=//meetingRoomSetups[2]/name",
"Value=banquet",
"IgnoreCase=Yes",
"NotFound=error",
LAST);
if (find_cnt ==0) {
lr_out_message(...);
lr_exit(...);
}
So you can simply use lr_xml_find()to check the critical or unique value in the response XML,just like web_reg_find() to do content check for Web requests.
of Course you can use Checkpoint for content check, it is easy to fill in the expect result in Checkpoint tab from tree view in Vugen
Monday, February 16, 2009
假如分开了,还会回来吗?
37岁的奥尼尔,在精彩的poping和霸气十足的扣篮中赢得了所有人的尊重。
这种“表演”才是全明星赛的真谛,尽情的享受篮球带给自己和球迷的快乐,大姚需要尽快的适应,腼腆不会给你带来加分和任何乐趣。。。
过去的事就随风去吧,不必总是活在自己的记忆里,科比和奥尼尔不约而同对记者提出“还会不会在一起共同比赛”的问题谁了声“No!”
分开就是分开了,大家都还有自己的一片天,把记忆永久的封存在最美好的一刻吧,合适的时候回忆起来,总会那么美好,大家还是好朋友好兄弟,分开的日子更融洽!:)
“如果有一天你决定离开了,你还会回来吗?”
这种“表演”才是全明星赛的真谛,尽情的享受篮球带给自己和球迷的快乐,大姚需要尽快的适应,腼腆不会给你带来加分和任何乐趣。。。
过去的事就随风去吧,不必总是活在自己的记忆里,科比和奥尼尔不约而同对记者提出“还会不会在一起共同比赛”的问题谁了声“No!”
分开就是分开了,大家都还有自己的一片天,把记忆永久的封存在最美好的一刻吧,合适的时候回忆起来,总会那么美好,大家还是好朋友好兄弟,分开的日子更融洽!:)
“如果有一天你决定离开了,你还会回来吗?”
Thursday, February 12, 2009
Get JMS_messaging table trend by easy SQL
I have not find a very powerful tool (and free) to monitor the JMS_messaging table status, so i intend to write some easy SQL to monitoring the trend of it. Anyway it is just a temp solution to solve my job...
Basically the SQL is to Get the JMS_messaging table destination contents by a fixing time(like every 30 seconds or something) and meanwhile i want to get the trend of JMS_messaging table to see how many DLQs in the table before,during and after my load test.
declare @i int
declare @nowtime datetime
set @i=0
while @i<20
begin
set @nowtime=getdate()
SELECT destination, count(destination)
FROM JMS_MESSAGES
group by destination
set @i=@i+1
print @i
print convert(varchar(max), @nowtime, 121)
waitfor delay '00:00:30'
end;
so i will start this SQL just before i start my tests, then start the load test, after load test then check the results and messages in SQL server 2005.
you can adjust the loop counts(@i) and time delay value according to your load tests duration.
Basically the SQL is to Get the JMS_messaging table destination contents by a fixing time(like every 30 seconds or something) and meanwhile i want to get the trend of JMS_messaging table to see how many DLQs in the table before,during and after my load test.
declare @i int
declare @nowtime datetime
set @i=0
while @i<20
begin
set @nowtime=getdate()
SELECT destination, count(destination)
FROM JMS_MESSAGES
group by destination
set @i=@i+1
print @i
print convert(varchar(max), @nowtime, 121)
waitfor delay '00:00:30'
end;
so i will start this SQL just before i start my tests, then start the load test, after load test then check the results and messages in SQL server 2005.
you can adjust the loop counts(@i) and time delay value according to your load tests duration.
Tuesday, January 27, 2009
Gran Torino,you are not alone!
一首动人的歌,让人读到了人的内心世界
饱经沧桑的面孔上,充斥着内心的矛盾,孤独(此片告诉我们,狗是人类忠诚的伙伴)。。。
处处表现出对现实的排斥,性格的固执与坚强,鲜明的爱与憎
这就像是一部老爷车,从来不会依照别人的眼光而去刻意改变或装饰自己,但却是最可靠最值得依赖的!
悲剧让老爷子的死有些壮烈,但悲剧给人的印象是深刻的,也使电影有了个合理的结局:一切都会过去,人都会变老,逝去。。。不过他的精神却被一个年轻人继承了下来,传承下去!
结尾的歌曲,我喜欢eastwood和Jamie cullum都有唱的那个版本,老爷子的嗓音是对这首歌最好的诠释:
http://www.youtube.com/watch?v=HEXF7U5TYV8

Gran Torino 老爷车
(Jamie Cullum & Clint Eastwood)
[*Sung By Clint Eastwood*]
So tenderly 如此温和
your story is 你的故事只是
nothing more than what you see 你所见到的和你所做过的事情
or what you've done or will become 你会变得坚强
standing strong do you belong 你会表里如一
in your skin; just wondering 只是还有点怀疑
gentle now the tender breeze blows 微风轻轻地吹
whispers through my Gran Torino 飒飒吹过我的老爷车
whistling another tired song 吹哨着另一首疲惫的歌
engine hums and bitter dreams grow 引擎嗡鸣 苦涩的梦继续
heart locked in a Gran Torino 心锁于老爷车
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
[*sung by Jamie Cullum*]
Realign all the stars above my head 重新排列头顶上的所有星星
Warning signs travel far 警告牌越行越远
I drink instead on my own Oh! how I've known 我借酒消愁
the battle scars and worn out beds 我多么熟悉战争的伤痕和磨损的睡床
gentle now the tender breeze blows 微风轻轻地吹
whispers through my Gran Torino 飒飒吹过我的老爷车
whistling another tired song 吹哨着另一首疲惫的歌
engines hum and bitter dreams grow 引擎嗡鸣 苦涩的梦继续
heart locked in a Gran Torino 心锁于老爷车
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
these streets are old they shine 这些街道都老了
with the things I've known 我熟悉的那些事物闪耀着光
and breaks through the trees 闪闪光辉穿过树丛
their sparkling
your world is nothing more than all the tiny things you've left behind
你的世界不过是你抛弃的那些微小的事物
So tenderly 如此温和
your story is 你的故事只是
nothing more than what you see 你所见到的和你所做过的事情
or what you've done or will become 你会变得坚强
standing strong do you belong 你会表里如一
in your skin; just wondering 只是还有点怀疑
gentle now the tender breeze blows 微风轻轻地吹
whispers through my Gran Torino 飒飒吹过我的老爷车
whistling another tired song 吹哨着另一首疲惫的歌
engines hum and bitter dreams grow 引擎嗡鸣苦涩的梦继续
heart locked in a Gran Torino 心锁于老爷车
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
may I be so bold and stay 我可以鲁莽地留下来吗
I need someone to hold 我需要一个可以拥抱的人
that shudders my skin 使我的肌肤战悚
their sparkling 的是他们的光芒
your world is nothing more than all the tiny things you've left behind
你的世界不过是你抛弃的那些微小的事物
Realign all the stars above my head 重新排列头顶上的所有星星
Warning signs travel far 警告牌越行越远
I drink instead on my own Oh! how I've known 我借酒消愁
the battle scars and worn out beds 我多么熟悉战争的伤痕和磨损的睡床
gentle now the tender breeze blows 微风轻轻地吹
whispers through my Gran Torino 飒飒吹过我的老爷车
whistling another tired song 吹哨着另一首疲惫的歌
engines hum and bitter dreams grow 引擎嗡鸣 苦涩的梦继续
heart locked in a Gran Torino 心锁于老爷车
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
饱经沧桑的面孔上,充斥着内心的矛盾,孤独(此片告诉我们,狗是人类忠诚的伙伴)。。。
处处表现出对现实的排斥,性格的固执与坚强,鲜明的爱与憎
这就像是一部老爷车,从来不会依照别人的眼光而去刻意改变或装饰自己,但却是最可靠最值得依赖的!
悲剧让老爷子的死有些壮烈,但悲剧给人的印象是深刻的,也使电影有了个合理的结局:一切都会过去,人都会变老,逝去。。。不过他的精神却被一个年轻人继承了下来,传承下去!
结尾的歌曲,我喜欢eastwood和Jamie cullum都有唱的那个版本,老爷子的嗓音是对这首歌最好的诠释:
http://www.youtube.com/watch?v=HEXF7U5TYV8
Gran Torino 老爷车
(Jamie Cullum & Clint Eastwood)
[*Sung By Clint Eastwood*]
So tenderly 如此温和
your story is 你的故事只是
nothing more than what you see 你所见到的和你所做过的事情
or what you've done or will become 你会变得坚强
standing strong do you belong 你会表里如一
in your skin; just wondering 只是还有点怀疑
gentle now the tender breeze blows 微风轻轻地吹
whispers through my Gran Torino 飒飒吹过我的老爷车
whistling another tired song 吹哨着另一首疲惫的歌
engine hums and bitter dreams grow 引擎嗡鸣 苦涩的梦继续
heart locked in a Gran Torino 心锁于老爷车
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
[*sung by Jamie Cullum*]
Realign all the stars above my head 重新排列头顶上的所有星星
Warning signs travel far 警告牌越行越远
I drink instead on my own Oh! how I've known 我借酒消愁
the battle scars and worn out beds 我多么熟悉战争的伤痕和磨损的睡床
gentle now the tender breeze blows 微风轻轻地吹
whispers through my Gran Torino 飒飒吹过我的老爷车
whistling another tired song 吹哨着另一首疲惫的歌
engines hum and bitter dreams grow 引擎嗡鸣 苦涩的梦继续
heart locked in a Gran Torino 心锁于老爷车
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
these streets are old they shine 这些街道都老了
with the things I've known 我熟悉的那些事物闪耀着光
and breaks through the trees 闪闪光辉穿过树丛
their sparkling
your world is nothing more than all the tiny things you've left behind
你的世界不过是你抛弃的那些微小的事物
So tenderly 如此温和
your story is 你的故事只是
nothing more than what you see 你所见到的和你所做过的事情
or what you've done or will become 你会变得坚强
standing strong do you belong 你会表里如一
in your skin; just wondering 只是还有点怀疑
gentle now the tender breeze blows 微风轻轻地吹
whispers through my Gran Torino 飒飒吹过我的老爷车
whistling another tired song 吹哨着另一首疲惫的歌
engines hum and bitter dreams grow 引擎嗡鸣苦涩的梦继续
heart locked in a Gran Torino 心锁于老爷车
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
may I be so bold and stay 我可以鲁莽地留下来吗
I need someone to hold 我需要一个可以拥抱的人
that shudders my skin 使我的肌肤战悚
their sparkling 的是他们的光芒
your world is nothing more than all the tiny things you've left behind
你的世界不过是你抛弃的那些微小的事物
Realign all the stars above my head 重新排列头顶上的所有星星
Warning signs travel far 警告牌越行越远
I drink instead on my own Oh! how I've known 我借酒消愁
the battle scars and worn out beds 我多么熟悉战争的伤痕和磨损的睡床
gentle now the tender breeze blows 微风轻轻地吹
whispers through my Gran Torino 飒飒吹过我的老爷车
whistling another tired song 吹哨着另一首疲惫的歌
engines hum and bitter dreams grow 引擎嗡鸣 苦涩的梦继续
heart locked in a Gran Torino 心锁于老爷车
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
it beats a lonely rhythm all night long 整晚敲击孤独的节奏
Sunday, January 25, 2009
今天是除夕。。。
除夕之夜,祝愿所有人平安,健康!2009,希望的起步,也许很艰难,但是顺着霞光,努力的走下去!
昨天自己看了“救火员”,体会到了一些东西,虽然故事情节一般,但的确对我来说也算是“情景教育”:)给它打80分!
昨天自己看了“救火员”,体会到了一些东西,虽然故事情节一般,但的确对我来说也算是“情景教育”:)给它打80分!
Tuesday, January 20, 2009
JMeter load get decreasing after a long duration test
Recently, I did a long duration test with a consistent load to the server to see how stable of our application is.
our application survival after almost 12 hours torment,but seems JMeter can not generate the consistent load(load get decreasing a lot) after about 5 hours or so, I do not know what happened to either our application or JMeter....
i just restart the JMeter only, so the load get back to normal again, it should be some problem on JMeter side:

BTW, I just add the aggregate report listener only during long duration testing, and no other logs output.
Have anyone met this problem before? someone found aggregate report will get the load down due to increasing calculation of 90% line.
our application survival after almost 12 hours torment,but seems JMeter can not generate the consistent load(load get decreasing a lot) after about 5 hours or so, I do not know what happened to either our application or JMeter....
i just restart the JMeter only, so the load get back to normal again, it should be some problem on JMeter side:
BTW, I just add the aggregate report listener only during long duration testing, and no other logs output.
Have anyone met this problem before? someone found aggregate report will get the load down due to increasing calculation of 90% line.
Friday, January 16, 2009
Speed simulator, added into my toolbox :)
Found one Cool tool to do network speed simulation testing---Speed simulator, it can simulate from 4.8Kbps to 1Mbps
you can find it here :http://sourceforge.net/project/showfiles.php?group_id=212588&package_id=255744&release_id=624415
you can find it here :http://sourceforge.net/project/showfiles.php?group_id=212588&package_id=255744&release_id=624415
Speed simulator is a simple throttling proxy which allows you to see how your site behaves under diffrent connection speeds.
LR scripts debuging on controller, try to make a "product" without a bug
These days, my team member met certain problems on the Loadrunner scripts during running in the controller, However the scripts run smoothly in Vugen with many loops...
The errors he got from LR controller is a lot with 10+ concurrent vusers
First, debugging with the first error info always:
I just want to make sure that which is the very first error, and analysis the error which page may have the problem.
Second, can we reproduce this error in the LR controller with only single user??( precondition:the scripts run smoothly in Vugen)
If Yes, then we enable the log level settings in the run-time settings: usually i want to have "always send messages"-->"extended log"-->"parameter substitution" enabled meanwhile i will add bellowing codes:
lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG|LR_MSG_CLASS_RESULT_DATA, LR_SWITCH_ON );
failed transaction;//which can be reached by the very first error info
lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG|LR_MSG_CLASS_RESULT_DATA, LR_SWITCH_OFF );
uncheck "continue on error" in run-time settings, then run the test in controller again
After running, the error show at the same place, open the log file in the result location which you set in the report menu.
Read the log like you do with vugen, then you can find which unexpected page(response data) you got, is it related to some parameters setting? or really a server problem?(you can manually verify it if it is a server error)
If No(only happens under concurrent load), the most possible problem may related to the parameters you set, I would like to have "always send messages"-->"extended log"-->"parameter substitution" enabled and uncheck "continue on error" , to check the parameters we pass into scripts in the log file after running the script.
Another way you can write some code to print out into the controller console as an error message... anyway, you need to use any manner wisely to see what exactly happened when there is an error message. Do not let every small error pass in the script tuning phase... we are making a "product" without bug :)!
Last thing, Content checking code is very very important, I found some people does not like to write this.
But it saves us from the fake performance testing, it is really harmful and misleading if our scripts do not work correctly but it does not trigger a fail transaction!
The errors he got from LR controller is a lot with 10+ concurrent vusers
First, debugging with the first error info always:
I just want to make sure that which is the very first error, and analysis the error which page may have the problem.
Second, can we reproduce this error in the LR controller with only single user??( precondition:the scripts run smoothly in Vugen)
If Yes, then we enable the log level settings in the run-time settings: usually i want to have "always send messages"-->"extended log"-->"parameter substitution" enabled meanwhile i will add bellowing codes:
lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG|LR_MSG_CLASS_RESULT_DATA, LR_SWITCH_ON );
failed transaction;//which can be reached by the very first error info
lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG|LR_MSG_CLASS_RESULT_DATA, LR_SWITCH_OFF );
uncheck "continue on error" in run-time settings, then run the test in controller again
After running, the error show at the same place, open the log file in the result location which you set in the report menu.
Read the log like you do with vugen, then you can find which unexpected page(response data) you got, is it related to some parameters setting? or really a server problem?(you can manually verify it if it is a server error)
If No(only happens under concurrent load), the most possible problem may related to the parameters you set, I would like to have "always send messages"-->"extended log"-->"parameter substitution" enabled and uncheck "continue on error" , to check the parameters we pass into scripts in the log file after running the script.
Another way you can write some code to print out into the controller console as an error message... anyway, you need to use any manner wisely to see what exactly happened when there is an error message. Do not let every small error pass in the script tuning phase... we are making a "product" without bug :)!
Last thing, Content checking code is very very important, I found some people does not like to write this.
But it saves us from the fake performance testing, it is really harmful and misleading if our scripts do not work correctly but it does not trigger a fail transaction!
Subscribe to:
Posts (Atom)