Shared Flashcard Set

Details

9. Unit Testing Part 1
Chapter on Testing
40
Computer Science
Undergraduate 4
04/02/2012

Additional Computer Science Flashcards

 


 

Cards

Term
Failure
Definition
Any deviation of the observed behavior from the specified behavior
Term
Reliability
Definition
The probability that a system will not cause a failure under certain conditions
Term
error(state)
Definition
The system is in a state such that further processing by the system can lead to a failure
Term
Fault
Definition
The mechanical or algorithmic cause of an error
Term
Validation
Definition
Activity of checking for deviations for observed behavior of a system and its specification
Term
What are three types of errors?
Definition
Null reference, concurrency, exceptions
Term
What are four types of algorithmic errors?
Definition
Missing initialization, incorrect branching condition, missing test for null value, concurrency issue.
Term
What are three types of mechanical fault?
Definition
Earth quake, power interruption, abnormal temperature.
Term
Which type of error is easier to find, algorithmic or mechanical?
Definition
Algorithmic
Term
What is fault avoidance?
Definition
Detects faults statically
Term
What are three techniques used for fault avoidance?
Definition
Methodology, verification, reviews
Term
What is fault detection?
Definition
Find faults during development
Term
What are two types of fault detection?
Definition
Testing and debugging
Term
What are four types of testing?
Definition
Unit testing, integration testing, system testing, and acceptance testing.
Term
What is a test model?
Definition
It is a system which contains all test related decisions and components into one package.
Term
What does a test model contain?
Definition
Test driver, test input data, oracle, test harness.
Term
What is a test driver?
Definition
It is the program that is executing the test.
Term
What oracles in test model?
Definition
They compare the expected output with the actual test output
Term
What is a test harness?
Definition
It is a component that allow running test under different conditions and monitor the behavior and output of System Under Test.
Term
What three skills must a person have to develop an effective test?
Definition
Detailed understanding of system, application and solution domain knowledge, knowledge of testing techniques
Term
Should testing be done by the developer or an independent tester?
Definition
Unit, integration, system testing done by developer. Acceptance testing done by independent tester.
Term
What is the structure of a test case?
Definition
identifier, location, feature to test, pass/fail criteria, data, test procedure
Term
What is model-based testing?
Definition
A technique where the system is used for generation of test model
Term
What are three advantages of model-based testing?
Definition
Design more code less, high coverage, easy maintenance(no need to write new tests for new feature)
Term
What are two ways to generate test model? Compare them
Definition
Manual and automatically
Term
What are 4 advantages of automated testing?
Definition
Reliable, repeatable, fast, reusable
Term
What is object-oriented test modeling?
Definition
Term
What is a test double?
Definition
Object try to make SUT believe it's talking to real collaborators
Term
What are 4 types of test double?
Definition
Dummy object, fake object, stub, mock object
Term
What is dummy object?
Definition
never used, to fill in parameters
Term
What is fake object?
Definition
A "shortcut" which is not suitable for production code
Term
What is stub?
Definition
Functionality which simulates some component in the system
Term
What is a mock object?
Definition
Object which mimic behaviors of real object
Term
What is a good design pattern used for generating mock objects?
Definition
Factory
Term
What is unit testing? What is its goal?
Definition
Test individual component. Goal is to confirm the component is correctly coded and has intended functionality
Term
What is integration testing? What is its goal?
Definition
Test groups of subsystems. Goal is to test the interfaces among the subsystems
Term
What is system testing? What is its goal?
Definition
Test the entire system. Goal is to see if the system meets requirements.
Term
What is acceptance testing? What is its goal?
Definition
Test entire system. Goal is to see if the system meets requirements from user's perspective
Term
What are 4 types of static analysis?
Definition
By-hand execution, code walk-thru, code review, automated checking(lint)
Term
What are 3 types of dynamic analysis?
Definition
blackbox testing, whitebox testing, runtime analysis(memory leaks, performance)
Supporting users have an ad free experience!