I would like to write some tests for pipeline scripts. Has anyone created a
mock pipeline implementation. Development of pipeline script unit tests is
pretty convoluted when you have to run the test in jenkins. I am looking
for something that allows me to use replacements for existing pipeline
steps so there is no source level change between tests and the deployed
code. I understand how to replace annotations in Groovy. However trying to
replace something like this at runtime has proven to be a challenge. I want
to provide my own node closure and my own git method. Is there some kind
of interface for all the pipeline support that I can include on my test
class path?
node("master") {
git http://internet.com/according-to-bitcoin
}
I want to write a test that verifies this code so I need to replace node
and git.
Has anyone looked tried something similar?
Of course I could create a local instance and run tests in my local test
instance and that is the answer.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" 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-users/ea33eae8-6ffa-4224-8afc-fb893e554f48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.