cucumber

How to pass in timeout for cucumber command as in start_test_server_in_background(:timeout => 30)

 ̄綄美尐妖づ 提交于 2020-01-05 20:01:03
问题 After digging around for a few days for the launch issue, I found out if I use start_test_server_in_background(:timeout => 300) the app will be fully launched successfully. So for calabash command, the question become, how to pass in the timeout for cucumber command line? I tried the following for cucumber version 0.9.167 and it's not working. $ CONNECT_TIMEOUT=300 DEBUG=1 CALABASH_FULL_CONSOLE_OUTPUT=1 cucumber 回答1: CONNECT_TIMEOUT <== controls how long to wait for the server to respond to

How to get @tag in step definition from scenario ? - Ruby

老子叫甜甜 提交于 2020-01-05 15:06:55
问题 How to get tags from scenario into step definition in Ruby? **@TAGS** Scenario: Showing information of the scenario When I execute any scenario Now my step definition is this: And(/^When I execute any scenario$/) do |page| How to get tag = @TAGS in step definition.. end 回答1: Not a direct solution, but hooks (Before, After, AfterStep, etc) can be set to run for specific tags, which allows you to set instance variables that are accessible in the scenario Before('@my_tag') do # will only run if

How to get @tag in step definition from scenario ? - Ruby

旧城冷巷雨未停 提交于 2020-01-05 15:06:21
问题 How to get tags from scenario into step definition in Ruby? **@TAGS** Scenario: Showing information of the scenario When I execute any scenario Now my step definition is this: And(/^When I execute any scenario$/) do |page| How to get tag = @TAGS in step definition.. end 回答1: Not a direct solution, but hooks (Before, After, AfterStep, etc) can be set to run for specific tags, which allows you to set instance variables that are accessible in the scenario Before('@my_tag') do # will only run if

How to run the feature file for definite number for times in karate framework?

人走茶凉 提交于 2020-01-05 07:51:14
问题 Example: I need to post the payment for an account for 100 times with same set data . In that case how to iterate the particular feature file using karate framework. Please help on this issue. 回答1: Sounds like you need a performance testing tool instead of Karate. But still, if you insist, here is the best reference example call-dynamic-json.feature. Also make sure you read the section on data-driven features in the documentation. All the best ! 来源: https://stackoverflow.com/questions

How to run the feature file for definite number for times in karate framework?

与世无争的帅哥 提交于 2020-01-05 07:51:03
问题 Example: I need to post the payment for an account for 100 times with same set data . In that case how to iterate the particular feature file using karate framework. Please help on this issue. 回答1: Sounds like you need a performance testing tool instead of Karate. But still, if you insist, here is the best reference example call-dynamic-json.feature. Also make sure you read the section on data-driven features in the documentation. All the best ! 来源: https://stackoverflow.com/questions

How to test filters based on authorization using Gherkin?

一曲冷凌霜 提交于 2020-01-05 05:55:51
问题 I don't understand how should scenario look like when there is no actual business action to test something. Is the following scenario good enough? I don't understand how it can be converted into Past, Action, Future sequence. Scenario: Given The system contains the following users | email | role | | admin@example.com | ADMIN | | user@example.com | USER | And The system contains the following Products | Name | Active | | Product1 | true | | Product2 | false | Then The list of Products for

Correct way to take screenshot with Robotium and Cucumber

若如初见. 提交于 2020-01-05 03:07:24
问题 Which is the best way to take a screenshot when one scenario fails using Robotium and Cucumber ? I have tried (without success, because it doesn't execute runTest method) with this: import cucumber.api.CucumberOptions; import cucumber.api.java.After; import cucumber.api.java.Before; @CucumberOptions(features = "features", tags = {"~@ignore"}) public class CustomInstrumentationTestCase extends ActivityInstrumentationTestCase2<LaunchActivity> { protected Solo solo; public

Cucumber/Capybara: tests fail randomly under PhantomJS

一世执手 提交于 2020-01-04 09:57:07
问题 When I run cucumber scenarios under PhantomJS I get Capybara::ElementNotFound: Unable to find css ".given_class" exceptions in random places it looks like driver does not wait for element appearance I'm using: Ruby 2.0 Cucumber 1.3.6 Capybara 2.1.0 Selenium-webdriver 2.35.1 PhantomJS 1.9.1 回答1: Capybara, particularly with PhantomJS will load a page really quickly, and perform checks for elements. As such, some elements may not have loaded and tests fail. By default capybara has a wait time of

Cucumber/Capybara: tests fail randomly under PhantomJS

烂漫一生 提交于 2020-01-04 09:56:50
问题 When I run cucumber scenarios under PhantomJS I get Capybara::ElementNotFound: Unable to find css ".given_class" exceptions in random places it looks like driver does not wait for element appearance I'm using: Ruby 2.0 Cucumber 1.3.6 Capybara 2.1.0 Selenium-webdriver 2.35.1 PhantomJS 1.9.1 回答1: Capybara, particularly with PhantomJS will load a page really quickly, and perform checks for elements. As such, some elements may not have loaded and tests fail. By default capybara has a wait time of

Cucumber/Capybara: tests fail randomly under PhantomJS

爷,独闯天下 提交于 2020-01-04 09:56:02
问题 When I run cucumber scenarios under PhantomJS I get Capybara::ElementNotFound: Unable to find css ".given_class" exceptions in random places it looks like driver does not wait for element appearance I'm using: Ruby 2.0 Cucumber 1.3.6 Capybara 2.1.0 Selenium-webdriver 2.35.1 PhantomJS 1.9.1 回答1: Capybara, particularly with PhantomJS will load a page really quickly, and perform checks for elements. As such, some elements may not have loaded and tests fail. By default capybara has a wait time of