I'm a Java developer by trade. I was 'brought-up' in what you could call best practices. Then I took my current job. I had a choice between the Java/SOA team, and the ERP team. I was told that joining the ERP team would give me the best insight into how the business operates (not in terms of technology, but in terms of business.) So I went with ERP.
I found a system with over 4 million lines of "Progress 4GL" code (since renamed to Openedge ABL, because "4GLs sound bad") code, spread out around about 11000 files. The best part is, no file exists more than one folder down. So you have about 50 folders, each with 300-400 files a piece in them. Luckily, many of the files haven't been touched in over 7 years, and many of them are deprecated (but we don't delete them from version control "just in case." Don't even get me started on that one.) So there's really only about 1.5 million lines of code we'd actually have to test. "Only."
I could go on and on about the poor practices of the system. The bottom line was for years, developers had no option to say no. It was "gimme gimme gimme," combined with a lot of contractors moving in and out. Now, they want to clean up their act.
One of the first things I suggested was testing. They said, basically "we've been wanting to do testing for years, but we don't really know where to start." The business logic and database access are baked into the UI. (I'd say GUI, but it's not graphical, it's on a mainframe. Even the order-entry people telnet in.)
So this is pretty much a worst case scenario. Millions of lines of code. Over a billion dollars in annual sales running through the system, so it's not going to get a re-write (obviously "it works as it is.") No object orientation. No formal or automated tests. Our testers are also the ones who write the specs (which biases them toward "pushing the project through.")
I'm getting pretty desperate. I'm even willing to write whatever testing frameworks (there isn't much for Openedge in open source frameworks) we need on my spare time. I'm convinced it will pay for itself quite quickly. Where can we start? Has anyone here come across a similar project (even if smaller in scale) and if so, how did you cope with and overcome this?
Update: I've had a chat with my manager, and I have approval to draw up a spec/timeline for creating a test harness. At first, I heard this: "What we really need to do is write some tests." to which I responded "Having tests won't really help us if we don't have a way to run them. I've been looking into ProUnit (the old name for OEUnit) and think it will work for us." "We should write some tests using it." It took about 10 minutes of repeating this for him to realize it was not as simple as downloading the library and "using it." But, approval to write a spec to create a test harness is a start! Thanks guys for all your input!