Does 100% statement coverage is adequate for testing criteria? What can go wrong even if we achieve 100% statement coverage? Please explain with an example.
100% statement coverage is not at all adequate for testing criteria and it is a big misconception that a code with 100% statement coverage has a very good code quality.It measures whether the test cases execute the code or not .They are least bothered about the effectiveness of the test and thus the content of the code is not properly explored.
Even if we achieve 100% statement coverage the following can go wrong:-
1)Simple IF statements
2)Exception Handling
3)Incorrect test cases that are just making the statement covered.
4)Missing of functionality
5)Logical Operators
6)Loop termination
For example:-
class Quantity(object):
def __init__(self, measure):
if measure == "Large" :
self.take = "Enough!"
if measure == "Small" :
self.take = "Hungry"
def test_missing(self):
#missing a test for medium quantity
l = Quantity("Large")
self.assertEqual( l.take, "Enough" )
s = Quantity("Small")
self.assertEqual( s.take, "Hungry" )
In the above example the medium size quantity is missing but still the statement coverage is 100% since all the code has been covered.Thus 100% statement coverage does not implies that all the functionality has been addressed,there may be a missing functionality.
Does 100% statement coverage is adequate for testing criteria? What can go wrong even if we...
WHAT CAN GO WRONG! CONCERNS DURING THE PRENATAL PERIOD We will discuss this in class on 9.17. It will be due on 9.19 1. We learned the definition of teratogens in class. Identify at least 3 teratogens and describe the effects on the embryo/fetus during the prenatal period. What impact from the tertatogen may be evidenced during infancy or later in life? 2. There are many issues that can occur during the prenatal period involving chromosome abnormalities. Identify one chromosome...
where does dividend payable go in the cash flow statement? I know "dividends paid" go under financing activities, but what about dividends payable? Does it go under operating or financing activities? or both???? can someone help me with this question please!!! thanks in advance.
What does it mean when we say that policy change requires a "window of opportunity" in order to be successful? Can you find an example of something in the news which may create a "window of opportunity" for a policy change to occur? Please explain exactly HOW your example offers a window of opportunity, including your reasoning for thinking so.
Explain why the income statement can also be called a "profit-and-loss statement." What exactly does the word balance mean in the title of the balance sheet? Why do we balance the two halves? Explain why the income statement can also be called a "profit-and-loss statement." (Select from the drop-down menus.) t h at the top and ends with In reviewing the income statement of a profitable company, one can see that it begins with at the bottom. Had there been...
Can you please thoroughly explain (In one page) this question: What does Andrew Carnegie think we ought to do with our wealth?
Can you please explain in detail how we went from A to B? and
what does it mean to "propose a synthesis"?
1. Propose a synthesis to prepare product B from A. ^ a 13 PBT HO OH CH2Cl2 DMF
We call this reaction green. What does that mean, and in which way can we say that the process is green? Explain briefly by using the exact conditions in this process, such as solvent, and catalyst. (5 pts)
Question 3 and 4 please ! Please go step by step so I
can fully understand the solution. thank you !
Question 1: Two-period model where Ci and C2 are perfect substitutes 1. Draw the budget constraint with Yi -100, Y2 60, and r 0.2. 2. Draw the indifference curves for the preference that is represented by the lifetime utility function Ci + BC2, where 3-1. Do it for various levels of lifetime utility, such as 100, 150, and 200...
i need positive thought and agree with the statement at leat 100
words
2. Give an example of how maximal oxygen uptake can be measured in the laboratory and estimated in the field. Maximal Oxygen Uptake can be measured in a laboratory setting using one of the various machines and facilities within the lab. With the use of gas analyzers in order to measure the Oxygen uptake within an individual, we are able to get a stable and true number...