Hi

I think that adding unit tests would greatly improve the ease of implementing 
new features for openvpn.  I have spend a lot of time coding Java (and others), 
and unit testing greatly improved my code quality, my throughput, and last, but 
not least, my confidence in the code. Indeed I have become very humble when it 
comes to the question of ‘what could possibly go wrong with this small change?’

What would be the steps to include unit testing?
—————————————————————————————————

1) Decide /if/ we want unit tests
2) Decide /how/ we want unit tests (this includes questions like dependency 
management, and the build system)
3) Decide /which/ framework to use
4) do it

How: Dependency management
—————————————————————————————————

Adding a test framework would require a way to include & track this dependency.

I see three possibilities

* Copy-and-forget: Add a copy the upstream testing framework and add it as-is 
to the source code repo.
* Include-dependency-management: Add some kind of dependency management, e.g. 
cmake packages.
* Use-the-SCM: Use git submodules to add the dependency.

I dislike Copy-and-forget because it pollutes the repository, and makes 
tracking upstream changes very hard.

I have no experience with Makefile based dependency management

But I do know how to handle a git submodule.

I have a very strong preference to using a git submodule for unit testing. 


Poll
—————————————————————————————————

What are your thoughts? Should we add unit tests at all? What would be your 
preferred way for dependency management. Please defer discussion on /which/ 
unit testing framework to use until we have an agreement on the /if/ and /how/ 
(just to prevent the ‘paint the bike shed’ discussion).

Cheers, Jens

Reply via email to