Answer To The Questions 18.1 and 16.8HOMEWORK
Answer To The Questions 18.1 and 16.8HOMEWORK
Answer To The Questions 18.1 and 16.8HOMEWORK
Answer:
Countable characteristics of software that imply quality (beside errors):
Any countable measure that indicates the factors noted in Chapter 16 are candidates. For example,
maintainability as measured by mean-time-to-change; portability as measured by an index that
indicates conformance to language standard; complexity as measured by McCabe's metric, availability,
reliability, and so on.
The full table of Characteristics and Sub characteristics for the ISO 9126-1 Quality
Model is:Characteristics Sub characteristics
Functionality
Definitions
Suitability
Accurateness
Interoperability
Compliance
Security
Reliability
Maturity
Fault tolerance
Recoverability
Efficiency
Learnability
Operability
Time behavior
Resource
behavior
Analyzability
Maintainability Changeability
Portability
Stability
Testability
Adaptability
Installability
Conformance
Replaceability
Question:
Myers [Mye79] uses the following program as a self-assessment for your ability to specify adequate
testing: A program reads three integer values. The three values are interpreted as representing the
lengths of the sides of a triangle. The program prints a message that states whether the triangle is
scalene, isosceles, or equilateral. Develop a set of test cases that you feel will adequately test this
program.
Answer:
The program reads three integer values. The three values are interpreted as representing the
lengths of the sides of a triangle. The program prints a message that states whether the triangle is
scalene, isosceles, or equilateral. Write test cases (specific input values) that you feel would
adequately test this program.
In a valid triangle, no side may have a length of zero or less, and each side
must be shorter than the sum of all sides divided by 2.
Equilateral triangle: all sides are of equal length.
Isosceles triangle: two sides are of equal length.
Scalene triangle: all sides are of unequal length.
In mathematics, the number of integer values is infinite. However, computers have finite space which
limits the number of values that can be processed. Let us assume that our triangle program is running
in a tiny computer with 10.000 as the largest integer value. Then there are 104* 104* 104= 1012
possible length combinations of triangle sides (including the invalid ones).
Suppose you are a very fast tester, running and checking 1000 tests per second, 24 hours per day,
365 days per year.
Then the exhaustive testing effort (testing each possible length combination) would take over 31.7
years.
Some Remarks:
Most test cases represent invalid inputs
Each valid triangle type is tested at least once
Permutations are used to check that the order of the input values does not affect the result
Boundary input values are used (length of exactly zero, length of exactly the sum of all sides divided
by 2)
Input values of wrong type (non-integers) are used
The number of test cases is rather small with respect to the number of all possible inputs