Software Engineering: Testing Flashcards
Test Case
Evaluates a single explicit behaviour in a program
Test Suite
Grouped Test Cases
White box testing
Developing tests based on the code
usually written by developers who have access to the code
Black box testing
Deleping tests based on the specifications and api signitures
usually written by stakeholders who do not have direct access to the code
Test cases should:
Be Fast
Be Reliable
Isolate defects
simulate users
Different kinds to tests?
Unit tests
integration tests
System tests
Acceptance tests
TDD process Red, Green, Refactor
- Implementation that Fails
- Implementation that Passes
- Refactor and Extend
Coverage
Measures the perportion of the sytem being tested
Two main kinds of coverage
Flow independent
Flow dependent
Flow independent coverage
Block
line
statement
Flow dependent coverage
Branch
Path
MCC
Coverage guided testing iteration
- Identify code
- Design test case
- Write and execute test
- Repeat
How many test cases should we write?
Till we have 100% line coverage, then tll we have 100%, branch coverage and then 100% path coverage
How to perform white box testing?
Coverage based tesing
How to perform black box testing?
Exhausting every possible state of the required inputs
or through input class partitioning and output class partition