• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unit Testing

Ill hold my hands up and admit that ive never done unit testing, having always relied on just running my code and gradually focusing in on any areas that arent producing the desired result. Ive done a bt of reading up, and ive a few questions about how unit testing would be implemented in a framework like codeigniter?

Firstly, im assuming that if i had
class Foo
to test this i would have a separate class (in the same file?) called
class Test_Foo
this would provide the methods of
with predetermined values and check to see if they received the expected results?

Is this correct?

Also im assuming in this instance, that all test classes are to be considered infallible?

And finally, how do you run your tests over an entire project? Do you need to create some sort of directory traversal script that just runs every class starting
or is there a better integrated way to do this?

Any clarification on these points would be greatly appreciated.

Messages In This Thread
Unit Testing - by El Forum - 11-29-2010, 02:49 PM
Unit Testing - by El Forum - 11-29-2010, 03:05 PM
Unit Testing - by El Forum - 11-29-2010, 03:31 PM
Unit Testing - by El Forum - 11-29-2010, 03:39 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.