Some of my ideas on unit test inline

On Wed, Jan 4, 2017 at 1:26 AM <[email protected]> wrote:

> Hi
>
> First of all, all the best for 2017!
>
> we got an interesting discussion on unit tests in Functest this morning
> and more specifically on how we should use them.
>
> see
>
> http://ircbot.wl.linuxfoundation.org/meetings/opnfv-functest/2017/opnfv-functest.2017-01-03-08.00.log.html
> from 08:36:00
>
> Did you already elaborate any strategy regarding your unit tests?
>
> - coverage target 100%? 80% any figure? exit jenkins if not reached?
>

I think 80% is a reasonable starting point. And we could apply it in
verification job but skip voting to avoid blocking fast development.

We may enforce it for stable branch as a release criteria.

- function / method based
>

Yes, we enforce a companion unit test for every module in QTIP and covers
the public interface.

- use of mock objects
>

mock is especially useful in unit test to isolate modules under test from
others

- unit versus unit/functionnal tests
>

unit test and functional test focus on different target. Unit test
guarantee a module works as expected, while functional test ensures related
modules works together correctly to fulfil a functional requirement.

What are your best practices?
>

The above are my two cents in unit testing :-)
_______________________________________________
opnfv-tech-discuss mailing list
[email protected]
https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss

Reply via email to