Behat icon indicating copy to clipboard operation
Behat copied to clipboard

cli suite filter argument does not works for suite with "-" in names

Open mathroc opened this issue 10 years ago • 8 comments

$ behat --suite=my-suite [Behat\Testwork\Suite\Exception\SuiteNotFoundException] my-suite suite is not found or has not been properly registered.

but it works if I rename the suite to "my_suite" or "mysuite"

mathroc avatar Nov 28 '16 09:11 mathroc

sorry, i can not understand your mean

tumingke0 avatar Nov 28 '16 09:11 tumingke0

well, in behat.yml I have a suite named "my-suite" but when I run behat --suite=my-suite it tells me that my-suite is not found

mathroc avatar Nov 28 '16 09:11 mathroc

ok, in your country, it is too late, why hwve not you sleep

tumingke0 avatar Nov 28 '16 09:11 tumingke0

Config keys normalization is disabled only for inner suite keys: https://github.com/Behat/Behat/blob/b171a35e53926220954823d261c83adfc81359c7/src/Behat/Testwork/Suite/ServiceContainer/SuiteExtension.php#L106

The same should be done for suite names too (one level upper compared to existing normalizeKeys() call if I understand things correctly).

avant1 avatar Nov 28 '16 09:11 avant1

rename it to mySuie - is it works for you?

On Mon, Nov 28, 2016 at 11:56 AM, Mathieu Rochette <[email protected]

wrote:

well, in behat.yml I have a suite named "my-suite" but when I run behat --suite=my-suite it tells me that my-suite is not found

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Behat/Behat/issues/968#issuecomment-263228937, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4v2wHSBEUv-iL1g7ZnWU8J_7zYsxoiks5rCqU2gaJpZM4K9j5X .

--

Serhii Polishchuk Symfony developer

a: 8072 Melrose Ave. Los Angeles, CA 90046 w: www.oroinc.com p: +380 (93) 418 75 75 e: [email protected] [email protected] s: serge_partner_ck

spolischook avatar Nov 28 '16 10:11 spolischook

yes it does work with mySuite too

mathroc avatar Nov 28 '16 10:11 mathroc

So next scenario is valid for you:

When my suite name is my-suite And I run in console:

behat --suite=my-suite

Then I have an error:

 my-suite is not found

But when my suite name is mySuite And I run in console:

behat --suite=mySuite

Then my tests suite run without error

On Mon, Nov 28, 2016 at 12:27 PM, Mathieu Rochette <[email protected]

wrote:

yes it does work with mySuite too

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Behat/Behat/issues/968#issuecomment-263235777, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4v25M9OCz3U7FioD970Yu2YilAgculks5rCqx8gaJpZM4K9j5X .

--

Serhii Polishchuk Symfony developer

a: 8072 Melrose Ave. Los Angeles, CA 90046 w: www.oroinc.com p: +380 (93) 418 75 75 e: [email protected] [email protected] s: serge_partner_ck

spolischook avatar Nov 28 '16 10:11 spolischook

@spolischook yes I've made a PR reproducting the bug here : #969

I think @avant1 is right. the suite names are normalized when read from behat.yml but not when read from the --suite argument

http://symfony.com/doc/current/components/config/definition.html#array-node-options

mathroc avatar Nov 28 '16 10:11 mathroc