cucumber

Cucumber 0.4.3 (cuke4duke) with java + maven gem issues

限于喜欢 提交于 2019-12-07 21:45:05
问题 I recently embarked on installing a sample project for cucumber and tried running it with maven + java. I followed this guide http://www.goodercode.com/wp/using-cucumber-tests-with-maven-and-java/ First issue was when I run mvn cuke4duke:cucumber -DinstallGems=true I was getting an issue running gem command from the jruby-complete-1.5.6 jar I installed JRuby1.5.6 and installed the cuke4duke gem myself to the maven repository. Now when I run the command above I get an error in the script file

cannot load such file — 2.2/gherkin_lexer_en, how to fix?

假装没事ソ 提交于 2019-12-07 17:53:50
问题 I need a little help. How do I resolve this problem? When I call cucumber I get the following error: *** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic on/) to get coloured output on Windows WARNING: cannot load such file -- 2.2/gherkin_lexer_en Couldn't load 2.2/gherkin_lexer_en The $LOAD_PATH was: lib C:/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-1.3.19/bin/../lib C:/Ruby22/lib/ruby/gems/2.2.0/gems/builder-3.2.2/lib C:/Ruby22/lib/ruby/gems/2.2.0/gems/diff-lcs-1.2

run cucumber tests parallel using cucumber-jvm 4

末鹿安然 提交于 2019-12-07 17:10:55
问题 Java v8.x - spring v5.x cucumber v4.2.0 i tried temyers/cucumber-jvm-parallel-plugin and it works fine, but when i get to their gitihub page they announced to stop using this plugin b/c cucumber already have start supporting parallel test running support from cucumber-jvm 4.0.0. I have existing tests with using following maven dependencies. cucumber-java v4.2.0 cucumber-junit v4.2.0 cucumber-spring v4.2.0 i have two questions making me confuse. In order to use cucumber-jvm do i have to change

Cucumber test not running

三世轮回 提交于 2019-12-07 15:53:43
问题 I am working on my first feature file/selenium project. I have created a feature file and runner class. package cucumberpkg2; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions (features="Features") public class Runner { } I have the feature file test.feature Feature: Login screen Scenario Outline: Successful login Given User is on Login page When User enters valid UserName and Password And Clicks

Cookies within a cucumber test using capybara

前提是你 提交于 2019-12-07 12:50:22
问题 As part of my integration tests for a website I am using cucumber with capybara. It seems that capybara cannot emulate the use of cookies. For example I set the cookie when the user signs in: def sign_in(user) cookies.permanent.signed[:remember_token] = [user.id, user.salt] current_user = user end However when I later fetch the value of cookies using cookies.inspect it returns {} Is this a known limiting of capybara? How can I test a signed in user over multiple requests if this is the case?

Cucumber + Capybara + Selenium: selecting text

让人想犯罪 __ 提交于 2019-12-07 08:12:30
问题 I'm making changes to a text editor, and I need to be able to select text to manipulate it with JavaScript. How do I select text with Cucumber, Capybara and Selenium? 回答1: I found another stackoverflow question that talks about how to select text using JavaScript. Can you set and/or change the user’s text selection in JavaScript? I was able to modify their script to be able to work within a getEval call from Selenium IDE (if you're using Selenium in a different way, you may need to modify it)

stack level too deep (SystemStackError) when using both rspec and cucumber with ruby and rails

二次信任 提交于 2019-12-07 06:32:09
问题 This is a question about what debugging strategy I should use when encountering a stack level too deep (SystemStackError) using Ruby and Rails. I am seeing these errors when using either rspec or cucumber perrys-MacBook-Pro:pc perry_mac$ cucumber stack level too deep (SystemStackError) /Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:240 perrys-MacBook-Pro:pc perry_mac$ rspec /Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3

Rails: Cucumber not cleaning DB

谁都会走 提交于 2019-12-07 06:27:26
问题 I'm having some issues with cucumber & database transactions - specifically, when I run the test suite, database transactions are not cleaned afterwards. I'm running rails 3.1 with spork, postgres. Initially features/support/env.rb was set to use database_cleaner, but consistently got the following error on each call to the db: No database specified. Missing argument: database. (ArgumentError) /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0.rc4/lib/active_record/connection

How do I send_keys a down arrow in capybara

做~自己de王妃 提交于 2019-12-07 06:14:08
问题 I have a special listbox that I could automate best by sending a down arrow and pressing enter. I can press enter like so: listbox_example = find(input, "listbox-example") listbox-example.set("stuff") #down arrow command goes here listbox-example.native.send_keys :return How do I write the down arrow command? 回答1: If I remember correctly the correct way to send the down arrow command is to use arrow_down So your code should look like this listbox-example.native.sendkeys :arrow_down If you

Routing http requests through Node.js

╄→гoц情女王★ 提交于 2019-12-07 04:24:52
问题 I'm trying to make a cucumber test setup with Node.js that can test any website by using an iframe. Normally the iframe is a no go because of cross script security limitations. However if it was possible (I'm sure it is. And i trust you to come up with a solution) to fetch the website being target for the test via the requested url when a specific url name is being requested, so that the iframe would be loaded with a copy of the test target. Basically just a standard node.js server that