黄瓜与 TestNG [英] Cucumber with TestNG

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

问题描述

我们在带有 Selenium WebDriver 的 TestNG 中有一个非常广泛的框架,我希望能够继续使用它,但要使用 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天全站免登陆