Open mortona42 opened 8 years ago
What happens if you add --verbose
? Anything different? Could you post a copy of your behat.yml
here?
Adding --verbose still gives empty output.
For behat.xml I tried with the samples in the full documentation and in this repo's readme:
default:
suites:
default:
contexts:
- Drupal\DrupalExtension\Context\DrupalContext
extensions:
Behat\MinkExtension:
goutte: ~
base_url: http://localhost:80
Drupal\DrupalExtension:
blackbox: ~
Thanks for your response!
I am having the same issue, a little different though.
If I do vendor/bin/behat -c behat.yml -dl, I see all the definitions.
When I execute Behat in command line or from PHPStorm, it claims the step I am using is missing. How can that be if I am executing it with the -c behat.yml (which is default anyway)? How is it unaware of the steps?
--- FeatureContext has missing steps. Define them with these snippets:
/**
* @When I go to :arg1
*/
public function iGoTo($arg1)
{
throw new PendingException();
}
Config:
default:
suites:
default:
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
extensions:
Behat\MinkExtension:
goutte: ~
selenium2: ~
base_url: http://local.d8contrib
Drupal\DrupalExtension:
api_driver: 'drupal'
blackbox: ~
drupal:
drupal_root: '/var/www/docroot'
FeatureContext.php:
<?php
use Drupal\DrupalExtension\Context\RawDrupalContext;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
/**
* Defines application features from the specific context.
*/
class FeatureContext extends RawDrupalContext implements SnippetAcceptingContext {
/**
* Initializes context.
*
* Every scenario gets its own context instance.
* You can also pass arbitrary arguments to the
* context constructor through behat.yml.
*/
public function __construct() {
}
}
I am also trying to run just a very basic test against D8, when a user visits the homepage.
This is with version 3.1.3 of the Drupal extension.
My bad.... a very easy mistake. Here was my Feature:
@api
Feature: Test the Fruit Form
In order to prove Drupal serves up an example form asking what your favorite fruit is
As a developer
I need to use the step definitions of this context
Scenario: Visiting '/testmodule/ask-user' displays the fruit form
When I go to '/testmodule/ask-user'
Then I should see the heading 'Fruit Form'
The paths should be in double quotes, not single quotes. Then, Behat worked. I should have realized that yesterday, but wasn't thinking clearly about what Behat was telling me apparently. I interpreted it as it not knowing about the additional Drupal steps, when really I had a typo.
@mortona42, just checking - you said 'behat.xml'. Wanted to make sure that was a typo - behat's going to look for 'behat.yml', and it might explain your difficulties.
@mortona42 did you ever resolve the issue? I'm having the exact same issue
Ahh which I could help, but I have long forgotten what I was working on here.
I followed the steps in the full documentation for the stand alone installation, but when I run [bin/behat -di (or -dl)], nothing is listed.