Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    vincentmary
    @vincentmary
    Hello does the DocumentElement is updated if the page DOM is changed during a step?
    During a step, i need to wait until an ajax call is made to check that page content match a pattern so I use spin method described here http://docs.behat.org/en/v2.5/cookbook/using_spin_functions.html and $this->assertSession()->pageTextMatches($this->fixStepArgument($pattern)); but I think DOM Content is not updated
    Tiko
    @tikolakin
    it's not updated
    Sam Tuke
    @samtuke
    Hi all, does it make sense to use behat + selenium for measuring page load speed? E.g. to determine whether over time a web app is loading more quickly or slowly?
    Christophe Coevoet
    @stof
    I would not use Behat for that. A Gherkin scenario does not seem the right way to check this
    and I'm not even sure Selenium allows to measure that easily
    Thread Reader Bot 🤖
    @threadreaderapp_twitter
    hello everyone, i looked all the doc i can found about it but still no luck
    I'm wondering how/if it is possible to pass an argument on the behat command line that I can get in my context after?
    for example behat --colors --my-arg=my-value
    I kind of see that it may be possible to pass through env var but this is not so flexible
    Ciaran McNulty
    @ciaranmcnulty
    I don’t think this functionality is built in
    Christophe Coevoet
    @stof
    you will need to write a Behat extension for that
    Thread Reader Bot 🤖
    @threadreaderapp_twitter
    thank you both for your help :)
    Analianys
    @Analianys
    Hola quisiera me aclaran una duda sobre el contralador Mink Cheat Sheet. Soy profesora de una universidad y sobre BDD tengo una duda. Si empleo las palabras reservadas de Mink Cheat Sheet, no tengo que implementar los Step Definitions. Por favor me urge
    Analianys
    @Analianys
    @Analianys
    Hola quisiera me aclaran una duda sobre el contralador Mink Cheat Sheet. Soy profesora de una universidad y sobre BDD tengo una duda. Si empleo las palabras reservadas de Mink Cheat Sheet, no tengo que implementar los Step Definitions. Por favor me urge
    SamyOteroGlez
    @SamyOteroGlez
    @Analianys
    Hola, es exactamente como dices, por defecto existen implementados los step definitions mas comunes para ahorrar tiempo, pues al final ese codigo se puede reutilizar. Acciones como pinchar un link, o presionar un boton, o llenar un campo, etc... Claro que de cierta manera eso te limita pues entonces no podrias reutilizar los mismo scenarios en varias implementaciones, como por ejemplo utilziar un scenario de autenticacion para hacer pruebas d UI automatizadas, usar el mismo scenario para hacer pruebas de integracion, o probar diferentes roles, etc...
    Christian Sciberras
    @uuf6429
    PHPUnit has a feature where one can define suites in the XML file and these will be run sequentially (unless the suite to run is specified from CLI). I tried something similar with Behat 3, but instead of running the suites, it seemed to run everything (it looked like it took the default settings).
    1. Is this the correct behaviour, or did I do something wrong?
    2. Is there a way to make it work like PHPUnit without requiring extensions?
      A little context on what I need: I'm testing a system and there are two types of tests: (a) should run during setup and (b) should run after setup (possibly more will come up in the future).
      I'm controlling this with the use of tags/filtering, but it would be nice to avoid having to run behat --tags=before-setup && behat --tags=after-setup (also because it would be great to have one unified output)
    David Lorite Fernández
    @dalorfer
    hello everyone! I’m using Selenium (3.8.1), Chromedriver (2.33), Behat (3.4.3) and Chrome (64)…when the tests run, an error appears randomly. The error: "no such window: target window already closed from unknown error: web view not found”, Selenium is running in standalone….any ideas?
    andreasRulle
    @andreasRulle
    Which mink-extension version do you use?
    David Lorite Fernández
    @dalorfer
    Mink-extension version 2.3.0
    Christophe Coevoet
    @stof
    @uuf6429 Behat also have this concept of suites, and they also run sequentially (unless you use the --suite option to run only one of them). Are you sure you were defining suites ?
    josephgut
    @josephgut
    Hello All, I am trying to figure out how to script click on tabs with Behat. I can click buttons, links, and elements, but having problems with tabs. I've tried to use Element thinking that may work, but no luck yet. Any help would be greatly appreciated. Thanks!
    josephgut
    @josephgut
    I think we figured it out. Correct syntax is to call the element with something similar to: And I click the ".StepListViewTabsItem[data-tab='Complete']" element
    Shaun Moss
    @mossy2100
    Hi - I am trying to use behat to set the value of a Body field on a form, except the field is a CKEditor rich text WYSIWYG field, which uses an iframe. Any tips?
    Shaun Moss
    @mossy2100
    solved. Happy to relay answer if anyone else is interested.
    Victoryyyyy
    @Victoryyyyy

    Hello all, I am trying to figure out if I can use custom parameters from .yaml file from one context to another. For ex:

    contexts:

                - CustomWebContext:
                    user: asdf
                    pass: 1234
                - CustomAPIContext:
                     user: asdf
                    pass: 1234

    The problem is: I have 2 context files which use same parameters. Should I define parameters for both context ?
    Any help will be appreciated. Thanks all.

    Victoryyyyy
    @Victoryyyyy
    Hello again :) , I found the solution here we go :
     suites:
          default:
              parameters:
                  user: &user asdf
                  pass: &pass 1234
              contexts:
                  - CustomWebContext:
                      sfEmail:              *user
                      sfPassword:     *pass
                  - CustomApiContext:
                      sfEmail:              *user
                      sfPassword:     *pass
    Jose Cornide
    @jcornide
    hello! I'm thinking about creating an html version of my behat tests some business people can read them even easier, so I was wondering if there's any way to get all the tests info
    and then iteract throw them to generate the output
    Ghost
    @ghost~553ce6ff15522ed4b3df8944
    Hi all. I use multiple suite and custom parameters. I retrieve my parameters using the scope. But I didn't find a way to retrieve these parameters in @BeforeSuite hook. How can I do that. Thanks in advance
    ultracrystal
    @ultracrystal
    Hi everyone. Is anyone aware of a Behat feature, or maybe even an extension, which would summarize in some form of a report the amount of time it took to execute each scenario?
    Ciaran McNulty
    @ciaranmcnulty
    ultracrystal
    @ultracrystal
    @ciaranmcnulty Thanks for the suggestion. I'll certainly look into this.
    Ben Plummer
    @benplummer

    Hi all, I'm working on a project that will follow DDD with layers and patterns but I also want to use BDD for acceptance testing outside-in.

    With this approach, I wondered whether the Behat scenarios would mainly concentrate on the UI? And what the best practices are?

    I've read that ideally we don't want to couple scenarios to a UI that could easily change but I'm not sure what the alternative would be when I want to write scenarios in a TDD fashion before any code/layers/patterns exist. I imagine it'd be quite difficult to write scenarios for DDD related code that does not exist yet whereas the UI is more predictable.

    Paul Gibbs
    @paulgibbs
    Does the BeforeScenario event hook trigger before Background steps, or only actuall Scenarios? I'm looking for something that fires before scenarios and backgrounds, but not BeforeFeature (can't use static function).
    Chris Lock
    @catharsisjelly
    @paulgibbs AFAIK it triggers before the Background too
    Hi all, I'm having a bit of an issue tryiong to get Behat to register a namespaced context file linking with Symfony 4, if anyone has an example I'd appreciate it
    Chuk Shirley
    @chukShirley
    Anyone have tips for selecting a DataTables row from within a Mink context class? At first I thought I would just select the element with a css selector and click(), but as the DataTables docs say, "The checkbox is not an <input type="checkbox"> element, but rather a CSS that uses the :before and :after pseudo elements of the cell to draw a box and the tick. "
    Chuk Shirley
    @chukShirley
    Well, apparently you can just select the surrounding td and click()
    Ciaran McNulty
    @ciaranmcnulty
    @benplummer wrote scenarios using ubiquitous language and exercise your Application Service / Command Handler layer as well as your UI
    Ben Plummer
    @benplummer

    @ciaranmcnulty Would you write steps inside FeatureContext.php using Application services that don't exist yet so that they fail first in the usual TDD fashion? And then start building them to fix the Behat scenarios?

    Or with Behat, would the TDD equivalent be writing the scenarios without steps in the FeatureContext.php so that they fail but build the Application services etc before writing the Behat steps?

    Ciaran McNulty
    @ciaranmcnulty
    I step-by-step write the definitions, see them fail, then make them work
    Ben Plummer
    @benplummer
    @ciaranmcnulty Ah okay - so you write your .feature files and FeatureContext.php step definitions before any code?
    Ciaran McNulty
    @ciaranmcnulty
    I wrote the feature with others as part of discussing the feature
    Then I write one step definition and then code to make it pass, etc
    Ben Plummer
    @benplummer
    @ciaranmcnulty Thanks, that makes sense. To clarify, when you say about writing one step definition, is that one method in the relevant context file for one of the Given/When/Then lines of the relevant scenario? I'm fairly new to Behat so a little rusty with the terms!
    Ciaran McNulty
    @ciaranmcnulty
    Yes the method that matches the step
    Ben Plummer
    @benplummer
    @ciaranmcnulty Great, thanks for the help!
    Ciaran McNulty
    @ciaranmcnulty
    When I feel I’ve done a few scenarios and worked out the domain model I then look at running some of the scenarios as end to end UI tests