Unit testing with pipeline projects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unit testing with pipeline projects

Lakshmi Narasimhan Vaikuntam
Hello.

Is it possible to write a unit test with a pipeline project instead of a freestyle project?

More generally, can we install additional plugins to the Jenkins instance launched during the test?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/202cc319-fb39-44f5-92dd-fadb4aba80a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unit testing with pipeline projects

Ulli Hafner
Do you mean an integration test? A unit test never starts a Jenkins instance.

Yes you can use any project type you like when your write an integration test. Just scan for some plugins that use a JenkinsRule.



Am 24.11.2017 um 07:33 schrieb Lakshmi Narasimhan <[hidden email]>:

Hello.

Is it possible to write a unit test with a pipeline project instead of a freestyle project?

More generally, can we install additional plugins to the Jenkins instance launched during the test?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/202cc319-fb39-44f5-92dd-fadb4aba80a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/D135F6BE-607B-4545-9454-B91961C827CC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unit testing with pipeline projects

Mark Waite-2
You can also refer to the pipeline tests in the hello-world-plugin fork that I created for Jenkins World 2017.


Same technique as noted by Ullrich Hafner.  Look at the pom.xml file for the dependencies and at the java file for the test writing technique.

Mark Waite

On Fri, Nov 24, 2017 at 6:19 AM Ullrich Hafner <[hidden email]> wrote:
Do you mean an integration test? A unit test never starts a Jenkins instance.

Yes you can use any project type you like when your write an integration test. Just scan for some plugins that use a JenkinsRule.



Am 24.11.2017 um 07:33 schrieb Lakshmi Narasimhan <[hidden email]>:

Hello.

Is it possible to write a unit test with a pipeline project instead of a freestyle project?

More generally, can we install additional plugins to the Jenkins instance launched during the test?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/202cc319-fb39-44f5-92dd-fadb4aba80a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/D135F6BE-607B-4545-9454-B91961C827CC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtEDCRg388JXX14SQ0gZ9ztKN0aD%2BNxqdiufOqix3UXESg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.