cucumber

How to match a specific java file with specific feature file in cucumber

大憨熊 提交于 2019-12-11 15:32:32
问题 I've created three java and feature files within cucumber and there's following code part for each java file. @Before public void startbrowser() { System.setProperty("webdriver.gecko.driver","/Users/firatkaymaz/eclipse-workspace/SeleniumTest/drivers/geckodriver/geckodriver"); driver = new FirefoxDriver(); so once i try to run one of my cucumber files (run as ->cucumber feature), three browser is opening because all @Before annotations located in three java file are being executed. how can i

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

java.lang.NoClassDefFoundError: gherkin/formatter/Reporter for Cucumber with extent reports

北城以北 提交于 2019-12-11 15:22:52
问题 I am trying to generate extent report for my test case using Cucumber and Extent report using JUnit. But I am getting: java.lang.NoClassDefFoundError: gherkin/formatter/Reporter and java.lang.NoClassDefFoundError exception while running cucumber test using JUnit These are the dependencies which I have added to my pom.xml: <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-java</artifactId> <version>2.3.1</version> <scope>test</scope> </dependency> <dependency> <groupId>junit<

How to handle different users in different environments

你说的曾经没有我的故事 提交于 2019-12-11 15:14:19
问题 For a login page automation, a user need to enter user id, security answer and password. Different environment have different users. For example, users for qa and dev environments have different user id, security answer and password. So how to handle user information properly in the automation test? We can store all the properties in the properties file, any other better solutions? 回答1: You can try Data Driven Framework automation test. Collect your data input in external file like excel csv

frank build fails on ld command

老子叫甜甜 提交于 2019-12-11 15:08:33
问题 I'm following the tutorial recommended on the Frank-Cucumber website (http://blog.thepete.net/blog/2012/06/24/writing-your-first-frank-test/), but once executing frank build , the build fails saying: The following build commands failed: Ld Frank/frankified_build/2012\ Olympics.app/2012\ Olympics normal i386 (1 failure) This clang error is present around the previous ld call: clang: error: linker command failed with exit code 1 (use -v to see invocation) I'm using XCode 4.6.3, I have the

Cucumber Protractor times out after using then() on elements selected using Protractors element function

与世无争的帅哥 提交于 2019-12-11 14:58:32
问题 I have an issue which description matches perfectly with I am not able to identify elements using protractor in angular 2 application but for me the problem is not fixed by adding # before the id value Here is the code below: When('I select my input box', (callback) => { let inputbox = element(by.css('#roomWidthInput')); console.log('inputBox promise set'); var scrpt = "return document.getElementById('roomWidthInput');"; browser.executeScript(scrpt).then(function (text) { console.log('info',

RSpec can't find Cucumber gem

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 12:38:50
问题 When running rspec I get the following error: no such file to load -- cucumber-rails /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:208:in `load' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:307:in `load

Cucumber does not read data from scenario outline

心已入冬 提交于 2019-12-11 12:34:29
问题 I have following scenario outline Background: Given customer is in hot or not page Scenario Outline: Hot article And customer enters <name> And submits And customer clicks thumbs up Then ensure the TBD Examples: | name | | Elliot | | Florian | and following step implementation - @And("customer enters <name>") public void customer_enters_name(String name) throws Throwable { // Express the Regexp above with the code you wish you had Thread.sleep(10000); } But when I execute test then I get

Cucumber - implementing missing steps in java

眉间皱痕 提交于 2019-12-11 12:30:19
问题 I have the below cucumber feature without any corresponding java code actions. @CucumberTest Scenario: Testing cucumber Given I have this test. When I test This Then I get this When I run it I get the following results 1 Scenarios (1 undefined) 3 Steps (3 undefined) 0m0.000s You can implement missing steps with the snippets below: Given("^I have this test\\.$", () -> { // Write code here that turns the phrase above into concrete actions throw new PendingException(); }); When("^I test This$",

Uploading file by label tag in capybara

左心房为你撑大大i 提交于 2019-12-11 11:52:08
问题 I have problem uploading file by using capybara and cucumber. The HTML is the following <div class="dyn-crm-upload-btn-container"> <label class="btn btn-primary btn-sm" data-bind="visible: newCrmBtnEnabled, enabled: fileEditEnabled"> <i class="fa fa-plus"></i> <span data-bind="i18n:panels.partnerCrm.new" data-i18n="panels.partnerCrm.new">NEW</span> <input id="dyn-crm-file-input" class="dyn-crm-upload-btn" type="file" name="file" accept=".csv" data-bind="events: { change: setFileToNewName }"><