-
Task
-
Resolution: Won't Do
-
Minor
-
None
It'd be handy to be able to add CPS-transformed code from a plugin (i.e., JENKINS-37011 or a GlobalVariable) to code coverage.
- relates to
-
JENKINS-37011 Provide a way to write full-fledged Steps in CPS-transformed Groovy
-
- Resolved
-
[JENKINS-37277] Provide a way to add CPS-transformed code in a plugin to code coverage
Link |
New:
This issue relates to |
Epic Link | New: JENKINS-35396 [ 171189 ] |
Component/s | New: pipeline-general [ 21692 ] |
Component/s | Original: workflow-plugin [ 18820 ] |
Issue Type | Original: Bug [ 1 ] | New: Task [ 3 ] |
Component/s | New: workflow-cps-plugin [ 21713 ] | |
Component/s | Original: pipeline [ 21692 ] |
Resolution | New: Won't Do [ 10001 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
I do not see any practical way to do this. Code coverage tools typically instrument bytecode. The bytecode generated by the CPS transformer is not going to make any sense to such a tool. So you would have to write a custom extension to the CPS transformer that inserts instrumentation calls directly to a particular code coverage tool, like JaCoCo.
Seems like it is not worth the marginal gains. Better to write as much as you can in Java.