hyperskill / hs-test

A framework that simplifies testing educational projects for Hyperskill. It is built on top of JUnit.
31 stars 10 forks source link

"No main method found" Exception should be described friendlier #46

Closed aaaaaa2493 closed 3 years ago

aaaaaa2493 commented 5 years ago

Now, it's like this:

Fatal error during testing, please send the report to Hyperskill team.

OS Mac OS X
Java 12.0.1
Vendor Oracle Corporation
Testing library version 5

Cannot be cloned: nothing
Cannot be reset: nothing
Cannot deserialize: nothing
Cannot serialize: nothing
Circular links: nothing

java.lang.Exception: No main method found
        at org.hyperskill.hstest.v5.stage.BaseStageTest.initTests(BaseStageTest.java:67)
        at org.hyperskill.hstest.v5.stage.BaseStageTest.start(BaseStageTest.java:120)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
aaaaaa2493 commented 3 years ago

Now, it's better

Error in test #1

No main method found in class outcomes.lib.NoMainMethodFoundMain