51Testing软件测试论坛
标题:
这样的脚本应该怎样参数化-高手请进
[打印本页]
作者:
msnshow
时间:
2008-1-21 17:04
标题:
这样的脚本应该怎样参数化-高手请进
web_submit_data("create.htm_2",
"Action=http://192.168.0.1:8080/Unit/create.htm",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.0.1:8080/Unit/new.htm?ProductId={PID}&TypeId={type}&productName={name}",
"Snapshot=t9.inf",
"Mode=HTTP",
ITEMDATA,
"Name=id", "Value=0", ENDITEM,
"Name=ProductId", "Value={PID}", ENDITEM,
"Name=returnLink", "Value=/Product/list.htm", ENDITEM,
"Name=title", "Value={name}", ENDITEM,
"Name=clickUrl", "Value={url}", ENDITEM,
"Name=desc", "Value={ad_name}", ENDITEM,
"Name=contentType", "Value=0", ENDITEM,
"Name=memo", "Value={name}", ENDITEM,
"Name=placement_144", "Value=144", ENDITEM,
"Name=chkFlag", "Value=144", ENDITEM,
"Name=filePath_144", "Value=", ENDITEM,
"Name=userImage_144", "Value=", ENDITEM,
"Name=placement_149", "Value=149", ENDITEM,
"Name=chkFlag", "Value=149", ENDITEM,
"Name=filePath_149", "Value=", ENDITEM,
"Name=userImage_149", "Value=", ENDITEM,
"Name=placement_145", "Value=145", ENDITEM,
"Name=chkFlag", "Value=145", ENDITEM,
"Name=filePath_145", "Value=", ENDITEM,
"Name=userImage_145", "Value=", ENDITEM,
"Name=placement_152", "Value=152", ENDITEM,
"Name=chkFlag", "Value=152", ENDITEM,
"Name=filePath_152", "Value=", ENDITEM,
"Name=userImage_152", "Value=", ENDITEM,
"Name=placement_150", "Value=150", ENDITEM,
"Name=chkFlag", "Value=150", ENDITEM,
"Name=filePath_150", "Value=", ENDITEM,
"Name=userImage_150", "Value=", ENDITEM,
"Name=placement_147", "Value=147", ENDITEM,
"Name=chkFlag", "Value=147", ENDITEM,
"Name=filePath_147", "Value=", ENDITEM,
"Name=userImage_147", "Value=", ENDITEM,
"Name=placement_153", "Value=153", ENDITEM,
"Name=chkFlag", "Value=153", ENDITEM,
"Name=filePath_153", "Value=", ENDITEM,
"Name=userImage_153", "Value=", ENDITEM,
"Name=placement_148", "Value=148", ENDITEM,
"Name=chkFlag", "Value=148", ENDITEM,
"Name=filePath_148", "Value=", ENDITEM,
"Name=userImage_148", "Value=", ENDITEM,
"Name=placement_146", "Value=146", ENDITEM,
"Name=chkFlag", "Value=146", ENDITEM,
"Name=filePath_146", "Value=", ENDITEM,
"Name=userImage_146", "Value=", ENDITEM,
"Name=placement_151", "Value=151", ENDITEM,
"Name=chkFlag", "Value=151", ENDITEM,
"Name=filePath_151", "Value=", ENDITEM,
"Name=userImage_151", "Value=", ENDITEM,
"Name=placement_142", "Value=142", ENDITEM,
"Name=chkFlag", "Value=142", ENDITEM,
"Name=filePath_142", "Value=", ENDITEM,
"Name=userImage_142", "Value=", ENDITEM,
"Name=placement_143", "Value=143", ENDITEM,
"Name=chkFlag", "Value=143", ENDITEM,
"Name=filePath_143", "Value=", ENDITEM,
"Name=userImage_143", "Value=", ENDITEM,
"Name=tempChannelId", "Value=", ENDITEM,
"Name=channelLink", "Value=/affnet", ENDITEM,
"Name=overrun", "Value=n", ENDITEM,
"Name=Exif", "Value=", ENDITEM,
LAST);
部分我已经参数化了,现在还有这部分需要参数化
"Name=placement_144", "Value=144", ENDITEM,
"Name=chkFlag", "Value=144", ENDITEM,
"Name=filePath_144", "Value=", ENDITEM,
"Name=userImage_144", "Value=", ENDITEM,
"Name=placement_149", "Value=149", ENDITEM,
"Name=chkFlag", "Value=149", ENDITEM,
"Name=filePath_149", "Value=", ENDITEM,
"Name=userImage_149", "Value=", ENDITEM,
"Name=placement_145", "Value=145", ENDITEM,
"Name=chkFlag", "Value=145", ENDITEM,
"Name=filePath_145", "Value=", ENDITEM,
"Name=userImage_145", "Value=", ENDITEM,
"Name=placement_152", "Value=152", ENDITEM,
"Name=chkFlag", "Value=152", ENDITEM,
"Name=filePath_152", "Value=", ENDITEM,
"Name=userImage_152", "Value=", ENDITEM,
"Name=placement_150", "Value=150", ENDITEM,
"Name=chkFlag", "Value=150", ENDITEM,
"Name=filePath_150", "Value=", ENDITEM,
"Name=userImage_150", "Value=", ENDITEM,
"Name=placement_147", "Value=147", ENDITEM,
"Name=chkFlag", "Value=147", ENDITEM,
"Name=filePath_147", "Value=", ENDITEM,
"Name=userImage_147", "Value=", ENDITEM,
"Name=placement_153", "Value=153", ENDITEM,
"Name=chkFlag", "Value=153", ENDITEM,
"Name=filePath_153", "Value=", ENDITEM,
"Name=userImage_153", "Value=", ENDITEM,
"Name=placement_148", "Value=148", ENDITEM,
"Name=chkFlag", "Value=148", ENDITEM,
"Name=filePath_148", "Value=", ENDITEM,
"Name=userImage_148", "Value=", ENDITEM,
"Name=placement_146", "Value=146", ENDITEM,
"Name=chkFlag", "Value=146", ENDITEM,
"Name=filePath_146", "Value=", ENDITEM,
"Name=userImage_146", "Value=", ENDITEM,
"Name=placement_151", "Value=151", ENDITEM,
"Name=chkFlag", "Value=151", ENDITEM,
"Name=filePath_151", "Value=", ENDITEM,
"Name=userImage_151", "Value=", ENDITEM,
"Name=placement_142", "Value=142", ENDITEM,
"Name=chkFlag", "Value=142", ENDITEM,
"Name=filePath_142", "Value=", ENDITEM,
"Name=userImage_142", "Value=", ENDITEM,
"Name=placement_143", "Value=143", ENDITEM,
"Name=chkFlag", "Value=143", ENDITEM,
"Name=filePath_143", "Value=", ENDITEM,
"Name=userImage_143", "Value=", ENDITEM,
下面这样的数据为一个值 143 , 我已经用函数读取到数组中,即有一个数组 A 已经存储了{144,149,145,150,152,147,153,148,146,151,142,143} 这些值
"Name=placement_143", "Value=143", ENDITEM,
"Name=chkFlag", "Value=143", ENDITEM,
"Name=filePath_143", "Value=", ENDITEM,
"Name=userImage_143", "Value=", ENDITEM,
要怎么样使用循环才能够将上面的脚本参数化呢
作者:
Zee
时间:
2008-1-22 11:15
看晕了,这是关联的过程吧。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2