Hi All,
We write a test cases for servlet at the time of running test cases it passing in my local. but we tried to move the code to higher environments by Jenkins it get failed we get null pointer exception why it was coming anybody have any idea Please i need some suggestions.
Thankyou.
Solved! Go to Solution.
Views
Replies
Total Likes
Hey, I think you should recheck the versions mentioned on Jenkins and on your local. try to identify which method is giving null pointer and which Junit version it is using.
In your local IDE you might be using Junit5 version which will pass in your local. But in jenkins their might be version miss match. Can you post the complete error trace that you are facing in jenkins?
[ERROR] PressReleaseServletTest.testDoGetWithParams:101 » NullPointer [ERROR] PressReleaseServletTest.testDoGetWithoutParams:87 » NullPointer
taking same code as pull i am testing in my local test cases are passng but it get failed with same code same test cases it get failed by Jenkins run
Hey, I think you should recheck the versions mentioned on Jenkins and on your local. try to identify which method is giving null pointer and which Junit version it is using.
Please check java/jdk version installed in local and jenkins.