cs 5380 software engineering chapter 8 testing
TRANSCRIPT
![Page 1: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/1.jpg)
S
CS 5380 Software Engineering
Chapter 8 Testing
![Page 2: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/2.jpg)
Validation vs Verification
Validation Are we building the right product?
Verification Are we building the product right?
Chapter 7 - Design and Implementation2
![Page 3: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/3.jpg)
Purpose of Testing
Demonstration of fulfillment of requirements
Identification of defects
Chapter 7 - Design and Implementation3
![Page 4: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/4.jpg)
Meeting Requirements(Validation)
At least one test per requirement xxxxxxxxx
Often more than one test Several valid cases xxxxxxxxx
Chapter 7 - Design and Implementation4
![Page 5: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/5.jpg)
Identification of Defects
Identifying undesirable results System crash Incorrect computation Data corruption
May need many tests
Chapter 7 - Design and Implementation5
![Page 6: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/6.jpg)
Testing is Never Final
Dijkstra: Testing can show presence of errors, not their absence
“There is always one more bug”
Chapter 7 - Design and Implementation6
![Page 7: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/7.jpg)
How Much Testing?- Factors Driving Testing
Software purpose Safety drives high requirements
User expectations Some tolerance
Marketing “We lose money every day the product is not
delivered”
Chapter 7 - Design and Implementation7
![Page 8: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/8.jpg)
Inspection vs Testing
Both address same issues Does the software meet requirements? Does the software fail in some situations?
Advantage of Inspection Identification of multiple errors at one time possible Identification of errors in incomplete software Looks beyond defects
Inefficient code, poor code structure, reuse
Advantage of testing Can be automated Detailed scenarios evaluated
Chapter 7 - Design and Implementation8
![Page 9: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/9.jpg)
Inspection
Gives insight into the method, and hence potential flaws
Does not give us automation, regression
May be difficult to comprehend all cases
Complements other methods
Good review point is before check-in
Chapter 7 - Design and Implementation9
![Page 10: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/10.jpg)
Testing Stages
Development Done during development, by programmers Often on development systems
Release Testing complete system before delivery Generally on a separate test system Formal test plans
User Test by users, on their systems Real world application Beta testing
Chapter 7 - Design and Implementation10
![Page 11: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/11.jpg)
Development TestingLevels
Unit Object, function level
Component Interaction of several objects Focus on component interactions
System Entire system Focus on interactions
Chapter 7 - Design and Implementation11
![Page 12: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/12.jpg)
Unit Testing
Object
Automated Setup Perform operation Evaluate Results
Execution Not UI
Chapter 7 - Design and Implementation12
![Page 13: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/13.jpg)
State Diagram Testing
System or object for which you have a state diagram
Test all transitions State, event
Chapter 7 - Design and Implementation13
![Page 14: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/14.jpg)
Activity Diagram Testing
Diagram clearly shows alternatives to be tested.
Chapter 7 - Design and Implementation14
![Page 15: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/15.jpg)
Chapter 7 - Design and Implementation15
![Page 16: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/16.jpg)
Component Testing
Testing of composite components
Several objects
Interfaces to consider Parameter (object) Procedural (object) Shared memory Message passing
Chapter 7 - Design and Implementation16
![Page 17: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/17.jpg)
Component Examples
Objects
Fast city grocers
Web browser
Chapter 7 - Design and Implementation17
![Page 18: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/18.jpg)
System Testing
Testing all components that come together Internal objects External objects – GUI, db External systems – credit card
Chapter 7 - Design and Implementation18
![Page 19: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/19.jpg)
Regression Testing
Testing that past cases should still work
Automation is key to effective regression testing
Chapter 7 - Design and Implementation19
![Page 20: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/20.jpg)
Release testing
Similar to system testing, but Separate team (not development) Goal: more about meeting requirements than finding
bugs
Goal: verify to the customer that the software is ready
Chapter 7 - Design and Implementation20
![Page 21: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/21.jpg)
Scenario Testing
Complete scenarios with data
May be followed by user
May be automated.
Chapter 7 - Design and Implementation21
![Page 22: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/22.jpg)
Performance Testing
Response times
Concurrency response
Identify degradation issues
Failure due to unexpected combination of events
Stress the system beyond normal use
Chapter 7 - Design and Implementation22
![Page 23: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/23.jpg)
User Testing
Alpha – users with developers
Beta – Users in production mode Generally to identify bugs
Acceptance testing Customer acceptance Acceptance plan needed
Chapter 7 - Design and Implementation23
![Page 24: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/24.jpg)
Release Cutoff
Software released when number of bugs/type tolerable
Unusual case causes software to crash Unexplained loss of data – single record lost Data corrupt (verified in customer data) Single minor function (.1% of users use this) fails Software lacks feature (50% of users want it)
Chapter 7 - Design and Implementation24
![Page 25: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/25.jpg)
Extent of Testing
Depends on Purpose Health/Safety Critical – insulin pump Credit card retention Web ordering
Depends on User Expections
Depends on Marketing pressures New customer delivery needed Customer testimonials/references Features for existing customers
Existing customer response to errors
Chapter 7 - Design and Implementation25
![Page 26: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/26.jpg)
Testers
Who does test? Object level?
Programmer other than developer Component level?
Programmers/ Test bed specialists Integration level?
User domain / Programmers Full scenario
Customers / Beta
Chapter 7 - Design and Implementation26
![Page 27: CS 5380 Software Engineering Chapter 8 Testing](https://reader031.vdocuments.us/reader031/viewer/2022032205/56649e925503460f94b98331/html5/thumbnails/27.jpg)
Experience with Testers
Search for people that test well
Most people will use a system for 1 hour and say it has 2 bugs
Another tester might use the same software for 10 minutes and find 10 bugs
Chapter 7 - Design and Implementation27