最近,我继承了“加强”工作中的一个商业关键项目。 过去五年来,该法典已经制定并经过了许多手法。 咨询人和全职雇员不再与公司打交道,他们研究了这一非常微妙和过于敏感的申请。 我们大多数人必须处理遗产法或此类项目。 . .
There are zero units and zero system tests. Logic is inter-mingled (and sometimes duplicated for no reason) between stored procedures, views (yes, I said views) and code. Documentation? Yeah, right. I am scared. Yes, very sacred to make even the most minimal of "tweak" or refactor. One little mishap, and there would be major income loss and potential legal issues for my employer.
So, any advice? My first thought would be to begin writing assertions/unit tests against the existing code. However, that can only go so far because there is a lot of logic embedded in stored procedures. (I know its possible to test stored procedures, but historically its much more difficult compared to unit testing source code logic). Another or additional approach would be to compare the database state before and after the application has performed a function, make some code changes, then do database state compare.