cucumber-java

qaf-cucumber - can not reference data from CSV data provider in BDD2 scenario outline

北城余情 提交于 2019-12-13 02:55:49
问题 Context I want to use qaf-cucumber to take advantage of QAF features while still using Cucumber with JUnit . Mainly, I need QAF for its data provider feature, allowing to externalize scenario examples in .csv in order to use them across several scenarios and features. Junit : 4.12 Cucumber : 5.0.0-RC2 QAF : 2.1.15 qaf-cucumber : 2.1.15-beta-3 (most recent version, as there is no release yet) Problem When using the QAF tag @dataFile above a scenario to specify the location of the .csv: I get

I am getting java.lang.ExceptionInInitializerError and java.lang.NoClassDefFoundError exceptions when running cucumber script through Selenium Java

拈花ヽ惹草 提交于 2019-12-13 02:54:31
问题 I have a cucumber and selenium test which has always worked fine and suddenly stops running with the below error. 1 Scenarios (1 failed) 14 Steps (14 skipped) 0m0.004s java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang

Maven ant task not getting executed while running cucumber tests

旧城冷巷雨未停 提交于 2019-12-13 02:54:13
问题 We are trying to set up cucumber framework tests. We started with sample tests and it ran fine. I then updated maven to have maven profiles which will do certain tasks specific to that profile. I have profile QA_Smoke and have ant task under it ( for now simple echo) . I have set this profile as active maven profile but whenever I run the profile , task does not get executed. Instead it directly starts cucumber tests. Below is snapshot of maven profile.Can someone please tell,how can we

Correct maven pom configuration for Cucumber Tests and maven-cucumber-reporting

不羁的心 提交于 2019-12-12 04:49:45
问题 I had this working in a previous project but cannot find it now... I am using Maven to build a java app and I am running tests on the app during the build process. I am using maven-cucumber-reporting plugin v3.0.0 to put together a report of the outcome. I want to: Run the cucumber tests Generate a report (whether or not the cucumber tests fail) Fail a build after generating reports if failed How can I setup my pom with a combo of maven-surefire-plugin , maven-cucumber-reporting plugin, and

cucumber repeat substeps in a feature file

最后都变了- 提交于 2019-12-12 03:56:16
问题 I have to run a feature file with multiple cases in a single login. For ex: Scenario: check total When user logs in with "username" and "password" And user checks for "" on "" And user checks for "" on "" Examples: | username | password | amount1 | date1 |amount2|date2|... some 20 entries.. I need to check for amount on date in a single login,while in my scenario it is login each time for every entry in data table.How do I achieve it? Instead I want something like this: When user logs in with

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

Create customize file report name in @CucumberOptions

北城余情 提交于 2019-12-11 18:50:02
问题 I am trying to customize the extent report which is a third party reporting tool added to my cucumber framework where I want to customize the name of the report.html to "Outputfilename".html which I unable to do as the value of "Outputfilename " is coming from my config file. here is my testrunner code @RunWith(Cucumber.class) @CucumberOptions( features = ".//src//test//java//FeatureList",glue = "stepDefinations", plugin = { "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber

Creating Cucumber Test on Executable Docker Image

僤鯓⒐⒋嵵緔 提交于 2019-12-11 18:30:16
问题 I am trying to come up with an idea on how to create a Cucumber Test on Docker Executable Image? public class GenerateNumber { public static void main(String[] args) { if (args != null && args.length > 0) { String input = args[0]; if(input.equals("ODD")) { //GENERATE ODD NUMBERS FROM 0 TO 1000 }else { //GENERATE EVEN NUMBERS FROM 0 TO 1000 } } } } Supposed I have this simple class file...I am packaging it into an executable Jar File and use this class as an entry point in my application. The

Getting an Exception when running tests in parallel using testng, mavensurefire plugin and cucumber jvm

拥有回忆 提交于 2019-12-11 15:26:37
问题 I am trying to execute cucumber feature files in parallel by automatically generating test runners using cucumber-jvm plugin and running them parallel using maven-surefire plugin. When running the command "mvn clean test" i am getting the below errors Below is my POM.xml, testng.xml file and testRunners. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Suite" parallel="tests"> <!-- how many scenarios we can execute at a time is

JUnit Cucumber cannot find steps

会有一股神秘感。 提交于 2019-12-11 12:59:37
问题 During the execution of the "mvn test" command, I obtain this error message : 7 Scenarios (7 undefined) 31 Steps (31 undefined) 0m0,000s You can implement missing steps with the snippets below... Nevertheless all this steps is defined well in my files and correspond well to snippets proposed in the error message ! This is my Cucumber runner : @RunWith(ExtendedCucumber.class) @ExtendedCucumberOptions(jsonReport = "target/cucumber.json", retryCount = 3, detailedReport = true,