1. No, that's not normal. The jenkins instance should have your plugin and all plugins that you depend on, as well as the optional dependencies.
2. You should annotate the method with both @Test and @LocalData /B On Tue, Jun 9, 2015 at 9:42 AM, Jochen Fuerbacher <[email protected] > wrote: > Hello, > > I am currently writing unit tests for my jenkins plugin and I have some > questions. > > 1. Is it normal when I run the unit tests, that my plugin isn't installed > on the "unit test" jenkins instance automatically? I know that for each > unit test a fresh jenkins instance get started. So are these instances > really total clean - without any plugin installed (also mine)? > > 2. I used the annotation @LocalData to import predefined jenkins jobs. > Problem: Test methods with this annotation don't get detected as unit > tests. Example: In a class in have 2 methods annotated with @Test and 1 > method with @LocalData. When I run this class as unit test, only the 2 > methods with @Test get tested, the other method is ignored. I use > JenkinsRule. > > Thank you for your help. > > -- > 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 on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/fa5e04ec-5fd9-41af-8cae-394a9569738b%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/fa5e04ec-5fd9-41af-8cae-394a9569738b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Robert Sandell *Software Engineer* *CloudBees Inc.* -- 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 on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS1UFd8hURYE34snxh2xeyOaYteD-b890jnUBY2FdMn2Pg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
