Test Methodology 1 AGENDA Test Process n Role

  • Slides: 58
Download presentation
Test Methodology 1

Test Methodology 1

AGENDA Test Process n Role and Responsibility n V Model n Test Technique n

AGENDA Test Process n Role and Responsibility n V Model n Test Technique n Test Type n Test Flow n Documents n Test Tool n 2

TEST PROCESS (CONT) ในมมมองของ Programmer และ Tester จะมแนวความคด (View) ทแตกตางกนใน เรองของการ Test ตวอยางเชน Programmer

TEST PROCESS (CONT) ในมมมองของ Programmer และ Tester จะมแนวความคด (View) ทแตกตางกนใน เรองของการ Test ตวอยางเชน Programmer Test only coding, not test in business view Need to test in business view Test only code that their change Test integration flow and possible error occur, need to be test Testing is no need for a little bit code change, not impact other (ถามการแกไขเลกๆนอยๆ จะไมสนใจทำการทดสอบ และจะไมดวามผลกระทบกบสวนอนๆ หรอไม ) Every change need to be test, and not change impact area need to be test (Test ทงทมการแกไขและไมมการแกไข Make data to test, no need data from other system Positive and Negative case need to be test ) 5

Test Process (cont) Test Planning Test Creation NO Requirement Analysis Create Test Scenario Create

Test Process (cont) Test Planning Test Creation NO Requirement Analysis Create Test Scenario Create Test Case Review Test Case YES Cover all requirements? Test Execution Create test coverage matrix Test Preparation Record Defect Log Analyze Defect NO Execute PASS? Run Test Case Record Test Result YES Create. Summary Test Report Test Environment Set up Create Test data Test Planning ประกอบดวย - Test strategy หมายถงการกำหนดวธการทดสอบใหเหมาะสมกบ Application หรอ ระบบทเราจะทำการทดสอบ วาควรจะมการทดสอบแบบใดบาง - Test schedule หมายถง Task งานตางๆ ทสามารถแตกแยกยอยออกมา และระบวนในการทดสอบได - Test Resource หมายถง Resource ตางๆ ทจะตองใชในการทดสอบ ไมวาจะเปน Human , S/W, H/W หรอ Time 6

ROLE AND RESPONSIBILITY TASK Work Product Response By Test Planning Test Plan Test Leader

ROLE AND RESPONSIBILITY TASK Work Product Response By Test Planning Test Plan Test Leader / QA Requirement Analysis Test Design or Test Specification Test Leader / QA Test Creation Test Scenario Test Case / Test Script Test coverage matrix Test Leader / QA Test Preparation Environment set up Check list Tester Test Execution Defect Log Test Result Summary Test Report Tester / Developer / DBA 7

V MODEL 8

V MODEL 8

V MODEL (CONT) V Model เปน Methodology ทไวสำหรบตรวจสอบคณภาพของระบบ ซงจะม Stage ตางๆ ของการ Test คอย

V MODEL (CONT) V Model เปน Methodology ทไวสำหรบตรวจสอบคณภาพของระบบ ซงจะม Stage ตางๆ ของการ Test คอย validate & verify ตงแตเรมตน Requirement จนถง phase สดทายของการพฒนาระบบ n Left side “V” จะเปน activity ของ Analysis Requirement and Design เมอเสรจสนการ Design แลว กระบวนการ Build จะเรมตนขน n Right side “V” จะเปน Testing activity ซงจะเรมตนขนหลงจาก Build เสรจ ในชวงแรกของการทดสอบ จะ focus เฉพาะ individual component หลงจากนนจะเปลยนเปน focus ในเรองของ Functional , nonfunctional ใหตรงกบ Business Requirement ความหมาย Verification and Validation n Verification q is the process confirming that something meets its specification q “Do we build the system right? ” n Validation q is the process confirming that it meets the user’s requirements q “Do we build the right software? ” 9

Software quality triangle คณภาพของ Software สามารถแสดงออกมาในรปแบบของสามเหลยม ซงในแตละมมจะแทนดวย User requirement, software , Requirements Specification Software

Software quality triangle คณภาพของ Software สามารถแสดงออกมาในรปแบบของสามเหลยม ซงในแตละมมจะแทนดวย User requirement, software , Requirements Specification Software Gap User Requirement Gap Requirement Specification 10

Software quality triangle (cont) 1. User requirements – Requirements specification Gap ชองวางนเกดขนมาจาก Developer ไมเขาใจ

Software quality triangle (cont) 1. User requirements – Requirements specification Gap ชองวางนเกดขนมาจาก Developer ไมเขาใจ Requirement ของ User ซงอาจจะเนองมาจากสาเหต ดงน Ø Misunderstood requirements Ø Ignored requirements Ø Missing requirements Ø Outdated requirements Ø Unneeded requirements 2. Requirements specification - Software Gap ชองวางนเกดขนมาจากการพฒนา Software ไมตรงตาม Requirement specification ซงอาจจะเกด มาจากสาเหตดงน Ø Requirement not identified in the specification Ø Changes to requirements identified after development commenced Ø Wrong interpretation of requirement due to vagueness and ambiguity in the specification Ø Features added by the developers to exploit technical opportunities Ø Features removed by the developers because they were too difficult to implement 11

Software quality triangle (cont) 3. Software – User requirements Gap ชองวางนเกดขนมาจาก Software ทพฒนาขนมาไมตรงกบ Requirement

Software quality triangle (cont) 3. Software – User requirements Gap ชองวางนเกดขนมาจาก Software ทพฒนาขนมาไมตรงกบ Requirement ทไดมาจาก User ซง อาจจะตอง re-work เพอแกไขให software เปนไปตามท user ตองการ Shapes of Software Quality Triangles ชองวางทง 3 แบบ ทำใหเกด Quality Triangle ทแตกตางกนออกไป Software q ดงน - SA Poor understanding of user requirements - Corrected during software development - Software meets user requirements (software ทพฒนาออกมาด อาจจะเนองมาจาก Developer มประสบการณจงเขยน software ออกมาใชงานไดด ) 12

Software quality triangle (cont) - SA, DEV Poor understanding of user requirements - Good

Software quality triangle (cont) - SA, DEV Poor understanding of user requirements - Good software development - Software does not meets user requirements Software (Developer พฒนา Software ไดด เปนอยางด แต Software ทไดไมตรงกบความตองการของ เขาใจ Requirement Spec. User) - SA Good understanding of user requirements - Poor software development - Software does not meets user requirements Better alignment (Developer มความเขาใจ Requirement นอย ทำใหสราง Software ไมตรงกบ Requirement) - Poor understanding of user requirements - Poor software development - Software does not meets user requirements (เปนรปแบบทแยทสด เนองจากแตละสวนไมมความเขาใจกน ) 13

Test Technique Software White Box Internal Quality External Quality Black Box User Requirement Specification

Test Technique Software White Box Internal Quality External Quality Black Box User Requirement Specification 14

LEVEL OF TESTING (cont) Level ของการทดสอบ จะถกกำหนดไวใน Test Planning ในสวนของ Test Strategy เพอเปน แนวทางวาควรจะใชการ

LEVEL OF TESTING (cont) Level ของการทดสอบ จะถกกำหนดไวใน Test Planning ในสวนของ Test Strategy เพอเปน แนวทางวาควรจะใชการ Test แบบใดใหเหมาะสมกบ Program และ Requirement ของ user Level of Testing จะประกอบดวย n Unit test (white box & black box testing technique) n Integration Test (For small size) n System Test n n n System Integration Test (SIT – For large size) n n n Functional Non-Functional Test ¨ Performance Test § Load Test § Stress Test ¨ Security Test ¨ Reliability / Availability Test § Disaster & Recovery Test (data backup & data recovery Test) § Horizontal Scalable End to End Test (E 2 E) Regression Test User Acceptance Test (UAT) n n Alpha (in-house test) Beta 19

LEVEL OF TESTING (cont) สำหรบการทำ Performance Testing จะขนอยกบความเหมาะสมและ Requirement วาตองการจะวดคณภาพหรอประสทธภาพในเรองใด ซงจะตองมขอมลตางๆ เหลาน เชน n

LEVEL OF TESTING (cont) สำหรบการทำ Performance Testing จะขนอยกบความเหมาะสมและ Requirement วาตองการจะวดคณภาพหรอประสทธภาพในเรองใด ซงจะตองมขอมลตางๆ เหลาน เชน n objectives of performance testing n problems in performance testing n Understand measurement in performance test n Able to select types of performance test appropriately 20

LEVEL OF TESTING (cont) Unit Test จดประสงค เพอตรวจสอบผลการทำงานของ module ยอยทงหมดของระบบ เปรยบเทยบ กบสงท design ไว

LEVEL OF TESTING (cont) Unit Test จดประสงค เพอตรวจสอบผลการทำงานของ module ยอยทงหมดของระบบ เปรยบเทยบ กบสงท design ไว วามความแตกตางกนหรอไม Response by : Programmer Skill: Programming skill, Internal program design Test technique: Black box and White box Test environment: Develop environment n Integration Test จดประสงค เพอตรวจสอบความถกตองของ Function การทำงานตางๆ เมอมการ Integrate unit / module เขารวมกน โดยจะใหความสำคญในสวนของการ Interface ระหวางกนวาสามารถใชงาน รวมกนไดหรอไม ซงอาจจะอยในรปแบบ Client/Server และ distributed system Response by : Programmer, Tester or QA Skill: Programming skill, Testing skill Test technique: Black box and White box Test environment: Develop environment and Test environment 21 n

LEVEL OF TESTING (cont) System Test จดประสงค เพอ Verify ระบบวาระบบทำงานไดถกตองและไดผลลพธตรงตาม Requirement โดย จะทำการทดสอบแบบ Functional

LEVEL OF TESTING (cont) System Test จดประสงค เพอ Verify ระบบวาระบบทำงานไดถกตองและไดผลลพธตรงตาม Requirement โดย จะทำการทดสอบแบบ Functional และ Non-Functional Test ขนอยกบวาแบบใดจะเหมาะสมกบ Requirement ของ User Response by : Tester or QA Skill: Testing skill Test technique: Black box Test environment: Test environment n System Integration Test จดประสงค เพอ Verify วาระบบตางๆ สามารถทำงานรวมกนไดอยางถกตอง ตรงตามวตถประสงค และ Requirement ทม โดยจะ verify ทง Network integration และ Product integration ซงจะ รวมไปถง Infrastructure ของระบบ เชน Operating system, file system, hardware, middleware, network configuration Response by : Tester or QA 22 Skill: Testing skill n

LEVEL OF TESTING (cont) Load Test จดประสงค เพอทำการทดสอบ performance ของเครองในเรองของ Time วาในเวลาหนงๆ ตอ จำนวน

LEVEL OF TESTING (cont) Load Test จดประสงค เพอทำการทดสอบ performance ของเครองในเรองของ Time วาในเวลาหนงๆ ตอ จำนวน Transaction ทสงเขาไปพรอมๆ กนในระบบ จะม Response time เปนไปตาม Business Requirement ของ User หรอไม ซงสามารถแยกไดเปน 2 ขอ คอ - Response time : The end to end response time associated with a specific usersystem interaction - Throughput : The ability of the business system to execute a given number of businesses or system related processes within a given unit of time Response by : Tester / QA Skill: Testing skill specify performance testing Test technique: Black box Test environment: Test environment (Realistic & Representative) Test tool: >> Load Runner (สำหรบ Web application or windows application) สามารถ จำลอง Request เปน Time Interval ไดคอ ใหเรมจาก load นอยๆ ไปหา load มากๆ แลวกลบมานอยใหม เพอดเรองการคน Memory ของตวระบบ n >> Script ตางๆ เชน unix shell script (สำหรบงาน Process) 25

LEVEL OF TESTING (cont) Stress Test จดประสงค เพอทำการทดสอบ Capacity ของเครองวาม ในการรองรบปรมาณขอมลได มากทสดเทาไหร จนกวาเครองจะ down

LEVEL OF TESTING (cont) Stress Test จดประสงค เพอทำการทดสอบ Capacity ของเครองวาม ในการรองรบปรมาณขอมลได มากทสดเทาไหร จนกวาเครองจะ down n Response by : Skill: Test technique: Test environment: limitation Tester / QA / Developer Testing skill specify performance testing Black box Test environment (same as production environment) 26

LEVEL OF TESTING (cont) Security Test (Non-functional) จดประสงค เพอทำการทดสอบวาระบบมความปลอดภยมากเพยงพอ ทบคคลภายนอกไมสามารถ hack เขามาดงขอมลของลกคาได n สำหรบวธในการปองกนระบบจากบคคลภายนอก

LEVEL OF TESTING (cont) Security Test (Non-functional) จดประสงค เพอทำการทดสอบวาระบบมความปลอดภยมากเพยงพอ ทบคคลภายนอกไมสามารถ hack เขามาดงขอมลของลกคาได n สำหรบวธในการปองกนระบบจากบคคลภายนอก มไดหลายวธ ü Password rules (Single sign on, LDAP) ü Access rights (user roles, file system security) ü Set time outs Response by : Skill: Test technique: Test environment: ตวอยางเชน Tester / QA / Developer Testing skill, network security, programming skill Black box Test environment (Realistic & Representative) 27

LEVEL OF TESTING (cont) Availability & Reliability test จดประสงค 1. เพอทำการทดสอบวาระบบสามารถทำงานไดตลอดเวลา โดยไมเกดปญหาขน 2. เพอทำการทดสอบความนาเชอถอของระบบ

LEVEL OF TESTING (cont) Availability & Reliability test จดประสงค 1. เพอทำการทดสอบวาระบบสามารถทำงานไดตลอดเวลา โดยไมเกดปญหาขน 2. เพอทำการทดสอบความนาเชอถอของระบบ เชนกรณทระบบ กสามารถทจะกกลบคนมาได โดยขอมลทกอยางยงถกตอง n down ไป สำหรบวธในการทดสอบจะยกตวอยาง 2 แบบคอ n Disaster & Recovery Test (data backup & data recovery Test) ¨ Data Backup n To perform regular and ad-hoc back-ups as part of normal operational lifecycle and perform backups of data prior to, or during batch processing. ¨ Data Recovery n Backed up data can be re-loaded and the system fully restored to the backup point without loss or corruption of data. n Recovery data at each commit point within an on-line transaction process without corruption of existing data. n To verify maximum recovery time (SLA) n Rollback data entry or batch process without corruption or loss of data 28

Test FLOW Unit Test Integra tion Test System Test * SIT * Regressi on

Test FLOW Unit Test Integra tion Test System Test * SIT * Regressi on Test * Performance Test * Security Test * Disaster & Recovery Test * Horizontal Scalable Test UAT P R O D U C T I O N * Means optional testing stage 30

Documents (cont) แผนผงการจดทำเอกสารทเกยวของกบกระบวนการทดสอบ Test Planning Test Specification / Test Design Test Case/ Test Script

Documents (cont) แผนผงการจดทำเอกสารทเกยวของกบกระบวนการทดสอบ Test Planning Test Specification / Test Design Test Case/ Test Script Requirement traceability matrix Test Result Defect Log Test Summary Report Integration Test System Integration Test 31

Documents n Input Document ¨ Requirement (มชอเรยกทแตกตางกนในแตละองคกร เชน Project Proposal, High Level Architecture Design

Documents n Input Document ¨ Requirement (มชอเรยกทแตกตางกนในแตละองคกร เชน Project Proposal, High Level Architecture Design etc. ) ¨ Program Specification (มชอเรยกทแตกตางกนในแตละองคกร Software Requirement Specification, Program Specification, Functional Specification etc. ) ¨ Work flow process n Output Document (deliverable document) ¨ ¨ ¨ ¨ Test Plan Test Specification / Test Design * Test Scenario Test Case / Test Script Requirement traceability matrix Test Summary Report * Defect Log Test Result * Optional document 32

Documents (cont) ตวอยาง Requirement Document 33

Documents (cont) ตวอยาง Requirement Document 33

Documents (cont) ตวอยาง Program specification Document 34

Documents (cont) ตวอยาง Program specification Document 34

Documents (cont) ตวอยาง Work Flow Process 35

Documents (cont) ตวอยาง Work Flow Process 35

Documents (cont) จาก Test Plan สามารถแตกออกมาเปน Element ตางๆ เพอใหเหนรายละเอยดไดดงน ¨ ¨ ¨ ¨ ¨

Documents (cont) จาก Test Plan สามารถแตกออกมาเปน Element ตางๆ เพอใหเหนรายละเอยดไดดงน ¨ ¨ ¨ ¨ ¨ S [Scope] : What to test (In scope), what not to test (Out scope) P [People] : Training, Responsibility, Schedule A [Approach] : To testing C [Criteria] : Entry / Exit Criteria E [Environment] : Environment needs D [Deliverables] : Deliverables as part of test process I [Incidentals] : Introduction, Identification R [Risks] : Risks and Contingencies T [Tasks] : Tasks involves in testing 37

Documents (cont) ตวอยาง Test Planning Document Test Scheduling Test Strategy 38

Documents (cont) ตวอยาง Test Planning Document Test Scheduling Test Strategy 38

Documents (cont) ตวอยาง Test Planning Document Entry Criteria & Exit Criteria ในแตละ Test Level

Documents (cont) ตวอยาง Test Planning Document Entry Criteria & Exit Criteria ในแตละ Test Level 39

Documents (cont) Environment Set up Test Check list ตวอยาง Environment Set up Test Check

Documents (cont) Environment Set up Test Check list ตวอยาง Environment Set up Test Check list n 43

Documents (cont) ตวอยาง Test Case 45

Documents (cont) ตวอยาง Test Case 45

Documents (cont) ตวอยาง Defect Log Defect Analysis 49

Documents (cont) ตวอยาง Defect Log Defect Analysis 49

Documents (cont) Test Summary Report ตวอยาง Test Summary Report (cont) n 51

Documents (cont) Test Summary Report ตวอยาง Test Summary Report (cont) n 51

Documents (cont) Level of Documents จากเอกสารทงหมด สามารถจดกลมแบงเปน Level ไดตามแผนผง ดงน Test Planning Test Specification

Documents (cont) Level of Documents จากเอกสารทงหมด สามารถจดกลมแบงเปน Level ไดตามแผนผง ดงน Test Planning Test Specification / Test Design Test Case/ Test Script Requirement traceability matrix Test Result Defect Log Test Summary Report Integration Test System Integration Test 52

Agile development เปนแหลงรวมวธการพฒนา Software ทใชวธแบบ IID (Iterative and Incremental Development) เชน Extreme Programming (XP),

Agile development เปนแหลงรวมวธการพฒนา Software ทใชวธแบบ IID (Iterative and Incremental Development) เชน Extreme Programming (XP), Scrum, Crystal, Feature Driven Development (FDD) เปนตน Crystal Process 56

FDD– Feature driven development 57

FDD– Feature driven development 57

Deployment Discipline Workflow 58

Deployment Discipline Workflow 58