Test Driven Development on the AS/400 - Does it exist?
Anyone out there? If so, are you doing test driven developmen on the AS/400? TDD is alive and kicking in some sectors of the software engineering community, but where I make my humble living, it's not even heard of.
Oh, I'm not saying we don't test our AS/400 code changes, I'm saying we don't develop our code based on tests. For most folks, and you'd do well to keep inline, they come up with tests after the fact, or trust the users to go off in isolation and dream up some poorly worded tests.
Anyway, so be thinking TDD or test driven development, on AS/400s in RPG/LE, Java, CLE, or maybe even in the PASE environment with *nix shell commands. How would you do it? What tools would you use? Would it have a web component? Would it be well integrated?
I'm all excited about doing something like this, and me not being the Lord's gift to programming like some folks, I'd rather get some guidance and instruction on which way to go here. Heck, feel free to point me to some good software products, even your own. :)
Outta here,
Tj


3 thoughts:
Hello fellow AS/400 (i5) programmer.
I've been told by the vendors themselves that automated testing software is rather expensive. After hearing the price, I was told that, "people usually head for the hills."
My own poor-man's method of testing is to develop and document a standard set of test data to try to hit as many data combinations and areas of my code as possible. Then next to it, document what my expected outcome should be. Then test, and compare the actual results to the expected.
Then recompile, retest the entire data set and repeat until clean. Of course the amount of testing is directly related to risk should something goes wrong with that program.
Your method seems to be the cheapest and most efficient. One thing I've been doing is capturing input/output sets for programs I'm going to change. Then compare the new output against the pre-change output.
We have no formal methodology in place where I work, nor any special tools for the AS/400. The prices, as you said, are out of this world. Developing a test suite would be easier I'm betting.
Thanks for stopping by.
Hi,
I am an RPG developper and I have been using TDD on the AS/400 for two years now.
The way I do it is very similar to the way I used to do it in JUnit. I create one procedure for each test case, and one module for each test suite. Just like JUnit uses methods and classes respectively. Each test case follows a three-part process.
1. Set up the database in a given, controlled state, by cleaning all relevant files and writing a few records.
2. Run the program or procedure under test.
3. Check the outputs (e.g., returned values, output parameters, records in files). If any checking fails, send an escape message, using the message API.
It is quite simple, really. At first, everybody around me thought I was a fool, because it took me a long time to write even simple programs. But a few months later, while they were drowning under hundreds of reported defects, I could still program with the same pace as before. TDD does not make you fast, but it makes your velocity a constant. That is a valuable asset over time.
Regards.
antoine
Post a Comment