|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem understanding branch, condition, statement coverage
Hi,
I am having this dilema with reference to the clear understanding of the following terms in order to pass the industry standard ISEB certification. Any help with a small piece of code would be greately appreciated. Branch coverage Statement coverage Condition coverage Method coverage Thanks.. |
|
#2
|
||||
|
||||
|
Those four terms look alarmingly like insurance terms. "You're covered, until you're sick, or dead, or your house floods or burns ... then you aren't"
Google's Define: seems to work as a starting point. I've been out of college since Papa Bush was in office so those terms don't jump out of the memory banks specifically.
__________________
medialint.com "Beware of the man who works hard to learn something, learns it, and finds himself no wiser than before. He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." - Vonnegut - Cat's Cradle, 1963 |
|
#3
|
||||
|
||||
|
I think he's referring to unit testing. We don't (yet) do that here so I can't help much.
__________________
Primary Forums: .Net Development, MS-SQL, C Programming VB.Net: It's not your father's Visual Basic. [Moving to ASP.Net] | [.Net Dos and Don't for VB6 Programmers] |
|
#4
|
||||
|
||||
|
I presumed the subject was unit testing also, but the question is somewhat confusing.
A method is the smallest unit in an OOP design (a function, procedure, or subroutine would be in other designs). The statement, branch, and condition terms baffle me unless they refer to the contents of a method or function. I don't consider them to be "unit testing" terms, however, but simple programming terms. A good unit test will ensure that all possible branches are taken, which means exercising the unit so that enough conditions occur to guarantee that. Given that, every statement will be executed. Again, though, I'm not sure that's the thrust of the question.
__________________
Antiquis temporibus, nati tibi similes in rupibus ventosissimis exponebantur ad necem. unoPolitically Incorrect DaWei on Pointers Grumpy on Exceptions |
|
#5
|
||||
|
||||
|
He's referring to code coverage
Here's a source of information regarding Statement and Branch Coverage. Method coverage is a code coverage metric that measures whether a method was entered at all during execution. This seems to consider all possible execution paths. Statement coverage seems to deal with measuring whether a block of code can be executed. if(false) printf("Hello World!"). The printf would never execute. Couldn't find a clear explanation of Condition Coverage, but it appears to be a test to display all possible outcomes of a boolean expression. Branch coverage seems to deal with verifying that boolean expressions can evaluate to both true and false. It seems that condition coverage can aid in this. Remember tech291083, google is your friend. |
|
#6
|
||||
|
||||
|
I sat ISEB in 2006, but for the life of me I can't remember a bloody thing about them
(Heads off to dig out the folder . . . . .)
__________________
The No Ma'am commandments: 1.) It is O.K. to call hooters 'knockers' and sometimes snack trays 2.) It is wrong to be French 3.) It is O.K. to put all bad people in a giant meat grinder 4.) Lawyers, see rule 3 5.) It is O.K. to drive a gas guzzler if it helps you get babes 6.) Everyone should car pool but me 7.) Bring back the word 'stewardesses' 8.) Synchronized swimming is not a sport 9.) Mud wrestling is a sport |
|
#7
|
||||
|
||||
|
Quote:
Code coverage was a semi-popular way of judging quality in software. The problem is that mechanical attempts to judge quality of software are hopeless. This is related to 'white box' testing, where you look inside the code Quality code is like porn, you can't define it, but you know it when you see it. |
|
#8
|
||||
|
||||
|
How would you handle it?? Just curious.
|
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > Problem understanding branch, condition, statement coverage |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|