unit testing from shell scripts?

267 views
Skip to first unread message

Bill Trost

unread,
Dec 7, 2012, 10:48:48 AM12/7/12
to jenkins...@googlegroups.com
Hi,

I need to run a set of unit tests that simply consist of seeing if
two files are identical. There are all kinds of Unix tools (diff,
cmp, comm, etc.) that can provide the basic information, but how do
I translate that into unit test results that Jenkins can understand
and display? Simply emitting XML for xUnit parser seems a bit crude.

Thanks,
Bill

Anthony Shortland

unread,
Dec 7, 2012, 11:35:25 AM12/7/12
to jenkins...@googlegroups.com, jenkins...@googlegroups.com
Hi Bill, 

Are you aware of Rerun (http://rerun.github.com/rerun) and its ability to formally manage shell script test cases?

Anthony.

Sent from my iPhone

Matt Benson

unread,
Dec 7, 2012, 11:55:57 AM12/7/12
to jenkins...@googlegroups.com
Bill:  You might also consider Antunit [1] for a simple means of generating JUnit-compatible XML.

HTH,
Matt
[1] http://ant.apache.org/antlibs/antunit/index.html

Benjamin Lau

unread,
Dec 7, 2012, 1:27:36 PM12/7/12
to jenkins...@googlegroups.com

I've also used the technique of generating xUnit formatted reports from the shell script and having Jenkins pick those up. Required the xUnit plug-in if I recall.

Ben

D. Scott

unread,
Jan 30, 2014, 6:17:16 PM1/30/14
to jenkins...@googlegroups.com, tr...@cloud.rain.com
I spent a lot of time looking for this same thing. Finally, I wrote my own solution.
It's now available on SourceForge at https://sourceforge.net/projects/jshu.

D

JonathanRRogers

unread,
Jan 31, 2014, 1:07:10 PM1/31/14
to jenkins...@googlegroups.com, tr...@cloud.rain.com

I haven't had a need to do what you're describing yet, but if I did, I'd probably check out the  TAP plugin for Jenkins. TAP is much simpler than xUnit.

<URL:https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin>
Reply all
Reply to author
Forward
0 new messages