Ch1 - A Perspective On Testing
Ch1 - A Perspective On Testing
Ch1 - A Perspective On Testing
1 A Perspective on Testing
Definitions and Concepts of Testing and Quality
What is Testing?
How Related?
What is Quality ?
1. Does finding a Lot of Problems through testing improve Quality? Ch. 1 A Perspective on Testing Sum2012Bernal
In the 1970s Glen Myers wrote a book, Art of Software Testing (1978).
He believed that the main purpose of testing is to find faults.
Why Test ?
Because we cant assume that the software works
How do we answer the question: Does this software work?
Is it reliable ? (system is continuously functioning > 720hrs) Is it functional ?
Complete Consistent
Quality of Software?
Depends on what we include as software
Just the executable code ----- How about ?
the pre-populated data in the database the help text and error messages the source logic code the design document the test scenarios and test results the reference manuals the requirements document
When we talk about quality how much of the above (do we / should we) include? How would you test these different artifacts?
Ch. 1 A Perspective on Testing Sum2012Bernal 4
DO NOT use the I feel lucky or I feel confident approach to testing - - - - although you may feel that way sometimes.
2. What do we do with the non-executable software artifacts? Reviews and Inspections - Expensive in terms of human resources - A lot to maintain and keep updated
3. Can we prove that the software works or is defect free? - Theoretically, given an arbitrary program we can not show that it has no bug. - We can use Formal Proofs to show the behavior of code
6
Test tool:
76 % had been exposed to some automated test tool
Test definitions
Most of the practicing testers could not supply good definitions of 7 testing terms; theyCh. 1 Adid the work! just Perspective on Testing Sum2012Bernal
1990s
-Web availability to many -Business conducted on the Web -Software and systems are not hobbies but a business again **Product Reliability & Quality is once again important** -especially SECURITY--
2.
3.
4.
Improvement in tools and standards making Ch. 1 A Perspective on Testing development easier and less error prone Sum2012Bernal
How 9 ?
W. Edward Deming
Quality => Non-faulty system
More recently:
Philip Crosby
Quality => conformance with requirements Achieve quality via prevention of error Target of Quality is zero defect Measure success via cost of quality
Ch. 1 A Perspective on Testing Sum2012Bernal 11
How do you know if it is achieved & how would you test for these? Do these have to be specified in the requirements? ---- if they are not-------- do we ask for these during review/inspection?
Ch. 1 A Perspective on Testing Sum2012Bernal 12
Quality
Quality is a characteristic or attribute
Needs to be clearly defined and agreed to
May have sub-attributes (e.g. previous page) Needs specific metrics for each of the sub-attributes
Testing and Measurement are two key activities that would help us manage quality.
Explain ----- the Perspective on Testing Ch. 1 A relationship ?
Sum2012Bernal 13
Schedule (first to market) Requirements (bad or missing) New and Exciting (demands of WANT not need) Price and Availability (retail customers)
14
16
17
Over-emphasis of exciting features is one reason why we are regressing a little in software quality in the last ten years !
**Still, consider Apple i-phone success inon Testing its activation & other problems 18 Ch. 1 A Perspective spite of Sum2012Bernal
Price and Availability is sometimes more important to customers (especially for commodity level software) than Product Maturity or Quality.
At the commodity level software, the customers are individuals who wants the product NOW at an competitive price. (much like shopping for a home appliance such as a coffee maker, T.V. or an i-phone) Sophisticated and full feature software needs to be balanced and sometimes traded off for price and speed. Customers dont always need all the functions and product maturity they think they require ---- if the price is right!
19
Summarizing: major
Competitors and Adversaries to Quality when developing software
Schedule (first to market) Requirements (bad or missing) New and Exciting (demands of WANT
not need)
Software Quality Crisis was recognized and Quality Assurance was born, along with the term Software Engineering (1968 NATO conference).
21
The focus on the process areas borrowed many techniques from the traditional manufacturing area
Concept of reliability (number of defects, mean time to failure, probability of failure, etc. metrics) Concept of process control in terms of looking at repeatability of process--- repeatable process produces similar product (or controllable results).
Ch. 1 A Perspective on Testing Sum2012Bernal 22
Improve the usability and productivity by providing more and better visualization of data
Replace numbers with graphs and figures Replace words with pictures
25
Perspective on Testing
Today we test because we know that systems have problems - - - we are fallible.
1. To find problems and find the parts that do not work 2. To understand and show the parts that do work 3. To assess the quality of the over-all product (A major QA and release management responsibility)
Ch. 1 A Perspective on Testing Sum2012Bernal 27
Error
A mistake made by a human The mistake may be in the requirements, design, code, fix, integration, or install
Fault
Is a defect or defects in the artifact that resulted from an error There may be defects caused by errors made that may or may not be detectable (e.g. error of omission) Note
Failure
Is the manifestation of faults when the software is executed.
Running code May show up in (includes error of omission and no-code?) several places May be non-code related (e.g. reference manual) (Not in the text)
Example? (bank accnt)
28
Incident
Testing utilize the notion of test cases to perform the activities of test(s)
Inspection of non-executables Executing the code Analyzing and formally proving the nonexecutables and the executable in a business workflow (or user) setting
Ch. 1 A Perspective on Testing Sum2012Bernal 29
Software Activities and Error Injections, Fault Passing, and Fault Removal
Error
Inspection
Requirements
Error
Inspection
faults Design
Error
Error
Faults/failures
Note that in fixing failures, one can commit errors and introduce faults
Ch. 1 A Perspective on Testing Sum2012Bernal 30
Specification vs Implementation
Specification Implementation
Expected
Actual
The ideal place where expectation and actual matches The other areas are of concern ---- especially to testers
Ch. 1 A Perspective on Testing Sum2012Bernal 32
Area S = Yellow=Specification
S=Spec->Expected
6 1 3
35
Increasing severity
37
Why do you care about these types of faults (results of errors made)? Because they give us some ideas of what to look for in designing future test cases --- in process of for other products developed by same people
Ch. 1 A Perspective on Testing Sum2012Bernal 38
. . .
Program unit T
. .
Function 8
.
Component 3
Whole System
39
Measure the cost of discovering the problems and fixing them prior to release
Cost of planning reviews and testing Cost of executing reviews and testing Cost of fixing the problems found and retest Cost of inserting fixes and updates Cost of managing problem-to-resolution steps
Compare the above two costs AND include loss of customer good-will
Ch. 1 A Perspective on Testing Sum2012Bernal 40
Goals of Testing?
Test as much as time allows us Validate all the key areas
Execute as many test cases as (schedule) time allows? Test only the designated keyrequirements?
Quality Target?
State your goal(s) for testing. - - - what would you like people to say about your system ? Your goals may dictate your testing process
Ch. 1 A Perspective on Testing Sum2012Bernal 41