cucumber

Good cucumber tutorial not dependent on rails [closed]

你离开我真会死。 提交于 2019-12-07 02:48:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm looking for a good cucumber tutorial that doesn't force me to use rails. Any good Suggestion? 回答1: A new book - The Cucumber Book provides a great introduction to Cucumber and continues on where the RSpec book left off. This new resource provides examples for non-rails application testing, both simple

Can I use Selenium IDE to generate Cucumber/Capybara steps?

自作多情 提交于 2019-12-07 02:02:53
问题 I've both installed Selenium IDE (Firefox addon) and Capybara (gem). I'm now driving Selenium from Cucumber/Capybara steps (@javascript) in my rails app. The question is: Can I export Selenium IDE steps as Cucumber/Capybara steps? In Selenium IDE Options > Format I can only see Ruby (Test::Unit) and RSpec, but having Capybara format as well would be awesome . Thank you. 回答1: I don't believe it is possible to export Selenium IDE tests as Cucumber scenarios. Honestly, I'm not even convinced

Log-in through authlogic without having to fill in form every time

£可爱£侵袭症+ 提交于 2019-12-07 01:15:39
问题 I have a number of Cucumber scenarios which run with capybara on a project I am working on. Most of these scenarios start with a "Given I am logged in" step. Currently my implementation of this is: visit path_to('the login page') fill_in('Username', :with => 'user') fill_in('Password', :with => 'password') click_button('Login') This works fine, however it is becoming a bit time consuming having to load and submit the login form before every single scenario. Is there a way to simply set up the

Ruby + Cucumber: How to execute cucumber in code?

╄→尐↘猪︶ㄣ 提交于 2019-12-06 22:09:49
问题 I'd like to execute Cucumber features from within Ruby code. Typically the cucumber binary installed with the gem is executed on the command line with one or more features specified. However, I'd like to define logic that creates a dynamic feature execution flow. In other words, the program can work out which features should be executed. Is it possible to instantiate Cucumber with specified feature files from Ruby code as opposed to the command line? 回答1: I discovered how from the mailing

capybara - Find with xPath is leaving the within scope

依然范特西╮ 提交于 2019-12-06 20:33:45
问题 I am trying to build a date selector with Capybara using the default Rails date, time, and datetime fields. I am using the within method to find the select boxes for the field but when I use xPath to find the correct box it leaves the within scope and find the first occurrence on the page of the element. Here is the code I am using. The page I am testing on has 2 datetime fields but I can only get it to change the first because of this error. At the moment I have an div container with id that

How to run a single cucumber scenario in Intellij?

依然范特西╮ 提交于 2019-12-06 18:54:00
问题 I have a simple problem - I want to run a single Cucumber scenario, but I can't seem to find any option/configuration for that. I have 5-6 scenarios and I can set up configurations to run all tests, but It takes too much time, when I am correcting one scenario... 回答1: Tag the feature file with any name, you may add multiple tags separated with spaces. Eg : @acceptance @regression Now, add below options in the end of VM otions by editing configuration -Dcucumber.options="--tags @acceptance"

Cucumber: Wait for ajax:success

空扰寡人 提交于 2019-12-06 17:12:39
问题 I have the following typical cucumber steps in a Rails 3.1 project: ... When I follow "Remove from cart" Then I should see "Test Product removed from cart" The difficulty is that "Remove from cart" button is an ajax :remote call, which returns "Test Product removed from cart" to the #cart_notice element via: $('#cart_notice').append("<%= @product.name %> removed from cart"); The function works fine in the browser, but doesn't find the "Test Product removed from cart" text in cucumber. I'm

How to convert a DataTable in Cucumber to a List of objects?

懵懂的女人 提交于 2019-12-06 16:56:20
Original Title: What does scalar mean in Cucumber DataTables in Java? From this reference: Java provides several scalar types. These include primitive numeric types, plus boolean and char. Every scalar (primitive) type has an associated wrapper class or reference type. Reading the javadocs: /** * Converts the table to a List. * * If {@code itemType} is a scalar type the table is flattened. * * Otherwise, the top row is used to name the fields/properties and the remaining * rows are turned into list items. * * @param itemType the type of the list items * @param <T> the type of the list items *

how use tests written in Selenium and Cucumber-JVM with JMeter?

随声附和 提交于 2019-12-06 16:14:57
I have set of functional tests written in Selenium and Cucumber-JVM, I use maven to run them by Cucumber tags. Now I need to use some of those tests with JMeter to check performance. How can I do it? I believe that you can just Compile your tests into .jar file(s) Copy the .jar file(s) into JMeter classpath tests files - under /lib/junit folder of your JMeter installation dependency files - under /lib folder Add JUnit Request Sampler and choose required test from "Classname" and "Test Method" dropdowns Configure JMeter as per your load scenario and run the test See How to Use JUnit With JMeter

How to pass multiple parameter to Cucumber Runner file from jenkins

那年仲夏 提交于 2019-12-06 16:14:16
问题 I am executing my test cases from Jenkins and passing multiple cucumber tags from Jenkins to execute my scenario - Runner File - plugin = { "pretty", "html:target/test-report" }, features = { "src/main/resources/abc/features" }, tags = {"@Demo","@Alpha"} ) Jenkins Parameter- test -Dcucumber.options="src/main/resources/myuhc2/features/ --tags @Demo, --tags @Alpha" but this is not working and I am getting error - Tests in error: Not a file or directory - /home/jenkins/workspace/XYZ2.0/consumer