Code Monkey home page Code Monkey logo

Comments (10)

aslakhellesoy avatar aslakhellesoy commented on July 22, 2024

What version are you using?

Can you prepare a Minimal, Complete, and Verifiable example in a git repo please?

from cucumber-java-skeleton.

Jeredriq avatar Jeredriq commented on July 22, 2024

Well, bad for me I cant reach git repo from my work place.

But I assure you all I did was just download this https://github.com/cucumber/cucumber-java-skeleton/ in zip file and open it and tried running tests

from cucumber-java-skeleton.

aslakhellesoy avatar aslakhellesoy commented on July 22, 2024

Please disregard my last comment. Can you tell us what OS you’re on and what Java version you’re using?

from cucumber-java-skeleton.

Jeredriq avatar Jeredriq commented on July 22, 2024

Windows 7 Enterprise Service Pack 1 and Java 1.8.0_121

from cucumber-java-skeleton.

onurozcelik avatar onurozcelik commented on July 22, 2024

Change your OS language to English and try again.

from cucumber-java-skeleton.

Jeredriq avatar Jeredriq commented on July 22, 2024

It works perfectly, thanks @onurozcelik

from cucumber-java-skeleton.

aslakhellesoy avatar aslakhellesoy commented on July 22, 2024

I'm reopening this - there should be a better error message.

from cucumber-java-skeleton.

mpkorstanje avatar mpkorstanje commented on July 22, 2024

I can't make sense of the error.

java.lang.NullPointerException: No format for key undefıned
at cucumber.runtime.formatter.AnsiFormats.get(AnsiFormats.java:51)

It's right there!

private static final Map<String, Format> formats = new HashMap<String, Format>() {{
        put("undefined", new ColorFormat(AnsiEscapes.YELLOW));
        ....
}};

Much less of how the OS language influences this.

from cucumber-java-skeleton.

mpkorstanje avatar mpkorstanje commented on July 22, 2024

Ah found it. It's in PrettyFormatter

        String formattedStepText = formatStepText(keyword, stepText, formats.get(result.getStatus().lowerCaseN11ame()), formats.get(result.getStatus().lowerCaseName() + "_arg"), testStep.getDefinitionArgument());

Which calls Result:

        public String lowerCaseName() {
            return name().toLowerCase();
        }

Which calls String

public String toLowerCase() {
        return toLowerCase(Locale.getDefault());
    }

Which uses a Locale which notes:

     * Converts all of the characters in this {@code String} to lower
     * case using the rules of the default locale. This is equivalent to calling
     * {@code toLowerCase(Locale.getDefault())}.
     * <p>
     * <b>Note:</b> This method is locale sensitive, and may produce unexpected
     * results if used for strings that are intended to be interpreted locale
     * independently.
     * Examples are programming language identifiers, protocol keys, and HTML
     * tags.
     * For instance, {@code "TITLE".toLowerCase()} in a Turkish locale
     * returns {@code "t\u005Cu0131tle"}, where '\u005Cu0131' is the
     * LATIN SMALL LETTER DOTLESS I character.
     * To obtain correct results for locale insensitive strings, use
     * {@code toLowerCase(Locale.ROOT)}.
     * <p>

from cucumber-java-skeleton.

aslakhellesoy avatar aslakhellesoy commented on July 22, 2024

Nice one @mpkorstanje!

from cucumber-java-skeleton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.