cucumber

Parallel Test run with cucumber

放肆的年华 提交于 2019-12-22 13:11:18
问题 I am currently trying to achieve parallel test run with cucumber. I managed to run two different runners at the same time with the sure-fire plugin. Now I want to check whether is it possible to run SingleRunner file multiple times in parallel. Ex: I have SignUpRunnerTest.java so I need to run this against few platforms parally.Is it possible? This is my Runner file import cucumber.api.CucumberOptions; import cucumber.api.cli.Main; import cucumber.api.junit.Cucumber; import java.util.List;

Getting “is not a thenable” message while using “eventually” in protractor chai

我与影子孤独终老i 提交于 2019-12-22 11:24:02
问题 When I tried to verify the condition as below. var val1 = "ONE"; var val2 = "TWO"; expect(val1==val2).to.eventually.equal(false) I'm getting false is not a thenable message, If I removed eventually condition as below then it working fine. var val1 = "ONE"; var val2 = "TWO"; expect(val1==val2).to.equal(false) Can anyone help me to understand the difference. Also If the condition fails, It displays the error message and not executing the hooks.js . 回答1: In simple words: eventually - is a method

Reusable/Generic Examples table in Cucumber

岁酱吖の 提交于 2019-12-22 11:23:58
问题 Is it possible for multiple scenarios to use the same Examples table? So instead of having something like the following: Scenario Outline: First Scenario Given I am viewing "<url>" Then I assert that the current URL "<url>" Examples: | url | | https://google.com | | https://twitter.com| Scenario Outline: Second Scenario Given I am viewing "<url>" with route "</contactus>" Then I assert that "<url>" contains "contactus" Examples: | url | | https://google.com | | https://twitter.com| I can do

How to get the exception that was thrown when a Cucumber test failed in Java?

落爺英雄遲暮 提交于 2019-12-22 10:29:25
问题 I can perform actions on test failure by using: @After public void afterTest(Scenario scenario) { if (scenario.isFailed()) { /*Do stuff*/ } } However some of the actions I need to perform depend on the Exception that was thrown and in what context it was thrown. Is there a way to get the Throwable that caused the test to fail? For example in JUnit I would do this by extending TestWatcher and add a rule to my tests: @Override protected void failed(Throwable e, Description description) { /*Do

How can I test a Ruby command-line program that communicates with a web service?

假如想象 提交于 2019-12-22 08:20:12
问题 I am building a Ruby command-line program that communicates with a web service. I am using Cucumber and Aruba to test the program. The problem is that I need to control the data returned from the web service; the program grabs a stream of user comments, so this can change frequently as new comments are added. I tried to mock the web service using WebMock, but this didn't work, since Aruba spins the command-line program off into a separate process that is unaffected by WebMock (so it still

List all available tags in Cucumber

。_饼干妹妹 提交于 2019-12-22 05:22:06
问题 Is there a command line option to list all the tags in your cucumber test suite? For example, I would want something like: cucumber --show-tags foo.feature That would give me something like: @ci @development @regression @wip 回答1: For a single file: cucumber -f tag_cloud foo.feature You could also find the tags of all features in a directory: cucumber -f tag_cloud features/login Or even features that are shared with a particular tag: cucumber --format tag_cloud --tags @bvt The output generated

How to use headless chrome with capybara and selenium

依然范特西╮ 提交于 2019-12-22 04:01:24
问题 Chrome version: 59.0.3071.104 Using Cucumber, Capybara, Selenium to implement automation testing with Headless Chrome. features/support/env.rb require 'rubygems' require 'capybara/cucumber' Capybara.register_driver :selenium_chrome do |app| Capybara::Selenium::Driver.new(app, :browser => :chrome, args: ['headless']) end Capybara.default_driver = :selenium_chrome When running a cucumber test, it says: WARN Selenium [DEPRECATION] :args or :switches is deprecated. Use Selenium::WebDriver::Chrome

Cucumber and RSpec testing with zeus: Postgres is being accessed by other users

ぐ巨炮叔叔 提交于 2019-12-22 01:17:40
问题 In my Rails 3.2.13 app, I'm using Zeus. In the test environment I use PostgreSQL. When I run Cucumber and then RSpec (or the other way around), 9 out of 10 times I get the message: PG::Error: ERROR: database "bp_test" is being accessed by other users DETAIL: There are 1 other session(s) using the database. : DROP DATABASE IF EXISTS "bp_test" Tasks: TOP => db:test:load => db:test:purge (See full trace by running task with --trace) It takes a whole non-deterministic circus of trying to kill

Writing integration tests against external resources which are A/B testing

喜你入骨 提交于 2019-12-21 21:29:56
问题 I have a bit of a design question and I'm curious if other users have run into this and how to develop the most elegant solution. I have some integration type feature tests in Cucumber using Capybara/Celerity/Selenium. A portion of these tests drive an external website to see how well my resources integrate (cookies, Javascript, etcetera). One particular external site is undergoing their own heavy A/B testing with a similar but significantly different site design, so my tests fail with the

Cucumber Java screenshots

我的梦境 提交于 2019-12-21 21:17:32
问题 Is there a way to take screenshots in between steps in Java Cucumber ? I have the following scenario : @Scenario_1 Given I log into url And I see the home page is displayed in English //Take screenshot And I click on 'Edit Profile' And I see the language set to 'English' When I change the language to Chinese //Take screenshot And I navigate to home page Then everything is displayed in Chinese //Take screenshot I want to take screenshots for certain steps of the scenario. I am currently taking