[zeromq-dev] Testing framework

Staffan Gimåker staffan at spotify.com
Mon Jan 23 15:05:01 CET 2012

On Mon, Jan 23, 2012 at 2:01 PM, Martin Lucina <martin at lucina.net> wrote:

> staffan at spotify.com said:
> > Are there any plans to migrate libzmq to use a more fully-featured
> testing
> > framework (e.g. googletest)?
> Not at the moment, but it's mostly a case of finding someone interested and
> persistent enough to do the work.
> I believe that Steven McCoy was working on something with googletest at
> some stage, not sure how far he got.

>From what I can gather from the archived thread linked by Ian, Steven's
focus seems to have been better test coverage in general, which of course
would be very very nice. My suggestion is more limited in scope: use a
testing framework to make writing new tests less painful.

> > The current automake test system is a bit of a
> > pain to work with since it's missing stuff like a nice way to group
> related
> > tests, a standardized way to do fixtures, sensible messages from failed
> > assertions, etc.
> While googletest does seem to have more features, at least some of the
> above (sensible messages, for example) could be achieved by improving the
> existing test programs.
> It'd be nice if someone volunteered to improve the existing testsuite (or
> create a new one, assuming it's at least as good as the existing one). I
> know that some of the language bindings (Python, Ruby) have extensive test
> suites which would be a good start.

It's probably less work to port the existing tests (less than 2000 loc)
over to an existing test framework than to write your own.

> > Aside from an added (compile-time) dependency, are there any reasons why
> the
> > automake way is preferable?
> Portability? We currently have autobuilds on all the following platforms
> (more welcome, btw):

Good point. I imagine it would work just fine for FreeBSB etc. (it
apparently supports z/OS!), but it would be nice if all targeted platforms
were officially supported I suppose. If googletest doesn't fit the bill
there are other alternatives as well (CppUnit, CxxTest, Boost.Test, ...).

Hopefully I will get some time to look more into this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120123/15abcde2/attachment.htm>

More information about the zeromq-dev mailing list