cucumber

Chrome 62 and Flash

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-27 11:31:09
问题 I have a Flash-based app that I need to test using Cucumber. As flash is not enabled by default I need to enable it before each test and whitelist the url I believe. If I pause the test in it's background phase I can manually set these options. How can I automate this approach though, I have looked into adding options and preferences , but still cannot seem to get to work. So this is my standard setup in an env.rb file Capybara.register_driver :chrome do |app| chrome_binary = '/Applications

how to create executable jar file with cucumber tests?

走远了吗. 提交于 2019-12-25 16:12:14
问题 My service create an executable jar by gradle. When i create and run my jar (java -jar file.jar) i recive error: no main manifest attribute, in "file.jar" because i don't have main_class. I created main method: public static void main(final String[] args) throws Throwable { String[] arguments = {"--plugin", "html:build/reports/cucumber", "src/test/resources/features", "--glue", "src/test/java/steps"}; cucumber.api.cli.Main.main(arguments); } and My program founds the features but doesn't

how to create executable jar file with cucumber tests?

好久不见. 提交于 2019-12-25 16:09:56
问题 My service create an executable jar by gradle. When i create and run my jar (java -jar file.jar) i recive error: no main manifest attribute, in "file.jar" because i don't have main_class. I created main method: public static void main(final String[] args) throws Throwable { String[] arguments = {"--plugin", "html:build/reports/cucumber", "src/test/resources/features", "--glue", "src/test/java/steps"}; cucumber.api.cli.Main.main(arguments); } and My program founds the features but doesn't

Mocha + Cucumber to mock the Net response

瘦欲@ 提交于 2019-12-25 12:42:12
问题 The following is the app/models/websites.rb class Masterpiece < ActiveRecord::Base validates_presence_of :title, :link validates_uri_existence_of :link, :allow_redirect => false end The second validation is from the plugin Validates Existence of URI plugin The following is the features/support/mocha.rb file require 'mocha' World(Mocha::API) Before do mocha_setup @http_mock = mock('Net::HTTPResponse') @http_mock.stubs(:code => '200', :message => "OK", :content_type => "text/html", :body => '

Multiple Step Definitions match error in Cucumber

霸气de小男生 提交于 2019-12-25 11:05:47
问题 I recently got started with Cucumber. I am trying to implement Cucumber+Protractor+TypeScript, using this link as the baseline. I am trying to follow this structure, C:. | ├───.circleci | ├───.vscode | ├───e2e │ ├───features | | |--sample.feature | | |--sample2.feature | | │ └───steps | | |--pageobject1_step.ts | | |--pageobject2_step.ts | | |--common_step.ts I have a simple feature inside both sample and sample2 feature files. However when I try running the tests, I get `Given I am on the

Multiple Step Definitions match error in Cucumber

只谈情不闲聊 提交于 2019-12-25 11:05:22
问题 I recently got started with Cucumber. I am trying to implement Cucumber+Protractor+TypeScript, using this link as the baseline. I am trying to follow this structure, C:. | ├───.circleci | ├───.vscode | ├───e2e │ ├───features | | |--sample.feature | | |--sample2.feature | | │ └───steps | | |--pageobject1_step.ts | | |--pageobject2_step.ts | | |--common_step.ts I have a simple feature inside both sample and sample2 feature files. However when I try running the tests, I get `Given I am on the

Meteor.js: Using server.call when testing with Chimp

安稳与你 提交于 2019-12-25 10:02:24
问题 I'm having an issue triggering method calls while writing feature tests. I'm not actually given an error in the chimp terminal log, but the server.call line is where the failure is highlighted. I believe this might be related to the folder structure of the app (which I've loosely based on Letterpress) or the order in which the call is defined and then triggered. When I move the method call out to my main.js file (in the root folder of the app), it works without a problem. hooks.js path: /app

cucumber not able to recognize the implemented methods

丶灬走出姿态 提交于 2019-12-25 09:25:13
问题 Feature: Title of your feature Scenario Outline: Login to the application Given Application is launched When I check for the <username> in step When I verify the <password> in step Then I login to the application Examples: | username | password | | admin | Admin123 | Method Implemented in Step Definition Class: @When("^I check for the \"([^\"]*)\" in step$") public void i_check_for_the_admin_in_step(String arg1) throws Throwable { driver.findElement(By.id("username")).sendKeys(arg1); } @When(

Checking values with Cucumber and Watir

怎甘沉沦 提交于 2019-12-25 08:56:58
问题 I've been trying to get started with Cucumber and Watir. I've done the installation and written/copied a simple 'feature'. However, I'm not getting anywhere with checking what's on a page. This my feature: Feature: Search Google In order to make sure people can find my documentation I want to check it is listed on the first page in Google Scenario: Searching for JS.Class docs Given I have opened "http://www.google.com/" When I search for "JS.Class" Then I should see a link to "http://jsclass

Sonarqube + Cucumber + Gradle

断了今生、忘了曾经 提交于 2019-12-25 08:14:55
问题 Whenever I try to run ./gradlew sonarqube I get the following message: Scenario: This is a test # sample/helloworld/readycheck.feature:3 Given This is my first step # StepDefinitions.This_is_my_first_step() When This is my second step # StepDefinitions.This_is_my_second_step() Then This is my third step # StepDefinitions.This_is_my_third_step() 1 Scenarios (1 passed) 3 Steps (3 passed) 0m0.221s sample.helloworld.ReadyCheckTest > testDoGet STANDARD_OUT Checking ready status... Returing ready