Automatic Unit Testing of SAS Programs with SASUnit

Andreas Mangold, Patrick Warnat · 2008

Software testing is indispensable, but time-consuming. The concept of unit testing implies that testing should start as early as possible during software development, and 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 in a fast and easy way. This paper presents SASUnit, a unit testing framework for SAS programs, which is available for free. SASUnit is used for the development, execution and documentation of tests for SAS programs. SASUnit test scenarios extend the specification of user requirements in a formal way and developers can leverage SASUnit for automatic and standardized documentation of test results. In a SASUnit test scenario, one allocates static test data, invokes the program under test and then calls assertion macros in order to compare actual with expected results. The comparisons are stored and used later to prepare the documentation.

Read the paper · More papers on PaperTik