Good Tests Flashcards
What four aspects of a program can be tested?
- Functional
- Operational
- Structural
- Usability
What is the functional aspect of a program?
Requested features working?
Input → expected output
- What is the operational aspect of a program?
2. How do you test it?
- Speed (memory/cpu usage)
2. Run program and check computer ressources
- What ist the structural aspect of a program?
2. How do you test it?
- Quality of the code
2. Manual review with best practices
What are the three measurements of Usability?
- Task performance
- Questionnaires
- Behaviour and physiology
What are the three (four) levels of functional testing?
- Unit
- Integration
- System
(4. Acceptance)
What are the principles for functional testing?
- Incremental
- Iterative
- Continous
What is incremental testing?
From function to system
What ist iterative testing?
Always test after modification
What is continuous testing?
Automatic build and testing on every push = iterative testing
What is a unit test?
Code testing the public behaviour of a class
What are the four Phases (As) of unit testing?
- Arrange (Setup)
- Act (Execute)
- Assert (Verify)
- Annihilate (Teardown)
What is test data?
Expected test results
What is a test case?
Set of input values, preconditions, expected results and postconditions
What is test fixture?
A fixed state of fake objects for running tests
What is a test suite
Several test cases for a tested component or system
What is a test runner?
A class running test suites
What is class behaviour?
Expected result of a public function
Why do we care for code coverage?
We can’t test everything. Sp we test one case for each path.
What is triangulation?
Technique to force us to progressively implement production code.