JBehave and Cucumber的区别

JBehave and Cucumber are completely different frameworks, although meant for the same purpose: acceptance tests. They are based around stories (JBehave) or features (Cucumber). A feature is a collection of stories, expressed from the point of view of a specific project stakeholder. In your tests, you are referring to the stories, typically via regular expression matching.

JBehave is a pure Java framework whereas Cucumber is based on Ruby. Both are very mature frameworks. You can use Cucumber from Java via the Cuke4Duke Maven plugin from Maven, but there is still a language mismatch as it continues to use Ruby internally and you will need to install this language and its infrastructure (so-called ‘gems‘) on the machine that runs your tests. This can be brittle and the language mismatch complicates both debugging and impedes performance of your tests. There is now a pure Java implementation of Cucumber which is called Cucumber-JVM. As of December 2011, it‘s not released yet, but perfectly usable (edit: version 1.0.0 was released on March 27th, 2012). This new framework is very similar to JBehave as both have native JUnit support.

The following is a comparison of Cucumber-JVM and JBehave.

Similarities:

  • JUnit support out of the box
  • Pure Java
  • Fast
  • Easy to use

Pros/Cons of JBehave:

  • Pro Very good documentation
  • Pro Pretty good HTML formatting of test results
  • Con Only supports stories, not features

Pros/Cons of Cucumber-JVM:

  • Pro Supports features
  • Con Doesn‘t support parallel JUnit tests. Will however work with parallel Maven 3 builds.
  • Con Lacking documentation
  • Con No pretty HTML formatting of test results, other than JUnit‘s own formatting (edit: Cucumber-JVM now does support HTML output)

If you are on a Java project, I would recommend either JBehave (if you are looking for great documentation) or Cucumber-JVM (if the support of features instead or stories is important to you).

I tried both frameworks and went for for Cucumber-JVM.

https://stackoverflow.com/questions/7954755/what-are-the-differences-between-jbehave-and-cucumber

原文地址:https://www.cnblogs.com/maoya/p/10073710.html

时间: 2024-10-19 11:31:14

JBehave and Cucumber的区别的相关文章

Cucumber(一): Preparation

Every time I wrote some code in ruby and executed our cucumber features I craved for something similar in Java. I knew that there were several BDD frameworks for Java like JBehave, JDave, and EasyB, but none of them was right for me: either it used a

醒醒吧少年,只用Cucumber不能帮助你BDD

转载:http://insights.thoughtworkers.org/bdd/ 引言 在Ruby社区中,测试和BDD一直是被热议的话题,不管是单元测试.集成测试还是功能测试,你总能找到能帮助你的工具,Cucumber就是被广泛使用的工具之一.许多团队选择Cucumber的原因是"团队要BDD",也就是行为驱动开发(Behavior Driven Development),难道用了Cucumber之后团队就真的BDD了么? 事情当然没这么简单了,BDD作为一种软件开发方法论,一定要

自动化测试框架Cucumber和RobotFramework的对比

一.摘要 自动化测试可以快速自动完成大量测试用例,节约巨大的人工测试成本:同时它需要拥有专业开发技能的人才能完成开发,且需要大量时间进行维护(在需求经常变化的情况下),所以大部分具有很好开发技能的人员不是很愿意编写自动化用例.但由于软件规模的高速增长,人力资源的逐步稀缺,自动化测试已是势在必行. 对于自动化测试首先需要保证其功能是对客户有价值的和正确可用的.而这一切的基础就是用例要能测试客户的需求,期望,最好能让客户参与到测试用例的开发过程中来或让客户评审测试用例,因此出现了ATDD.BDD等各

filter()和find()的用法区别

1.filter()用法详解 应用场景1:假定有一个对象数组A,获取数组中指定类型的对象放到B数组中. var products = [ { name: "cucumber", type: "vegetable" }, { name: "apple", type: "fruit" }, { name: "orange", type: "fruit" } ]; var filters =

Nginx 反代参数:$X-Real-Ip和$X-Forwarded-For的区别

## \$X-Real-Ip和$X-Forwarded-For的区别 标签(空格分隔): nignx 负载均衡 client-ip --- ####1.如果只有一层代理,这两个头的值就是一样的####2.多层代理> * X-Forwarded-For:  header包含这样一行        `*X-Forwarded-For: 1.1.1.1, 2.2.2.2, 3.3.3.3*`> * X-Real-Ip:没有相关标准,上面的例子,如果配置了X-Read-IP,可能会有两种情况`// 最

C#中Convert和parse的区别

Convert.ToInt32()与int.Parse()的区别(1)这两个方法的最大不同是它们对null值的处理方法: Convert.ToInt32(null)会返回0而不会产生任何异常,但int.Parse(null)则会产生异常. 没搞清楚Convert.ToInt32和int.Parse()的细细微区别时千万别乱用,否则可能会产生无法预料的结果,举例来说:假如从url中取一个参数page的值,我们知道这个值是一个int,所以即可以用Convert.ToInt32(Request.Que

python判断字符串,str函数isdigit、isdecimal、isnumeric的区别

s为字符串s.isalnum() 所有字符都是数字或者字母s.isalpha() 所有字符都是字母s.isdigit() 所有字符都是数字s.islower() 所有字符都是小写s.isupper() 所有字符都是大写s.istitle() 所有单词都是首字母大写,像标题s.isspace() 所有字符都是空白字符.\t.\n.\r 判断是整数还是浮点数a=123b=123.123 >>>isinstance(a,int)True>>>isinstance(b,floa

java web 过滤器跟拦截器的区别和使用

1.首先要明确什么是拦截器.什么是过滤器 1.1 什么是拦截器: 拦截器,在AOP(Aspect-Oriented Programming)中用于在某个方法或字段被访问之前,进行拦截然后在之前或之后加入某些操作.拦截是AOP的一种实现策略. 在Webwork的中文文档的解释为--拦截器是动态拦截Action调用的对象.它提供了一种机制可以使开发者可以定义在一个action执行的前后执行的代码,也可以在一个action执行前阻止其执行.同时也是提供了一种可以提取action中可重用的部分的方式.

mysql中int、bigint、smallint和tinyint的区别与长度

对比发现 int bigint smallint 和 tinyint 类型,如果创建新表时没有指定 int(M) 中的M时,默认分别是 : int             -------     int(11) bigint       -------     bigint(20) smallint   -------     smallint(6) tinyint     -------     tinyint(4) 下面是这几种类型的取值范围 参考:http://www.2cto.com/d