What is Software Testing? Flashcards
What is Testing?
Evaluating software in order to derive an estimate as to whether or not it meets some criteria.
What can testing do?
It can build confidence that key properties hold.
Dynamic Testing
Form of testing that involves executing the code.
Static Analysis
Form of testing which does not involve executing the code.
What are some forms of Static Analysis?
- Inspections
- Walkthroughs
- Syntax Check (Linter)
What are some forms of Dynamic Testing?
White box, grey Box, Black box, functional testing, Non-functional testing…
Grey-box testing and why you may use it?
Involves prior knowledge about the system to compose tests.
- Building tests for many implementations of a product.
- Closed-source product
Black-box testing
Involves testing a product without any knowledge of its implementation, only its requirements.
White-box testing
Involves testing that exploits full knowledge of the system and source code.
Ex: following branches
What is an example of a Black/Grey/White box test for an Apache Web-server
B: Run external request generator.
G: Run generator with prior knowledge of most taxing requests (bottlenecks).
W: Run generator with code coverage to see which parts of the code are run
Functional Testing
Involves testing the product to ensure it provides a particular functionality.
Non-functional Testing
Involves testing the product on something other than whether it provides some function.
What is an example of a Functional and Non-functional test for a smartphone app
F: Does our app link to Facebook?
NF: Does the app divulge personal information?
Define a Fault and give an example of one
A property that can cause a failure to occur in a program. It is still stable.
Ex: A for loop starts at the wrong index and thus misses that index when the expected behaviour is to check it.
Define an Error and give an example of one.
A bad state of a running program which may lead to a failure.
Ex: A variable that checks how many multiples of two appears in an array is modified unexpectedly.
Define a Failure and give an example of one.
The software does something observably bad.
Ex: A unit test case in JUnit fails.
An Exception is triggered such as arrayOutOfBounds.
Name the strengths of unit testing
Can pinpoint a low-level fault precisely.
Can be easily conducted individually by the actual programmer (more knowledge of the system)
What is a limitation to unit testing
Many faults do not manifest at the unit level (method or class), they manifest in the interactions within the system.
What is System testing
Testing that involves the entire system as a whole (typically blackbox)
Name the strengths of System testing
- Can find faults in your design
- Tests both functional and Non-functional requirements.
- Can help understand non-explicit requirements (Behaviour that “seems” wrong)
- Can pass on this task to a specialist team that is familiar with this testing.
Ex: Ariane 5 launch system simulation, would have found fault.
Limitations of system testing
Some part interacting faults are still difficult to find at system level
Integration testing
Testing interacting classes, modules or subsystems.
Taking a bunch of units and testing together at that level in blackbox style.
What are the main approaches of integration testing
Big Bang: Put everything together and test.
Top-down: Modules tested from entry points and integrated progressively.
Bottom-up: Modules progressively integrated and tested from the most elementary ones.
Name the strengths of integration testing
- More traceable than system test
- tests the interactions that unit testing cannot
How can we convince someone that our tests are sufficient
Acceptance testing. Not to really discover failing scenarios. To ensure for the customer that the product works for their need.
Ensuring the system is in harmony with the environment it is intended for.
Strengths of Acceptance testing
A VALIDATION activity. Did the right product get built.
Helps build trust with customer.
Understand the customer, domain and market.
What is a form of testing that is done repetitively over the life of a system
Regression testing. Automated tests are formed into a testing suite for further versions.