Saved by Tests - Importing and Upgrading to Ensemble 2008
Shortly after completing a small project using Ensemble 2007 we received a developer version of Ensemble 2008. Preliminary to upgrading Ensemble, we imported the project and ran our automated test suites to catch any issues that might arise.
The imported production was built to migrate financial data from a legacy system to a new system. It was not particularly large or complex. It consisted of two business services, two routers, two transformations, and two operations that wrote the financial information to a file. Since we built this production using TDD (test-driven development), we had a full suite of automated tests.
After importing the project I ran our entire suite of tests for the production and noticed that two system tests and two router tests had failed. The system tests exercise the entire production from the inbound adapter all the way to the outbound operation that writes out the file. The router tests focus specifically on what transformation and operation a message is sent to based on a rule or set of rules.
The first thing I noticed in the system tests was that a request message was not being created or sent to the router. This meant that our inbound service was not operating properly. A few short moments later I realized I had forgotten to setup our ODBC connection to the legacy system and as a result the SQL inbound adapter was failing to collect data
I ran the tests again and the same tests were failing, however the system tests were failing in a different place. The message request was being created but it was not making it past the message router. Every single message router test was failing; none of the messages were routed to any transformation or operation.
I checked to make sure the router’s rule set was imported and verified that all the rules appeared to be in place. After spot checking the rules I re-saved the rule set and ran the tests again; all of the router and system tests passed this time around. It appeared that the imported rule set got munged and re-saving them fixed the problem.
Our tests alerted us of problems with the production immediately after the import and it acted as a guide in tracking down the problems that arose. Without our tests the failures would not have been immediately evident and we would not have had the granularity of information required to trace and fix the problems quickly. In short, our tests saved us.


Leave a Reply