cucumber 相关问题

Cucumber是一种行为驱动开发(BDD)工具,它以纯文本(以简单的Gherkin语言结构)编写的功能描述作为自动化测试。

测试/场景未使用 testng Cucumber 执行

从 TestNG 运行程序类(Testng-Cucumber)执行测试后获得以下输出,但没有执行任何测试 - [RemoteTestNG] 检测到 TestNG 版本 7.4.0 通过:运行场景(“

回答 1 投票 0

无法使用 Testng 运行 Cucumber。但是如果我在功能文件中执行,它就可以工作

在 TestNg Runner 中我没有执行代码,但是使用功能文件我得到了结果 我需要使用 TestNg runner 执行。显示以下错误 [TestNG] 未找到测试。没有运行任何内容 用途: 在 TestNg Runner 中我没有执行代码,但使用功能文件我得到结果 我需要使用 TestNg runner 执行。显示以下错误 [TestNG] No tests found. Nothing was run Usage: <main class> [options] The XML suite files to run Options: -alwaysrunlisteners Should MethodInvocation Listeners be run even for skipped methods Default: true -configfailurepolicy Configuration failure policy (skip or continue) -d Output directory -dataproviderthreadcount Number of threads to use when running data providers -dependencyinjectorfactory The dependency injector factory implementation that TestNG should use. -excludegroups Comma-separated list of group names to exclude -failwheneverythingskipped Should TestNG fail execution if all tests were skipped and nothing was run. Default: false -generateResultsPerSuite Should TestNG consider failures in Data Providers as test failures. Default: false -groups Comma-separated list of group names to be run -ignoreMissedTestNames Ignore missed test names given by '-testnames' and continue to run existing tests, if any. Default: false -includeAllDataDrivenTestsWhenSkipping Should TestNG report all iterations of a data driven test as individual skips, in-case of upstream failures. Default: false -junit JUnit mode Default: false -listener List of .class files or list of class names implementing ITestListener or ISuiteListener -methods Comma separated of test methods Default: [] -methodselectors List of .class files or list of class names implementing IMethodSelector -mixed Mixed mode - autodetect the type of current test and run it with appropriate runner Default: false -objectfactory List of .class files or list of class names implementing ITestRunnerFactory -overrideincludedmethods Comma separated fully qualified class names of listeners that should be skipped from being wired in via Service Loaders. Default: false -parallel Parallel mode (methods, tests or classes) Possible Values: [tests, methods, classes, instances, none] -port The port -propagateDataProviderFailureAsTestFailure Should TestNG consider failures in Data Providers as test failures. Default: false -reporter Extended configuration for custom report listener -spilistenerstoskip Comma separated fully qualified class names of listeners that should be skipped from being wired in via Service Loaders. Default: <empty string> -suitename Default name of test suite, if not specified in suite definition file or source code -suitethreadpoolsize Size of the thread pool to use to run suites Default: 1 -testclass The list of test classes -testjar A jar file containing the tests -testname Default name of test, if not specified in suitedefinition file or source code -testnames The list of test names to run -testrunfactory, -testRunFactory The factory used to create tests -threadcount Number of threads to use when running tests in parallel -threadpoolfactoryclass The threadpool executor factory implementation that TestNG should use. -usedefaultlisteners Whether to use the default listeners Default: true -log, -verbose Level of verbosity -xmlpathinjar The full path to the xml file inside the jar file (only valid if -testjar was specified) Default: testng.xml 要通过 TestNG 运行 Cucumber 功能,请确保完成以下步骤: 包含 Cucumber-testNG 依赖项:https://mvnrepository.com/artifact/io.cucumber/cucumber-testng Cucumber runner 类已创建,例如: package testrunners; import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; @CucumberOptions( features = "src/test/resources/features", glue = {"stepdefinitions"}, plugin = { "pretty", "json:cucumber.json" } ) public class TestRunner extends AbstractTestNGCucumberTests {} 该类必须扩展 AbstractTestNGCucumberTests 类 src/test/resources/features 是包含 .feature 文件的文件夹的路径 stepdefinitions 是包的名称,其中包含已实现步骤的代码的类。 TestNG XML 运行上述步骤中的 Cucumber 运行程序类,例如: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Default Suite" configfailurepolicy="continue" time- out="60000"> <test name="Main tests"> <classes> <class name="testrunners.TestRunner"/> </classes> </test> </suite> 通过此设置,您应该能够运行 TestNG XML,它将执行位于指定文件夹中的所有 .feature 文件中的所有场景。

回答 1 投票 0

如何为python的behave(cucumber)中的某个功能创建临时目录?

我正在尝试对一些使用 Cucumber 进行测试的 ruby 代码进行 python 移植。我正在尝试在新端口中使用完全相同的功能文件。其中一个功能看起来有点像: 特点:...

回答 1 投票 0

cucumber.runtime.DuplicateStepDefinitionException:

你好,我是黄瓜和硒的新手。我正在尝试使用多个黄瓜功能文件执行我的 Maven 项目。但是当我执行以下错误时,我得到了。 黄瓜.运行时。

回答 3 投票 0

ruby cucumber 如何使用黄瓜表达式让不同的步骤调用相同的定义

说我想要 给定一些东西 当天空蔚蓝时 而且草是绿的 那我就开心了 但我想要 当('天空是蓝色的')做 写“好” 结尾 和 When('草是绿的') 做 写“好” 结尾 成为

回答 1 投票 0

空手道无法在 jar 应用程序中找到功能文件

我正在尝试使用 karate runner 从 REST 控制器类调用执行一些功能文件(功能文件与应用程序 jar 文件捆绑在一起)。在服务课上,我使用空手道跑步者来运行...

回答 2 投票 0

错误:processTimers(节点:内部/计时器:512:7)处的listOnTimeout(节点:内部/计时器:569:17)超时

我目前正在开发一个 Android 应用程序的测试自动化项目。为此,我使用安装在 Node.js 上的 Appium 服务器以及两个框架 WebDriver.io 和 Cucumber,以及

回答 1 投票 0

无法在特征文件中执行转到定义功能以导航到量角器黄瓜框架中的步骤定义文件

转到定义功能在 vs-code 上不起作用。 我已经安装了黄瓜(小黄瓜)完整支持插件。 复制步骤:右键单击功能文件上的步骤,然后选择转到定义。

回答 2 投票 0

java.lang.NoSuchMethodError:'void org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.constructAppearances()'

iam 在 selenium cucumber java 中创建范围 PDF 和 html 报告。报告正在以 html 格式创建,没有任何失败。 PdfReport 文件夹正在测试输出文件夹下创建。但报告不是通用的...

回答 2 投票 0

如何包含正在进行的黄瓜测试,但不执行它们

我的一些黄瓜场景失败了,我想将它们标记为@wip,这样我仍然可以在 Runner.java 类中标记它们,但不能实际运行它们。 我正在我的 .

回答 2 投票 0

验证 Cypress 中的复选框已选中

我想验证该复选框是否已选中。这是复选框的 HTML 它的js: localShopClerkcheckbox(){ return cy.get("[name='isLocalClerk']") //返回c...

回答 3 投票 0

如何停止同时运行我的 Cucumber.js 步骤?

我想编写一个 Cucumber.js 测试来测试我网站上的搜索表单。使用 Selenium Webdriver,我可以在搜索字段中输入一个术语并按回车键,没有问题。然而,在这一步之后......

回答 1 投票 0

是否可以输出每个场景运行的场景百分比?

在 Cucumber on Ruby 中,当运行大型功能时,我想看看我已经走了多远;一个有用的信息可能是“100 个场景中的第 20 个”或“已完成 30% 的场景”,

回答 1 投票 0

如何仅在从jenkins运行时运行特定代码?

我有下面的代码用于调用 chromedriver。在所有 chrome 选项中,仅当我从

回答 1 投票 0

当 Cucumber 场景失败时,mvn 测试不会失败

我有一个 RunCucumberTest 类,如此处 JUnit 部分所述,以及一个从 IntelliJ 中的装订线图标运行时失败的 Cucumber 场景。 但是,为什么mvn test构建成功呢? [W...

回答 2 投票 0

为什么我的黄瓜上下文配置无法识别?

我使用 Spring Boot 3,我想使用 JUnit/Cucumber 运行测试。 执行测试时我无法启动我的应用程序。 我有这个堆栈跟踪: io.cucumber.core.backend.CucumberBackendException:请

回答 1 投票 0

Junit5 Suite 未发现任何测试(使用 Cucumber 设置的 Spring Boot)

关注中 在这个例子中,我尝试在 JUnit5 中运行黄瓜测试,但 @Suite 不喜欢我: org.junit.platform.suite.engine.NoTestsDiscoveredException:套件 [org.ono.sprint.demo。

回答 1 投票 0

Jenkins 中的 Cucumber 测试运行两次

测试项目环境: 爪哇17 朱尼特5 黄瓜7 行家3.3.9 春天 跑步者类别: @套装 @IncludeEngines(“黄瓜”) @SelectClasspathResource(“项目/uss/as/play/test/features/sm...

回答 1 投票 0

在线黄瓜报表控制台输出在同一行

这是一个selenium java项目,使用Intellij Idea来运行测试自动化场景。它最后生成在线黄瓜报告。但正如你在图片中看到的,不幸的是,它梳理了......

回答 1 投票 0

如何使用打字稿通过剧作家 API 测试设置 Cucumber

当我使用 cucumber 和 playwright 时,我无法使用 GET、POST、PUT 任何 http 请求。在步骤定义中,我尝试使用 request.get 但它说不是函数。当我创造...

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.