cnpaf 发表于 2012-7-16 20:20:06

LR11 中自带的webtour脚本练习userSession 出现两个??咋回事???

****** Response Body For Transaction With Id 159 ******
<!-- Comments option is ON

These are used to make the automated parsing difficult.
User must try and get the UserSession value.There are several here, with similar boundaries.
But none are the right value.

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Web Tours Navigation Bar</TITLE>
<style>
        blockquote {font-family: tahoma; font-size : 10pt}
        H1 {font-family: tahoma; font-size : 22pt;color: #993333}
        small {font-family: tahoma; font-size : 8pt}
</style>
</HEAD><BODY BGCOLOR="#E0E7F1"><br clear>
<form method=post action=login.pl target=body>
<input type=hidden name=userSession value=8454108743.085621709ffQDtHcptzzzzzzHDDfzApiDti>
<form method=post action=error.pl onSubmit='doJSformSubmit1(this)' target=body>
<input type=hidden name=userSession value=1108743.085621709ffQDtHcptzzzzzzHDDfzApiDti>
<table border=0>
<tr><td><font face=sans-serif size=2>&nbsp;</font><td><tr>
<tr><td><font face=sans-serif size=2>&nbsp;Username</font><td><tr>
<tr><td><input type=text name=username value='' size=18 maxlength=30>
<tr><td><font face=sans-serif size=2>&nbsp;Password</font>
<tr><td><input type=password name=password value='' size=18 maxlength=30>
<tr><td><input type=image name=login value=Login alt=Login border=1 src='/WebTours/images/mer_login.gif'>
</table></form>
</BODY></HTML>

cnpaf 发表于 2012-7-16 20:22:09

为什么 在 form 里面出现两个 userSession
<form method=post action=login.pl target=body>
<input type=hidden name=userSession value=8454108743.085621709ffQDtHcptzzzzzzHDDfzApiDti>
<form method=post action=error.pl onSubmit='doJSformSubmit1(this)' target=body>
<input type=hidden name=userSession value=1108743.085621709ffQDtHcptzzzzzzHDDfzApiDti>

cnpaf 发表于 2012-7-16 23:30:51

来自 《精通软件性能测试与LR实战》
就这个 关联例子 通不过
其他的几个 关联 都通过了正确的

云层 发表于 2012-7-17 09:53:42

你不用关心这个代码怎么写,反正要么用web_submit_form()不需要关联,要么使用web_submit_data()关联一个sessionid给服务器就行了
页: [1]
查看完整版本: LR11 中自带的webtour脚本练习userSession 出现两个??咋回事???