Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296283

JUnit5 tests using Params API fails to compile

XMLWordPrintable

    • b07

        Tests using the JUnit 5 params API fails to compile due to missing dependencies.
        ------------
        import org.junit.jupiter.params.ParameterizedTest;
        import org.junit.jupiter.params.provider.ValueSource;

        Class JUnit5Test {

            @ValueSource(doubles = { 1.0, 2.0, 3.0 })
            @ParameterizedTest
            void aTest(double value) {
            }
        }
        ------------
        This was uncovered when running the test added in a PR in commit #1+#2: https://github.com/openjdk/jfx/pull/910

        The test failed to compile on local mac machine but passed on GHA.
        Error:
        error: package org.junit.jupiter.params does not exist
        error: package org.junit.jupiter.params.provider does not exist
        error: cannot find symbol @ValueSource
        error: cannot find symbol @ParameterizedTest

              arapte Ambarish Rapte
              arapte Ambarish Rapte
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: