In order to assess the correctness of SAS macros, testing is indispensable. The concept of Unit Testing implies that tests themselves should be implemented as executable pieces of source code. As a result, tests can be repeated anytime, and negative side effects of software changes can be spotted easily. To check the correctness of SAS macros, all statements of a macro should be executed at least once during testing. This can be assessed with the Code Coverage measure, which describes the degree to which a macro has been tested.
This paper gives a general introduction as well as an update on recent developments on SASUnit; available for free from HMS Analytical Software GmbH. SASUnit is a unit testing framework for the development, execution and documentation of tests for SAS macros. A special focus of this paper is put on a new feature of SASUnit: the assessment of Code Coverage.
more...