CuCumber

作者: 小眼睛的露鹿酱 | 来源:发表于2019-08-26 18:48 被阅读0次

文章翻译来自于:guru99

假设你正在一个网银应用上创建一个转账模块, 以下有多条测试路径:

  1. 资金足够, 继续转帐
  2. 目标账户信息一致, 继续转账
  3. 密码一致, 继续转帐
  4. 即使假期, 也会转账
  5. 按照设定转账

以上的测试情景其实会更加复杂, 一般开发人员会先开发特性 然后进行测试, 因为case太复杂, 他会在rlease生成的时候测试,否则都是无效的测试;
于是行为驱动开发BDD就出现了,它使得测试流程变得容易。
在BDD中 测试用例呈现Given-when-then

Given that a fund transfer module in net banking application has been developed
And I am accessing it with proper authentication

When I shall transfer with enough balance in my source account
Or I shall transfer on a Bank Holiday
Or I shall transfer on a future date
And destination a/c details are correct
And transaction password/rsa code / security authentication for the transaction is correct
And press or click send button

Then amount must be transferred
And the event will be logged in log file

这是不是看上去就很容易理解呢?

什么是CuCumber

Cucumber是一个支持行为驱动开发的工具。 他提供了一个任何人都能理解的编写测试的方法, 即使这个人不了解技术。
在BDD中,用户(分析师与产品经理)会首先在perspective中写好场景以及用户接受测试用例,让开发人员在编写代码之前 产品经理阅览以及签字。

Cucumer的优势

  1. 关注目标用户的体验
  2. 重复利用test
  3. 编辑的set-up以及执行
  4. 快速有效的测试

Cucumber vs Selenium vs ALM

下载以及安装

  1. Got to download
  2. Open the downloaded file, 安定click accept
  3. install

相关文章

网友评论

      本文标题:CuCumber

      本文链接:https://www.haomeiwen.com/subject/teidectx.html