Monday, December 27, 2004

Test only code

Just found some test only code in our system. Freaks me out. We have a test facade that allows people to access data that is not normally visible through the facade. For example, some results are not visible on the GUI, they are only reported in the database, or in reports.

When you need access to that data for testing purposes, you can write a test facade method. In general though it should not be used for any business logic. It can appear in setup code and verify code, but it should never appear in the execute (system under test) area of a test.

Looks like I'll be doing a refresher on Jan 3rd.


Post a Comment

<< Home