Is it possible to aggregate all tests in a pipeline?

86 views
Skip to first unread message

Marc Esher

unread,
Aug 5, 2016, 6:23:50 PM8/5/16
to Jenkins Users
Greetings,

I'm pretty new to pipelines, and I'm coming to them from the perspective of replacing Build Flow plugin with Pipelines.

One thing I've found really valuable with Build Flow is the Build Flow Test Aggregator plugin, which makes it easy to see all the different test jobs (unit, functional, load, security, etc) that comprise a Build Flow in a single place.

I'm wondering: If I have a Pipeline that essentially just replicates what I'd normally do with a build flow -- building other jobs -- is there a way to aggregate all the tests in a single place?

And if not, where would I look for guidance on how to build a plugin to integrate into Pipeline to do that?

Thanks,

Marc

R. Tyler Croy

unread,
Aug 5, 2016, 9:16:39 PM8/5/16
to jenkins...@googlegroups.com
(replies inline)
If you're actually invoking other defined jobs in Jenkins via Pipeline (see the
`build` step), then no I do not believe this is currently feasible.

However, if you're defining a Pipeline which is going to have multiple
steps generating test reports, I believe multiple invocations of `junit` will
cover your nedes. For example:

node {
sh 'bundle exec rake spec'
junit 'spec/reports/*.xml'

sh 'bundle exec rake cucumber'
junit 'features/reports/*.xml'
}


That should meet your needs if I'm understanding correctly.



- R. Tyler Croy

------------------------------------------------------
Code: <https://github.com/rtyler>
Chatter: <https://twitter.com/agentdero>

% gpg --keyserver keys.gnupg.net --recv-key 3F51E16F
------------------------------------------------------
signature.asc
Reply all
Reply to author
Forward
0 new messages