Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behat did not find any feature with SF3 #123

Open
OskarStark opened this issue Aug 17, 2017 · 4 comments
Open

Behat did not find any feature with SF3 #123

OskarStark opened this issue Aug 17, 2017 · 4 comments

Comments

@OskarStark
Copy link

Hi guys,

this is my behat.yml:

default:
    extensions:
        FriendsOfBehat\PerformanceExtension: ~
        Behat\Symfony2Extension: ~

        Behat\MinkExtension:
            sessions:
                my_session:
                    symfony2: ~

    suites:
        app_bundle_suite:
            type:   symfony_bundle
            bundle: AppBundle
            contexts: [ Tests\AppBundle\Features\Context\HeadlessContext ]

and the following versions:

# composer show | grep behat
Do not run Composer as root/super user! See https://getcomposer.org/root for details
behat/behat                              v3.3.1  Scenario-oriented BDD framework for PHP 5.3
behat/gherkin                            v4.4.5  Gherkin DSL parser for PHP 5.3
behat/mink                               v1.7.1  Browser controller/emulator abstraction for PHP
behat/mink-browserkit-driver             v1.3.2  Symfony2 BrowserKit driver for Mink framework
behat/mink-extension                     v2.2    Mink extension for Behat
behat/symfony2-extension                 2.1.1   Symfony2 framework extension for Behat
behat/transliterator                     v1.2.0  String transliterator
friends-of-behat/performance-extension   v1.0.2  Accelerates Behat using features available only for newer PHP versions.
# vendor/bin/behat
No scenarios
No steps
0m0.06s (14.54Mb)

I have login.feature which is located here: src/tests/AppBundle/Features/login.feature

Would be great to get a hint what to change to get this working!

Cheers, Oskar

@OskarStark
Copy link
Author

This is my file structure:
screenshot 2017-08-22 16 03 10

@OskarStark
Copy link
Author

This line fixes it:

default:
    extensions:
        FriendsOfBehat\PerformanceExtension: ~
        Behat\Symfony2Extension: ~

        Behat\MinkExtension:
            sessions:
                my_session:
                    symfony2: ~

    suites:
        app_bundle_suite:
+           paths:
+              features: tests/
            type:   symfony_bundle
            bundle: AppBundle
            contexts: [ Tests\AppBundle\Features\Context\HeadlessContext ]

Maybe the default value could be changed based on the Sf version?

@mvhirsch
Copy link

Would be nice to have a feature, that autoloads tests automatically from a Symfony3 filesystem structure!

@OskarStark
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants