software testing basics
TRANSCRIPT
![Page 1: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/1.jpg)
Software Testing
Prepared by:Raghav
![Page 2: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/2.jpg)
Target Audience
Beginners Intermediate
![Page 3: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/3.jpg)
What do we cover?
Basics of testing Levels of Testing Testing techniques
![Page 4: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/4.jpg)
Software testing
25
50
75
100
125
Relative costper defect
Req Design Code Test Production
![Page 5: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/5.jpg)
Software testing
Points to Ponder: 80% of all defects occur in 20% of the work Test strategies impact test costs Conversion of testing from craft to process can
give extensive benefits
![Page 6: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/6.jpg)
Software Testing
What hinders effective testing?
![Page 7: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/7.jpg)
Aspects that hinder Effective testing
Optimism Belief that the system works Negative attitude towards effective testing Conflict between testers and developers Testing is expensive Delivery commitments
![Page 8: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/8.jpg)
The V Model
What is V model?
![Page 9: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/9.jpg)
The V ModelThe V Modelvalid
ation
Customer Requirements
Software Requirements
Architecture (HLD)
Detailed Design (LLD)
Acceptance
System testing
Integration testing
Unit testing
Code
![Page 10: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/10.jpg)
Testing v/s Life Cycle
Stage Test Activity
Requirements Acceptance Test ,System Test
Design (HL) Integration Test
Design (LL) Unit Test
Code Unit test / Debug
Integration Integration test / debug
System test / debug
Acceptance Acceptance test / debug
![Page 11: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/11.jpg)
Why Test?
Developers not fallible Bugs in compilers, languages, DBs, OS Certain bugs easier to find in testing Don’t want customers to find bugs Post release debugging is expensive
![Page 12: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/12.jpg)
Test team
Why separate testing team?
![Page 13: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/13.jpg)
Is Testing everything?
There are other approaches possible to create good software
Effective methods are•Inspection•Design style•Static analysis•Language checks•Development environment
![Page 14: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/14.jpg)
Can Testing be replaced?
NO!! Even if we use other methods, cannot do away
with testing Review, inspect, read, walkthrough, better
methodologiesAnd then TEST
![Page 15: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/15.jpg)
TESTING
Definition: Testing is the process of exercising or evaluating a system or system component by manual or automated means to verify that it satisfies specified requirements. (IEEE 83a)
![Page 16: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/16.jpg)
Testing objective
Process of executing a program with an intent of finding an error
A good test case is one that has a high probability of finding an as yet undiscovered error
A successful test is one that uncovers an as yet undiscovered error
![Page 17: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/17.jpg)
Testing Involves
•Test plan•Generate test conditions, cases•Create required test environment•Execute tests by
Initiating application under testApplying inputs that are specified in the already generated test case
Compare actual results with expected resultsResults: Test passed or failed!
![Page 18: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/18.jpg)
A ‘FAILED’ Test
The term ‘Test Failed’ is used when the program has failed to give the expected result
Actually, the test has succeeded in discovering a fault!
![Page 19: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/19.jpg)
Definitions
•Defect
A deviation from specification or standard
Anything that causes customer dissatisfaction
Verification
All QC activities throughout the life cycle that ensure that interim deliverables meet their input specification
Validation
The ‘test phase’ of the life cycle which assures that the end product meets the user’s needs
![Page 20: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/20.jpg)
Debugging
Debugging is the act of attempting to
determine the cause of the symptoms
of malfunctions detected by testing or
by frenzied user complaints. (Beizer)
![Page 21: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/21.jpg)
Testing: static and dynamic
• Static Testing: Verification performed without executing the system’s code
•Code Inspection•Reviews
• Dynamic Testing: Verification or validation performed by executing the system’s code
![Page 22: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/22.jpg)
Testing Techniques
• Black Box• White Box• Basis path testing
![Page 23: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/23.jpg)
Black box testing
What is black box testing?
![Page 24: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/24.jpg)
Black box testing
Also called Behavioural testing, focuses on functional requirement of the software
![Page 25: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/25.jpg)
Black box testing
Detects following categories of errors
Incorrect or missing functions Interface errors Errors in data structures and external database
access Behaviour or performance errors Initialisation and termination errors
![Page 26: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/26.jpg)
Types of Black box testing
Boundary value analysisEquivalence partitioningSpecial value
![Page 27: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/27.jpg)
BVA(Boundary Value Analysis)
What is BVA?
![Page 28: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/28.jpg)
Boundary value analysis (two variables)Boundary value analysis (two variables)
a<=x1 <=b
c<=x2 <=d
X2
X1
d
c
a b
![Page 29: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/29.jpg)
BVA
Great number of errors tends to occur at the boundaries of the input domain rather than in the ‘center’
BVA leads to a selection of test cases that exercise bounding values
![Page 30: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/30.jpg)
Equivalence partitioning
What is equivalence partitioning?
![Page 31: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/31.jpg)
Equivalence partitioning testingEquivalence partitioning testing •EC partitions the data to partition
of a set• Partition refers to collection of
mutually disjoint subsets whose
union is the entire set.•Choose one data element from
each partitioned set.• EC based testing allows
- to have a sense of complete
testing.
- helps avoid redundancy• The KEY is the choice of
equivalence relation.
![Page 32: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/32.jpg)
Special value
What is special value testing?
![Page 33: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/33.jpg)
Special value testingSpecial value testing
• Select test data on the basis of features of a function to be computed
• Tester uses her/his domain knowledge, experience with similar programs
• Ad-hoc/seat of pants/skirt testing
• No guidelines, use best engineering judgment
• Special test cases/Error guessing
• Is useful – don't discount effectiveness !
![Page 34: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/34.jpg)
Levels of testingLevels of testing
What does each level of testing uncover?
• Unit testing– implementation deficiencies– Code / LLD
• Integration testing– interface deficiencies– architecture / HLD
• System testing– requirement deficiencies– SRS
• Regression testing– fix has not broken existing
functionality - product / code
• Alpha / Beta testing• Acceptance testing
– customer expectations– notion of stability (time)
• Certification testing – external compliance– third party
![Page 35: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/35.jpg)
Unit Testing
What is Unit testing?
![Page 36: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/36.jpg)
Unit Testing
Unit- Smallest testable piece of software A unit can be compiled / assembled / linked /
loaded; and put under a test harness Unit testing is done to show that the unit does not
satisfy the functional specification and/or its implemented structure does not match the intended design structure
![Page 37: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/37.jpg)
Integration Testing
What is integration testing?
![Page 38: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/38.jpg)
Integration Testing
Integration is the process of aggregating components to create larger components.
Integration testing done to show that even though components were individually satisfactory, the combination is incorrect or inconsistent
![Page 39: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/39.jpg)
Integration problems
What are the general integration problems?
![Page 40: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/40.jpg)
Types of Integration problems
Configuration / version control I/O format, protocol mismatches Conflicting data views/ usage Data integrity violated Wrong parameters
![Page 41: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/41.jpg)
Integration test approachIntegration test approach
• Top down
• Bottom up
• Sandwich
M23
M12
M22
M31
M0
M11
M21
M13
![Page 42: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/42.jpg)
Top down integrationTop down integration
• Modules are integrated by moving downward
• Depth-first or breadth-first manner
• Verifies major control or decision points early in the test process
• Stubs replace low-level modules
M23
M12
M22
M31
M0
M11
M21
M13
![Page 43: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/43.jpg)
Bottom – up integrationBottom – up integration
• Construction and testing with atomic modules
• Stubs are NOT needed
• Drivers are needed
![Page 44: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/44.jpg)
Integration testing – some thoughtsIntegration testing – some thoughts
• How to choose integration order – incremental
• May be based on criticality of interfaces/module
• Risk reduction principle may be used
• Critically based on ..
- Module used by lot of other modules
- Module has high cyclomatic complexity
- Has special non-functional (e.g, performance) requirements
What to check for ….
• Interface integrity
• Functional validity
• Information content
• Performance
![Page 45: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/45.jpg)
System testing
What is system testing?
![Page 46: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/46.jpg)
System Testing
A system is the big component System testing is aimed at revealing bugs that
cannot be attributed to a component as such, to inconsistencies between components or planned interactions between components
Concern: issues, behaviours that can only be exposed by testing the entire integrated system (e.g., performance, security, recovery)
![Page 47: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/47.jpg)
System testing is…System testing is…
• Functionality Testing
• Stress testing
• Usability testing
• Security testing
• Performance testing
• Storage testing
• Internationalization testing
• Compatibility testing
• Installation testing
• Reliability testing
• Recovery testing
• Supportability testing
• Compliance testing
• …
![Page 48: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/48.jpg)
Acceptance Testing
Aims at uncovering ‘implied requirements’ Aims at evaluating ‘fitness for use’ Should not find bugs which should have been
found in earlier testing phases
![Page 49: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/49.jpg)
Regression Testing
Testing after changes been made to ensure that no unwanted changes were made
![Page 50: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/50.jpg)
Test Strategy
This defines the scope and general directions for testing for a project
Should be developed for each project Should be reviewed and approved with the
project plan
![Page 51: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/51.jpg)
Test Plan
Test plans specify the test conditions, features, functions that will be tested for a specific level of testing. Plans also contain other information about resources, schedules, etc
Test plans should be prepared as soon as the corresponding document in the development life cycle is produced
![Page 52: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/52.jpg)
Test specification
What is test specification?
![Page 53: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/53.jpg)
Test Case
A sequence of steps, sub steps, and other actions, performed serially, in parallel, or in some combination of consecution, that creates the desired test conditions that the test case is designed to evaluate
![Page 54: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/54.jpg)
Is complete testing possible?
To prove that a program is free of bugs is•Practically impossible•Theoretically a mammoth exercise
![Page 55: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/55.jpg)
Stop Criteria
When to stop testing?
![Page 56: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/56.jpg)
STOP Criteria
Time runs out – Poor criteria A certain number of errors found Require a certain test coverage Stop when testing becomes unproductive
![Page 57: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/57.jpg)
Software testing
ExercisePrepare a checklist for testing
![Page 58: Software Testing Basics](https://reader035.vdocuments.us/reader035/viewer/2022062614/546f79f2b4af9ff52a8b45bc/html5/thumbnails/58.jpg)
IV & V
What is Independent Verification & Validation?