Hi Mark

Thanks for the response. Quite detailed set of resources and yes I would
need all of them. Does involve testing against a git repo.  Great to see
junit rules are available.

I'll try to share the results once I have completed the work so it will be
a good example for others.

Thanks again.

Regards
Mani

On Sat, 18 May 2019 at 13:59, Mark Waite <[email protected]> wrote:

>
>
> On Sat, May 18, 2019 at 2:00 AM Mani Sarkar <[email protected]> wrote:
>
>> Hi.
>>
>> I'm looking for pointers to go about testing a Jenkins plugin.
>>
>>
> That's great that you want to automate testing of your Jenkins plugin!
> First reference should probably be the Jenkins Developers Handbook page
> called "Testing Jenkins <https://jenkins.io/doc/developer/testing/>".
> More general plugin development topics are covered in the Developer
> Handbook <https://jenkins.io/doc/developer/>.  Those more general topics
> include testing topics and test automation topics.
>
> More information is available in various articles linked from the testing
> section of a blog post "Plugin Development Tutorials, Videos, and More
> <https://jenkins.io/blog/2017/08/07/intro-to-plugin-development/>".
>
> After those overviews, the details in the various testing classes are
> quite useful as well, including:
>
>    - JenkinsRule
>    
> <https://javadoc.jenkins.io/component/jenkins-test-harness/org/jvnet/hudson/test/JenkinsRule.html>
>  -
>    automate a test within a lightweight Jenkins server
>    - LoggerRule
>    
> <https://javadoc.jenkins.io/component/jenkins-test-harness/org/jvnet/hudson/test/LoggerRule.html>
>    - capture Jenkins logs for assertions
>    - RestartableJenkinsRule
>    
> <https://javadoc.jenkins.io/component/jenkins-test-harness/org/jvnet/hudson/test/RestartableJenkinsRule.html>
>    - automate a test of Jenkins server restart
>
> If you need a git repository as part of your automated tests, there are
> test extensions that are used in many locations to simplify automated
> testing of plugins that need to interact with a git repository.
>
>
>> Happy to use mocks but would love to also write a real integration test
>> against a Jenkins server, where the Jenkins server is using the plugin in
>> question and is triggered by the test runner itself.
>>
>> Has anyone done this before or can point me to some examples that I can
>> examine.
>>
>> Thanks.
>>
>> Regards
>> Mani
>>
>> --
>> 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/01342628-e77f-423e-ba49-137a5939e1d3%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/01342628-e77f-423e-ba49-137a5939e1d3%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Thanks!
> Mark Waite
>
> --
> 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/m9mtZfrs2tM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtED43carg7dm9TxAe9Pb%3DJX7W0LGtEaE%2BEWbPurHcH4vA%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtED43carg7dm9TxAe9Pb%3DJX7W0LGtEaE%2BEWbPurHcH4vA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
-- 
@theNeomatrix369  |  Blog: http://neomatrix369.wordpress.com
| @adoptopenjdk @graalvm @graal @truffleruby  |  Github:
http://github.com/neomatrix369  |  Slideshare:
https://slideshare.net/neomatrix369 | LinkedIn:
https://uk.linkedin.com/in/mani-sarkar

Come to Devoxx UK 2019: http://www.devoxx.co.uk/

Don't chase success, rather aim for "Excellence", and success will come
chasing after you!

-- 
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/CAGHtMWmHnpUx%3Da4CQJYgjHm--spUoyENOMDBFDmBZCdcwuCG3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to