ISTQB Foundation - CHAPTER 1

ISTQB Foundation - CHAPTER 1

1.      WHAT IS TESTING

- Testing is not only consists of running test. This is a part of testing - Kiểm thử không chỉ là chạy test. Chạy test chỉ là 1 phần trong kiểm thử phần mềm

- Test activities exit before and after test execution - Các hoạt động kiểm thử tồn tại trước và sau khi chạy

- Test activities: Planning & control, choosing test conditions, designing & executing TC, checking result, evaluating exit criteria, reporting test process & system under test, finalizing/completing closure activities - Các hoạt động kiểm thử bao gồm: Lập kế hoạch và kiểm soát, chọn điều kiện test, thiết kế và chạy TC, kiểm tra kết quả, đánh giá tiêu chí kết thúc, báo cáo quá trình kiểm thử và hệ thống sau khi kiểm thử, hoàn thiện/hoàn thành các hoạt động kiểm thử

- Testing includes: Review document, source code, conducting static analysis - Kiểm thử bao gồm: Review tài liệu, source code, phân tích tĩnh

1.1. Typical Objectives of Testing

- To evaluate work product (Requirements, user stories, design, code) - Đánh giá các sản phẩm trung gian như requirements, user stories, design, code

- To verify all requirements has been fulfilled - Để xác minh tất cả các yêu cầu đã được hoàn thành

- To validate test object - Để xác thực đối tượng test

- To build confidence - Để xây dựng lòng tin

- To prevent defects - Để ngăn ngừa lỗi

- To find failures and defects - Để tìm ra các failure và defects (Mục 2.3)

- To provide information to stakeholders - Để cung cấp thông tin tới các bên liên quan

- To reduce the level of risk - Để giảm mức độ rủi do

- To comply with contractual, legal, regulatory requirements… - Để tuân thủ các yêu cầu theo hợp đồng, pháp lý, quy định...

1.2 Defferent view points in testing

- Component testing: Objective maybe to find failures and fixed early, maybe to increase code coverage - Mục tiêu có thể là tìm ra lỗi và khắc phục sớm, có thể để tăng độ bao phủ các thành phần code

- Acceptance testing: Objective maybe to confirm system works as expected and satisfies requirements, maybe to give information to stakeholders about risk of releasing - Mục tiêu có thể là xác nhận hệ thống hoạt động đúng mong đợi và đáp ứng các yêu cầu, có thể là cung cấp thông tin cho các bên liên quan về rủi ro khi phát hành hệ thống

1.3. Testing and Debugging

- Executing tests can show failures caused by defects - Thực hiện test có thể cho thấy các failure được gây ra bởi các defect

- Debugging is finds, analyzes and fixes defects - Gỡ lỗi là hoạt động tìm, phân tích và sửa các defect

- Subsequent confirmation testing check the fixes resolved the defect - Kiểm tra, xác nhận xem các bản sửa lỗi có giải quyết chính xác lỗi không

2.      WHY IS TESTING NECESSARY

- Rigorous testing to reduce the risk of problems - Kiểm thử một cách cẩn trọng để giảm rủi ro của các vấn đề

- When defects are detected, fixed, this contributes to the quality - Khi phát hiện lỗi và được sửa, điều này góp phần vào xây dựng chất lượng  hệ thống

- Testing also be required to meet contractual/legal requirements - Kiểm thử cũng là yêu cầu trong hợp đồng, pháp lý

2.1. Testing Contribultion of Success

Phase

Contributes

Requirements reviews/user strory refinement => detect defects

Reduces risk of incorrect/untestable function

Tester work closely with designer => Increase understanding, how to test

Reduces rick of design defects, enable test to be identified at early stage

Tester work closely with dev => Increase understanding, how to test

Reduces risk of defect within the code, tests

Verify, validate prior to release => Detect failures

Increases meet stakeholders need and requirement

2.2. Quality Assurance and Testing

- Quality assurance and testing are not the same, but they are related - Đảm bảo chất lượng và kiểm thử là không giống nhau, nhưng chúng có liên quan

- Quality mamagement include: Quality assurance and quality control - Quản lý chất lượng bao gồm: Đảm bảo chất lượng và kiểm soát chất lượng

- Quality assurance is focused on adherence to proper processes - Đảm bảo chẩ lượng tập trung vào việc tuân thủ các quy trình phù hợp

- Quality assurance contributes to defect prevention - Đảm báo chất lượng góp phần ngăn ngừa lỗi

- Quality control include test activities, test activities are part of software development/maintenance process - Kiểm soát chất lượng bao gồm các hoạt động kiểm thử, các hoạt động kiểm thử là 1 phần của quy trình phát triển/bảo trì

- Quality assurance support proper testing - Đảm bảo chất lượng hồ trợ kiểm thử tích hợp

2.3. Errors, Defects, Failures

A person can make an error (mistake) => defect (fault or bug) in the software code or in some other related work product => failure (false) in execute

2.4. Defects, Root causes, Effects

- Root causes of defects are the earliest actions/conditions that contribute to create defects - Nguyên nhân gốc rễ của defect là những hành động/điều kiện sớm nhất góp phần tạo ra các defect

- Identify root causes of defects can: Xác định nguyên nhân gốc rễ của defect có thể:

o Reduce similar defects in the future - Giảm các defect tương tự trong tương lai

o To improve process, that prevent future defects - Để cải tiến quy trình, ngăn chặn các defect trong tương lai

3.      7 PRINCIPLES OF TESTING

3.1. Testing show presence of defect

- Testing can show deffect are present, but can’t prove no defects - Kiểm thử có thể chỉ ra lỗi, nhưng không thể chứng minh không có lỗi

- Testing reduces probability of undiscovered defect - Kiểm thử làm giảm xác suất của các lỗi chưa được phát hiện

3.2. Exhaustive testing is impossible – Complete test

- Test every thing is not feasible - Kiểm thử tất cả mọi thứ là không khả thi

- Risk analysis and priorities should be use to focus testing efforts - Phân tích rủi ro  và sắp xếp thứ tự ưu tiên nên được sử dụng để tập trung effort kiểm thử

3.3. Early testing

- Test should start early - Kiểm thử nên được bắt đầu sớm

- Test design and review early can find defect early => cheap to find and fix - Thiết kế kiểm thử và review sớm có thể tìm ra lỗi sớm => chi phí rẻ để tìm và sửa lỗi

3.4. Defect clustering

- A small number of modules usually contain most of defects - Một số lượng nhỏ các module thường chứa hầu hết các lỗi

- Modules core often contain 80% defects - Các module lõi thường chứa 80% lỗi

3.5. Pesticide paradox

- Tests are repeated over again => can not found new defects - Kiểm thử lặp đi lặp lại 1 kịch bản có thể không tìm được các lỗi mới về sau

- TC need to be regularly reviewed and revised - Kịch bản kiểm thử cần thường xuyên rà soát và sửa đổi

- New, difference tests to find protentially defects - Kiểm thử khác biệt để tìm ra các lỗi tiềm ẩn

3.6. Testing is context dependent

- Testing is done differently in different context - Kiểm thử được thực hiện khác nhau trong các bối cảnh các nhau

3.7. Absence of error fallacy

- All requirement, fixing all deffect, system can still difficult to use, not fulfill the user needs - Tất cả yêu cầu được chỉ định và sửa tất cả các lỗi, hệ thống có thể vẫn khó sử dụng, không đáp ứng nhu cầu người dùng cần

4.      TEST PROCESS

4.1. Test Process In Context

Contextual factors influence the test process, include: Các yếu tố bối cảnh ảnh hưởng đến quá trình kiểm thử bao gồm:

- Model, project methodologies being used: Mô hình và phương pháp dự án đang được sử dụng

  o Test levels and test types being considered - Test level và loauj test type đang được  xem xét

  o Product and project risks - Rủi do sản phẩm và dự án

  o Bussiness domain - Lĩnh vực kinh doanh

- Operational contrains: Các ràng buộc hoạt động

  o Budgets and resources - Ngân sách và tài nguyên

  o Timescales - Thời gian

  o Complexity - Độ phức tạp

  o Contractual and regulatory requirements - Yêu cầu hợp đồng và quy định

- Policies and practices - Chính sách và hoạt động tổ chức

- Required internal and external standards - Yêu cầu tiêu chuẩn nội bộ và cộng đồng

4.2. Test Activity and Task

Test activities

Task

Test planning

Create/update test plan

Define entry, exit criteria

Test mornitoring

Compare actual with plan

Create test report

Test control

Mesurement: progress, quality…

Test analysis

Make decisions

Evaluate exit criteria

Test design

Review and evaluate test basic

Make QA

Identify test condition

Test implementation

Design and prioritizing TC

Identify test data, enviroment

Test execution

Run tests

Report defects

Log test result

Retest/regression test

Analyzing anomalies

Test completion

Check defect reports are closed

Create change request for unresolved defects

Create test summary report

Collect and hand over test ware

Improve test process

Analyzing lessons learned

Nguồn: Tài liệu Quality Resources & Solution by Ta Thi Thinh