java.lang.Exception

Test class should have exactly one public constructor

Solutions on the web1306

  • via GitHub by Tomahna
    , 7 months ago
    Test class should have exactly one public zero-argument constructor
  • via GitHub by mpfeifer
    , 1 year ago
    Test class should have exactly one public constructor
  • via Apache's JIRA Issue Tracker by Eric Hanson, 1 year ago
    Test class should have exactly one public zero-argument constructor
  • Stack trace

    • java.lang.Exception: Test class should have exactly one public constructor at org.junit.runners.BlockJUnit4ClassRunner.validateOnlyOneConstructor(BlockJUnit4ClassRunner.java:158) at org.junit.runners.BlockJUnit4ClassRunner.validateConstructor(BlockJUnit4ClassRunner.java:147) 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.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runner.Computer.getRunner(Computer.java:40) at org.junit.runner.Computer$1.runnerForClass(Computer.java:31) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:101) at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:87) at org.junit.runners.Suite.<init>(Suite.java:81) at org.junit.runner.Computer.getSuite(Computer.java:28) at org.junit.runner.Request.classes(Request.java:75) at org.junit.runner.JUnitCommandLineParseResult.createRequest(JUnitCommandLineParseResult.java:118) at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77) at org.junit.runner.JUnitCore.main(JUnitCore.java:36)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    2 times, 8 months ago
    Unknown user
    Once, 10 months ago