Let me rephrase the question. When I said conversation I meant by hand. Manually written them so to reflect the job description on jenkins itself.
I understand the classes are created so we programmatically rewrite them using the classes provided. However it would help if these building block classes could.load in configuration information at various levels in jenkins ie configuration of plugins or the jobs we run or the jenkinsfile itself. Just helps in writing and changing tests quicker and less translations between the real jenkins system and the test harness. If there is documentation on any of these I'll be happy to check them out. Thanks for the link I'll take a look. On Wed, 22 May 2019 at 20:14, Mark Waite <[email protected]> wrote: > > > On Wed, May 22, 2019 at 10:19 AM Mani Sarkar <[email protected]> wrote: > >> Hi Mark, all, >> >> Has anyone implemented the Project and Builder classes to convert project >> types like >> >> FreeStyleProject >> SimplePipeline >> MultiPipeline >> >> > I'm not sure I understand your question. It seems like you're asking for > an automated testing library that will convert a project type. What is the > destination for that conversion? Convert to what? > > >> What would be even better, if I could just load the *config.xml* files >> for the above project types via the project/builder classes - is there >> something close to this? >> >> > I believe the automated testing functions are written to encourage > creation of the job from the program, rather than using configuration files. > > However, there is a facility to use static configuration data in a Jenkins > test. Refer to > https://jenkins.io/doc/developer/testing/#providing-test-data for more > information on that technique. > > >> Regards >> Mani >> >> On Sat, 18 May 2019 at 20:46, Mark Waite <[email protected]> >> wrote: >> >>> >>> >>> On Sat, May 18, 2019 at 10:52 AM Mani Sarkar <[email protected]> >>> wrote: >>> >>>> Hi Mark, >>>> >>>> Another question, (I haven't looked into the docs in details), can I >>>> create SimplePipeline and MultiPipeline projects just like I can create a >>>> FreeStyle project. >>>> >>>> >>> Pipeline jobs can be created from automated tests. Refer to the >>> artifact-s3-manager-plugin >>> <https://github.com/jenkinsci/artifact-manager-s3-plugin/blob/5779d5c9ffdb1757792c1059ed11e6efa5767bfa/src/test/java/io/jenkins/plugins/artifact_manager_jclouds/NetworkTest.java#L138> >>> as one example. >>> >>> >>>> I have certain configs to apply to each type of the project - usually >>>> the same settings. The crude way would be to copy the config.xml files over >>>> but since each run is ephemeral I did like to do it Jenkins-idomatically or >>>> programmatically - any tips for this. >>>> >>>> Thanks. >>>> >>>> Cheers, >>>> Mani >>>> >>>> On Sat, 18 May 2019 at 16:45, Mani Sarkar <[email protected]> wrote: >>>> >>>>> 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! >>>>> >>>> >>>> >>>> -- >>>> @theNeomatrix369 <http://twitter.com/theNeomatrix369>* | **Blog >>>> <http://neomatrix369.wordpress.com>** | *@adoptopenjdk >>>> <http://twitter.com/adoptopenjdk> @graalvm <http://twitter.com/graalvm> >>>> @graal <http://twitter.com/graal> @truffleruby >>>> <http://twitter.com/truffleruby> >>>> *Bitbucket <https://bitbucket.org/neomatrix369>* * | **Github >>>> <https://github.com/neomatrix369>* * | * *Slideshare >>>> <https://slideshare.net/neomatrix369>* * | **LinkedIn >>>> <http://uk.linkedin.com/pub/mani-sarkar/71/a77/39b>* >>>> *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/CAGHtMW%3DPfdhuhGTZrfXU0N%2B1kOBLD%3DFLmuwy86M5te-8M1hOiQ%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/jenkinsci-dev/CAGHtMW%3DPfdhuhGTZrfXU0N%2B1kOBLD%3DFLmuwy86M5te-8M1hOiQ%40mail.gmail.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/CAO49JtE3x1%2Bo8Dt0cA7LpSZ9zQC2GjhQwrtzSdsWTWwg%2BdZFWQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtE3x1%2Bo8Dt0cA7LpSZ9zQC2GjhQwrtzSdsWTWwg%2BdZFWQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> -- >> @theNeomatrix369 <http://twitter.com/theNeomatrix369>* | **Blog >> <http://neomatrix369.wordpress.com>** | *@adoptopenjdk >> <http://twitter.com/adoptopenjdk> @graalvm <http://twitter.com/graalvm> >> @graal <http://twitter.com/graal> @truffleruby >> <http://twitter.com/truffleruby> >> *Bitbucket <https://bitbucket.org/neomatrix369>* * | **Github >> <https://github.com/neomatrix369>* * | * *Slideshare >> <https://slideshare.net/neomatrix369>* * | **LinkedIn >> <http://uk.linkedin.com/pub/mani-sarkar/71/a77/39b>* >> *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/CAGHtMWnF6AZjVYibC%2B%3DEpCuOVhOBJimqt%2B8CjvcMViUBUSD8ew%40mail.gmail.com >> <https://groups.google.com/d/msgid/jenkinsci-dev/CAGHtMWnF6AZjVYibC%2B%3DEpCuOVhOBJimqt%2B8CjvcMViUBUSD8ew%40mail.gmail.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/CAO49JtEmRDePCNGk0%3DTvuLT91yaGsVyTi9sZO1QHiyR5SYm5DQ%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtEmRDePCNGk0%3DTvuLT91yaGsVyTi9sZO1QHiyR5SYm5DQ%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/CAGHtMWkej7YHqecSN2%3D00hTMT%3DL3Un89nEWnA4_zppGvPt1YwQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
