Thursday, 13 November 2008

You can see some working code in the svn. Currently ojes will only support functional level testing. No mock services is supported currently, But will soon introduce those. I am also planning to introduce a End User Documentation as well as PHPDoc for the project very shortly.

You can see I have specified the test cases in the comments itself. So when ever the ojes unit run it will take the test case one by one from the comment and run against the function. So for the function add it is pretty simple.

Now take the case of the Multiply which in turn call the add function. In an ideal situation when testing the function multiply, we don't want to call the function add. And most of the unit test provides as with the option to write mock object or function etc. But that all has to be done by the programmer. So now come the turning point in ojes and the part which i like the most. The part which has driven me to do this. ojes will automatically generate mocks for you...... , Can't believe. Just wipe your eyes and look again. ojes will generate mocks for and test the required function in isolation. The idea behind this is very simple the test case of multiply is 2 and 3, So inside the multiply I go into a loop and call 2 + 2 and then 4 + 2. These values are given as the test case for the add function. So ojes will take these values and make the mock and return back the predefined value given by the user.

Looks good and easy then join hands with me. Let us change the world.

(I have a prototype for this one. But the code is not that good. I am just clearing out the code and creating documentation. By the mean time if any one is interested in this project can mail me for the code.

I am planning for making this project an open source one :) So once we have a nice documented and running code we can go for releases)