What's up with G2?

bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2003-04-14 03:03

Hey all. I recently started using Extreme Programming at work and found that it works really well. It is the most revolutionary concept I've seen in software design in the past decade I've spent in the industry.

I've decided that I can't adopt all the XP principles at once, but I see the obvious short and long term benefit from the concept of Test Driven Design. So, I've spent the past month writing unit tests for all aspects of G2. Thus far I've written ~150 tests that cover almost all of the core framework and a fair chunk of the site admin controller code. By my estimate I have another 80 or so tests to go to complete the core, then I have to write tests for the other modules.

I've written up a document to explain what TDD is and why it's a good idea. Read about it <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpWiki&amp;file=index&amp;pagename=Test%20Driven%20Development" TARGET="_blank">here</A><!-- BBCode End --> and tell me what you think. The tests I've already written have helped me to find places where my thinking was muddled and find and fix many platform-specific bugs. If you're interested in jumping in and writing tests, that'd be a big help since I don't plan on advancing the product until I have written tests for all of the current codebase.

 
adpowers

Joined: 2003-03-25
Posts: 17
Posted: Mon, 2003-04-14 07:45

I've heard about extreme programming before, but I never looked into it. It sounds like TDD will really help you guys. That's good.

Anyway, I ran the phpunit script (when logged in as admin) and I got the following errors:

translatortest testgetlanguagecodefromrequest FAIL

Details:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> 1. testgetlanguagecodefromrequest
*

false type:boolean
en_US type:string
2. testgetlanguagecodefromrequest
*

false type:boolean
en_US type:string
3. testgetlanguagecodefromrequest
*

false type:boolean
en_US type:string </TD></TR></TABLE><!-- BBCode End -->

Just thought you should know this. It sounded like you want people on all platforms and systems to run the test.

Andrew

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2003-04-14 08:13

Thanks for the feedback, Andrew! Looks like I had some bad expectations in that series of tests. I've just checked in a fix for them; let me know if you see any other test failures.

 
adpowers

Joined: 2003-03-25
Posts: 17
Posted: Mon, 2003-04-14 19:25

I downloaded the latest CVS code and ran the test again. It worked :smile: !

Andrew