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

Software Testing & Quality - Wk2

Uploaded by

moayyadsmra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Software Testing & Quality - Wk2

Uploaded by

moayyadsmra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Click to edit Master title style

Software Testing & Quality


Basic Concepts

1
Click to edit Master title style

Basic Concepts

2 2
Click to
Basic Concepts
edit Master title style

• Psychological factor: “Attitude”


• Economical factor: Complexity & Feasibility

3 3
Click to
Basic Concepts
edit Master title style

• Psychological factor: “Attitude”


• Breakage testing: “Testing is the process of executing a
program with the intent of finding errors.”
• The problems of seeing testing as verifying whether a
program behaves correctly: (a) a “successful test” should
find fixable errors; (b) to prove a program error free is
almost an impossible task which will discourage people
from doing it; (c) a program can produce unintended
results.
• Economical factor: Complexity & Feasibility

4 4
Click to edit
Example: Classifying
Master title
Triangles
style

Input Output Test Result

(3,4,5) Scalene CORRECT

(1,1,1), (3842,3842,3842) Equilateral CORRECT

(1,2,3) Scalene INCORRECT

INCORRECT
(0,0,0) Equilateral

INCORRECT
(-3,4,5) Any

INCORRECT
(2,A,2) Any

5 5
Click to
Basic Concepts
edit Master title style

• Psychological factor: “Attitude”


• Economical factor: Complexity & Feasibility
• Finding all errors is impractical in general
• Black-box and white-box testing

6 6
Click to
Basic Concepts
edit Master title style

• Psychological factor: “Attitude”


• Economical factor: Complexity & Feasibility
• Finding all errors is impractical in general
• Black-box and white-box testing

7 7
Click to
Basic Concepts
edit Master title style

Black-Box Testing White-Box Testing

• Also-called “data-driven” or “input/output- • Also-called “logic-driven”.


driven”.
• Test data are derived from an examination of
• Test data are derived solely from the the program’s logic.
specifications without knowing program
• In order to find all errors in the program, one
internal structure.
has to perform exhaustive path testing which
• In order to find all errors in the program, one can be intractable and still incomplete.
has to perform exhaustive input testing which
is impossible.

8 8
Click to
Basic Concepts
edit Master title style

• while loop with nested ifs.


• If iterations = 20,
20 �
number of paths = �=1
5 ≈ 1014
• Three potential problems: (a)
misunderstanding specification; (b)
missing paths; (c) data-sensitivity
errors.

9 9
ClickPrinciples
Ten to edit Master title style

1. A necessary part of a test case is a definition of the


expected output or result.
2. A programmer should avoid attempting to test his or
her own program.
3. A programming organization should not test its own
programs.
4. Any testing process should include a thorough
inspection of the results of each test.
5. Test cases must be written for input conditions that
are invalid and unexpected, as well as for those that
are valid and expected.

1010
ClickPrinciples
Ten to edit Master title style

6. Examining a program to see if it does not do what it is


supposed to do is only half the battle; the other half is
seeing whether the program does what it is not
supposed to do.
7. Avoid throwaway test cases unless the program is
truly a throwaway program. (regression testing)
8. Do not plan a testing effort under the tacit assumption
that no errors will be found.
9. The probability of the existence of more errors in a
section of a program is proportional to the number of
errors already found in that section.
10. Testing is an extremely creative and intellectually
challenging task.
1111
Click1to
Lab (Triangle)
edit Master title style

• Lab 1 (Triangle)
• Write your triangle classification program
• Design a test suite according to the tips in our textbook
• Your codes should be commented concisely, and you should
show how your test suite accomplishes tasks suggested in those
14 tips
• Due: 9/24 Sun 24:00

1212
Click to edit Master title style

Thank You!

13

You might also like