Top Banner
CHAPTER 1 Software Verification and Validation SE34 5
44

Chapter 1

Feb 25, 2016

Download

Documents

TerriS

Chapter 1. SE345. Software Verification and Validation. วัตถุประสงค์เฉพาะบท. 1. เพื่อให้นักศึกษารู้จักและเข้าใจศัพท์ เทคนิคและพื้นฐานความรู้ที่ใช้ในการทดสอบซอฟต์แวร์ 2. เพื่อให้นักศึกษาเข้าใจกระบวนการ พัฒนาซอฟต์แวร์ บรรยาย ( 2 ชม. ) - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 1

CHAPTER 1Software Verification and

ValidationSE345

Page 2: Chapter 1

วตถประสงคเฉพาะบท

1. เพอใหนกศกษารจกและเขาใจศพท เทคนคและพนฐานความรทใชในการทดสอบซอฟตแวร

2. เพอใหนกศกษาเขาใจกระบวนการ พฒนาซอฟตแวร

บรรยาย (2 ชม.) ศกษาและนำาเสนอกรณตวอยาง (30 นาท) Pre-Test (15 นาท) Post-Test (15 นาท) ศกษาดวยตนเอง (6 ชม.)

Page 3: Chapter 1

Pre-Test ใหนกศกษาทำา Pre-Test บทท 1 ลงในกระดาษทอาจารยผสอนไดจดเตรยมไวให ใชเวลา 15 นาท

Page 4: Chapter 1

ความรเบองตนเกยวกบกระบวนการพฒนาซอฟตแวรและการทดสอบซอฟตแวร

1.1 วงจรชวตการพฒนาซอฟตแวร (SDLC)1.2 ความรเบองตนเกยวกบการทดสอบซอฟตแวร (Software Testing คาใชจายทเกดขนเมอเกดบค (The Cost

of Bugs) ทมการทดสอบซอฟตแวร (Software

Testing Teams)1.3 การทวนสอบและการทดสอบซอฟตแวร (Software Verification and Validation)

1.4 คำาศพททเกยวของ (Terminologies)1.5 ศกษากรณตวอยางผลกระทบทเกดจากการ

ไมทำาการทดสอบ

Page 5: Chapter 1

วงจรชวตการพฒนาซอฟตแวร (SDLC)

ในกระบวนการพฒนาซอฟตแวร มแบบจำาลองทหลากหลายเพอใชเปนแบบจำาลองในการพฒนาซอฟตแวร เชน Waterfall Model , Spiral Model , Incremental Model , Agile , Scrum , XP Model , V Model , RUP Model , RAD Model ฯลฯ ซงแบบจำาลองเหลานมขนตอนตาง ๆ ทแตกตางกนไปในกจกรรมยอยของแตละขนตอน

Page 6: Chapter 1

การบาน บทท 1 งานเดยว (12 คะแนน) 1. ใหนกศกษาทำาการศกษาคนควาดวยตนเองเกยวกบแบบจำาลองตางๆ มาอยางนอย 3 แบบจำาลอง พรอมทงทำาสรปสงภายในวนศกรท 29 ตลาคม กอน 16.30 น. สงใน E-learning รายละเอยดกจกรรม / ขนตอนของแบบจำาลอง รปภาพแบบจำาลอง ขอด / ขอเสย

สงชาหกวนละ 1 คะแนนให Save ชอไฟล HW1-1_รหส

นกศกษา.docx

Page 7: Chapter 1

วงจรชวตการพฒนาซอฟตแวร (SDLC)

สรปไดวาวงจรชวตการพฒนาซอฟตแวร (Software Development Life Cycle) มขนตอนดงน

Project planning, feasibility study: Systems analysis, requirements

definition: Systems design: Implementation: Integration and testing: System Testing Acceptance, installation Maintenance:

Page 8: Chapter 1

เอกสารทเกดขนในกระบวนการพฒนาซอฟตแวร เอกสารใน Project planning,

feasibility study: Software Project Management Plan (SPMP)

Feasibility study Software Configuration Management Plan (SCMP)

Test Plan (TP) Systems analysis,

requirements definition: Software Requirement Specification (SRS)

Page 9: Chapter 1

เอกสารทเกดขนในกระบวนการพฒนาซอฟตแวร

Systems design: Software Design Documentation (SDD)

Test Case (TC) Test Script (TS)

Implementation: Source Code (SC) Unit Testing Report (UTR)

Page 10: Chapter 1

เอกสารทเกดขนในกระบวนการพฒนาซอฟตแวร

Integration and testing: Integration Test Report (ITR)

System Testing System Test Report (STR)

Acceptance, installation Acceptance Test Report (ATR) Installation Document (ID)

Maintenance: User Manual (UM)

Page 11: Chapter 1

Why do we test? ม 2 เหตผลทตองทดสอบซอฟตแวร คอ

คณภาพ (หรอการยอมรบ) และการคนพบปญหา

สาเหตทตองทำาการทดสอบเพราะวามขอผดพลาด โดยเฉพาะอยางยงความเทยงตรงของซอฟตแวร และระบบตาง ๆ ทไดรบการควบคม

Page 12: Chapter 1

Per The Requirements

As Systems Specified It

As Engineering Designed It

If You Don’t Do Both …

Page 13: Chapter 1

As the Factory Built It

As Integration Installed It

What the Customer Wanted

You Can Meet the Spec, But …

Page 14: Chapter 1

Without Validation as part of the process, you will waste:• Time• Energy• Money• Resources

… and still not get it right.

Page 15: Chapter 1

Why Do Bugs Occur?

There are several reasons specifications are the largest bug producer. In many instances a spec simply isn’t written. Other reason may be that the spec isn’t thorough enough, it’s constantly changing, or it’s not communicated well to the entire development team. Planning software is vitally important. If it’s not done correctly, bugs will be created.

The next largest source of bugs is the design. This is where the programmers lay out their plan for the software. Compare it to an architect creating the blueprints for a building. Bugs occur here for the same reason they occur in the specification. It’s rushed, changed, or not well communicated.

Page 16: Chapter 1

Bugs are caused for numerous reasons, but, in this sample project analysis, the main cause can be traced to the specification

Page 17: Chapter 1

What Exactly Does a Software Tester Do? The goal of a software tester is

to find bugs. The goal of a software tester is

to find bugs and find them as early as possible.

The goal of a software tester is to find bugs, find them as early a possible, and make sure they get fixed.

Page 18: Chapter 1

Software tester should have:

They are explorers. They are troubleshooters. They are relentless. They are creative. They are (mellowed)

perfectionists. They exercise good judgment. They are tactful an diplomatic. They are persuasive.

Page 19: Chapter 1

Software tester should have:

They are explorers. ผทดสอบตองทำาตวเปนนกสำารวจ และไมกลว

ทจะอยในเหตการณทเขาไมเจอพบ และมใจรกทจะทดสอบซอฟตแวรใหม ๆ

They are troubleshooters. ผทดสอบตองเปนนกแกไขปญหา ผทดสอบทดควรหาเหตผลวาทำาไมงานนนถง

ไมผานการทดสอบ มสาเหตเกดจากอะไร

Page 20: Chapter 1

Software tester should have:

They are relentless. ผทดสอบตองมความอดทนทจะคนหาขอผด

พลาด และตองมความพยายาม เขาจะเกดความรสกวาปญหาถกคลคลายไปอยางรวดเรวหรอยากทจะเกดขนมาอก

บางครงการพบขอผดพลาดอาจเกดจากความบงเอญกเปนได

ผทดสอบตองทำาทกวถทางทจะใหพบขอผดพลาดใหได

Page 21: Chapter 1

Software tester should have:

They are creative. วธการทดสอบททำาอยนนหากไมเพยงพอทจะ

กำาจดขอผดพลาดใหออกไปได ผทดสอบจงตองมการคดสรางสรรคเพอหาวธในการหาขอผดพลาดหรอขอบกพรอง

They are (mellowed) perfectionists. ผทดสอบตองมความสขม รอบคอบ มงทจะหา

ขอผดพลาด

Page 22: Chapter 1

Software tester should have:

They exercise good judgment. ผทดสอบตองมการฝกฝนในการตดสนใจและ

ใชดลพนจในการตดสนใจเกยวกบสงทเขากำาลงทดสอบวาสงเหลานนเปนขอผดพลาดหรอขอบกพรองหรอไม

They are tactful an diplomatic. ผทดสอบตองมความเชยวชาญ มไหวพรบ

และมชนเชง เขาควรมชนเชงในการพดทจะบอก

Programmer ถงขอผดพลาดทเกดขน

Page 23: Chapter 1

Software tester should have:

They are persuasive. ผทดสอบตองมความสามารถในการโนมนาว

จตใจ หรอสามารถเกลยกลอม ขอผดพลาดหรอขอบกพรองทผทดสอบพบ

นนอาจจะไมรนแรง หรอไมสงผลกระทบทจะทำาใหระบบเสยหาย ดงนนผทดสอบตองแสดงใหเหนวาเพราะเหตใด

หรอขอผดพลาดหรอขอบกพรองนนสมควรทตองไดรบการแกไข ( Fixed) ผทดสอบตองแสดงใหทมเหนวาเพราะอะไรขอผดพลาดหรอขอบกพรองนควรไดรบการแกไข (Fixed)

Page 24: Chapter 1

ทมการทดสอบซอฟตแวร(Software Testing Teams) Software Customers

Those who contract for the software to be developed

Software Users Those who will use the software

Page 25: Chapter 1

ทมการทดสอบซอฟตแวร(Software Testing Teams) Software Developers

Those who involve or assist inWriting requirements from the software user,

Designing the software,Building the software, andChanging and maintaining the software as needed

Development Testers / Software Testers Those who perform the check

function on the software

Page 26: Chapter 1

ทมการทดสอบซอฟตแวร(Software Testing Teams) Senior Management

CEO of the organization and other senior executives who are responsible for fulfilling the organization mission. Information technology is an activity that supports fulfilling that mission.

Auditor The individual or group responsible

for evaluating the effectiveness, efficiency, and adequacy of controls in the information technology area. Testing is considered a control by the audit function.

Page 27: Chapter 1

ทมการทดสอบซอฟตแวร(Software Testing Teams) Project manager

The individual responsible for managing the building, maintaining, and/or implementing of software.

Page 28: Chapter 1

The Cost of Bugs The costs are logarithmic – that

is, they increase tenfold as time increase. A bug found and fixed during the early stages when the specification is being written might cost next to nothing, or 1$ in our example. The same bug, if not found until the software is coded and tested, might cost $10 to $100. If a customer finds it, the cost could easily be thousands or even millions of dollars.

Page 29: Chapter 1

The cost to fix bugs can increase dramatically over time.

Page 30: Chapter 1

Software Verification and Validation

Page 31: Chapter 1

Software Verification

Verification helps answer the question “Are we building the product right?”

Verification activities are defined around three basic processes: inspection, measurement, and configuration management.

เราไดสรางระบบอยางถกตองหรอไม ซอฟตแวรทพฒนาตรงกบขอกำาหนดทระบไวหรอไม

Page 32: Chapter 1

Software Validation

Validation activities are performed after the software is developed to determine if the software correctly implements the requirements.

Validation helps answer the question “Did we build the right product?”

เราไดสรางระบบทถกตองหรอไม ซอฟตแวรทพฒนาตรงกบความตองการหรอไม

Page 33: Chapter 1
Page 34: Chapter 1

คำาศพททเกยวของ (Terminologies)

Software Testing (การทดสอบซอฟตแวร) เปนกจกรรมทจดทำาขนเพอประเมนและ

ปรบปรงคณภาพของซอฟตแวร โดยการตรวจหาขอผดพลาดและปญหาทเกดขน แลวทำาการแกไขขอผดพลาดหรอปญหาดงกลาวใหถกตอง [IEEE, 2004] วตถประสงคของการทดสอบซอฟตแวร กเพอพสจนวาซอฟตแวรทำางานไดครบทกฟงกชนตามขอกำาหนดความตองการ และตรวจสอบวาแตละฟงกชนสามารถประมวลผลขอมลไดอยางถกตอง

Page 35: Chapter 1

คำาศพททเกยวของ (Terminologies)

Errors (ความผดพลาด) คนทำาผด หรอเกดจากการเขาใจความหมายใน

เอกสารผดกจะทำาใหการเขยน Code ผดไปดวย ซงเรยกขอผดพลาดนวาความผดพลาดททำาใหเกด Bug ความผดพลาดจากความตองการ (Requirement) อาจขยายความผดพลาดไปยงการออกแบบ (Design) และ Code

Page 36: Chapter 1

คำาศพททเกยวของ (Terminologies)

Fault (ความคลาดเคลอน) ความคลาดเคลอนเปนผลมาจากความผดพลาด

(Error) ทนำาเสนอไดอะแกรม narrative text, dataflow diagrams, hierarchy charts, source code และอน ๆ ความคลาดเคลอนทยากจะเขาใจ เมอผออกแบบ (Designer) ละเลยขอผดพลาด ผลของความคลาดเคลอนทเกดขน อาจเกดจากการขาดหาย (Missing) ทควรนำาเสนอ

อาจเกดจากขอมลในเอกสารขาดหาย ตกหลน Failure (ความลมเหลว)

ความลมเหลว เกดขนเมอเกด Fault กอใหเกดความเสยหายตอตวทำางานระบบ มผลใน

ทางลบตอผใชและลกคา

Page 37: Chapter 1

คำาศพททเกยวของ (Terminologies)

Bugs จะพบไดตอน Coding

Crashes มผลกระทบทำาใหระบบลม / พง ใชไมได

Indicant (เหตการณ) เหตการณทเกดขนทเกยวของกบความลมเหลวโดย

มการแจงเตอนใหผใชทราบวาเกด Failure Defects (ขอบกพรอง)

เปนขอบกพรองทพบกอนการ Coding Missing / Wrong / Extra

Page 38: Chapter 1

What are you test for? A defect is a variance from a

desired product attribute. Any variance at all is a defect. Wrong – A variance from

customer/user specification Missing – A specified or wanted

requirement is not in the built product

Extra – May be an attribute desired by the user, but a defect nonetheless

Page 39: Chapter 1

กรณตวอยางผลกระทบทเกดขน

Disney’s Lion King, 1994-1995: In the fall of 1994, the Disney company released its first multimedia CD-ROM game for children, The Lion King Animated Storybook. Although many other companies had been marketing children’s programs for years, this was Disney’s first venture into the market and it was highly promoted and advertised. Sales were huge. It was “the game to buy” for children that holiday season. What happened, however, was a huge debacle. On December 26, the day after Christmas, Disney’s customer support phones began to ring, and ring, and ring. Soon the phone support technicians were swamped with calls from angry parents with crying children who couldn’t get the software to work. Numerous stories appeared in newspapers and on TV news. It turns out that Disney failed to properly test the software on the many different PC models available on the market. The software worked on a few systems—likely the ones that the Disney programmers used to create the game—but not on the most common systems that the general public had.

Page 40: Chapter 1

ศกษากรณตวอยางผลกระทบทเกดขน

กจกรรมในชนเรยนใชเวลา 30 นาท (10 คะแนน)

ใหนกศกษาทำาการศกษา “Infamous Software Error Case Studies” และวเคราะห วจารณถงสาเหตททำาใหเกดขอผดพลาดคออะไร ใหเขยนสงอาจารยเปนรปเอกสารและออกมาวเคราะหใหเพอนฟงหนาหอง Intel Pentium Floating-Point Division Bug, 1994:

NASA Mars Polar Lander, 1999:

Patriot Missile Defense System, 1991:

The Y2K (Year 2000) Bug, circa 1974

Dangerous Viewing Ahead, 2004

Page 41: Chapter 1

Questions & Answers

Page 42: Chapter 1

“What we anticipate seldom occurs; what we least expected generally happens.”

- Benjamin Disraeli

“สงทเราคาดคด จะไมคอยเกดขน สงทเราคาดไมถงสวนใหญกจะเกดขน”

Page 43: Chapter 1

Post-Test (10 คะแนน) ใหนกศกษาทำา Post-Test บทท 1 ลงในกระดาษทอาจารยผสอนไดจดเตรยมไวให ใชเวลา 15 นาท

Page 44: Chapter 1

การศกษาดวยตนเอง

เพอการเตรยมตวเรยนในบทท 2 ใหนกศกษาทำาการศกษาเอกสาร “Software Test

Plan” ตามเอกสาร ใน E-Learning “Practial Support for CMMI-SW Software Project Documentation Using IEEE Software Engineering Standards” by Susan K. Land and John W. Walz, Wiley Interscience Publication, 2006. แลวทำาการสรางแบบฟอรม Template เปนภาษาไทย เพอนำาไปใชในการวางแผนการทดสอบตอไป (10 คะแนน)

สงใน E-learning วนจนทรท 1 พฤศจกายน กอนเวลา 12.00 น.