Junit 5 - No ParameterResolver registered for parameter

后端 未结 6 3338
长情又很酷
长情又很酷 2021-02-05 01:41

Source : JUnit 5, Eclipse 4.8 , Selenium

I can write up and execute Selenium script without any special test framework but I wanted to use Junit 5 (because we have depe

6条回答
  •  遇见更好的自我
    2021-02-05 02:22

    I also got ParameterResolutionException with JUnit 5.

    org.junit.jupiter.api.extension.ParameterResolutionException: 
    No ParameterResolver registered for parameter [int[] arg0] in constructor (public my_package.MyClass(int[]))
    

    I had written @Test methods inside the class I was testing.

    This error could be fixed in two ways:

    1) Either replacing import org.junit.jupiter.api.Test with import org.junit.Test, or

    2) Writing tests in a separate TestClass.

提交回复
热议问题