cucumber-jvm

Cucumber Eclipse - Resolving warning: Cucumber-JVM's --format option is deprecated. Please use --plugin instead

感情迁移 提交于 2019-12-12 06:35:36
问题 Running Cucumber with Eclipse and getting the following warning: Cucumber-JVM's --format option is deprecated. Please use --plugin instead Tried to use Eclipse search functionality to search for "--format" and "format" but unable to find the relevant file I need to change. Any ideas? 回答1: In cucumber-java/src/org/jetbrains/plugins/cucumber/java/run/CucumberJavaRunConfigurationProducer.java change public static final String FORMATTER_OPTIONS = " --format org.jetbrains.plugins.cucumber.java.run

Cucumber cannot find StepDefinitions while running the code but manually using the option “Find Step” can find step definition

天大地大妈咪最大 提交于 2019-12-12 05:14:33
问题 In the project Structure defined like below, src/main/java -- Config (RunCukesTest.java) -- StepDefinitions src/test/resources -- features/login When I run from RunCukesTest.java using RunAs --> JUnit Test, Step Definitions cannot be found by runner When I click find Step, opens the right file. Couldn't understand where the issue is because the code was running few days back. File is downloaded from here https://drive.google.com/open?id=0B4SgyzyvwKhiVTRmRDZuNXNTSjA Runner class code package

Usage: java cucumber.api.cli.Main [options] [ [FILE|DIR][:LINE[:LINE]*] ]+

本小妞迷上赌 提交于 2019-12-12 04:34:29
问题 I am getting this error while running my feature file Usage: java cucumber [options] [ [FILE|DIR][:LINE[:LINE]*] ]+ Options: -g, --glue PATH Where glue code (step definitions and hooks) is loaded from. -f, --format FORMAT[:PATH_OR_URL] How to format results. Goes to STDOUT unless PATH_OR_URL is specified. Built-in FORMAT types: junit, html, pretty, progress, json. FORMAT can also be a fully qualified class name. -t, --tags TAG_EXPRESSION Only run scenarios tagged with tags matching TAG

Cucumber test scenarios running in parallel?

梦想与她 提交于 2019-12-12 04:29:39
问题 I've couple test features in my project and so far i'm running them in parallel using runner classes with thread count.. but the problem here is optimising execution time because on of these threads taking longer time to finish test scenarios Is there any better approach to execute test scenarios in parallel?? Any help.. much appreciated!! 回答1: Take a look at Courgette-JVM It has added capabilities to run cucumber tests in parallel on a feature level or on a scenario level. It also provides

serenity cucumber browser unique session per feature

我与影子孤独终老i 提交于 2019-12-12 04:05:58
问题 I'm looking at serenity (the following versions) <serenity.version>1.1.26</serenity.version> <serenity.maven.version>1.1.26</serenity.maven.version> <serenity.cucumber.version>1.1.5</serenity.cucumber.version> I have feature files F1, F2, F3. I'm looking for support to run all the scenarios in F1 (only) to run in a single browser session. The scenarios in F2 and F3 can run in a "browser per scenario" mode. How to achieve this? 回答1: Cucumber hooks do the job for you. import cucumber.annotation

NoClassDefFoundError while setting up cucumber tests

给你一囗甜甜゛ 提交于 2019-12-12 03:17:20
问题 I am getting the following error with my cucumber setup. I was following a youtube video (https://www.youtube.com/watch?v=pD4B839qfos&list=PL_noPv5wmuO_t6yYbPfjwhJFOOcio89tI) for this setup but I downloaded all the latest jars. Not sure what went wrong but now I can't figure out what needs to be done. Can anyone help me, please? Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/formatter/Formatter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader

Cucumber-Java i18n zh-CN in eclipse not working

﹥>﹥吖頭↗ 提交于 2019-12-12 02:29:06
问题 we are working on test automation using Cucumber-Java, Maven in Eclipse IDE below is the code which we are trying to execute but facing issues, kindly help us I have also change default encoding to UTF-8 Cucumber code # language: zh-CN 功能: 测试 场景: 注册负方案 而且 一世 开放 "https://accounts.coursera.org/signup" 网址 在 该 浏览器 Below is the step implementation @而且("一世 开放 \"([^\"]*)\" 网址 在 该 浏览器") public void i_go_to_URL_Chinese(String url) { try { String configuredURL = config.getString(url); DriverFactory

Pass cucumber options dynamically in cucumber-junit?

我是研究僧i 提交于 2019-12-11 19:57:40
问题 I understand that @CucumberOptions is used to pass Cucumber options. However, due to the limitation that Java annotations only allow inline constants, it is quite cumbersome to use @CucumberOptions . So, is there a dynamic way to pass Cucumber options when using cucumber-junit? Thank you very much. 回答1: This question is quite old now, but the answer is yes you can. If you are using maven for example just add it like this. mvn test -Dcucumber.options="--tags @your_tag" You can filter yous

Running features cucumber in parallel in different browser using selenium testNG

人走茶凉 提交于 2019-12-11 18:17:32
问题 How can i run cucumber features using testNG and selenium or cucumber-JVM i'm new in this but after my researsh i think that cucumber jvm doesn't work in paralell for me i added also the surefire plugin now i try to test with TESTNG my testNg.xml : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="run test in parallel Suite" parallel="tests" verbose="1" configfailurepolicy="continue" thread-count="2"> <listeners> <listener classname

Unable to create test Runner class in Cucumber Framework due to Error in resolving Cucumber Options

旧时模样 提交于 2019-12-11 17:58:24
问题 I am working on creating a Cucumber Framework for Test Automation. Issue I am facing is I am not able to resolve the imports for CucumberOptions in the Test Runner class Initially I tried to use the Suggestion of importing cucumber.api which is now deprecated. Then I went to the official Cucumber site to find the imports but they are not solving the problem as well. Deprecated Import : import cucumber.api.CucumberOptions; Import from Cucumber Official Site : import io.cucumber.junit.Cucumber;