[Gluster-devel] GlusterFS unit test framework

Luis Pabon lpabon at redhat.com
Thu Mar 6 21:01:15 UTC 2014


Hi all,
     The patch is now live in GlusterFS.  This patch will allow you to 
write unit tests for your new patches or if you want, you can start 
writing unit tests for older code.  Writing unit tests for older code is 
a great way to learn the code (which I will be doing :-)).  I have also 
created a presentation to help explain what unit tests are:

http://slides-lpabon.rhcloud.com/feb24_glusterfs_unittest.html#/

The framework will also help in situations where developers are 
depending on APIs from other contributors.  In this situation, the 
developer can write their patch and test their code by mocking any APIs 
their code is dependent on.  This method allows for parallel development 
without the need to wait for the APIs to be available.

- Luis


On 02/20/2014 02:00 PM, Luis Pabon wrote:
> Hi all,
>     I have uploaded my patch to add unit test support to GlusterFS. 
> The unit test framework provides integration with Jenkins and coverage 
> support.  The patch is:
>
> http://review.gluster.org/#/c/7145/
>
> * Documentation:
> https://github.com/lpabon/glusterfs/blob/xunit/doc/hacker-guide/en-US/markdown/unittest.md 
>
>
> * Integration with Jenkins:
> http://build.gluster.org/job/glusterfs-unittests/
>
> * Tracker Bug:
> https://bugzilla.redhat.com/show_bug.cgi?id=1067059
>
> This is just the start.  If this is accepted, we would need developers 
> to start adding unit tests as part of their patches. Imagine, 
> hundreds, no wait, thousands of unit tests running on every patch 
> submit :-).
>
> Let me know what you think.
>
> - Luis
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at nongnu.org
> https://lists.nongnu.org/mailman/listinfo/gluster-devel





More information about the Gluster-devel mailing list