Skip to main content

Thread: question on unit testing


hello,
have couple of questions related unit testing. i'm sorry if not right place ask this, not sure else ask.
these questions.

1)why unit testing framework(i'm using cunit) need have such complex architecture of
1 registry has multiple suites,
1 suite has multiple tests.

finally, comes down test functions, correct ? so, why can't have simple architecture test functions execute 1 after other ?

someone asked me question , told him it's multiple developers can work simultaneously, each 1 writing tests in separate suite , collaborate. wasn't convinced , asked, if that's case, why have multiple registries ?

2)why need have many types of assertions. please refer http://cunit.sourceforge.net/doc/wri...tml#assertions. sorry again asking question particular framework, question is, can't
code:
cu_assert(int expression)
same job other assertions given right "expression" ?

3)because, can't answer these questions, end asking myself, why need framework ? doesn't give me ; instead of assertions, can write own if-else decides if test function passed or failed based on say, return value
advantages of using framework unit testing ?

i asked this, , gave me blunt answer , "why don't write own operating system?"

thanks.
please advise.

hello there!

actually, guess problem haven't worked tdd. tdd stands test-driven development, first specify kind of tests in code must succeed, , right code tests in hand.

therefore, more complete test set write is, more close specifications code be, when stop getting kind of error set. imagine calculator (imagining each operation complex programming task) - how many tests have include before starting development?

- if include 4 operations (addition, subtraction, multiplication , division) intuitive response "four".
- but, work combination of positive , negative numbers? "ok, maybe need 12 units".
- but, have considered decimals? , special numbers, infinity?

in conclusion, set of questions required knowledge of tdd. google it!

ps: , luck interviews!


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk question on unit testing


Ubuntu

Comments

Popular posts from this blog

Could not place because the source rectangle is empty

Thread: Using smartcard reader with vpnc

Adobe Font Folio 7.0 or just 7?