behat

How can I tell selenium webserver standalone which firefox version to use?

情到浓时终转凉″ 提交于 2019-12-12 04:23:23
问题 Usually I start my selenium server like this: java -jar -Dwebdriver.firefox.profile=MyProfile /usr/local/bin/selenium-server-standalone-3.0.1.jar My programming language is php, so I use mink in which I initialize the Selenium2Driver. By executin my phpunit tests everything works fine, my firefox is started and all the tests run as they should. But selenium always starts my installed firefox version. How can I start a standalone version? Is there a parameter telling selenium which firefox to

Behat tests not running on CircleCI

拜拜、爱过 提交于 2019-12-12 03:55:23
问题 I'm having come trouble getting my tests to run within CircleCI. Locally the tests run fine, as shown on the right side of the screenshot. But in CircleCI, it will load the SuiteContext file and run the Before/AfterSuite methods, but nothing else. What would cause this sort of behavior? Thanks default: autoload: Test/Context suites: default: paths: features: Test/Features contexts: - SettingContext: ~ - LanguageContext: ~ - ActionContext: ~ - FrontendContext: ~ - FileTypeContext: ~ -

Behat, MySql Connection error in Laravel5 : 'PDOException''SQLSTATE[HY000] [2005] Unknown MySQL server host 'mysql' (2)'

坚强是说给别人听的谎言 提交于 2019-12-12 02:39:07
问题 I run Laravel applic ation in docker container dockervel and my feature is : Feature: Registation form In order to test register on this site As a visitor I need to fill in the necessary info Scenario: Given I am on the homepage Then I should see "Welcome" When I run vendor/bin/behat I get this The text "Welcome" was not found anywhere in the text of the current page. (Behat\Mink\Exception\ResponseTextException) --- Failed scenarios: This is in my log file: [2016-06-29 19:24:09] local.ERROR:

Accept browser permission dialog with behat/mink

谁说我不能喝 提交于 2019-12-12 00:43:45
问题 I'm using Behat with Mink. Currently I'm working on building a test for webrtc. The issue is that webrtc has a browser permission dialog where the user has to select that they do want to share their media. As this permission is from the browser itself instead of html I don't know how to accept it with mink or even if that's possible. Is there any work around or standard solution for this? I imagine the same issue holds true for anything a browser requires user permissions to use. 回答1: Option

bin/behat @FootballTeamBundle is fine but bin/phing is not for running FeatureContext

前提是你 提交于 2019-12-11 23:00:17
问题 If I use bin/behat @FootballTeamBundle in terminal as stand-alone, the error screen-shots are taken and saved under build/behat/ folder which is fine however, if I run bin/phing then the FeatureContext file seems to be ignored as a whole so neither screen-shots taken nor its internal methods are being triggered (such as I wait for ** seconds) which is strange. Anyone know the solution to it? I also updated the line to bin/behat -f progress --format html --out ${dir-report}/behat.html to bin

Preventing user login method running every single time after first login

风流意气都作罢 提交于 2019-12-11 20:34:44
问题 I'm trying to find a way to create a session/cookie to handle user login so that the method below doesn't run query against the database every singe time. It is being called in nearly all the scenarios and slows the test suite a lot. Important note: There are 2 different users login: user and admin so there may be three different sessions. When I login as "user" When I login as "admin" class FeatureContext extends MinkContext implements KernelAwareInterface { /** * @When /^I login as "([^"]*)

Configure behat with Symfony2

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 16:14:40
问题 I'm trying to configure Behat, but I have some errors. Here is config: default: suites: default: contexts: - FeatureContext: session: '@session' extensions: Behat\Symfony2Extension: ~ Behat\MinkExtension: sessions: default: symfony2: ~ Import to config.yml. And when I try run clear:cache or bin/behat I getting: There is no extension able to load the configuration for "default" (in /var/www/ontheway/app/config/behat.yml). Looked for namespace "default", found "framework", "security", "twig", I

Behat (+ Mink) Check for some text followed by some text (in sibling elements)

不打扰是莪最后的温柔 提交于 2019-12-11 14:11:55
问题 The I should see... function is an essential feature of Behat but I regularly find myself wanting to write something like this in my scenarios: Then I should see "Session ID" followed by "3" Which is my humanly-parsable way of describing 2 pieces of text next to each other in the content. That is to say the first string is the content of any element and the second is the content of it's next immediate sibling. This would be useful for checking label - value type layouts: Or if I want to check

Can behat check that steps are defined before trying to run anything?

巧了我就是萌 提交于 2019-12-11 13:17:10
问题 I've got a behat scenario that takes a long time to run. If I've written a step incorrectly, I have to wait for the test to hit that step before I find out my mistake when it tells me I've got an undefined step. Is there a way to get behat to check that all the steps it's going to try and run are defined, before it tries to run anything? 回答1: Use dry run option to prevent step execution: bin/behat --dry-run In the long run, you should rather fix your tests and make them quicker. For example,

Parameters in Behat 3

一世执手 提交于 2019-12-11 11:50:37
问题 I have a website written in PHP with around 40 countries. I started to develop test in Behat v3, with many features. Sometimes, I need to run a feature/suite with a specific country and on a specific server. For instance, what I have to do is : php bin/behat --suite=mySuite --env=stg --country=US,IT,CA Or something like that. For just retrieve URL by the environment and country passed in parameter. I think it's not possible whit Behat and if not, what kind of tool can I use ? Thanks ! 回答1: