-
Junior Member
Manual Testing
What is statement coverage?
Please answer this question.................
-
Re: Manual Testing
Hi prasath,
Statement coverage is one of the Technique used in White Box Testing. Here the testing is done against the code. Statement coverage will check whether all the statements in the code block are executed atleast once. By using statement coverage it is validated that all the lines of code are executed and by that unwanted lines of code are removed.
REgards,
Ganesan
-
Banned
Re: Manual Testing
Statement coverage is a code coverage metric that tells you whether the flow of control reached every executable statement of source code at least once.
Attaining coverage on every source statement seems like a good objective. But statement coverage does not adequately take into account the fact that many statements (and many bugs) involve branching and decision-making. Statement coverage's insensitivity to control structures tends to contradict the assumption of code coverage testing itself: thorough testing requires exercising many combinations of branches and conditions.
In particular, statement coverage does not call for testing the following:
Simple if statements
Logical operators (&&, ||, and ?
Consecutive switch labels
Loop termination decisions
Do-while loops
Statement coverage has three characteristics that make it seem like a good coverage metric. Upon close inspection, they all become questionable. Statement coverage is:
Simple and fundamental
Measurable by object code instrumentation
Sensitive to the size of the code
Experts agree. A number of software testing books and papers give descriptions of statement coverage that range from "the weakest measure" to "not nearly enough".
Line coverage, basic block, and segment coverage are variations of statement coverage. They all have similar characteristics and this document applies equally to all of them, except where noted.
-
Contributing Member
Re: Manual Testing
Simple formula for statement coverage is
Statement Coverage =
Executable Statements Tested
_____________________________
Total No. of executable Statements
-
Contributing Member
Re: Manual Testing
Statement Coverage : The percentage of executed statements in a component that have been exercised by a test case suite.
The simple formula is
statement coverage = Executable Statements
Tested
____________________
Total No. of
executable Statements
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules