jenkins-docs/simple-java-maven-app

org.opentest4j.AssertionFailedError: "message" is not "Hello World!"

Ananth-Adhikarla opened this issue · 1 comments

Hello,

I am new to Jenkins and just started by watching a tutorial. I forked this repo and used it in Jenkins along with maven. But it keeps giving error even if output is wrong. Could you help me understand it maybe I did something wrong on my side and not able to find any articles related to this and I also tried different versions of JDK 17/14.

To be more elaborate.

  1. I installed git and maven plugins
  2. I set my global config tools with : jdk-17.0.5 , apache-maven-3.8.6 and git from my local computer
  3. I create a new maven project and added the GitHub repo URL + GitHub hook trigger options
  4. I click on build
  5. I get error message

Error is : "message" is not "Hello World!"

Stack trace: org.opentest4j.AssertionFailedError: "message" is not "Hello World!"
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
at org.junit.jupiter.api.Assertions.fail(Assertions.java:135)
at com.mycompany.app.AppTest.testAppMain(AppTest.java:42)

Standard Output: Hello World!

I´m having the same problem and today is still having the same error.
The Jenkinsfile suggested in tutorial is using maven 3.8.1 adoptopenjdk outdated and I have to manually change it to maven 3.8.6 openjdk-18. Still, when I reach the step to pass the tests it does not pass
I'm using Jenkins running in Docker for Windows with Linux containers