Bugs
Faults
Failures
Devs
Defect Prevention
Fault Tolerance
Defect Removal
REMEMBER OUR TARGET AS SOFTWARE ENGINEERS: REDUCE AND MINIMIZE IMPACT OF DEFECTS
Bugs
Faults
Failures
Devs
INPUT
OUTPUT
Look inside your code for the origin of the failures and when detected, remove it
Is the output different to the expected one? FAILURE
INPUT
OUTPUT
UNIT TESTING
COMPONENT TESTING
INTEGRATION TESTING
SYSTEM TESTING
COVERAGE BASED
USAGE BASED
SMOKE TESTING
CERTIFICATION TESTING
REGRESSION TESTING
SMOKE TESTING: a non-exhaustive set of tests that aim at ensuring that the most important functions work. The result of this testing is used to decide if a build is stable enough to proceed with further testing.
REGRESSION TESTING: tests to determine that the system remains stable as it cycles through the integration of other subsystems and through maintenance tasks
CERTIFICATION TESTING: tests that if executed successfully guarantee that a product meets some certification requirements (e.g. regulation).
FUNCTIONAL TESTING
STRUCTURAL TESTING
AUTOMATED
MANUAL
Scalability tests determine the scaling limits of the system, in terms of user scaling, geographic scaling, and resource scaling
Stress tests put a system under stress in order to determine the limitations of a system and, when it fails, to determine the manner in which the failure occurs
High Availability tests verify that the system keeps working in situations where parts of the system fail (e.g. if the service is supported by multiple servers and of them is not available).
A test-case is the description of the procedure to test a specific functionality of the system, explaining clearly what the expected outcome of the execution
In software, a test-case is usually:
Pre-conditions | Input 1 | Input 2 | Input 3 | Expected Result |
---|---|---|---|---|
2 | 2 | 2 | 6 | |
4 | 3 | 3 | 10 |
TEST CASES EXAMPLE
Test Cases for a function that calculates the addition of 3 numbers
TEST EXECUTION INFO
PLANNING
EXECUTION
FOLLOW-UP
WHICH STEPS YOU THINK SHOULD BE FOLLOWED TO FIX A DEFECT?
In the book "The Art of Software Testing", Glenford Myers poses the following functional testing problem: Develop a good set of test cases for a program that accepts three numbers, a, b, c, interprets those numbers as the lengths of the sides of a triangle, and outputs the type of the triangle. Myers reports that in his experience most software developers will not respond with a good test set.
Idea: Partition of the input domain into a relatively small number of groups (domains) and then select some representative tests from each group
Domains can be also divided into subdomains and the range of possible output values can be also considered (output domains)
A way to formalize the identification of subdomains
Build a matrix using the conditions that we can identify from the specification and then systematically identify all combinations of these conditions as being true or false.
Select the test cases randomly in the possible values of the input domains
In order to define the test cases, the knowledge about the structure of the software it's used
Execute at least once every sentence of the software
Go at least once for every decision branch of the code
Test all the feasible paths in the software.
Planning, Definition, Execution, Analysis...
Unit Testing, End-to-End testing, etc.
1. Preparation (initializations)
2. Execution
3. Assessment (check result of test)
1. JUnit
2. QUnit
3. NUnit
...
First Step: Add a test, just enough code to fail
Second Step: Run the test, it should fail
Third Step: Update the functional code to pass the test
Fourth Step: Run the tests. If fails, fix it, if not, start over the process