我正在为我的Jenkins groovy脚本编写junit测试.我正在测试的Jenkins脚本包含如下方法调用:
error "Foo"
当我try 从我的IDE(Intellij IDEA)运行测试时,我会遇到如下错误:
没有方法签名:静态xxx.error()适用于参数类型:(org.codehaus.groovy.runtime.GStringImpl)值[Foo]
所以我想,我需要在我的类路径中添加一些库,让运行时知道这个error
函数.我试过这个maven依赖
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-aggregator</artifactId>
<version>2.5</version>
</dependency>
但这没有帮助.
所以我很难找到哪个库包含这里描述的这些基本Jenkins工作流功能:https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps
有什么 idea 吗?