> In general, if you use Mockito in Jenkins tests, you should expect to be > forced to edit existing test suites after even compatible changes to core or > plugin dependencies.
That's fine, I was just making sure in this specific case this isn't something that slipped through the core tests. > It is safer to divide test code into true unit tests (no mocking framework) > plus proper integration tests with `JenkinsRule` or one of its variants. By the variants you mean @WithJenkins @WithoutJenkins, right? I'm guessing this is purely logistical/logical suggestion to quickly catch issues like that - but indeed, that's a good one. > You need a valid Jenkins context to use this class. Simply removing > @WithoutJenkins annotation from the test method should fix it. That's exactly what I was curious and sent that email - why did it work before (so didn't need the instance) and suddenly it's needed after bumping the LTS. Thinking about it, if I would set up an alternate branch that would automatically bump BOM and Jenkins parent version continuously, then it could catch and pinpoint it to a specific change. Anyway, thanks guys! Radek On 16 Jun 2025 at 23:47 +0200, 'Jesse Glick' via Jenkins Developers <[email protected]>, wrote: > In general, if you use Mockito in Jenkins tests, you should expect to be > forced to edit existing test suites after even compatible changes to core or > plugin dependencies. It is safer to divide test code into true unit tests (no > mocking framework) plus proper integration tests with `JenkinsRule` or one of > its variants. > -- > You received this message because you are subscribed to a topic in the Google > Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-dev/nE3hFK8WV34/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1%2B9FKeeaP1LmyaFt%3DL%2BijdNOEjS0Yp3SdMMyUujXLM6w%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jenkinsci-dev/fefd8a12-f4e8-40ab-ab36-ac9dcbfd3797%40Spark.
