For Programmers: Free Programming Magazines  


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


Phlip

2006-04-17, 8:06 am

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/ZLand[/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.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com