[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] xen-api-libs unit tests



Hello Dave,

Two things:

1. Have you considered switching (at least partly) to property based testing [*], which works nicely for pure functions (for example most of the stuff from `stdext` can beÂcoveredÂin no time).

2. This is a bit unrelated, but anyway -- why don't you use ExtLib or Batteries, instead of `stdext`? Obviously, the goal is the same for all three of these libraries. And it would be really nice to see Batteries or ExtLib in a project as big as XenAPI.

Cheers,
Sergei

[*] http://kaputt.x9c.fr

On Tue, Nov 15, 2011 at 3:01 PM, Dave Scott <Dave.Scott@xxxxxxxxxxxxx> wrote:
Hi,

I've added some more unit tests to xen-api-libs which can be run at build time:

https://github.com/djs55/xen-api-libs/commit/75d9fb555e40700d6b959c116d64c603767b74cb

I've also added a "make test" target to the makefile which is invoked as part of the RPM build. I encourage everyone to (i) design their code to be testable; (ii) add some unit tests where the effort is worth it; and (iii) hook 'em in to the "make test" target. When deciding whether a particular test is worth it or not, I try to imagine myself refactoring the code in about a years time, when I've forgotten how it all works :)

Cheers,
Dave

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.