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

查看:169
本文介绍了在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.

我们使用的技术:黄瓜,Java,Rest-Assured和junit

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

以下是我个人的评论或个人观点.这是基于我的经验.

Following pros and cons are my own comment or personal view. It is based on my experience.

优点:

  • 易于使用Gherkin语言编写功能文件
  • 很容易满足接受标准
  • 团队中的每个人(包括team)都可以帮助您编写功能文件
  • 非常好的报告格式和调试失败
  • 易于在夜间或常规构建期间执行
  • 集成测试非常容易,因为您可以使用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 Coverage报告之类的测试产品的融合.

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

特别是对于那些多年编写测试用例的人来说,为数不多的冲刺就不难写了.

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天全站免登陆