Home > Archive > Software Testing > April 2006 > About OO unit testing
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
About OO unit testing
|
|
| Liu Zhiqiang 2006-04-17, 4:10 am |
| Hi everyone,
I'am worring about how to design unit tesing case in OO context. In
other words, what test cases can cover the tested class?
Can you give me some guides? Thanks
| |
|
| Liu Zhiqiang wrote:
> I'am worring about how to design unit tesing case in OO context. In
> other words, what test cases can cover the tested class?
Whoever programs the OO classes should write unit tests for them, as they
go.
They should write the tests first, then write the code to pass the tests.
This forces the OO classes to be highly reusable and decoupled.
Formal QA unit tests should be an extension of this process.
--
Phlip
[url]http://www.greencheese.org/Z Land[/url] <-- NOT a blog!!!
| |
| Jose Cornado 2006-04-17, 7:08 pm |
| In their core there is no difference between them.
For instance:
int ReturnInt(char c)
whether it is in c , c++, or java the fact remains that the method
should return int X if char C is passed as parameter.
The trick or treat comes with the tools or methodologies that you
choose: that will depend on your budget and commitment from management.
The test cases that cover the tested class will depend on the number of
methods, their complexity and their protection levels.
|
|
|
|
|