Tests with @Parameters in Spring 4.3 should have no parameters

phenomenon

When I upgrade Spring Boot to 1.4 series, the test with @Parameters of JUnitParams fails with Initialized Error with the message should have no parameters`.

solution

Change Runner to @RunWith (JUnitParamsRunner.class)

background

--It seems that the implementation of the constructor of SpringJUnit4ClassRunner has changed from the Spring Framework 4.3 series that depends on SpringBoot 1.4. --Until 4.2, @Parameters worked on SpringJUnit4ClassRunner, but it stopped working from 4.3.

reference

Recommended Posts

Tests with @Parameters in Spring 4.3 should have no parameters
Encode query parameters with Uri Components Builder in spring
How to bind request parameters in list format with bean property in Spring
Test controller with Mock MVC in Spring Boot
Asynchronous processing with regular execution in Spring Boot
Write RestController tests quickly with Spring Boot + Spock
One way to redirect_to with parameters in rails
[JAVA] [Spring] [MyBatis] Use IN () with SQL Builder
SSO with GitHub OAuth in Spring Boot 1.5.x environment
Handle passwords hashed with BCryptPasswordEncoder in Spring Security in Perl
Until you start development with Spring Boot in eclipse 1
Until you start development with Spring Boot in eclipse 2
Database environment construction with Docker in Spring boot (IntellJ)
Call your own method with PreAuthorize in Spring Security