S12-Fundamentals of Testing
S12-Fundamentals of Testing
Chapter One:
Fundamentals Of Testing
What is Testing?
Validation: checking whether the system meets users’ and stakeholders’ needs.
“Are we building the right product?”
What can Happen if system fails?
Loss of your job
Loss of Money
Loss of Reputation
Loss of time
User Inconvenience
Static vs Dynamic
Static testing: is done without the execution of the software.
<includes review and examine work products>
Quality Assurance - QA
• Process-oriented.
• Preventive approach.
• Implementation and improvement of processes.
• QA applies to both development and testing processes.
Error vs Defect vs Failure
• Human beings make errors, which produce defects, which in turn may result in failures.
• Defects in artifacts produced earlier, if undetected, often lead to defective artifacts later.
• Defect in code is executed, the system may fail to do what it should do.
• Defect shouldn’t, causing a failure.
Root cause analysis
• Root cause is a fundamental reason for the occurrence of a problem.
• Root causes are identified through root cause analysis which is typically performed
when a failure happens or a defect is identified.
Testing Principles
1. Testing shows the presence of defects, not the absence
Testing can show that defects are present in the test object but cannot
prove that there are no defects.
Testing reduces the probability of defects remaining undiscovered in the test object.
• Test case prioritization, and risk-based testing should be used to focus test efforts.
3. Early testing saves time and money
Defects that are removed early will not cause subsequent defects in derived work products.
The cost of quality will be reduced since fewer failures will occur later.
• Small number of system components usually contain most of the defects discovered or are
responsible for most of the operational failures.
• Predicted defect clusters, and actual defect clusters observed during testing or in operation, are an
important input for risk-based testing.
5. Tests wear out
If same tests are repeated many times, they become increasingly ineffective
in detecting new defects.
• Existing tests and test data may need to be modified, and new tests may need to be written.
• In some cases, repeating the same tests can have a beneficial outcome,
e.g. in automated regression testing.
6. Testing is context dependent
• Testing all the specified requirements and fixing all the defects found could still produce a system
that does not fulfill the users’ needs and expectations.
• Testing is context dependent but, at a high level, there are common sets of test activities.
• Although many of these activities may appear to follow a logical sequence, they are often implemented
iteratively or in parallel.
• These testing activities usually need to be tailored to the system.
1. Testing Planning
Test monitoring: involves the ongoing checking of all test activities and the
comparison of actual progress against the plan
Test control: involves taking the actions necessary to meet the objectives of testing
3. Test Analysis
Creating or acquiring the testware Test cases can be organized into test
necessary for test execution (e.g. procedures and are often assembled into test
test data) suites
Running the tests which may be Test execution can take many forms
manual or automated (continuous testing or pair testing sessions)
The way the testing is carried out will depend on a number of contextual factors including:
• Stakeholders (needs, expectations, requirements, willingness to cooperate, etc.)
• Team members (skills, knowledge, level of experience, availability, training needs, etc.)
• Business domain (criticality of the test object, identified risks, market needs, legal regulations)
• Technical factors (type of software, product architecture, technology used, etc.)
• Project constraints (scope, time, budget, resources, etc.)
• Organizational factors (organizational structure, existing policies, practices used, etc.)
• Software development lifecycle (engineering practices, development methods, etc.)
• Tools (availability, usability, compliance, etc.)
Testware
Testware: output work products from the test activities
2. Testing role:
• Responsible for the engineering (technical) aspect of testing.
• Focus on test analysis, test design, test implementation and test execution.
Generic Skills Required for Testing
• Testing knowledge.
• Thoroughness, carefulness, curiosity, attention to details, being methodical.
• Good communication skills, active listening, being a team player.
• Analytical thinking, critical thinking, creativity.
• Technical knowledge.
• Domain knowledge.
Whole Team Approach
• In the whole-team approach any team member with the necessary
knowledge and skills can perform any task.
• Everyone is responsible for quality.
• Team members share the same workspace, as co-location facilitates communication.
• Improves team dynamics, enhances communication and collaboration within the team
• Allowing the various skill sets within the team.
• Testers work closely with other team members to ensure that the desired quality levels are achieved.
Independence of Testing
A certain degree of independence makes the tester more effective at finding defects due to
differences between the author’s and the tester’s cognitive biases.
For most projects, it is usually best to carry out testing with multiple levels of independence
Benefits and drawbacks of Independent Testing
• Benefits:
1. Independent testers are likely to recognize different kinds of failures and defects
2. Independent tester can verify, challenge, or disprove assumptions made by stakeholders during
specification and implementation.
• Drawbacks:
1. Independent testers may be isolated from the development team.
2. Lack of collaboration, communication problems and an adversarial relationship.
3. Developers may lose a sense of responsibility for quality.
4. Testers may be seen as a bottleneck or be blamed for delays in release.
THANK YOU!