-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven Surefire not properly loaded #129
Comments
Hello, Sorry for the delay. Could you please try to run And retry the installation of |
C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects>mvn install T E S T SRunning easymock.LoginControllerIntegrationTest Results : Tests run: 24, Failures: 0, Errors: 0, Skipped: 0 [INFO] C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner>mvn install T E S T Sorg.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner>
|
Hello, You need to clean up the compiled files in the test-project, otherwise the tests won't pass. In other words, you can run: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner>mvn clean install clean The second call to the The idea of this Hope this is helpful, best |
Hello, As I've described above, I have already done this and I keep getting the same error. |
Hello, I'm sorry, I understand that you have run: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects>mvn install without running If this is the case, I do not understand the problem. Could you verify that the folder Best, |
Okay, it seems that a target file in the test-projects was still existing. I cleaned it and ran it, but I still get several errors. Would you say this is due to a pathing error? Here is a summarized output of the surefire reports: Test set: eu.stamp_project.testrunner.EntryPointJUnit5TestTests run: 24, Failures: 0, Errors: 10, Skipped: 5, Time elapsed: 18.986 sec <<< FAILURE! Test set: eu.stamp_project.testrunner.EntryPointTestTests run: 29, Failures: 0, Errors: 12, Skipped: 4, Time elapsed: 16.224 sec <<< FAILURE! Test set: eu.stamp_project.testrunner.listener.CoverageTestTests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.32 sec <<< FAILURE! Test set: eu.stamp_project.testrunner.maven.EntryPointTestTests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.248 sec Test set: eu.stamp_project.testrunner.runner.coverage.JacocoRunnerPerTestMethodTestTests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.95 sec <<< FAILURE! Test set: eu.stamp_project.testrunner.runner.coverage.JUnit4JacocoRunnerCoveredResultPerTestMethodTestTests run: 3, Failures: 0, Errors: 2, Skipped: 1, Time elapsed: 0.587 sec <<< FAILURE! Test set: eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerCoveredResultPerTestMethodTestTests run: 3, Failures: 0, Errors: 2, Skipped: 1, Time elapsed: 0.587 sec <<< FAILURE! Test set: eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerTestTests run: 4, Failures: 0, Errors: 3, Skipped: 1, Time elapsed: 0.892 sec <<< FAILURE! |
Could you give the logs of the execution? Thank you! |
Using mvn clean install clean -q > mvn.log the amount of LOC is roughly 2500 lines. Is there a better command to log the data? Otherwise, I have the last result of the output here. Results : Tests in error: Tests run: 71, Failures: 0, Errors: 35, Skipped: 12 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project test-runner: There are test failures. |
Hello, Could you execute the tests without the quiet mode (do not use Yes, I think it is a path problem, we do not test Thank you for your patience and for raising the issue 😄 |
Here is the full log without the -q command-line option: |
Using the development instructions as per the Readme instructions, i.e
testrunner
:Causes me to get the following error:
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NoClassDefFoundError: test-projects/target/test-classes/easymock/LoginControllerIntegrationTest (wrong name: easymock/LoginControllerIntegrationTest)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)
at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)
at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:194)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:92)
I believe that this is due to the maven.surefire plugin not being properly loaded in the testing phase.
The text was updated successfully, but these errors were encountered: