My way to start QTP auto testing---2

上一篇 / 下一篇  2010-07-11 23:02:23 / 天气: 阴雨 / 心情: 平静 / 精华(1) / 置顶(1) / 个人分类:QTP auto testing technology

I found some one  had interests in my previous article : My way to start QTP auto testing---1 .

Although not all of you have give me a flower , I want to share more.

Step4Create your QTP frame. work from your test plan.

Suppose you know well about your target product. So the step 4 will be create your QTP frame. work from your test plan.

As far as we all know, if the frame. work is not istablished before your QTP coding, you will find a lot of troubles. For example, you may find that all the pages in a web site have a same object (the logo!?). and in every action, you have to click or highlight this object. If you hadn't create the object using desription programing langugae , you would find it boring to repeat the record by QTP.

So the first sub-step you have to do is to prepare the variables , paremeters and environment variables. For instance, maybe 30 in 55 actions will using the same page , you can create a 'pageobject' by add objects or define new objects, and then you create a new value in you paremeters . 

The code looks like: Set Pageobject=Browser("Browser").Page("For same pages")

And then you use it in every associate actions: PageObject.Link("Link").Click

The second you have to do is to prepare the data used in action control.

This data is not the data used for verifying the product's function or something else. It used by each actions which will influence the next action. Look at the image below:

Notes : Different data will control different actions in different levels. It means that you will use differet data to control the actions, and different actions will process or execute different test cases. It will be flexible for you to start your auto testing.

There will be other sub-steps, I will share it in My way to start QTP auto testing---3.

Thank you for you coming.

 


TAG: QTP

wanlg的个人空间 引用 删除 wanlg   /   2010-08-16 13:40:46
wanlg的个人空间 引用 删除 wanlg   /   2010-08-16 13:40:26
5
51mobile的个人空间 引用 删除 51mobile   /   2010-07-13 13:09:38
期待新的文章,
自导自演-从开始到现在 引用 删除 Ade_Huang   /   2010-07-12 23:37:01
5
克彻巴彦 引用 删除 克彻巴彦   /   2010-07-12 16:54:58
原帖由Chain.Dai.China于2010-07-12 15:18:03发表
great.  如果能把你写的一个实例放上来就好了


待续  会有实例的  
Chain.Dai.China的个人空间 引用 删除 Chain.Dai.China   /   2010-07-12 15:18:03
great.  如果能把你写的一个实例放上来就好了
 

评分:0

我来说两句

日历

« 2024-05-01  
   1234
567891011
12131415161718
19202122232425
262728293031 

我的存档

数据统计

  • 访问量: 3183
  • 日志数: 4
  • 建立时间: 2010-07-08
  • 更新时间: 2010-07-13

RSS订阅

Open Toolbar