51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1792|回复: 5
打印 上一主题 下一主题

[原创] 请问如何代码设置:参数化的操作执行的起始行和结束行

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-7-23 16:06:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如题。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2008-7-23 16:19:49 | 只看该作者
在set里面有。运行在第几行到第几行这个就可以用了。
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2008-7-23 16:23:27 | 只看该作者
描述的实在是太费解,能否描述清楚点,你想问的到底是什么,参数化指的又是哪种参数化的方法
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2008-7-23 17:04:11 | 只看该作者

这个就是大部份人的通病,自己了解的,或者想到的,就以为别人也和自己一样,所以问问题很抽象。
做测试员就不能这样了。
回复 支持 反对

使用道具 举报

该用户从未签到

5#
 楼主| 发表于 2008-7-23 17:27:49 | 只看该作者
这是最原始的问题,我怕贴出来大家都不想看了,才简单的问了句。 使用的是QTP安装时自带的Flight程序。

Exercise C: Using QuickTest and VB Script Functions with the Data Table

Note: Normally it is Best Practice that QuickTest can run unattended. However, for
training purposes, we will use manual input in this exercise .

Create a test that will perform the following:

login as member
specify flight details
search for available flights
pick from the list of available flights
supply payment information
purchase the flight
go back and search for another flight
log off

Your script should:

Note: Answer the questions before you start implementing the test requirements. The
questions will act as a guide for the correct usage of functions and Statement for the
script.

1. Data drive the test on the Departing From and Arriving In fields for one valid
member login.

2. Import the data to use from   an existing spreadsheet file: \Data\testdata.xls.

3. Iterate the test depending on the row number entered by the tester and not by the
action properties or run settings.


4. You can use either one Action or multiple Actions. Remember to declare global
variables and constants if you are using multiple Actions.
回复 支持 反对

使用道具 举报

该用户从未签到

6#
发表于 2008-7-25 11:00:14 | 只看该作者
先获取行的总数
然后使用循环,在里面添加一个if语句即可
for i=你需要设置的起始行 to 你需要设置的结束行

    执行你的操作

next

我觉得的就是这么简单
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-25 12:28 , Processed in 0.074184 second(s), 33 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表