1 testing fundamentals

42
Fundamentals of Testing Prepared By Asmaa Matar

Upload: asmaa-matar

Post on 17-Jan-2017

420 views

Category:

Software


0 download

TRANSCRIPT

Software Testing

Fundamentals of Testing

Prepared ByAsmaa Matar

Fundamentals of TestingWhy is testing necessary?What is testing?Testing Principles.Fundamental Test Process.How much testing is enough?Why Testers?

Why is testing necessary ?Software Systems ContextCauses of Software Defects.Why we Test?Cost of Software Quality

Why is testing necessary ?Software system contextSoftware can be found in many areas of life.

When a system go wrong, it can result many effects start from user inconvenience ,including loss of money, time or business reputation, and could even cause loss a life.

.Mission CriticalBusinessOthersHealth equipment.Transportations.

BankingInsuranceEducationScientific Research

Errors &Mistakes

Documents.CodeSoftware system

Defect or Fault

FailureCauses of software defects

Why is testing necessary ?Causes of Software DefectsHumans do mistakes.Mistakes may lead to defects in source code or system specifications.Defects are detected only when they leads to failures (code is executed), not all defects do so.Failures are considered problems when they occurred in live systems.An observed failure is an incident.

DefectInjectionDetectionPrevention- A defect injected at the time the causing error is made.

- A defect is detected atThe time when failure occurs.

- Finding defects in requirements docs or static code can prevent detecting them in running systems.

Why is testing necessary?Why we Test (Testing Goals)

Find defects.Measure quality.Provide confidence.

Why is testing necessary?Costs of Software defects

Msnbc published the news of 2010 bug hits millions of German bank cards. Guardin.co.uk said they paid about (300m).

Apple Maps gives us directions to nowhere (2012).

Risks(Poor Quality)Humans(Death, Injury)Economy(Money, Time)Business(Revenue, Reputation)

Fundamentals of TestingWhy is testing necessary?What is testing?

What is testing?The process consisting of all life cycle activities, both static and dynamic concerned with planning , preparation and evaluation of software products and related work products to determine that they satisfy specified requirements , to demonstrate that they are fit for purpose and to detect defects.

What is Testing?Executing SW is only part of testing ,other activities exist before and after execution.Testing activities include: planning and control ,choosing test conditions , designing test cases and checking results , evaluating exit criteria , reporting and closure.

Suppose You are given Pen with instructions to test it .

What will you do ?

TestingStaticReviews DynamicFunctionalNon-FunctionalPerformanceSecurityUsability

Fundamentals of TestingWhy is testing necessary?What is testing?Testing Principles

Testing PrinciplesTesting Shows Presence of defects.Exhaustive testing is impossible.Early Testing.Defect Clustering.Pesticide Paradox .Testing is context dependent.Absence of errors fallacy.

Testing PrinciplesTesting Shows the presence of defectsTesting can show that defects are present, but cannot prove that there are no defects.

Testing reduces the probability of undiscovered defects remaining in the software.

Discovering no more defects is not a proof of correctness.

Testing principlesExhaustive testing is impossibleTesting everything (all combinations of inputs and preconditions) is not feasible except for trivial cases.Instead of exhaustive testing, risk analysis and priorities should be used to focus testing efforts.Example: a simple screen with five input fields and 10 distinct values for each field has 10^5 different combination.

Testing PrinciplesEarly TestingThe earlier defects are detected , the lower the cost of correction.To find defects early, testing activities shall be started as early as possible in the software or system development life cycle, and shall be focused on defined objectives.

Testing PrinciplesDefect ClusteringSystem modules vary in size, complexity and frequency of change.System modules do not experience the same defect density or failure rate.Thus, pareto principle (80-20 rule) is applicable:

A small number of modules contains most of the defects discovered during prerelease testing , or show the most optional failures

Testing PrinciplesDefect Clustering ContdWhen a defect is found in one area , changes are there that more defects can be found and more time can be invested there.Testers should not ignore any area as defects can be scattered around

Testing PrinciplesPesticide ParadoxIf the same tests are repeated over and over again, eventually the same set of test cases will no longer find any new defects. To overcome this, test cases need to be regularly reviewed and revisedNew and different tests need to be written to exercise different parts of the software or system to find potentially more defects.

Testing PrinciplesTesting is context dependentTesting is done differently in different contexts.

For example, safety-critical software is tested differently from an e-commerce site.

Testing PrinciplesAbsence of Error FallacyFinding and fixing defects does not help if the system built is unusable and does not fulfill the users needs and expectations.

Fundamentals of TestingWhy is testing necessary?What is testing?Testing PrinciplesFundamental Test Process

Testing Process...

Planning and Control

Analysis and design

Implementation and execution

Evaluating Exit criteria And reporting

Closure

Fundamental Test ProcessPlanning and ControlOngoing comparison of actual progress against plan.

Reporting status.

Takes into account feedback of monitoring and control.

Fundamental Test ProcessAnalysis and DesignReviewing the test basis.Evaluating testability of test basis and test objects.Identifying and prioritizing test conditions Designing and prioritizing test cases.Identifying necessary test data.Designing the test environment set-up and identifying any required infrastructure and tools.

Fundamental Test ProcessImplementation and executionCreating test cases , writing test procedures.

Creating test suits.

Prepare test execution plans.

Fundamental Test ProcessEvaluating Exit Criteria and ReportingChecking test logs against the exit criteria specified in the planning.

Assessing if more tests are needed.

Writing a test summary report for stake holders.

Fundamental Test ProcessTest ClosureChecking that deliverables have been delivered as planned.

Archiving the test environment and the test infrastructure for later reuse.

Analyzing lessons learned for future releases and projects .

Fundamentals of TestingWhy is testing necessary?What is testing?Testing PrinciplesFundamental Test ProcessHow much testing is enough?

How much testing is enough?

How much testing is enough?The amount of testing needed is proportionate with:Risk.Defect Cost.Information needed.Project constraints.Test infrastructure.

Fundamentals of TestingWhy is testing necessary?What is testing?Testing PrinciplesFundamental Test ProcessHow much testing is enoughWhy Testers?

Why Testers?Characteristic of a testerCuriosity.Clear thinking skills.Top flight reading speed and comprehension.Attention to details.Quick learner (outside of testing).

Fundamentals of TestingWhy is testing necessary?What is testing?Testing PrinciplesFundamental Test ProcessHow much testing is enoughWhy Testers?