laracasts / Behat-Laravel-Extension

Laravel extension for Behat functional testing.
MIT License
260 stars 73 forks source link

Behat only running 1st Scenario #70

Closed catharsisjelly closed 6 years ago

catharsisjelly commented 6 years ago

Hi there,

I'm using this to begin to test an API that I am working on. My .feature has several Scenarios in but Behat is only running the first one for some reason. Would you have any clue as to why?

My behat.yml file

default:
    extensions:
        Laracasts\Behat:
            env_path: .env.behat
        Behat\MinkExtension:
            base_url: http://localhost:8080
            default_session: laravel
            laravel: ~

    gherkin:
        filters:
            tags: ~@skip

    suites:
        default:
            paths: [ %paths.base%/tests/Feature ]
            contexts:
                - Tests\Feature\Context\APIClientContext:
                - Tests\Feature\Context\BusinessContext:
                - Tests\Feature\Context\FeatureContext:

Let me know if you need any more info.

catharsisjelly commented 6 years ago

Hey,

Just thought I would say that I resolved this today, the reason it was happening is because I had Behat had no idea where MinkContext was since none of Contexts was extending them. Fix was as follows

    suites:
        default:
            paths: [ %paths.base%/tests/Feature ]
            contexts:
                - Tests\Feature\Context\APIClientContext:
                - Tests\Feature\Context\BusinessContext:
                - Behat\MinkExtension\Context\MinkContext: