[vdsm] clean testable code

Yaniv Bronheim ybronhei at redhat.com
Sun Aug 11 16:10:25 UTC 2013


Thanks Guiseppe! Great links  
We're surely can and should improve our VDSM unit tests, and use more of our functional tests
I'll check the links more deeply, and be glad to get more useful and good material\lectures for better programming that you encountered with

Yaniv Bronhaim.

----- Original Message -----
> From: "Giuseppe Vallarelli" <gvallare at redhat.com>
> To: "engine-devel" <engine-devel at ovirt.org>, "VDSM Project Development" <vdsm-devel at lists.fedorahosted.org>
> Sent: Sunday, August 11, 2013 3:57:08 PM
> Subject: [vdsm] clean testable code
> 
> Talking with my teammates I've noticed that there is some confusion related
> to what testing means and in general
> how tests can improve the quality of the codebase by favouring the
> development of components that are of higher
> quality - unluckily it doesn't favour hair regrowing. Tests are also cool
> because when done right they represent
> an executable form of documentation.
> 
> Some intro material:
> 
> 1 How to Write Clean, Testable Code by Miško Hevery (A Googler)
>   http://www.youtube.com/watch?v=XcT4yYu_TTs
> 
> 2 How to write testable code by Miško Hevery (hands on ;-))
>   http://misko.hevery.com/attachments/Guide-Writing%20Testable%20Code.pdf
>   Examples are provided in Java but the same principles apply to Python
>   as well.
> 
> 3 TDD by James Shore (a practice created by Kent Beck)
>   http://www.jamesshore.com/Agile-Book/test_driven_development.html
>   A broad article explaining TDD and related concepts.
> 
> 4 Difference between state based testing and interaction based testing
>   http://martinfowler.com/articles/mocksArentStubs.html
> 
> Not so intro - but easier to understand after consuming previous material:
> 
> 5 Mock Roles, not Objects by Freeman and Pryce
>   http://jmock.org/oopsla2004.pdf
>   They both wrote a very interesting book: Growing Object Oriented Software:
>   Guided by Tests
>   http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627/ref=cm_cr_pr_product_top
>   I didn't read it yet.
> 
> Points from 3 to 5 mostly describe a different kind of working practice,
> which is very
> opinionated but nevertheless with some interesting ideas. I consider points
> 1-2 fundamentals.
> 
> Enjoy, Giuseppe
> 
> I will share new materials if there's some interest on it.
> _______________________________________________
> vdsm-devel mailing list
> vdsm-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
> 


More information about the vdsm-devel mailing list