Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    pmaasz
    @pmaasz
    I had updated instantly when it was merged
    Marco Veenendaal
    @cwdt

    Hi all,

    I'm running into some issues with Behat/Mink/Selenium2/Firefox.
    The situation is that I have an IFrame with only a src attribute, I managed to update the id & the name property of the IFrame with a JS script in my test-step.

    But when I call switchToIFrame with that generated attribute I'm getting the following error: "data did not match any variant of untagged enum FrameId at line x column x"

    Can someone help me or point me in the right direction or room?

    Michael Lundquist
    @user-name-is-taken
    I didn't see a way to override a method with a stub in behat. I asked a question about it on stackoverflow but thought posting here would be good too https://stackoverflow.com/questions/61401506/how-can-i-stub-out-an-api-call-method-in-behat
    pmaasz
    @pmaasz
    if i understand you correctly you have to authenticate the user at your api? if you have an endpoint for that like /login_check or otherwise you can write a Scenario for that in Gherkin or PHP
    Michael Lundquist
    @user-name-is-taken
    Yeah, for me to make/test API calls to the quickbooks API I need a user to authenticate which isn't realistic in a unit test. The way I've seen to get around this is to override the methods that make API calls and make them return hard coded data. Is there a way to do this in behat?
    Michael Lundquist
    @user-name-is-taken
    My code is here if this helps https://gitlab.com/greenhouseaffectors/php
    Michael Lundquist
    @user-name-is-taken
    Never mind, I think I figured it out.
    Cristian
    @dumitriucristian

    Hi, Please help me if you can...
    I use symfon5 with friends of Behat and I am unable to run only one suites.
    Is always ask me to define steps in other context.
    This is my yml :

    default:
        suites:
            login:
                contexts:
                    - Api\LoginContext
    
            register:
                contexts:
                    - Api\RegisterContext
    
        extensions:
            FriendsOfBehat\SymfonyExtension: ~
            Behat\MinkExtension:
                sessions:
                    symfony:
                        symfony: ~

    I wish to run only register but throw "register suite has undefined steps. Please choose the context to generate snippets:" and ask me to define steps from login context

    Cristian
    @dumitriucristian
    solved thanks
    Anyqax
    @Anyqax
    hi, is it possible to define dependencies between scenarios or suites, e.g. run scenario B only when scenario A succeeded?
    kevin-schmitt
    @kevin-schmitt
    Hello @Anyqax , question is why? test with dependencies that can change state is dangerous. Why you need that?
    Kamil Kokot
    @pamil
    Hopefully, Behat will be maintained a bit more: Behat/Behat#1296 :)
    ash-m
    @ash-m
    I was watching a video with Ciaran McNulty which basically advised against using infrastructure in your tests; I get that every situation is different, but I am a bit confused when it comes specifically to testing infrastructure components -- say you're writing a table module that manipulates data in a specific way .... or something. Anyway, the point is, if you want to be concrete about an example you could say Given I have a table named 'table' in a PG database with data ... and you can write a specific implementation for your PG database; so if your component uses PDO, would you instantiante a PDO instance in your test with a DSN pointing to a test db? In a situation where this could be swapped out for another DSN connecting to a different type of database (with it's own implementation) you'd set all that up a second time? This just seems like the wrong way to go about things and I'm not sure how to go about it.
    saravanan sp
    @saravanansp96
    Hi I am Saravanan from India, I am pretty much new to Behaviour testing
    I was asked it do a POC on behaviour testing on magento 2.3.4 (PHP e-commerce framework) based modules. So is there any docs I have seen through ( https://behat-magento-2-extension.readthedocs.io/en/latest/guide/quickstart.html ). But I don't know how to start with it
    Anyqax
    @Anyqax

    Hello @Anyqax , question is why? test with dependencies that can change state is dangerous. Why you need that?

    I'm not refering to state dependencies between tests but rather logical "dependencies"
    cases where e.g. when a simpler test A fails, it's just unneccessary to execute a more elabore test B because it's expected to fail as well and obfuscates the cause in the test result output

    Randy Geraads
    @rgeraads
    hey, I inherited a huge behat test suite and it contains the behat/symfony2-extension, and I want to move away from KernelAwareContext by injecting the services instead of calling the container, but I'm getting stuck where some scenarios apparently depend on some state?
    Randy Geraads
    @rgeraads
    oh I guess I'm requesting the Symfony2Extension migration guide :) Behat/Behat#1296
    alberbeni
    @alberbeni
    Hello, i new on the use of behat, i'm use behat to programing unit test for moodle, i need some help whit the configuration of the files config.php and behat.yml, can you help me?
    alberbeni
    @alberbeni
    my gmail is albergs97@gmail.com if you can help me thanks
    Jolivé Hodehou
    @JoliveHodehou
    Hello, can you help me save the information about my scenarios and features in a mysql database please
    Jolivé Hodehou
    @JoliveHodehou
    I would like to make sure that when I run a test I can save the information about the test in a database
    help me please
    nmathew1610
    @nmathew1610
    Hello , can some one provide me with a good tutorial regarding behat and selenium grid in docker .Pls send me the tutorial link my gmail id is niviaugus@gmail.com .If some one can help kindly mail me .
    Victor Tran
    @VictorTran-rc
    Does anyone have a good tutorial about using behat, selenium, and chrome driver?
    Jesse Nicola
    @jnicola
    Hey there! Working with Behat and Drupal. Looking to essentially replicate what they have for "userManager" in a new "groupManager". I've got it working, but all contexts when accessing "$this->getGroupManager" get their own object instead of accessing a shred object between them. If anyone has any ideas, I'd appreciate it!
    Olivier Lance
    @olance

    Hi :wave:

    Is there any admin around?
    Got a security concern to chat about regarding Behat's website