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
    in the end it doesnt test more that "is it callable".
    PurHur
    @PurHur
    than low-level, as it becomes brittle and closely related to an "UI"
    and for that: I really want that! Thats is what showing me if the software is working. Imagine a Feature which a Background a User cant fullfill because the UI doesnt allow it.
    But still there are sentences like "if the user opens the profil menu" (could be if the frontent want the profile menu as json) i wanne see....
    Even André Fiskvik
    @grEvenX
    How do you deal with Fixtures, backgrounds and "givens" for your scenarios in that case? I guess you don't go through these "UI" layers to configure existing state?
    PurHur
    @PurHur
    :D
    you got it
    a lot of pre tests in the right order
    Even André Fiskvik
    @grEvenX
    ugh :P
    PurHur
    @PurHur
    background and givins are no problem but fixtures... yes its more that the stack doesnt allow fancy shit and is always started with a dump so its there
    but if i wanna test the booking feature yoy have to run the registration features for a new user before that because all the following things depend on a new registeres user
    That is no problem because it is already written. And i dont even want to know if the booking doesnt work for a new user when a user cant even register
    pmaasz
    @pmaasz
    What you could do is test the routine of register a new user in behat and then write a php version of this routine into your FeatureContext using it as an Annotation call like „@registerNewUser“. I haven‘t done that one specifically but i wrote something like that to login users. For example „@loginAdmin“ or „@loginTestuser“. All My tests require no data at the beginning. That way it gets easier to use in pipelines but the runtime is a down side. I have thought about a sql dump service to provide mock data but I scrapped that idea. I still have the Problem of an exploding FeatureContext sizewise. The behat project could provide a solution by providing more features and sentences in the framework but it seems the maintainers have vanished.
    PurHur
    @PurHur
    Hello pmaasz
    This would only move the lines from my feature files into a php file. I want my testers to write that.
    pmaasz
    @pmaasz
    If
    pmaasz
    @pmaasz
    If you have the testers that would be the best option.
    PurHur
    @PurHur
    You dont need dedicated persons to write that. Its only like 2 lines or something like that. It doesnt cost that much.
    pmaasz
    @pmaasz
    I tried Scenario Outlines for the first time for the registration steps and it makes the tests pretty compact. It's even less work to write but the test runtime is the same.
    pmaasz
    @pmaasz
    does anybody here use the DMore Chromeextension?
    pmaasz
    @pmaasz
    There is a new release 3.6.0 (https://github.com/Behat/Behat/releases) it immediately broke my tests... (PHP Fatal error: Declaration of TestworkEventDispatcherPhp72Trait::dispatch($event, ?string $eventName = NULL): object must be compatible with Symfony\Component\EventDispatcher\EventDispatcher::dispatch($eventName, ?Symfony\Component\EventDispatcher\Event $event = NULL))
    pmaasz
    @pmaasz
    Is here somebaody from the following repo https://github.com/Textalk/websocket-php ?
    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.