java.lang.Exception

Test class should have exactly one public constructor

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1306

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

    • java.lang.Exception: Test class should have exactly one public constructor at org.junit.runners.BlockJUnit4ClassRunner.validateOnlyOneConstructor(BlockJUnit4ClassRunner.java:134) at org.junit.runners.BlockJUnit4ClassRunner.validateConstructor(BlockJUnit4ClassRunner.java:123) at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:103) at org.junit.runners.ParentRunner.validate(ParentRunner.java:355) at org.junit.runners.ParentRunner.<init>(ParentRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:57) 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:80) at org.junit.runner.Computer.getSuite(Computer.java:28) at org.junit.runner.Request.classes(Request.java:75) at org.junit.runner.JUnitCore.run(JUnitCore.java:117) at org.junit.runner.JUnitCore.runMain(JUnitCore.java:96) at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:47) at org.junit.runner.JUnitCore.main(JUnitCore.java:40)

    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