How do I run tests on Java Maven app on Heroku. I am using autodeploy linked to a branch on Github.
The default Maven command run on Heroku is: mvn -DskipTests clean dependency:list install
To remove the skipTests, I set the MAVEN_CUSTOM_OPTS
as described on https://github.com/heroku/heroku-buildpack-java#customize-maven.
However this does not result on the tests to be run. Looking at the build log I can see:
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (java-test-compile) @ myapp ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M1:test (default-test) @ myapp ---
[INFO] No tests to run.
Compared to running Maven locally, I can see:
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (java-test-compile) @ myapp ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 65 source files to ...
So it would seem there is an issue with Heroku ignoring my test resources and code.
Aucun commentaire:
Enregistrer un commentaire