Search code examples
gradleintellij-ideajunitcucumbercyrillic

Bad Cyrillic output of Cucumber test result when using Gradle


When I run my Cucumber scenarios with Gradle configuration in IDEA, I get this: Bad output of case names

But when I run tests with JUnit Run Configuration in IDEA, names display normally.

Console output is the same in both cases.

Scenarios are written in Russian, I can't show them cause of security restrictions.


Solution

  • Thanks to y.bedrov comment.

    Adding -Dfile.encoding=UTF-8 into "Help | Edit Custom VM Options" and then restarting an IDE solves this problem.

    An alternative solution, which I used before:

    change "Run tests using:" from Gradle to IntelliJ IDEA

    in "File | Settings | Build, Execution, Deployment | Build Tools | Gradle"