Keyword-driven testing

Address: http://en.wikipedia.org/wiki/Keyword-driven_testing

Keyword-driven testing, also known as table-driven testing or action-word testing, is a software testing methodology for automated testing that separates the test creation process into two distinct stages: a Planning Stage, and an Implementation Stage.

Examples include GUIdancer and QTP.

Pros

  1. Maintenance is low in the long run:
    1. Test cases are concise
    2. Test cases are readable for the stake holders
    3. Test cases easy to modify
    4. New test cases can reuse existing keywords more easily
  2. Keyword re-use across multiple test cases
  3. Not dependent on a specific tool or programming language
  4. Division of Labor
    1. Test case construction needs stronger domain expertise - lesser tool / programming skills
    2. Keyword implementation requires stronger tool/programming skill - with relatively lower domain skill
  5. Abstraction of Layers

[edit]Cons

  1. Longer Time to Market (as compared to manual testing or record and replay technique)
  2. Moderately high learning curve initially
Who said QTP does not belong to keyword-driven tool? I do doubt that.

Robot Framework是一款开源软件测试自动化工具,它支持关键字驱动测试(Keyword-Driven Testing)和行为驱动测试(Behavior-Driven Testing)两种模式,并且具有可扩展性,可以与其他工具(如Selenium、Appium等)进行集成。 以下是Robot Framework的使用方法: 1. 安装Robot Framework 可以通过pip命令来安装Robot Framework: ``` pip install robotframework ``` 2. 安装关键字库 Robot Framework依赖于关键字库来执行测试任务,可以通过pip命令来安装所需的关键字库,如Selenium2Library: ``` pip install robotframework-selenium2library ``` 3. 创建测试用例 可以使用任何文本编辑器创建Robot Framework测试用例。测试用例通常以“.robot”文件格式保存,例如: ``` *** Settings *** Library Selenium2Library *** Test Cases *** Example Test Case Open Browser http://www.google.com chrome Input Text name=q Robot Framework Click Button name=btnK Wait Until Page Contains Robot Framework Close Browser ``` 其中,关键字“Library”指定了使用的关键字库,关键字“Test Cases”定义了测试用例,关键字“Open Browser”、“Input Text”、“Click Button”等是关键字库中的关键字。 4. 运行测试用例 可以使用命令行工具来运行测试用例: ``` robot example.robot ``` 运行测试用例后,Robot Framework会输出测试结果报告。 以上是Robot Framework的基本使用方法,更多高级功能和扩展可以参考官方文档。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值