temyers / cucumber-jvm-parallel-plugin

Maven plugin to help running Cucumber features in parallel
Apache License 2.0
129 stars 121 forks source link

generateRunners failed when running a project from the command line #195

Closed AntonDyukarev closed 5 years ago

AntonDyukarev commented 5 years ago

Hi!

I have some problem with cucumber-jvm-parallel-plugin. When I running a project from the command line, plugin gives an error:

[ERROR] Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners (generateRunners) on project android-acceptance: Execution generateRunners of goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners failed: Parser errors:

[ERROR] (5:1): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'Функционал: Подтверждение заказа'

[ERROR] (7:3): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'Предыстория:'

[ERROR] (8:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'Пусть сотрудник дождался исчезновения splash'

[ERROR] (9:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '? сотрудник авторизован'

[ERROR] (10:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '? сотрудник переходит в меню "Каталог"'

[ERROR] (13:3): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'Сценарий: Проверка отображения обязательных элементов экрана подтверждения заказа Доставка'

[ERROR] (14:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'Когда сотрудник ищет любой товар для чекаута'

[ERROR] (15:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '? сотрудник на PDP жмет кнопку Добавить в корзину'

[ERROR] (16:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '? сотрудник переходит в меню "Корзина"'

[ERROR] (17:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '? сотрудник дожидается прогрузки корзины'

[ERROR] (18:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '? сотрудник жмёт на кнопку "Перейти к оформлению"'

[ERROR] -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

But when I launch from IDE, everything works fine. I traced this problem. It starts with version 2.0.0. The feature files in English do not issue such errors. Is there any solution to this problem?

AntonDyukarev commented 5 years ago

Guys! @temyers I figured out this issue!

The problem is this! image

The method you use is outdated. Here you must also specify the file encoding !!! Like this: image

I checked this part of the code in a separate test. I tried to read the script names from the features file. With the option of passing arguments without a file encoding name, I got a similar result: image

But, specifying the file encoding, everything works fine !!!

image

If this fix, files features parish in other languages! Please fix it!

temyers commented 5 years ago

@AntonDyukarev Pull Request welcomed.

temyers commented 5 years ago

Cucucmber 4.0.0 now supports parallel execution natively.

Therefore, upgrading cucumber is recommended and this project shall be archived