ADF页面在跳转过程中有很多页面的state会作为reqeust的参数的一部分自动传递。因此,在使用一些测试工具进行压力测试的时候,脚本录制就变得非常困难。以LoadRunner为例,必须正确配置LoadRunner的Correlation才能保证脚本在Replay过程中不会出现错误。 另外还需要注意ADF框架会在request的header中增加一些特殊的变量会影响到response,必须要保证录制的request能够保证一致性。
以下是一个LoadRunner Recording Rule的导出xml文件,可以用于录制ADF的测试脚本。
<?
xml
version
=
"1.0"
?>
<
CorrelationSettings
>
<
Group
Name
=
"WebCenter"
Enable
=
"1"
Icon
=
"logo_default.bmp"
>
<
Rule
Name
=
"adf.ctrl-state"
LeftBoundText
=
"_adf.ctrl-state="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
'"'
RightBoundType
=
"1"
AltRightBoundText
=
"Newline Character"
AltRightBoundType
=
"4"
Flags
=
"137"
ParamPrefix
=
"adf.ctrl-state"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"adf.winId"
LeftBoundText
=
"_adf.winId="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"&"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"137"
ParamPrefix
=
"adf.winId"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"jsessionid"
LeftBoundText
=
"jsessionid="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
'"'
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"136"
ParamPrefix
=
"jsessionid"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"STATETOKEN"
LeftBoundText
=
'javax.faces.ViewState" value="'
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText='">'
RightBoundType="1" AltRightBoundText="" AltRightBoundType="1"
Flags="136" ParamPrefix="STATETOKEN" Type="8" SaveOffset="0"
SaveLen="-1" CallbackName="" CallbackDLLName="" FormField=""
ReplaceLB="" ReplaceRB=""/>
<
Rule
Name
=
"afrLoop"
LeftBoundText
=
"_afrLoop="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
'"'
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"136"
ParamPrefix
=
"afrLoop"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"adf.ctrl-state_new"
LeftBoundText
=
"_adf.ctrlstate="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"<"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"9"
ParamPrefix
=
"adf.ctrl-state_new"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"SecurityUsersCreateUserPortletfrsc"
LeftBoundText
=
'SecurityUsersCreateUserPortletfrsc" value="'
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText='">'
RightBoundType="1" AltRightBoundText="" AltRightBoundType="1"
Flags="8" ParamPrefix="SecurityUsersCreateUserPortletfrsc"
Type="8" SaveOffset="0" SaveLen="-1" CallbackName=""
CallbackDLLName="" FormField="" ReplaceLB="" ReplaceRB=""/>
<
Rule
Name
=
"CreatedPageName"
LeftBoundText
=
"/Page"
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
".jspx"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"1037"
ParamPrefix
=
"createPageName"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"adfp_rendition_cahce_key"
LeftBoundText
=
"_adfp_rendition_cahce_key="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"&"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"8"
ParamPrefix
=
"adfp_rendition_cahce_key"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"adfp_request_hash"
LeftBoundText
=
"_adfp_request_hash="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
'"'
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"8"
ParamPrefix
=
"adfp_request_hash"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"adfp_full_page_mode_request"
LeftBoundText
=
"_adfp_full_page_mode_request%3D"
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"%"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"8"
ParamPrefix
=
"adfp_full_page_mode_request"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"- 1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"adfp_full_page_mode_request2"
LeftBoundText
=
"_adfp_full_page_mode_request="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"&"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"8"
ParamPrefix
=
"adfp_full_page_mode_request2"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"afrLoop2"
LeftBoundText
=
"_afrLoop="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"<"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"8"
ParamPrefix
=
"afrLoop2"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"afrLoop3"
LeftBoundText
=
"_afrLoop="
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"&"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"136"
ParamPrefix
=
"afrLoop3"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"wsrpresourceState"
LeftBoundText
=
"wsrp-resourceState~25253D"
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"~252526"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"8"
ParamPrefix
=
"wsrp-resourceState"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
<
Rule
Name
=
"_afrWindowMode_checksum"
LeftBoundText
=
"_afrWindowMode~253D0~26checksum~3D"
LeftBoundType
=
"1"
LeftBoundInstance
=
"0"
RightBoundText
=
"/container-view"
RightBoundType
=
"1"
AltRightBoundText
=
""
AltRightBoundType
=
"1"
Flags
=
"8"
ParamPrefix
=
"_afrWindowMode_checksum"
Type
=
"8"
SaveOffset
=
"0"
SaveLen
=
"-1"
CallbackName
=
""
CallbackDLLName
=
""
FormField
=
""
ReplaceLB
=
""
ReplaceRB
=
""
/>
</
Group
>
</
CorrelationSettings
>
|