Use @springboottest on the class
Use @test on the method (note that the package “import org.JUnit.Jupiter.API.Test” is imported.)
Similar Posts:
- [Solved] Springboot test class injection bean is null Error: java.lang.NullPointerException…
- junitjava.lang.Exception: No tests found matching
- How to Solve Annotation type expected error
- [Solved] java.lang.NoClassDefFoundError: org/junit/runner/manipulation/Filter
- Solve the error of springboot failed to load ApplicationContext
- javax.websocket.server.ServerContainer not available
- [Solved] org.hibernate.MappingException: Unknown entity: com.huangliusong.entity.Person
- [Solved] Cannot resolve symbol ‘SpringJUnit4ClassRunner’
- Springboot: solve the problem of failed to load ApplicationContext
- SpringBoot Datas Validation Build Error: Add a provider like Hibernate Validator (RI) to your classpath