![]() |
Advice on TDD / Unit Testing Class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Advice on TDD / Unit Testing Class (/showthread.php?tid=31379) |
Advice on TDD / Unit Testing Class - El Forum - 06-16-2010 [eluser]Buso[/eluser] I have just heard of TDD and remembered CI's unit testing class (which I have never used). I wanted to know if it has been useful to you. Are you doing TDD? (whether with or without CI) Is there much to learn about this? I know CI's unit testing class is quite simple, but maybe I should research further if I want to be a better developer and start using it? Advice on TDD / Unit Testing Class - El Forum - 06-16-2010 [eluser]Eric Barnes[/eluser] Yes the internal one is very basic but should give you an idea on how to start testing. I have actually ported simpletest and released this: http://github.com/ericbarnes/codeigniter-simpletest Advice on TDD / Unit Testing Class - El Forum - 06-16-2010 [eluser]Buso[/eluser] that looks amazing, how come I never heard of these things before T_T thanks Advice on TDD / Unit Testing Class - El Forum - 06-17-2010 [eluser]Buso[/eluser] So.. what am I supposed to do with this unit testing class? (the codeigniter one I mean) I have been thinking but nothing came out I must write separate files for the tests I guess, and maybe a test controller that gathers all the tests and runs them? A simple example would be helpful (not necessarily coded) I just wanna know the most basic usage for this, as I never used it Advice on TDD / Unit Testing Class - El Forum - 06-17-2010 [eluser]Eric Barnes[/eluser] With the ci unit testing I just create a controller and then add all my tests in it. It is very lacking if you need more than just a few simple tests. Advice on TDD / Unit Testing Class - El Forum - 06-17-2010 [eluser]Buso[/eluser] edit: SOLVED. Had to require it from index.php, not sure why. Simpletest makes my apache crash when I require autorun.php from within my controller. Any ideas? Advice on TDD / Unit Testing Class - El Forum - 06-18-2010 [eluser]Buso[/eluser] yay! I finally completed my own simpletest integration here's a screen: http://img248.imageshack.us/img248/5278/mytestsuite.jpg development is just getting more awesome :lol: Advice on TDD / Unit Testing Class - El Forum - 06-24-2010 [eluser]Rey Philip Regis[/eluser] Hi Eric, Im using your Test Suit Library for CodeIgniter right now. I have a question, how do I test a controller? Good day. |