Lecture1-Intro to software testing Flashcards
(26 cards)
Why do we do software testing?
Software failures are costly and testing can help prevent these failures.
What is the process of testing(4)?
Test Planning –> Test development–>Running test cases–>Evaluating test results
Failure vs fault vs error
Error:
-A mistake usually made by PEOPLE.cause of a fault
Fault:
-The result of an error(BUG)
Failure:
-Occurs when the code corresponding to a fault executes. Observable incorrect behaviour of a program.
ERROR –>CAN LEAD TO –>FAULT –>CAN LEAD TO –>FAILURE
What are the 3 levels of software testing?
1.Unit testing
2.Integration testing
3.System testing
What is unit testing?
-Individual units(a function) are tested in isolation.
-Determine whether each unit functions as designed.
What is integration testing?
-Test a group of related units together(testing database access)
-Find interface issues between units
What is system testing?
-Test the complete software system
-Evaluate the system’s compliance with the specified requirements.
What are the 2 basic approaches to identify test cases?
1.Black-box testing
2.White-box testing
What is black-box testing?
-based on software description(specification)
-covers as much SPECIFIED behaviour as possible
-cannot reveal errors due to implementation details.
What is white-box testing?
-based on the code
-covers as much CODED behaviour as possible
-cannot reveal errors due to missing paths
What are the 4 QA approaches?
-Testing
-Static verification
-Inspection /review
-Formal proof
Which QA approach has the most subjective bias?
Inspection/ review
What does the testing approach consist of and what are its pros and cons (1 of each) ?
Exercising software to try and generate failures.
Pros: no false positives
Cons: incomplete
What does the static verification approach consist of and what are its pros(1) and cons (2) ?
Identify specific problems statically considering all possible executions.
Pros: complete
Cons: false positive(main issue),expensive
What does the inspection/review approach consist of and what are its pros(2) and cons (2) ?
Systematic group review of program text to detect faults.
Pros: systematic, thorough
Cons: informal, subjective
What does the formal proof approach consist of and what are its pros (1)and cons (2) ?
Proving that the program text implements the program specification.
Pros: strong guarantees
Cons: complex, expensive (requires a specification)
What is correctness?
-Do the specification and the program meet the customer/user’s expectations?
-Program P is correct with respect to specification S
*Test can never reveal the absence of a bug(fault).
*We run the program by running the code.
What is validation ?
Process of evaluating software at the end of software development to ensure compliance with intended usage. => DO THE RIGHT THINGS
What is verification?
The process of determining whether the products of a given phase of the software development process fulfill the requirements established during the previous phase=>DO THE THINGS RIGHT
What is an example of validation vs verification?
Divide 2 numbers :
Validation : Does it divide ?
Verification: Is the division correct?
Describe this process : Testing–>Test Failure–>Debugging
Testing: Evaluating software by observing its execution.
Test failure: Execution that results in a failure.
Debugging: The process of finding a fault given a failure.
What are the three conditions that must be present for a failure to be observed (RIP)?
REACHABILITY : The location that contain the fault must be reached.
INFECTION: After executing the location, state of the program must be incorrect.
PROPAGATION:The infected state must propagate to cause some output of the program to be incorrect.
*Failure is a result of fault, but not all faults are a result of failure
What is the content of a test case?(6)
-Summary
-Pre-conditions
-Inputs
-Expected outputs
-Observed outputs
-Pass/fail
What is complete testing?
At the end of testing, you know there are no remaining unknown bugs.