天天看點

《QTP自動化測試進階》(9)

學習《QTP自動化測試進階》第11章 – QTP描述性程式設計

使用QTP的描述性程式設計編寫腳本的方式,與錄制腳本以及在關鍵字視圖編寫腳本的方式有很大的不同。描述性程式設計能提供更加靈活的測試腳本編寫方法,并且能擺脫測試對象庫的限制,編寫出更為複雜、适應力更強的測試腳本。

兩種描述性程式設計的開發方式:

直接描述

使用Description對象

描述性程式設計的“後續強迫性”:如果在測試對象層次結構的某一點開始使用了描述性程式設計,則該測試對象層次結構下的後續測試對象都要使用描述性程式設計的方式來描述對象。

其他學習資料:

1、《兩種DP描述方法的比較》:

http://blog.csdn.net/Testing_is_believing/archive/2010/01/01/5116959.aspx

2、《什麼時候使用DP》:

http://blog.csdn.net/Testing_is_believing/archive/2010/01/01/5116856.aspx

3、《QTP中使用OR還是DP對于IE記憶體洩漏的影響》:

http://blog.csdn.net/Testing_is_believing/archive/2009/11/29/4900770.aspx

4、《QTP: Creating Object Descriptions “On The Fly”》:

http://relevantcodes.com/qtp-creating-object-descriptions-on-the-fly/

5、《QTP: Understanding the Description Object (Description.Create)》介紹了Description對象的使用方法:

http://relevantcodes.com/qtp-all-about-the-description-object-description-create/

6、《Descriptive Programming (DP) – 4 (Creating a Test Script)》:

http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/

7、《Descriptive Programming (DP) Concepts – 3 (Ordinal Identifiers)》介紹了使用描述性程式設計時順序辨別符的用法:

http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/

8、《Descriptive Programming (DP) vs Object Repository (OR)》介紹了使用對象庫和使用描述性程式設計的差別:

http://relevantcodes.com/dp-vs-or/

9、《Descriptive Programming (DP) Concepts – 2 {Regular Expressions}》介紹了描述性程式設計中正規表達式的使用:

http://relevantcodes.com/descriptive-programming-dp-concepts-2-regular-expressions/

10、《Descriptive Programming (DP) Concepts – 1》介紹了描述性程式設計的基本概念和腳本編寫方法:

http://relevantcodes.com/descriptive-programming-concepts-1/

繼續閱讀