Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Andy Jiang
    @lambtron
    i figured it out
    Anthony Tetlow
    @anthonyptetlow
    Hey, has anyone looked at updating behat to work with symfony 5 yet?
    Kevin Abatan
    @carere
    hello all :)
    Nino Paolo
    @paoloooo_twitter
    heya
    Kevin Abatan
    @carere
    Im new to behat, and i wonder how can i do a Background entry on a feature file ??
    i would like to use a table for defining some data
    Nino Paolo
    @paoloooo_twitter
    new here, too :)
    Kevin Abatan
    @carere
    welcome then :)
    here is what im trying to do, can anyone tell me if i have the wrong syntax in my gherkin feature ?
        Background:
            Given the following connections exist:
                | name    | user  | password | port | host      | scheme
                | default | neo4j | neo4j    | 7687 | localhost | bolt
    when i do that i got the following error during parsing: Expected Step, but got text: " | name | user | password | port | host | scheme" in file: features/create-node.feature
    Nino Paolo
    @paoloooo_twitter
    same here
    Kevin Abatan
    @carere
    do you have the same problem ? @paoloooo_twitter
    Nino Paolo
    @paoloooo_twitter
    let me try
    yes, same problem
    but I fix it by adding | at the end of line
    Kevin Abatan
    @carere
    indeed, that was the problem :)
    thx a lot, have a nice day ;)
    Nino Paolo
    @paoloooo_twitter
      Background:
        Given the following connections exist:
          | name    | user  | password | port | host      | scheme |
          | default | neo4j | neo4j    | 7687 | localhost | bolt   |
    yw :)
    but are you trying to connect to a database?
    Kevin Abatan
    @carere
    im creating a "Neo4j Companion" in PHP, and im writing some features, since it's my first project in BDD / TDD style
    so i need to be able to provide some connections, in my main domain :)
    im not building a project, im building a library
    Nino Paolo
    @paoloooo_twitter
    ah ok
    Kevin Abatan
    @carere
    so if my features a domain oriented, i should be able to use them in order to build a "neo4j companion" in any langage
    Nino Paolo
    @paoloooo_twitter
    Good luck :)
    Kevin Abatan
    @carere
    thx :)
    Nino Paolo
    @paoloooo_twitter
    I think, it would be good if you can add the configuration on behat.yml
    but Iā€™m not 100% of it :)
    Kevin Abatan
    @carere
    hello all :)
    it's me again XD
    i need some help in order to tell to behat where to find my gherkin files, do you know how to do this ?
    can i put them elsewhere than features folder ??
    Kevin Abatan
    @carere
    i found it :) it's the option paths in suite
    
      suites:
        default:
          paths:
            - '%paths.base%/../tests/Behaviors'
    Ghost
    @ghost~54b7c3b4db8155e6700eb40b
    Hi all
    Is there any way with Behat 3.5 to store failed tests result in a file to be able to rerun it after ?
    John Behrens
    @WebconsultsEu_gitlab
    Hi there, wonder if somebody is here who could help me.
    I got a problem with object(Behat\Mink\Element\DocumentElement)#1743 (4)
    even the esaiest css or xpath selector with $page->find() is returning null
    no idea where to look further
    John Behrens
    @WebconsultsEu_gitlab
    i guess nobody is here
    PurHur
    @PurHur
    This channel is not very active you have to wait a little bit :)
    But sounds like the browser is not responding or has a white screen
    John Behrens
    @WebconsultsEu_gitlab
    Code
    public function iShouldSeeGithublogin()
        {
            $session = $this->getSession();        
            $session->start();
            $session->visit('https://github.com/login');
            $page = $session->getPage();
            //var_dump($this->getSession()->getPage());
            $pageContent = $this->getSession()->getPage()->getContent();
            $titleStart = strpos($pageContent, "<title");
            $titleEnd = strpos($pageContent, "</title");
            if(null === $titleStart || null === $titleEnd) {
                throw new \Exception('title not found by strpos');
            } else {
                echo "\n TitleStart:".$titleStart." TitleEnd:".$titleEnd."\n";
            }
    
            $title = $page->find('css', 'title');
            if (null === $title) {
               throw new \Exception('Couldn\'t locate the title.');
            }
        }
    @javascript
    Scenario: Show the Login Screen # features/githublogin/githublogin.feature:4
    Given I visit the GitbubLogin Page # GithubLoginFeatureContext::iVisitTheGitbubloginPage()
    When I see the GithubLoginPage # GithubLoginFeatureContext::iSeeTheGithubloginpage()
    Then I should see GithubLogin # GithubLoginFeatureContext::iShouldSeeGithublogin()
    ā”‚
    ā”‚ TitleStart:1471 TitleEnd:1505
    ā”‚
    Couldn't locate the title. (Exception)
    seems like $page->find is never working however whyt i try
    PurHur
    @PurHur
    Try to make a screenshot. It sounds like the browser isnt respoonding properly
    John Behrens
    @WebconsultsEu_gitlab
    if i use selenium browser is opening the page, and the pageContent is the correct content of the page
    Tadas Davidsonas
    @tdavidsonas88
    Hi there, is there a nice way to use phpunit assertions inside Behat? Pros / cons for doing that? I find using phpunit within Behat context a bit more productive. Just the way to include the library from vendors folder does not seem nice.
    require_once DIR . '/../../../../../../vendor/phpunit/phpunit/src/Framework/Assert/Functions.php'; does not seem nice or the other way I have to do it with 'use' in every class.
    Tadas Davidsonas
    @tdavidsonas88
    so in general not sure if it is a good idea using phpunit assertions inside Behat contexts
    kevin-schmitt
    @kevin-schmitt
    Hello everyone, i have a question can you help me please? I have to work project with multiple rest api and i want use behat for testing. But for best practice and best evolution It's more efficient to use one behat/composer.json/context for test all api with different base_url like explain here Behat/MinkExtension#155 or just init behat test for each repo with one configuration by project. Thanks