黄瓜与TestNG [英] Cucumber with TestNG

查看:1311
本文介绍了黄瓜与TestNG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个非常广泛的框架在TestNG与Selenium WebDriver,我想要能够继续使用它,但使用Cucumber BDD与它。我知道Cucumber与JUnit工作,但不确定如果它与TestNG工作。

We have a very extensive framework in TestNG with Selenium WebDriver and I want to be able to continue using it, but use Cucumber BDD with it.I am aware that Cucumber works with JUnit, but not sure if it works with TestNG.

任何人都可以让我知道,如果这将很快有可用的?如果没有,是否有任何解决方法,以便我可以使用Cucumber与TestNG?

Can anyone let me know if this is going to be available anytime soon ? If not, are there any workarounds so that I can use Cucumber with TestNG?

此外,市场上是否还有其他可用于TestNG的BDD?

Also, are there any other BDDs that are available in the market which can be used with TestNG ?

推荐答案

依赖关系在maven的pom中:

Dependency in maven's pom:

    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-testng</artifactId>
        <version>1.1.5</version>
        <scope>test</scope>
    </dependency>

测试运行的功能:

import cucumber.api.testng.AbstractTestNGCucumberTests;

public class CucumberTets extends AbstractTestNGCucumberTests {

}

这篇关于黄瓜与TestNG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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