Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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

    George2023
    @George2023
    Hi
    Anyone know a solution possible to make a Symfony php Monoliticc to Microservice with various database for exmple the monolitic one used bad mySQL to make different micro service with NoSQL database ?
    Lewis Cowles
    @Lewiscowles1986
    Does anyone know or can point to documentation showing how to load behat bootstrap or cascade bootstrap from another repo using composer?
    RickQA
    @RickQA
    I'm new to the group here, so HI! I just started going through the Behat documentation, and my results while following along differ from the Docs. I have Behat 3.8.1.
    RickQA
    @RickQA
    Have there been any updates?
    Christian Bolduc
    @snowfrogblues
    Hi there; Been reading here and there seems to be a whole lot of questions and no answers!!! Is there a community for behat where there are answers?
    In one of my test I'm using scenario outline and in the table one of the value is A1X- behat show this in yellow and does not seem to recognize it as a parameters. I tried backslashing the - but it did not work. Any guidance?
    Jee Elmore
    @Jeemo_gitlab
    @VictorTran-rc I can recommend https://symfonycasts.com/screencast/behat
    Jee Elmore
    @Jeemo_gitlab
    @snowfrogblues I am running into a similar issue with a datestring (mm/dd/YYYY). When I debug the function, it is only getting the month portion of the string. I tried putting it in quotes instead of backslashing. I will try that next.
    Christian Bolduc
    @snowfrogblues
    thank you. I might try this also.
    Christian Bolduc
    @snowfrogblues
    @Jeemo_gitlab - It worked for me with the quotes. Hope it works for you. Cheers
    Jee Elmore
    @Jeemo_gitlab
    @snowfrogblues Awesome!
    Guillaume R
    @rikemSen
    Hey there :)
    I made my company use behat for a large ecommerce platform :D However, I'm still new to it and I am wondering how would I write / organize my scenario for a specific feature : the search
    We set "nodes". A node is a "node" which contains a product category and some filters for search bounded to it.
    Do you have some examples for a search scenario? I mean just typing "Given I want to search for a product" - "When I enter <keyword>" - "Then the results must contain ...."
    Seems relatively light
    abhi2950
    @abhi2950
    Hi All
    Error: Call to a member function source() on null in Behat\Mink\Driver\Selenium2Driver->getContent() (line 487 of /mnt/gfs/home/utcfs/behat/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php)
    getting this error on Behat when executing test cases on Drupal 7
    Jee Elmore
    @Jeemo_gitlab
    @rikemSen Have you followed any tutorials for behat scenario writing?
    @abhi2950 Do you have selenium running in the background?
    Bit Wombat
    @bitwombat
    What have I done wrong if behat just dumps the context steps to STDIO rather than a php file?
    Bit Wombat
    @bitwombat
    I see the ContextSnippetAppender but can't see why it wouldn't be invoked.
    Bit Wombat
    @bitwombat
    Oh, der, --append-snippets
    Pretty sure this used to be the default?
    Anyway, I wish the chat were more alive! Love behat. Used it extensively in my last project (2 years ago).
    George2023
    @George2023
    Hi guys
    is that possible to make
    Bhat test for prestashop for example add products for load test ?
    Karolis Stanelis
    @k.stanelis_gitlab

    Hello, I am trying to automate behat test via Gitlab CI. Issue I've got is that in CI and in PHPStorm (executing same tests) I always get WebDriver\Exception\NoSuchElement: Element not found with xpath, //html . From stack trace, I am not able to find anything. When I try to run locally (docker) via terminal test passes and everything works, but if I try to run then through PHPStorm I get the same error as in CI. I can't figure out what is wrong, it looks like selenium2 is not working correctly. And screenshots generated by test (when using PHPStorm and CI) are 0 byte.
    My behat.yml file looks like:

    default:
        suites:
            default:
                path: '%paths.base%/features'
                contexts:
                    - App\Tests\Behat\FeatureContext
                    - Behat\MinkExtension\Context\MinkContext
    
        extensions:
            FriendsOfBehat\SymfonyExtension:
                bootstrap: tests/bootstrap.php
                kernel:
                    environment: test
    
    local_ff:
        extensions:
            FriendsOfBehat\SymfonyExtension:
                bootstrap: tests/bootstrap.php
                kernel:
                    environment: test
            Behat\MinkExtension:
                base_url: http://behattest.test
                browser_name: firefox
                sessions:
                    firefox:
                        selenium2:
                            wd_host: "http://selenium-hub:4444/wd/hub"
                            browser: firefox
                            capabilities:
                                browser: firefox

    When running in local terminal (docker) and using local_ff profile it works as expected

    swaibar
    @swaibar
    @George2023
    sure, setup a test system, use facebook webdriver and selenium and write some features. You could also use guzzle and directly make http calls if you prefer.
    @rikemSen great to hear you are using this... maybe https://github.com/Sylius/Sylius/tree/master/features might be of some general help... but specifically about your search question... I don't see why it's "too light"... I mean you might have a single scenario like that... or you might use a scenario outline to have many examples with the same steps but different input/output expected