DEV Community

Discussion on: How-To: Setup a unit-testable Jenkins shared pipeline library

Collapse
 
kuperadrian profile image
Adrian Kuper

Yeah, I'm not to sure about how to test groovy scripts in general, but testing anything in vars can be tough when Jenkins steps like sh are used. So as you said, the general approach here is to keep the code inside vars as small and trivial as possible while testing can be done for "conventional" classes. Therefore I don't have any code coverage numbers for the vars stuff