On 3/26/2013 6:33 PM, Gary Thompson wrote:
RPGUnit from sourceforge.net I guess
I see they have a tutorial
maybe we can use here in the swamp
if you could expand some; much appreciated !
RPGUnit is loosely modelled after JUnit for Java. The main idea is to
allow you to create a test suite that thoroughly tests your
sub-procedures.
As far as this list is concerned, unfortunately there isn't any link
between RPGUnit and RDp. In the Java world, JUnit is integrated with
Eclipse and you can test while you develop. Very cool and very handy.
I'll risk my posting status by noting that JUnit and RPGUnit are
implementations of a philosophy called TDD - Test Driven Development.
The main idea is to have complete test coverage of each function. Say
you have a function that does XML character escaping. Your test suite
will include a null string, a string of all blanks, a string of one
character, etc.
How does this help us as programmers? Well, every time I start to work
on a change, I run the full test suite first to verify that all tests
pass. Then I write a new test to see if the new functionality is
working. It had better fail because I haven't written the code yet.
This step proves that the test suite is behaving as expected. Now I
write the code that implements the new functionality and run the test
suite. It should pass all the tests. Now I am sure that my new
functionality works AND that I haven't broken existing functionality.
Again, I apologise for the off-topic post.
--buck
As an Amazon Associate we earn from qualifying purchases.