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

Install behat show error on windows 10 (help wanted) #1413

Open
hongxianf opened this issue Sep 28, 2022 · 1 comment
Open

Install behat show error on windows 10 (help wanted) #1413

hongxianf opened this issue Sep 28, 2022 · 1 comment

Comments

@hongxianf
Copy link

After i install behat by visual studio code ,then i input the command :

**vendor/bin/behat -v

1 want check the vesion,but it show error. as bellow:**
Snipaste_2022-09-28_15-51-59

In UninitializedContextEnvironment.php line 44:

[Behat\Behat\Context\Exception\ContextNotFoundException]
FeatureContext context class not found and can not be used.

Exception trace:
at D:\science\burger\vendor\behat\behat\src\Behat\Behat\Context\Environment\UninitializedContextEnvironment.php:44
Behat\Behat\Context\Environment\UninitializedContextEnvironment->registerContextClass() at D:\science\burger\vendor\behat\behat\src\Behat\Behat\Context\Environment\Handler\ContextEnvironmentHandler.php:91
Behat\Behat\Context\Environment\Handler\ContextEnvironmentHandler->buildEnvironment() at D:\science\burger\vendor\behat\behat\src\Behat\Testwork\Environment\EnvironmentManager.php:69
Behat\Testwork\Environment\EnvironmentManager->buildEnvironment() at D:\science\burger\vendor\behat\behat\src\Behat\Testwork\Tester\Runtime\RuntimeExercise.php:67
Behat\Testwork\Tester\Runtime\RuntimeExercise->test() at D:\science\burger\vendor\behat\behat\src\Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise.php:73
Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise->test() at D:\science\burger\vendor\behat\behat\src\Behat\Testwork\Ordering\OrderedExercise.php:80
Behat\Testwork\Ordering\OrderedExercise->test() at D:\science\burger\vendor\behat\behat\src\Behat\Testwork\Tester\Cli\ExerciseController.php:149
Behat\Testwork\Tester\Cli\ExerciseController->testSpecifications() at D:\science\burger\vendor\behat\behat\src\Behat\Testwork\Tester\Cli\ExerciseController.php:108
Behat\Testwork\Tester\Cli\ExerciseController->execute() at D:\science\burger\vendor\behat\behat\src\Behat\Testwork\Cli\Command.php:63
Behat\Testwork\Cli\Command->execute() at D:\science\burger\vendor\symfony\console\Command\Command.php:308
Symfony\Component\Console\Command\Command->run() at D:\science\burger\vendor\symfony\console\Application.php:1002
Symfony\Component\Console\Application->doRunCommand() at D:\science\burger\vendor\symfony\console\Application.php:299
Symfony\Component\Console\Application->doRun() at D:\science\burger\vendor\behat\behat\src\Behat\Testwork\Cli\Application.php:124
Behat\Testwork\Cli\Application->doRun() at D:\science\burger\vendor\symfony\console\Application.php:171
Symfony\Component\Console\Application->run() at D:\science\burger\vendor\behat\behat\bin\behat:34
include() at D:\science\burger\vendor\bin\behat:120

behat [-s|--suite SUITE] [-f|--format FORMAT] [-o|--out OUT] [--format-settings FORMAT-SETTINGS] [--init] [--lang LANG] [--name NAME] [--tags TAGS] [--role ROLE] [--story-syntax] [-d|--definitions DEFINITIONS] [--snippets-for [SNIPPETS-FOR]] [--snippets-type SNIPPETS-TYPE] [--append-snippets] [--no-snippets] [--strict] [--order ORDER] [--rerun] [--stop-on-failure] [--dry-run] [--] []

Need your help,thank you very much.

@uuf6429
Copy link

uuf6429 commented Apr 8, 2023

If you look at the synopsis shown in the bottom, you'll see there is no -v option. In fact there is such a thing, but it stands for verbosity not version.

Instead, the command you ran effectively makes it try to run tests (with verbose logging), and seeing that it's not set up yet, you get that error message.

In short, to do what you've asked, you should use vendor/bin/behat --version.

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