Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 8th, 2008, 01:02 AM
tech291083 tech291083 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 331 tech291083 User rank is Sergeant Major (2000 - 5000 Reputation Level)tech291083 User rank is Sergeant Major (2000 - 5000 Reputation Level)tech291083 User rank is Sergeant Major (2000 - 5000 Reputation Level)tech291083 User rank is Sergeant Major (2000 - 5000 Reputation Level)tech291083 User rank is Sergeant Major (2000 - 5000 Reputation Level)tech291083 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 2 h 43 m 6 sec
Reputation Power: 27
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..

Reply With Quote
  #2  
Old January 8th, 2008, 11:07 AM
medialint's Avatar
medialint medialint is offline
Type Cast Exception
Click here for more information.
 
Join Date: Apr 2004
Location: Tralfamadore
Posts: 13,653 medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)medialint User rank is General 51st Grade (Above 100000 Reputation Level)  Folding Points: 307430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 307430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 307430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 307430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 307430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 307430 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 2 Weeks 2 Days 4 h 51 m 35 sec
Reputation Power: 4390
Facebook
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

Reply With Quote
  #3  
Old January 8th, 2008, 01:21 PM
f'lar's Avatar
f'lar f'lar is offline
Senior WeyrLeader
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Aug 2003
Location: WI
Posts: 4,130 f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level)f'lar User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 11 h 49 m 55 sec
Reputation Power: 977
Send a message via Google Talk to f'lar
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]

Reply With Quote
  #4  
Old January 8th, 2008, 01:40 PM
sizablegrin's Avatar
sizablegrin sizablegrin is offline
Crab
Click here for more information.
 
Join Date: Jun 2005
Posts: 5,032 sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 4 Days 10 h 39 m 37 sec
Reputation Power: 3388
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. uno
Politically Incorrect DaWei on Pointers Grumpy on Exceptions

Reply With Quote
  #5  
Old January 8th, 2008, 02:03 PM
flashbck's Avatar
flashbck flashbck is offline
/* Spawn Killer Killer */
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Nov 2004
Location: New Orleans, LA, USA
Posts: 1,202 flashbck User rank is Captain (20000 - 30000 Reputation Level)flashbck User rank is Captain (20000 - 30000 Reputation Level)flashbck User rank is Captain (20000 - 30000 Reputation Level)flashbck User rank is Captain (20000 - 30000 Reputation Level)flashbck User rank is Captain (20000 - 30000 Reputation Level)flashbck User rank is Captain (20000 - 30000 Reputation Level)flashbck User rank is Captain (20000 - 30000 Reputation Level)flashbck User rank is Captain (20000 - 30000 Reputation Level)flashbck User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 3924 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 2 Days 3 h 51 m 55 sec
Reputation Power: 210
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.

Reply With Quote
  #6  
Old January 8th, 2008, 03:06 PM
aitken325i's Avatar
aitken325i aitken325i is offline
At a NO MA'AM meeting . . . .
Dev Shed God 18th Plane (13500 - 13999 posts)
 
Join Date: Mar 2004
Location: nr Edinburgh, Scotland
Posts: 13,723 aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)aitken325i User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 10110 Folding Title: Novice Folder
Time spent in forums: 5 Months 2 Weeks 4 Days 21 h 50 m 35 sec
Reputation Power: 2383
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

Reply With Quote
  #7  
Old January 8th, 2008, 08:02 PM
fishtoprecords's Avatar
fishtoprecords fishtoprecords is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Sep 2007
Location: outside Washington DC
Posts: 1,908 fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)fishtoprecords User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 264946 Folding Title: Super Ultimate Folder - Level 1Folding Points: 264946 Folding Title: Super Ultimate Folder - Level 1Folding Points: 264946 Folding Title: Super Ultimate Folder - Level 1Folding Points: 264946 Folding Title: Super Ultimate Folder - Level 1Folding Points: 264946 Folding Title: Super Ultimate Folder - Level 1Folding Points: 264946 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Weeks 10 h 24 m 51 sec
Reputation Power: 1513
Quote:
Originally Posted by flashbck
He's referring to code coverage



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.

Reply With Quote
  #8  
Old January 8th, 2008, 11:02 PM
sizablegrin's Avatar
sizablegrin sizablegrin is offline
Crab
Click here for more information.
 
Join Date: Jun 2005
Posts: 5,032 sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 36th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 4 Days 10 h 39 m 37 sec
Reputation Power: 3388
How would you handle it?? Just curious.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > Problem understanding branch, condition, statement coverage


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT