Shared Flashcard Set

Details

91. ECE 355 Unit Testing Part 2
Chapter on Testing
16
Computer Science
Undergraduate 4
04/02/2012

Additional Computer Science Flashcards

 


 

Cards

Term
What are three components unit testing should have?
Definition
Driver, component, stub
Term
What are 3 pros of unit testing?
Definition
Find problem early, detects bugs produced by changes, locate bugs easily
Term
What are 2 cons of unit testing?
Definition
No broader error catching, can't show absence of errors
Term
What does blackbox testing focus?
Definition
I/O behavior
Term
What is a problem of blackbox testing in term of lack of something?
Definition
oracle
Term
What is goal of blackbox testing?
Definition
Use equivalence partitioning by three criteria, coverage, disjointedness, representation
Term
In blackbox testing, what are two guidelines for selection of equivalence classes?
Definition
Input is valid across range of values? Input is valid if it is from a discrete set?
Term
What are 3 pros of blackbox testing?
Definition
testers can be non-technical, test cases can be designed early, identify vagueness of requirement
Term
What are 3 cons of blackbox testing?
Definition
might be too many inputs, chance of having non-covered case, difficult to apply tricky inputs
Term
What does whitebox testing focus?
Definition
coverage of different cases
Term
What are four types of white-box testing?
Definition
statement testing, loop testing, path testing, branch testing
Term
What is the goal of whitebox testing?
Definition
Prevent hacking
Term
Compare blackbox and whitebox testing, giving 3 points for each
Definition
Whitebox: potentially infinite number of path needs to be tested, tests what is done instead of what should be done, cannot detect missing use cases
Blackbox: potential combinatorial explosion of test cases, not clear if a test case will uncover particular error, fails to discover side effects
Term
Why both blackbox and whitebox testing are needed?
Definition
Because they are at the extreme ends of testing space
Term
What are 8 steps of unit testing heuristics?
Definition
1. Create unit tests when object design is completed
2. Develop the test cases
3. Cross-check the test cases
4. Desk-check source code
5. Create a test harness
6. Describe the test oracle
7. Execute the test cases
8. Compare the results of the test with the test oracle
Term
Describe 5 stages of Test-Driven Development Cycle
Definition
1. Add a new test to the test model
2. run the automated tests
3. write code to deal with the failure
4. run the automated tests
5. refactor code
Supporting users have an ad free experience!