Error message
java.lang.Exception: Test class should have exactly one public zero-argument constructor
at org.junit.runners.BlockJUnit4ClassRunner.validateZeroArgConstructor(BlockJUnit4ClassRunner.java:171)
at org.junit.runners.BlockJUnit4ClassRunner.validateConstructor(BlockJUnit4ClassRunner.java:148)
at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:127)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:10)
at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder$DefensiveJUnit4Builder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:128)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:56)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.vintage.engine.discovery.TestClassRequestResolver.createRunnerTestDescriptor(TestClassRequestResolver.java:55)
at org.junit.vintage.engine.discovery.VintageDiscoverer.lambda$discover$0(VintageDiscoverer.java:53)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
Test class should have only one public zero parameter constructor
Similar Posts:
- [Solved] java.lang.Exception: No runnable methodsĀ at org.junit.runners.BlockJUnit4ClassRunner.validateIns…
- java.lang.Exception: No runnable methods
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
- com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class tonels.
- [Solved] org.hibernate.hql.internal.ast.QuerySyntaxException: persons is not mapped…
- [Solved] org.hibernate.hql.internal.ast.QuerySyntaxException: persons is not mapped…
- JUnit Error: java.lang.IncompatibleClassChangeError [How to Solve]
- How to Solve Java.sql.sqlexception: ora-02289: sequence does not exist
- [Solved] org.hibernate.exception.SQLGrammarException: could not execute statement at…
- [Solved] org.hibernate.MappingException: Unknown entity: com.huangliusong.entity.Person