Testing in Software Development Life Cycle
Transcript of Testing in Software Development Life Cycle
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 1/18
Testing in Software Development
Life Cycle
Testing Types
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 2/18
Agenda
QA , QC, Testing Sof tware development process
Objectives of testing
Testing Types
Functional vs. Structural Testing Sof tware Testing Lif e C y cle Phases
Measuring success
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 3/18
QA, Q C, Testing Testing:
x It¶s process of executing a system with the intent of f inding def ects.
Quality Control (product oriented) :x Measuring & Monitoring the quality of sof tware af ter completion of
every phase Quality A ssurance (process oriented) :
x It¶s a set of activities carried out to pro vide adequate conf idence thatprocesses are esta blished and continuously impro ved in order to produce products that meets the quality requirements
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 4/18
QA, Q C, Testing
QA QC Testing
QC Procedures Management reviews Documentation Training Tests&Measurements
Testing Static testing & reviews Internal audits
Unit Integration S ystem Acceptance
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 5/18
Software development process
W aterf all V-C y cle
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 6/18
How Traditional Test Practices Evolved
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 7/18
Objectives of testing What's a 'test case'?
x A test case is a document that descri bes an input, action, or eventand an expected response, to determine if a f eature of anapplication is w orking correctly.
Test Planningx Def ine what to test
x Identif y Functions to be tested
x Test conditions
x Manual or Automated
x Prioritize to identif y Most Important Tests
x
Record Document Ref erences Test Execution
x Def ine when to test
x Build test execution schedule
x Record test results
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 8/18
Testing types
Unit Testingx Testing of individual units of source code are tested to determine if they
are f it for use. A unit is the smallest testa ble part of an application.x function, modulex
NUnit, JUnit, RTR Integration Testingx The phase in sof tware testing in which individual sof tware modules are
com bined and tested as a group.
S ystem Testingx Testing conducted on a complete, integrated system to evaluate the system's
compliance with its specif ied requirementsx black box testing require no kno wledge of the inner design of the code or logic
Acceptance Testingx Black -box testing performed on a system prior to its delivery.x It is also kno wn as functional testing, QA testing, application testing,
conf idence testing, f inal testing, validation testing, or f actory acceptance testing
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 9/18
Functional Testing( black -box)x Testing that doesn't explicitly use kno wledge of the internal structure.
x Focus on generated output of the sof tware program
Structural testing(white-box)x Focuses specif ically on using internal kno wledge of the sof tware to
guide the selection of test data
Functional vs Structural Testing
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 10/18
Black-Box Testing
Equivalence partition -examplex f (int month) ± want to test this function
«, -1, 0, 1, 2, 3, «., 9, 10, 11, 12, 13, 14, «.
______||____________________||__________
invalid1 valid partition invalid2
x f (int month, int nrdays) ± want to test this function
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
31 28/29 31 30 31 30 31 31 30 31 30 31
x V alid partition: [(1, 3, 5, 7, 8, 10, 12; 31), (4, 6, 9, 11; 30), «]
x Invalid partition: [(1, 2, 3, 5, 7, 8, 10, 12; 30), «]
Bounday analysis ±examplex
f (intmonth) ± want to test this functionif (month > 0 && month < 13)
or
if (month>= 0 && month < 13)
«, -1, 0, | 1, 2, 3, «., 9, 10, 11, 12 |, 13, 14, «.
|_________________________|
valid partiti on
x Test: 0, 1, 12, 13
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 11/18
Black-Box Testing
Decision Ta blex A decision ta ble is a ta bular form that presents a set of conditions and
their corresponding actions.
State Transition TestingOFF
ON
Input: switch on
Output: light on
Input: switch off
Output: light off
Start state Input Expected
result
Final state
OFF switch on light on ON
ON switch off light off OFF
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 12/18
White-Box Testing
Statement testingx uses a model of the program¶s control f lo w
x it is designed in order to execute all or selected statements of thetest object
x Test completeness criteria: the percentage of the statements in thesof tware which were executed at least at once
Branch/Decision Testingx uses a model of the program¶s f lo w
x it is designed in order to execute (each) outcome of all or selectedd ecision points in a test object
x
Test completeness criteria: achievement of the test co verage ± 100%of the branches
Branch Condition Com binationx uses a model of the program f lo w where each com bination of the
inputs for a decision/condition must be tested, in order to check if each branch is co vered
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 13/18
White-Box Testing
f loat foo (int a, int b, int c, int d, f loat e){
f loat e;if (a == 0) {
return 0;}int x = 0;if ((a== b) OR ((c == d) A ND bug(a) )) {
x=1;}e = 1/x;return e;
}
Statement
Decision
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 14/18
White-Box Testing
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 15/18
White-Box Testing
Test case Condition 1 Condition 2
1 True True
2 True False
3 False True
4 False False
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 16/18
Software Testing Life Cycle Phases
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 17/18
Measuring Success
Customer satisf actionx Beta surveysx Public product surveysx Newsgroupsx Support callsx Def ects found af ter release
Test eff ectivenessx Test co veragex Functional testingx Types of testing required b y productx Prioritized test efforts based on risk
Objective test metricsx Test resultsx Code co veragex Bug f ind/f ix ratesx Bug categorization ± type/f requenc y x Customer satisf action ratingsx Product performance and sta bility x Metrics allo w y ou to measure where y ou are in relation to y our product goals.
8/7/2019 Testing in Software Development Life Cycle
http://slidepdf.com/reader/full/testing-in-software-development-life-cycle 18/18
Q& A