Welcome Guest, Not a member yet? Register   Sign In
Unit Testing
#1

[eluser]richzilla[/eluser]
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
Code:
class Foo
to test this i would have a separate class (in the same file?) called
Code:
class Test_Foo
this would provide the methods of
Code:
Foo
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
Code:
Test_
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



Theme © iAndrew 2016 - Forum software by © MyBB