Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Rich Bodo
    @richbodo
    We are trying to debug doobie, a D7 module that uses the php behat suite, and we're looking for some tips. URLs seem to be mangled a bit on the way into the Behat DSL engine.
    jazzcool31
    @jazzcool31
    Anyone getting an issue on I am on "xyz" # Drupal\DrupalExtension\Context\MinkContext::visit()
    DMore\ChromeDriver\StreamReadException in /var/www/ibm/vendor/dmore/chrome-mink-driver/src/DevToolsConnection.php:70
    Stack trace:
      #0 /var/www/ibm/vendor/dmore/chrome-mink-driver/src/DevToolsConnection.php(52): DMore\ChromeDriver\DevToolsConnection->waitFor(Object(Closure))
      #1 /var/www/ibm/vendor/dmore/chrome-mink-driver/src/ChromePage.php(42): DMore\ChromeDriver\DevToolsConnection->send('Page.navigate', Array)
    I am using BLT with dMore extension
    Please suggest if anyone has any solution on same, i am struggling for last couple of days
    Ghost
    @ghost~5b5995f1d73408ce4fa26375
    Hey, I am trying to use a DI container in Behat Contexts. At first, I used a ContextInitializer and called a setDIContainer() method, which works, but is messy and uses a lot of boilerplate code.
    What I am now trying is using the ContainerBuilder that is passed to the extension, and filling it with my own services.yaml
    Parameters work ok, but services are ignored.
    Any ideas?
    Ghost
    @ghost~5b5995f1d73408ce4fa26375
    :-O Ha, what? You can just paste your services.yaml in the behat.yaml? That is so cool!
    Why is that not documented anywhere? I had to debug Behat for an hour now to stumble across that feature after several hours of trying to find other ways.
    I will write a blog post on this now (german, though), maybe save some other guys a few hours of searching.
    Ghost
    @ghost~5b6c4ba5d73408ce4fa4115c
    hi all, anyone here?
    Douglas Reith
    @redthor
    new to behat - using symfony 4 with dotenv .env - is there a standard practice for loading the values in .env into the behat environment so my test cases don't fail?
    Douglas Reith
    @redthor
    ok, so I worked it out, features/bootstrap/bootstrap.php is loading DotEnv but only if APP_ENV is not defined, I unset that in my local environment and now all is fine
    Jaroslav Rakhmatoullin
    @tox2ik
    Is there a way to force behat to write exceptions / errors / notices to the configured (php.ini) error_log instead (or in addition to) of rendering them in the output?
    Renato Marinho
    @renato2marinho_twitter

    Hey guys, I'm GitScrum founder. I want to invite group members to get to know GitScrum. Site: https://site.gitscrum.com/

    GitScrum’s agile approach to project management has proven itself to be a time and money saving strategy with the flexibility to keep up with rapid changes.

    Victor Hugo
    @victorhsanjos_twitter
    Hi, I'm new to behat! I'm using transformers to get :card, :card1 and :card2. With this regular expression /^:card(\d*)$/ but not working.
    Bit Wombat
    @bitwombat
    @victorhsanjos_twitter post code :)
    mmilinkovic
    @mmilinkovic

    Hi there, i have some issue whit Behat on Lumen 5.2

    this is my post on StackOverflow so if somebody can leave a comment i would be thankfull

    https://stackoverflow.com/questions/52704017/problem-with-laravel-lumen-applicationpreparerequest-must-be-an-instance-of

    Christian Sciberras
    @uuf6429
    I've seen "exercise" mentioned in a few places around behat code and also some of the docs. What is it exactly? I couldn't find full documentation explaining it.
    Ciaran McNulty
    @ciaranmcnulty
    beforeExercise hook runs before the first suite
    And afterExercise after the end of the last suite
    Christian Sciberras
    @uuf6429
    ok, so exercise is a bit like a whole "profile" in behat.yml terms?
    Ciaran McNulty
    @ciaranmcnulty
    Yeah the whole shebang
    Christian Sciberras
    @uuf6429
    Thanks, good to know! My next question, if I may: I'm trying to set up some fixtures setup/teardown in before/after feature.
    The problem is that the hook has to be a static method.
    Since my context receives some dependencies (which may have to be passed to the fixture), I won't be able to pass them during these two hooks.
    So I went with a different approach which stinks of a hack.
    In beforeScenario I check if the scenario is the first one and if it is, then set up the fixture.
    Likewise, in afterScenario, if it is the last one, I teardown the fixture.
    Should I be concerned or is it passable?
    Ciaran McNulty
    @ciaranmcnulty
    That’s acceptable I think. The context is not instantiated until the scenario so they have to be static. Possibly we should support auto wiring in beforeScenario hooks if we do not already
    Moises Ruiz
    @MoisesRuiz_gitlab
    I am a beginner, how can install and configure behat in a project?
    D_R
    @acdpro9x_twitter
    I learning behat, but I difficult to understand pystrings. I don't know how to use it ?
    Alexandre Lemaire
    @Saeven
    What's the right Behat\Testwork\EventDispatcher\Event\ event for start and finish of a feature?
    Christian Sciberras
    @uuf6429
    Hi! Maybe someone might find this useful: https://github.com/uuf6429/behat-breakpoint
    Raaghav Srinivasan
    @raags90_twitter

    Hi ! I am new to Behat, trying to understand if Behat can be used to write evil stories (https://www.owasp.org/index.php/Agile_Software_Development:_Don%27t_Forget_EVIL_User_Stories) .... has anyone seen this being used to perform security testing ?

    Also are there any lessons learned/gotchas you can share as part of getting Behat setup within the SDLC of your organization ? any resource would be helpful. Thanks in advance!

    Christian Sciberras
    @uuf6429
    They look like regular stories to me. You just need a different set of step definitions.
    Raaghav Srinivasan
    @raags90_twitter
    thanks ! fair point, was curious to see if anyone has taken this approach for security and has come across any issues/challenges... does integrating behat into the sdlc involve any code level changes on the application code base in order to support the tests ? or is it something which can be done standalone ?
    Christian Sciberras
    @uuf6429
    If someone develops a context to provide your steps, then you don't need any code. But this is unlikely, especially in this case.
    Behat doesn't provide navigation, for example. It's provided by mink instead.
    Raaghav Srinivasan
    @raags90_twitter

    I am not sure what you meant by "if someone develops a context" , if I understand correctly - with Behat, looks like that the functions need to annotated with the patterns ( @when etc..)... so is it fair to say that before I can start using behat, I need to manually annotate the existing functions in my code base which I tend to use as part of my scenario ?

    Behat uses php-doc annotations to bind patterns to FeatureContext methods:

    Christian Sciberras
    @uuf6429
    Yes, that's one way to put it.
    Hackbard
    @Hackbard
    hi there
    i have a problem with too_many_redirects
    the test break while it the browser gets too_many_redirects
    how can i skip that?
    Michael Schröder
    @paddelboot
    Hello everyone, is it possible to write features and scenarios for behat in another language than english?
    Michael Schröder
    @paddelboot
    I found this post: https://stackoverflow.com/questions/27312612/change-behat-language; but there's no behat.yml in my project folder (I ran --init just before), and if I run behat -- lang de, then I still get Expected Feature, but got text: "Funktionalität [..]