General discussion

Locked

Mixed results for unit testing poll

By martinig ·
How is unit testing performed in organizations? Is it an informal activity that is done before integration if there is some time left after programming or is it the key element of the development effort? A recent poll examined the way unit testing is performed in software development organizations. Here are the results:

Unit testing is not performed 13%
Unit testing is informal 46%
Unit tests cases are documented 11%
Unit tests cases and their executions are documented 16%
We use a Test Driven Development approach 14%

Participants: 460

These results do not claim any scientific value, but they give some information on the usage of unit testing in organizations. Unit testing is still performed informally by a majority of participants. This is symptomatic of the small consideration that is given to the testing activities in most software development projects. When the pressure to deliver is big, testing informally makes it easier to execute poorly without being noticed as you don't have to provide evidence of your activity. It is however recognized that unit testing is an important building block of system quality and that it costs more to correct errors discovered in later project phases. Good documentation of unit tests allows also to improve maintenance when the original developer has left the project or the company, because it can limit the occurrence that the correction introduced a negative side-effect.

At a time where agile approaches repeat the importance of unit testing, the glass can also be considered as half-empty. From this point of view, It is already encouraging to see that 41% of the participants are documenting their unit testing efforts. A Test Driven Development approach is used by 14% of the participants and 16% are documenting the execution of their unit test. These percentages are already important, as we know that documentation is not the preferred activity of software developers. They could be explained by the emergence of a wide range of open source unit testing frameworks in the xUnit family. They are the tools that should lead to more and more repeatable unit tests.

Source: Methods & Tools (www.methodsandtools.com)

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Definitions of "Unit Test" and "Informal"

by Wayne M. In reply to Mixed results for unit te ...

I am not sure how much information can be gleened from an informal opinion poll. I suspect the number for "Unit testing is not performed" is vastly understated and the number for Test Driven Design is certainly overstated for the general programming population.

I am a big proponent of Test Driven Design, but I am also a proponent of good use of measurement and statistics. Though I think I am in agreement with the intent, I think poor survey methodology hurts the argument.

Collapse -

Ask a crap question, get a crap answer

by Tony Hopkinson In reply to Mixed results for unit te ...

What do they mean by unit. A tool like DUnit/NUnit would be completely opaque to anyone but a developer. Automation testers or test straps built from use cases work from the other end completely.
Documentation of tests can be mandatory, but there are levels of that. You can test 'til, bits of paper are coming out of your ears, but still fall over badly in a real time environment.

There is no one size fits all strategy, people have different appreciations of what denotes a particular sort of test, never mind defining what they mean by informal. Might as well have asked them whether they thought brown shoes were a big help in development.

Collapse -

This is no scientific research

by martinig In reply to Ask a crap question, get ...

I agree with you that these results should be considered with care. This poll would like to provide a global vision of unit testing. On the other hand, if you tried to perform an university-like research on "real world" software development organisations: how many money should you spend to implement it and would you be sure to get more meaningfull results?

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums