[openstack-dev] When is it okay for submitters to say 'I don't want to add tests' ?
Rosa, Andrea (HP Cloud Services)
andrea.rosa at hp.com
Fri Nov 1 11:05:36 UTC 2013
>From: Chris Friesen [mailto:chris.friesen at windriver.com]
>Sent: 31 October 2013 17:07
>To: openstack-dev at lists.openstack.org
>Subject: Re: [openstack-dev] When is it okay for submitters to say 'I don't
>want to add tests' ?
>On 10/31/2013 06:04 AM, Rosa, Andrea (HP Cloud Services) wrote:
>>> A - there is no test suite at all, adding one in unreasonable B -
>>> this thing cannot be tested in this context (e.g. functional tests
>>> are defined in a different tree) C - this particular thing is very
>>> hard to test
> >> D - testing this won't offer benefit
>> In my opinion C instead of being an acceptable reason for not having tests is
>a symptom of one of the two things:
>> 1) F => Submitter doesn't know how to write tests, in this case
>> someone else can help with suggestions
>> 2) The code we are trying to test is too complicated so it's time to
>> refactor it
>> And about D, In my opinion tests always offer benefits, like code coverage
>or helping in understanding the code.
>I think there are actually cases where C is valid. It's difficult to test certain
>kinds of race conditions, for example, unless you have very low-level hooks
>into the guts of the system in order to force the desired conditions to reliably
>occur at exactly the right time.
Well depends which kind of tests we are talking about.
I was talking about unit tests and I totally agree with Sandy when he said that "everything can be tested and should be".
"Test certain kinds of race conditions" those kind of tests not always are unit tests, I'd consider them functional tests.
More information about the OpenStack-dev