Editorials

Unit Testing Difficult Code

How do you test your applications? Believe it or not, you always test your software. There are companies that test their software through user affirmation; if they don’t get any complaints then the software must be correct. Hopefully this is not the normal testing methodology.

You can test your software manually if it has a user interface or tools allowing you to view the results of your application. For example, you can test ETL tools by having test input data and expected result data, and comparing the results from the process with SQL Statements or some other data viewing tool.

Unit tests are one of the most valuable kinds of tests that can be performed. They can be automated in many scenarios. The problem is figuring out how to write software that is testable, especially in tools where code is written as XML that is interpreted to code. SSIS is one of those tools difficult to test. Often you have different tools for retrieving, filtering, manipulating and exporting data such that it would be like trying to test a number of pipe programs all in one.

When it comes to data driven programming, what tools or techniques have you found to get the job of Unit Testing done? Share your ideas here or by email to btaylor@sswug.org.

Cheers,

Ben