Consulting prime time! The customer needed a feed from the backend (Sybase) SQL server database with the data transformed into Accounts, Opportunities, Contracts and several custom objects. It is a complex feed and the deadline was looming. 3,500 lines of Apex feed/batch code with 5,500 lines of supporting test code!
We spent 5 weeks on the code and almost as much writing the test code! Most of the test code is putting the data together – simulating different inputs, typing field values endlessly.
Not a pleasant task.
In our after-project briefing, we discussed the amount of time we had to spend on the test code and came up with the idea: why not reading the data from Salesforce objects and transforming the data into Apex code?? Nobody is offering this …