Unit tests are popular, but it is an art to write them in a way that specifies
a program’s behavior well and it is laborious to write enough of them to have
confidence in the correctness of an implementation. Symbolic execution is an
approach that can help. We describe techniques for unit testing based on symbolic
execution. These techniques can be used to increase code coverage by finding
relevant variations of existing unit tests, and they can be used to generate unit
tests from an implementation automatically when no prior unit tests exist. The
adoption of symbolic analysis techniques in commercial testing tools has already
begun.