by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    PurHur
    @PurHur
    No
    Eme Mora
    @chowzenwan
    hello guys, i just started a proyect with behat, what best way you advice to do a report?
    how behat can output a json to use it in a report?
    PurHur
    @PurHur
    Youre looking for the json formatter in https://github.com/Behat/CommonFormatters
    Eme Mora
    @chowzenwan
    thanks @PurHur i will try it!
    any other suggestion for creating a report?
    I have used it and it is quiet practical. I think purhur even has a fork
    Eme Mora
    @chowzenwan
    great i will also review it cause i was looking for one and all ended as far as i investigate so far using mink
    also and im using php webdriver
    its mink better then using php webdriver?
    pmaasz
    @pmaasz
    You could use the DMore/BehatChromeExtension. That way you only Need a chrome installed
    Gazal Shukla
    @gazalshukla
    I am trying to verify the text being displayed on page but the problem is that text displays only for few secs and scenario is getting failed as it says it is unable to find anywhere in the text of the current page.
    image.png
    image.png
    Also attaching the screenshot of feature .
    pmaasz
    @pmaasz
    how long do you wait in your wait step?
    Gazal Shukla
    @gazalshukla
    5 secs
    pmaasz
    @pmaasz
    maybe thats too long? why not make that step configurable by saying something like Then I wait x seconds ?
    to test mails I created an extension https://github.com/pmaasz/BehatMailExtension
    Gazal Shukla
    @gazalshukla
    image.png
    I have added the function for wait in contextFeature file
    pmaasz
    @pmaasz
    /**
     * @When I wait :seconds seconds
     *
     * @param mixed $seconds
     */
    public function iWaitSeconds($seconds) {
        $this->getSession()->wait(
            $seconds * 1000
        );
    }
    this must be added to your FeatureContext in the bootstrap directory
    Gazal Shukla
    @gazalshukla
    I added what you sent in the screenshot . But i am getting this
    image.png
    @pmaasz Thanks a lot .It passed
    I am very new to Behat . Thanks for helping me out.
    pmaasz
    @pmaasz
    No problem, we want the community to grow and be more active.
    Gazal Shukla
    @gazalshukla
    do you have any articles or link for using data-driven/parameterization approach
    in behat? Thanks in advance !
    pmaasz
    @pmaasz
    https://docs.behat.org/en/latest/user_guide/writing_scenarios.html you could start with Sceanrio Outlines or Backgrounds
    Gazal Shukla
    @gazalshukla
    @pmaasz Thanks :)
    Gazal Shukla
    @gazalshukla
    How can we get a field when Form field is not defined with id|name|label|value|placeholder ?
    PurHur
    @PurHur
    how is it defined
    PurHur
    @PurHur
    that is a html element that simulated a field. You have to work with that html
    Gazal Shukla
    @gazalshukla
    Okay,Thanks
    any links do you have for ref?
    Alexandre Vialatte
    @Matelight35_gitlab
    Hi everyone !
    I'd like to know if there is a way in behat to create a configuration to limit the action time of each step. It will be likely the "Set selenium speed" from Robot framework. :)
    pmaasz
    @pmaasz
    Robot is python, right?
    Alexandre Vialatte
    @Matelight35_gitlab
    YEs exactly but I'd like to know if, in behat, we are able to reproduce the same behavior ?
    pmaasz
    @pmaasz
    I don't think it is natively possible but I also never needed such behaviour. You could look into writing a small extension for that.
    matlar83
    @matlar83
    Hi, anyone can help me with a behat+symfony+mocking problem? https://stackoverflow.com/questions/60542538/mock-symfony-service-in-behat-functional-test
    PurHur
    @PurHur
    did you try to start a proxy beside your test runner for that api?
    matlar83
    @matlar83
    I would be difficult using a proxy since I need the fake API to return different data for each different scenario
    Матвей Болисов
    @mbolisov_twitter
    Hello, I'm trying to rollback database transaction by "DatabaseTransactions.php" methods. I have no Exceptions but nothing gonna happened and new records still in my DB
    PurHur
    @PurHur
    that depends on how you test all the things
    mysql doenst support transactions so you cannot run a "real testrun" only in unit tests is works (i assume you are using laravel/databasetransactions)
    Матвей Болисов
    @mbolisov_twitter
    I am using behat-laravel-extension/databasetransaction. Thx for answer
    kevin-schmitt
    @kevin-schmitt
    Hello, How load test env file and with symfony when i run behat command please? Current when i use vendor/bin/behat --tags=api , it's dev env that load by symfony for avoid that i have to replace env file by env.test. It not exist a way for to do that with configuration file in behat? Thanks
    kevin-schmitt
    @kevin-schmitt
    Resolved, i use finally env.test and overwrite env file. For use specific authenticator in test environnement i use specific firewall where pattern use parameter in .env.test file for disable in dev or prod env just specify parameter with empty string ' ' :)