在 API 自动化测试中使用 BDD 是一个好方法吗? [英] Using BDD in API automation testing is a good aproach?

查看:54
本文介绍了在 API 自动化测试中使用 BDD 是一个好方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 RESTful API 测试自动化编写一个框架,我已经决定使用 REST Assured,我不能 100% 确定添加一个层以允许使用像 Gherkin 这样的特定领域语言定义测试,因此添加一个BDD 框架,如 Cucumber.你有什么看法?
在 API 自动化测试中使用 BDD 是一种好方法吗?

I'm writing a framework for RESTful API test automation, I already decided to go with REST Assured, I'm not 100% sure about add a layer to allow define tests using a domain specific language like Gherkin, therefore adding a BDD framework like Cucumber. What is your opinion?
Is a good approach to use BDD in API automation testing?

推荐答案

我目前正在使用 BDD 进行 RestAPI 测试.这是 BDD RestAPI 自动化框架的优缺点.

I am currently using BDD for RestAPI Testing. Here is pros and cons for BDD RestAPI Automation framework.

我们使用的技术:Cucumber、Java、Rest-Assured 和 junit

Technology We used: Cucumber,Java,Rest-Assured and junit

以下优点和缺点是我自己的评论或个人观点.这是基于我的经验.

优点:

  • 使用 Gherkin 语言轻松编写功能文件
  • 很容易涵盖验收标准
  • 团队中的每个人(包括团队)都可以帮助您编写功能文件
  • 非常好的报告格式和调试失败
  • 在夜间或常规构建期间易于执行
  • 集成测试非常简单,您可以使用 Background 或 Given 以及 Gherkin 语言的其他功能

缺点:

  • 当公司的其他团队成员需要测试用例或任何文档时,您的回答将是我们有小黄瓜语言的场景",有时很难理解/解释场景,因为没有像传统步骤那样明确的步骤定义或大文档

  • When other team member in company need test case or any documentation than your answer will be "We have scenario in Gherkin Language" and it is sometime hard to understand/explain scenario as there is no clear step like traditional step definition or big documentation

高层管理人员有大量时间了解测试产品的收敛情况,例如 HP ALM 覆盖率报告.

Higher management have high time to understand converge of testing product like HP ALM Coverage report.

专门为那些多年编写测试用例的人编写很少的sprint.

It is little hard to write for few sprint specially for those who write test case for years.

请自由编辑或建议任何需要添加或删除的内容.希望对你有帮助.

Please free to edit or suggest anything need to add or remove. I hope it will help you.

这篇关于在 API 自动化测试中使用 BDD 是一个好方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆