51Testing软件测试论坛
标题:
请教下云层,为何一直关联不到
[打印本页]
作者:
素还真
时间:
2013-5-26 09:32
标题:
请教下云层,为何一直关联不到
本帖最后由 素还真 于 2013-5-26 09:55 编辑
我安装了书上说的那个xampp,然后进行登录!
lr_start_transaction("login");
//lr_think_time(20);
web_submit_data("login.php",
"Action=http://127.0.0.1:7001/phpwind85/login.php",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:7001/phpwind85/index.php",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=jumpurl", "Value=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"Name=step", "Value=2", ENDITEM,
"Name=pwuser", "Value=test1", ENDITEM,
"Name=pwpwd", "Value=123456", ENDITEM,
"Name=head_login", "Value=", ENDITEM,
"Name=lgt", "Value=0", ENDITEM,
EXTRARES,
"URL=js/lang/zh_cn.js", ENDITEM,
"URL=images/register/regright2.png", ENDITEM,
"URL=images/wind85/bg.jpg", ENDITEM,
"URL=images/down.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/topbar.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/navA.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/g/facebg_a.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/down.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/search_btn.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/searchA.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/colon.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/hB.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/old.gif", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/wind85/h.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/pwicon/top.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/job/doupdateavatar.gif", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/job/dosendmessage.gif", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/job/doaddfriend.gif", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
"URL=images/job/menu_tasksA.png", "Referer=http://127.0.0.1:7001/phpwind85/index.php", ENDITEM,
LAST);
web_url("pw_ajax.php",
"URL=http://127.0.0.1:7001/phpwind85/pw_ajax.php?action=jobpop&nowtime=1369492471876&verify=68c4e992",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://127.0.0.1:7001/phpwind85/index.php",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
lr_end_transaction("login", LR_AUTO);
上面的nowtime是一个变动的数据
如何获取它的数值呢?
在tree下面看到的是:
HTTP/1.1 200 OK
Date: Sat, 25 May 2013 14:34:31 GMT
Server: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7
X-Powered-By: PHP/5.4.7
Set-Cookie: f87b1_lastpos=other; expires=Sun, 25-May-2014 14:34:31 GMT; path=/
Set-Cookie: f87b1_lastvisit=2%091369492471%09%2Fphpwind85%2Fpw_ajax.php%3Factionjobpop%26nowtime1369492471876%26verify68c4e992; expires=Sun, 25-May-2014 14:34:31 GMT; path=/
Set-Cookie: f87b1_jobpop=0; expires=Sun, 25-May-2014 14:34:31 GMT; path=/
Content-Encoding: gzip
Content-Length: 1161
Keep-Alive: timeout=5, max=92
Connection: Keep-Alive
Content-Type: text/xml;charset=utf-8
<?xml version="1.0"
而我使用:(放在web_submit_data后面,web_url脚本前)
web_reg_save_param_regexp(
"ParamName=temp1",
"RegExp=Set-Cookie: f87b1_lastvisit.*pw_ajax.php%3Factionjobpop%26nowtime(.*)%26verify.*",
"Ordinal=1",
SEARCH_FILTERS,
LAST);
output后发现temp1等于那串数字!
但是如果我在代码中的那个nowtime={temp1}后,再输出temp1,结果就会等于%7Btemp1%7D
作者:
素还真
时间:
2013-5-26 09:35
本帖最后由 素还真 于 2013-5-26 09:54 编辑
我通过输出,temp1=%7Btemp1%7D
很奇怪,为什么是%7B和%7D,中间又是temp1(也就是参数名
如果
web_url("pw_ajax.php",
"URL=http://127.0.0.1:7001/phpwind85/pw_ajax.php?action=jobpop&nowtime={temp1}&verify=68c4e992"
这个不参数化,则输出的temp1结果是正确的,而如果使用了参数化后,temp1结果输出的就会%Btemp1%7D呢?
作者:
云层
时间:
2013-5-27 08:49
Nowtime的作用是个时间戳吧,应该不用处理的,
作者:
素还真
时间:
2013-5-27 09:57
回复
3#
云层
其实我的疑问是,为什么我如果不参数化和参数化后,结果不同,特奇怪!
作者:
云层
时间:
2013-5-27 15:15
参数化?
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2