Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

Software Testing

Aims And Objectives


• To understand the different between White
and Black Box Testing
• To understand what is required in a white box
test plan
• Create a list of tests that you can use on your
program
What is Software Testing
• “Testing is the process of executing a program
with the intent of finding errors.”
• Glen Myers
Objectives of Software Testing
• The main objective is to find errors.
• Testing ensures that software meets its
requirements.
• Testing helps in assessing the quality and
reliability of software.
Testing vs Debugging
• Debugging is not testing.
• Debugging always occurs as a consequence of
testing.
• Debugging attempts to find the cause of an
error and correct it.
Testing Types
• Black-box testing
• White-box testing
Black- Box Testing
• Tests the functionality of the software from a
users point of view.
• Tests performed are created from the desired
specification of the software.
• Also known as functional testing.
White-Box Testing
• Tests the internal structures of the code.
• Tests are created by looking at the code itself.
(i.e calculations and inputs)
• Known as structural tests.
Black- Box vs White- Box Testing
• Black box testing can detect errors such as
• Incorrect functions or missing functions.
– It cannot detect design or coding errors along as the
application runs.

• White box testing can detect errors such as


• Logic or design errors.
– It cannot detect whether the program is performing
its expected functions or missing functionality.
Testing is part of the systems life cycle.

·Analysis
·Design
·Draw up test plans
·Implementation
·Testing
·Evaluation.

How are test cases selected?

There are always too many inputs to try every one of them.

The best strategy is to test using a subset of testing inputs.


Therefore, when testing we should:
·Keep test to a minimum in order to save time and effort.
·Carry out enough tests to cover all eventualities
10
One way to keep tests to a minimum is equivalence
partitioning. For example, the following property band of
an house means the owner pays the following council tax
rate.

PROPERTY VALUE TAX RATE

LESS THAN £ 40,000 £ 216

LESS THAN £ 52,000 AND GREATER OR


EQUAL TO £ 40,000 £ 256

LESS THAN £ 68,000 AND GREATER OR


EQUAL TO £ 52,000 £ 288

11
RANGE TESTING

Equivilance partitioning

You would carry out a test for each band. For example:

INPUT VALUE EXPECTED RESULT

£ 38,000 £ 216

£ 43,000 £ 256

£ 64,000 £ 288

12
RANGE TESTING
You would still be expected to carry out a boundary analysis test or
testing ranges. For example for the test less than 40,000 you would test
the following inputs.

NAME & Description of Test Tester: A. Student


Output 216 if the number inputted is less than 40,000 Date: 15/11/99

Test PURPOSE INPUT EXPECTED ACTUAL ACTION TAKEN


Case RESULT RESULT

1 Test minimum range 1 216 216

2 Test Maximum range 39,999 216 216

3 Test mid range 20,000 216 216

13
POSITIVE TESTING
Positive testing is testing the software in the exact way it
was designed. To create these test cases, you will want
to follow the requirements document to ensure that all
features of the software are tested.

But there is a problem

I need to check that it acts correctly for a negative input

14
NEGATIVE TESTING
Negative testing is used to try to break the software in
ways that a typical user might, by entering erroneous data

Date formats – Try entering invalid dates (like 02/30/2006).


Try entering alphabetic dates (like Jan 1,2006).

Numeric formats – If you know a field must allow only


numeric entry, try entering character data (abcdefg). Try
entering commas, decimals, hyphens, dollar signs.

Field Sizes – If you know the size of a field (let’s say up to 20


characters), try entering a large amount of data (like 100 X’s),
it should handle that gracefully. Many times this will cause a
crash.
15
COMPLETE TESTING
What to test
Positives – Data and inputs that (should) work

Negatives – Data and inputs that shouldn’t work

Positive Extremes – If you used a range, test on the edge of


the range. i.e. if you ask for a number 1 – 10, then test 1 and
10

Negative Extremes – If you used a range, test just outside of


the range. i.e. if you ask for a number 1 – 10, then test 0 and
11

Types – When you ask for a number can you enter a letter?
16
COMPLETE TESTING
One last thing
Use your flowchart – Programmers don’t just write them to
look pretty.

You can use them to identify paths through your program and
ensure that you have hit every block of code

17

You might also like