Skip to content
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

Open
Renstrom opened this issue Dec 29, 2021 · 10 comments
Open

Maven Surefire not properly loaded #129

Renstrom opened this issue Dec 29, 2021 · 10 comments
Assignees
Labels

Comments

@Renstrom
Copy link

Using the development instructions as per the Readme instructions, i.e

  1. clone:
git clone https://github.com/STAMP-project/testrunner.git
  1. build resources:
cd testrunner/src/test/resources/test-projects/
mvn install
  1. build testrunner:
cd ../../../..
mvn install

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.

@danglotb
Copy link
Member

Hello,

Sorry for the delay.

Could you please try to run mvn clean in the testrunner/src/test/resources/test-projects/ project?

And retry the installation of test-runner.

@Renstrom
Copy link
Author

Of course, I restored my project to the latest version with all the target folders removed using mvn clean.  

Here is a fresh installation output I get when running the code using Windows 10.

C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< example:example >---------------------------
[INFO] Building test-projects 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ example ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 5 source files to C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ example ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 10 source files to C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ example ---
[INFO] Surefire report directory: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects\target\surefire-reports


T E S T S

Running easymock.LoginControllerIntegrationTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.177 sec
Running example.ParametrizedTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running example.TestSuiteExample
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running example.TestSuiteExample2
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec

Results :

Tests run: 24, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ example ---
[INFO] Building jar: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects\target\example-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ example ---
[INFO] Installing C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects\target\example-0.0.1-SNAPSHOT.jar to C:\Users\ander.m2\repository\example\example\0.0.1-SNAPSHOT\example-0.0.1-SNAPSHOT.jar
[INFO] Installing C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\src\test\resources\test-projects\pom.xml to C:\Users\ander.m2\repository\example\example\0.0.1-SNAPSHOT\example-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.413 s
[INFO] Finished at: 2022-01-18T16:22:21+01:00
[INFO] ------------------------------------------------------------------------

C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner>mvn install
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] --------------------< eu.stamp-project:test-runner >--------------------
[INFO] Building eu.stamp-project:test-runner 3.1.4-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The artifact junit:junit-dep:jar:4.11-beta-1 has been relocated to junit:junit:jar:4.11-beta-1: The artifact junit:junit does not contain Hamcrest anymore but declares a dependency to Hamcrest. Thus, junit:junit-dep has become obsolete.
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ test-runner ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ test-runner ---
[INFO] argLine set to -javaagent:C:\Users\ander\.m2\repository\org\jacoco\org.jacoco.agent\0.8.7\org.jacoco.agent-0.8.7-runtime.jar=destfile=C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\target\jacoco.exec
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ test-runner ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 67 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ test-runner ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 71 source files to C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\target\classes
[INFO] /C:/Users/ander/Documents/Skola/Master/Programming-Exercise/testrunner/src/main/java/eu/stamp_project/testrunner/listener/utils/ListenerUtils.java: Some input files use unchecked or unsafe operations.
[INFO] /C:/Users/ander/Documents/Skola/Master/Programming-Exercise/testrunner/src/main/java/eu/stamp_project/testrunner/listener/utils/ListenerUtils.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ test-runner ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 53 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ test-runner ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ test-runner ---
[INFO] Surefire report directory: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\target\surefire-reports


T E S T S

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:763)
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:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
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)
... 9 more

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.356 s
[INFO] Finished at: 2022-01-18T16:26:14+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project test-runner: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner>

I have received the same errors when using Ubuntu 20.04 LTS and different versions of Maven and Java. 

@danglotb
Copy link
Member

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 clean goal will remove the target directory and the tests of test-runner should pass.

The idea of this mvn install is to download the required dependencies to run the test-project but the test-runner's test suite will recompile in its own way.

Hope this is helpful, best

@Renstrom
Copy link
Author

Hello,

As I've described above, I have already done this and I keep getting the same error.

@danglotb
Copy link
Member

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 mvn clean after the mvn install.

If this is the case, I do not understand the problem. Could you verify that the folder test-project/target/ does not exist before running the mvn install of test-runner?

Best,

@danglotb danglotb self-assigned this Jan 19, 2022
@Renstrom
Copy link
Author

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.EntryPointJUnit5Test

Tests run: 24, Failures: 0, Errors: 10, Skipped: 5, Time elapsed: 18.986 sec <<< FAILURE!
testRunGlobalCoverage(eu.stamp_project.testrunner.EntryPointJUnit5Test) Time elapsed: 0.82 sec <<< ERROR!
java.lang.RuntimeException: java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat


Test set: eu.stamp_project.testrunner.EntryPointTest

Tests run: 29, Failures: 0, Errors: 12, Skipped: 4, Time elapsed: 16.224 sec <<< FAILURE!
testRunGlobalCoverage(eu.stamp_project.testrunner.EntryPointTest) Time elapsed: 0.63 sec <<< ERROR!
java.lang.RuntimeException: java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat


Test set: eu.stamp_project.testrunner.listener.CoverageTest

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.32 sec <<< FAILURE!
compareTwoCoverages(eu.stamp_project.testrunner.listener.CoverageTest) Time elapsed: 0.307 sec <<< ERROR!
java.lang.NullPointerException


Test set: eu.stamp_project.testrunner.maven.EntryPointTest

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.248 sec


Test set: eu.stamp_project.testrunner.runner.coverage.JacocoRunnerPerTestMethodTest

Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.95 sec <<< FAILURE!
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JacocoRunnerPerTestMethodTest) Time elapsed: 0.335 sec <<< ERROR!
java.lang.NullPointerException


Test set: eu.stamp_project.testrunner.runner.coverage.JUnit4JacocoRunnerCoveredResultPerTestMethodTest

Tests run: 3, Failures: 0, Errors: 2, Skipped: 1, Time elapsed: 0.587 sec <<< FAILURE!
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JUnit4JacocoRunnerCoveredResultPerTestMethodTest) Time elapsed: 0.272 sec <<< ERROR!
java.lang.NullPointerException


Test set: eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerCoveredResultPerTestMethodTest

Tests run: 3, Failures: 0, Errors: 2, Skipped: 1, Time elapsed: 0.587 sec <<< FAILURE!
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerCoveredResultPerTestMethodTest) Time elapsed: 0.274 sec <<< ERROR!
java.lang.NullPointerException


Test set: eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerTest

Tests run: 4, Failures: 0, Errors: 3, Skipped: 1, Time elapsed: 0.892 sec <<< FAILURE!
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerTest) Time elapsed: 0.274 sec <<< ERROR!
java.lang.NullPointerException

@danglotb
Copy link
Member

Could you give the logs of the execution?

Thank you!

@Renstrom
Copy link
Author

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:
testRunGlobalCoverage(eu.stamp_project.testrunner.EntryPointJUnit5Test): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat
testRunCoveragePerTestMethodsSameNamedMethods(eu.stamp_project.testrunner.EntryPointJUnit5Test): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\CoveragePerTestMethod.dat
testRunCoveredTestResultPerTestMethodsSameNamedMethodsDetailedCompressedCoverage(eu.stamp_project.testrunner.EntryPointJUnit5Test): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveredTestResultPerTestMethodsSameNamedMethodsDetailedCoverage(eu.stamp_project.testrunner.EntryPointJUnit5Test): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveredTestResultPerTestMethodsDetailedCoverage(eu.stamp_project.testrunner.EntryPointJUnit5Test): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveredTestResultPerTestMethodsDetailedCompressedCoverage(eu.stamp_project.testrunner.EntryPointJUnit5Test): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveredTestResultPerTestMethods(eu.stamp_project.testrunner.EntryPointJUnit5Test): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveragePerTestMethods(eu.stamp_project.testrunner.EntryPointJUnit5Test): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\CoveragePerTestMethod.dat
testRunCoverageSameNamedMethods(eu.stamp_project.testrunner.EntryPointJUnit5Test): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat
testRunCoverage(eu.stamp_project.testrunner.EntryPointJUnit5Test): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat
testRunGlobalCoverage(eu.stamp_project.testrunner.EntryPointTest): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat
testRunCoveragePerTestMethodsSameNamedMethods(eu.stamp_project.testrunner.EntryPointTest): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\CoveragePerTestMethod.dat
testRunCoveredTestResultPerTestMethodsSameNamedMethodsDetailedCompressedCoverage(eu.stamp_project.testrunner.EntryPointTest): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveredTestResultPerTestMethodsSameNamedMethodsDetailedCoverage(eu.stamp_project.testrunner.EntryPointTest): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveredTestResultPerTestMethodsDetailedCoverage(eu.stamp_project.testrunner.EntryPointTest): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveredTestResultPerTestMethodsDetailedCompressedCoverage(eu.stamp_project.testrunner.EntryPointTest): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testRunCoveredTestResultPerTestMethods(eu.stamp_project.testrunner.EntryPointTest): eu.stamp_project.testrunner.listener.impl.OnlineCoveredTestResultPerTestMethodImpl cannot be cast to eu.stamp_project.testrunner.listener.impl.CoveredTestResultPerTestMethodImpl
testOnParametrizedForOneTestMethodCoveragePerTestMethod(eu.stamp_project.testrunner.EntryPointTest): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\CoveragePerTestMethod.dat
testRunCoveragePerTestMethods(eu.stamp_project.testrunner.EntryPointTest): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\CoveragePerTestMethod.dat
testRunGlobalCoverageWithBlackList(eu.stamp_project.testrunner.EntryPointTest): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat
testRunCoverageSameNamedMethods(eu.stamp_project.testrunner.EntryPointTest): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat
testRunCoverage(eu.stamp_project.testrunner.EntryPointTest): java.nio.file.NoSuchFileException: C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner.\target\Coverage.dat
compareTwoCoverages(eu.stamp_project.testrunner.listener.CoverageTest)
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JacocoRunnerPerTestMethodTest)
testWithoutNewJvmOnTestClassParametrized(eu.stamp_project.testrunner.runner.coverage.JacocoRunnerPerTestMethodTest)
testWithoutNewJvmOnTestClassAll(eu.stamp_project.testrunner.runner.coverage.JacocoRunnerPerTestMethodTest)
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JacocoRunnerTest)
testWithoutNewJvmOnTestClass(eu.stamp_project.testrunner.runner.coverage.JacocoRunnerTest)
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JUnit4JacocoRunnerCoveredResultPerTestMethodTest)
testWithoutNewJvmOnTestClassAll(eu.stamp_project.testrunner.runner.coverage.JUnit4JacocoRunnerCoveredResultPerTestMethodTest)
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerCoveredResultPerTestMethodTest)
testWithoutNewJvmOnTestClassAll(eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerCoveredResultPerTestMethodTest)
testWithoutNewJvmOnTestCases(eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerTest)
testWithoutNewJvmOnTestClass(eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerTest)
testMethodDetailedCoverageDetail(eu.stamp_project.testrunner.runner.coverage.JUnit5JacocoRunnerTest)

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.
[ERROR]
[ERROR] Please refer to C:\Users\ander\Documents\Skola\Master\Programming-Exercise\testrunner\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@danglotb
Copy link
Member

Hello,

Could you execute the tests without the quiet mode (do not use -q command line option) and upload the whole log file (by drag and drop, you can attach it to your comment on GitHub)?

Yes, I think it is a path problem, we do not test test-runner on Windows.

Thank you for your patience and for raising the issue 😄

@Renstrom
Copy link
Author

Here is the full log without the -q command-line option:

mvn.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants