0% found this document useful (0 votes)
4 views

2- Introduction to Software Testing [1]

The document outlines the principles and processes of software testing and validation, emphasizing the importance of demonstrating that software meets its requirements and identifying defects. It covers various testing types, including development testing, release testing, and user testing, as well as the distinction between verification and validation. Additionally, it discusses the complementary roles of inspections and testing in ensuring software quality.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

2- Introduction to Software Testing [1]

The document outlines the principles and processes of software testing and validation, emphasizing the importance of demonstrating that software meets its requirements and identifying defects. It covers various testing types, including development testing, release testing, and user testing, as well as the distinction between verification and validation. Additionally, it discusses the complementary roles of inspections and testing in ensuring software quality.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

CCSW-323

Software Testing & Validation

Dr. Abubakar Elsafi - SW Eng. Dept.


E-mail: [email protected]
Lecture #2
Topics covered

 Introduction
 Development testing
 Test-driven development
 Release testing
 User testing

3
Introduction

4
Program testing

 Testing is intended to show that a program does what it is


intended to do and to discover program defects before it is put
into use.

5
Program testing (cont.)

 When you test software, you execute a program using


artificial data.
‫ عند اختبار البرنامج نستخدم بيانات لنتأكد من جوده التطبيق‬
▪ You check the results of the test run for errors, anomalies or information
about the program’s non-functional attributes.
▪ Can reveal the presence of errors NOT their absence.
▪ Testing is part of a more general verification and validation process,
which also includes static validation techniques.
: ‫عند عمل االختبار يجب أن‬
‫▪ نتأكد من النتايج المطبق‬
‫▪ نكتشف عدم وجود أخطاء‬
‫▪ االختبار جزء من التأكد و التحقق‬

6
Program testing goals

 To demonstrate to the developer and the customer that the software


meets its requirements
. ‫ التيستنق يثبت للعميل و المطور أن النظام يتطابق مع المواصفات‬
▪ For custom software, this means that there should be at least one test for
every requirement in the requirements document.
▪ For generic software products, it means that there should be tests for all
of the system features, plus combinations of these features, that will be
incorporated in the product release.
 To discover situations in which the behavior of the software is
incorrect, undesirable or does not conform to its specification.
‫ يكتشف حاالت النظام يكون فيها خطأ او غير مرغوب او مايتوافق مع المتطلبات‬, ‫ التيستنق‬
▪ Defect testing is concerned with rooting out undesirable system behavior:
• System crashes, unwanted interactions with other systems, incorrect
computations and data corruption.
7
Validation and defect testing

 The first goal leads to validation testing


▪ You expect the system to perform correctly using a given set of test
cases that reflect the system’s expected use.
‫ مثل متغيرات ونشوف رده فعل النظام عليها‬, ‫▪ نعطي النظام مجموعه من الكيسس‬
 The second goal leads to defect testing
▪ The test cases are designed to expose defects. The test cases in defect
testing can be deliberately obscure and need not reflect how the system
is normally used.
‫▪ الكيسس هذي مصممه لكشف األخطاء الغير متوقعه او الغامضه بالنظام و مو الزم تعكس فعل‬
‫الفنكشن االساسي‬
‫ كود خبيث ألجلب بيانات الداتا بيس‬, ‫ ان حط في مكان البحث‬, ‫▪ يعني مثل‬
‫▪ هنا استخدمنا البحث بشكل غير عن فعله‬

‫ الهدف األول تجربه كيسس تعكس رده فعل النظام‬-1 ▪


‫ الهدف الثاني اكتشاف االخطاء‬-2 ▪
Testing process goals

 Validation testing
▪ To demonstrate to the developer and the system customer that
the software meets its requirements
▪ A successful test shows that the system operates as intended.
‫▪ التأكد يثبت للعميل و المطور ان النظام يقابل مواصفاته المتفق عليها‬
‫ يعرض عمليات النظام المتوقعه‬, ‫▪ التأكد الناجح‬
 Defect testing
▪ To discover faults or defects in the software where its behaviour
is incorrect or not in conformance with its specification
▪ A successful test is a test that makes the system perform
incorrectly and so exposes a defect in the system.
‫▪ االكتشاف يثبت اكتشاف أخطاء بالنظام ال تتوافق مع المواصفات‬
‫ يجعل النظام يعمل بشكل خاطئ ألكتشاف االخطاء‬, ‫▪ االكتشاف الناجح‬ 9
An input-output model of program testing

10
Verification vs validation

 Verification: "Are we building the product right”.


▪ The software should conform to its specification.
 Validation: "Are we building the right product”.
▪ The software should do what the user really requires.

11
V & V confidence

 Aim of V & V is to establish confidence that the system is


‘fit for purpose’.
 Depends on system’s purpose, user expectations and
marketing environment
▪ Software purpose
• The level of confidence depends on how critical the software is to
an organisation.
▪ User expectations
• Users may have low expectations of certain kinds of software.
▪ Marketing environment
• Getting a product to market early may be more important than
finding defects in the program.
‫ ان المنظمة تعتمد على نظامها‬, ‫هدف النظام‬
‫ ان التطبيق يتوافق مع توقعاتهم‬, ‫هدف المستخدم‬
‫ وهذا اهم من اننا نكتشف االخطاء‬, ‫ ان التطبيق ينعرض بالسوق بدري‬, ‫هدف التسويق‬ 12
Inspections and testing

 Software inspections Concerned with analysis of


the static system representation to discover problems
(static verification)
‫ تحليل او عرض النظام على بيانات ثابته‬: ‫الفحص‬
▪ May be supplement by tool-based document and code analysis.
 Software testing Concerned with exercising and
observing product behaviour (dynamic verification)
▪ The system is executed with test data and its operational
behaviour is observed.
‫ تصرف النظام على بيانات متغيره‬: ‫االختبار‬

13
Inspections and testing

14
Software inspections

 People examine the source representation to discover


anomalies and defects.
▪ Not require execution of a system, so may be used before
implementation.
▪ May be applied to any representation of the system
(requirements, design, configuration data, test data, etc.).
▪ An effective technique for discovering program errors.

‫ انك تكتشف مصدر الكود ألكتشاف األخطاء‬, ‫الفحص‬


‫ مايحتاج عمليه تنفيذ للنظام‬-
) ‫ واالختبار‬, ‫ التأكد‬, ‫ التمصيم‬, ‫ الفحص ينطبق على عمليات كثير ( المتطلبات‬-
‫ تقنيه فعاله ألكتشاف األخطاء بالنظام‬-

15
Advantages of inspections

 During testing, errors can mask (hide) other errors.


▪ Because inspection is a static process, you don’t have to be concerned with
interactions between errors.
‫▪ االختبار الديناميكي قد من الممكن أن خطأ ما يخفي خطأ ثاني‬
‫ انت تشوف الكود قدامك في حالته الثابته‬, ‫▪ لذلك الفحص‬
 Incomplete versions of a system can be inspected without additional costs.
▪ If a program is incomplete, then you need to develop specialized test harnesses to
test the parts that are available.
‫عمل فحص لنسخه غير مكتمله للنظام بدون تكلفه‬
 Inspection can also consider broader quality attributes of a program, such
as compliance with standards, portability and maintainability.
: ‫ ايجابياته‬
‫ عمل فحص ثابت للكود بدون ماتختفي األخطاء في اثناء التشغيل‬-1 
‫ عمل فحص قبل اكتمال نسخه النظام‬-2 
16
‫ عمل فحص يساعد في جوده المتغيرات‬-3 
Inspections and testing

 Inspections and testing are complementary and not opposing


verification techniques.
‫ الفحص و االختبار مكملين لبعض‬
▪ Both should be used during the V & V process.
▪ Inspections can check conformance with a specification but not
conformance with the customer’s real requirements.
‫ ولكن ليس بالضروره ان الفحص يتطابق مع مواصفات العميل‬, ‫▪ الفحص يتأكد من صحة المواصفات‬
▪ Inspections cannot check non-functional characteristics such as
performance, usability, etc.
‫▪ الفحص مايتطبق على النن فنكشن‬

17
Software testing

 Software testing stages


▪ Development testing: The system is tested during development to
discover bugs and defects.
‫ اكتشاف األخطاء بالنظام خالل عمليه تطويره‬, ‫▪ االختبار التطويري‬
▪ Release testing: A separate testing team test a complete version of the
system before it is released to users.
‫ التيم يعملون تجارب على النظام قبل االطالق‬, ‫▪ االختبار االطالقي‬
▪ User testing: Users or potential users of a system test the system in their
own environment.
‫ المستخدمين يجربون النظام على الواقع‬, ‫▪ اختبار المستخدمين‬
 A model of the software testing process:

18

You might also like