2. Learning Objectives
What is Testing
Testing Methods
Black box testing
Test Design Technique
Testing Types
Advantages
Disadvantages
3. Software Testing
Definition:
Software Testing is the process of exercising S/W
with the intent of ensuring that the S/W meets its
requirements and user expectations and does not
fail in an unacceptable manner.
Methods:
1. White box Testing
2. Black box Testing
3. Grey box Testing
6. Black Box Testing
It is Basic technique of Software testing.
Testing without knowledge of internal working.
Testing of a system considering inputs,outputs and general
functions.
7. Test Design Technique
Black box test design techniques include:
1. Equivalence partitioning
2. Boundary value analysis
3. State transition tables
4. Decision table testing
5. Cause Effect Diagram
6. Error Guessing
8. Equivalence Partitioning -:
Equivalence partitioning is a class of object having
equivalent property. It is a software testing related
technique with the goal:
To reduce the number of test cases to a necessary
minimum.
Types of Equivalence Classes:
1. Continuous
2. Discrete
3. Boolean
9. Boundary Value Analysis:
Data Selection Technique.
Test maximum, minimum, error value, abnormal
value.
For example text field which is accept only 1 to 10
number then we can test this text field with the data
0, 1, 10, 11.
10. State Transition Testing :
Designed to execute valid and invalid state
transitions.
Decision Table testing :
A decision table lists causes and effects in a matrix.
Each column represents a unique combination.
Purpose is to structure logic.
Structure -:
Decision tables are typically divided into four quadrants
Causes Combination
Effects Effect Entries
11. Cause Effect Diagram:
A technique for identifying possible causes affecting a
problem.
They are sometimes called Fishbone Diagrams (because
of they have the appearance of the skeleton of a fish)
or Ishikawa diagrams (after their developer Dr. Dr.
Kaoru Ishikawa)
12. Error Guessing :
Test cases can be developed based upon the
intuition and experience of the Test Engineer.
Purpose is to focus the testing activity on areas
that have not been handled by the other more
formal techniques.
For example if an input is the date, a test engineer
may try February 29, 2000 or 9/9/0099.
13. Advantages
More effective on larger units of code than white box
testing.
Tester needs no knowledge of implementation, including
specific programming languages.
Tester and programmer are independent of each other.
Tests are done from a user's point of view.
Will help to expose any ambiguities or inconsistencies in
the specifications.
Test cases can be designed as soon as the specifications
are complete.
14. Disadvantages
Only a small number of possible inputs can actually be
tested, to test every possible input stream would take
early forever.
Without clear and concise specifications, test cases are
hard to design.
There may be unnecessary repetition of test inputs if the
tester is not informed of test cases the programmer has
already tried.
May leave many program paths untested.
17. Agenda
Test Plan
Test Design
Test Script
Introduction of Scripted Testing
“Generic” Script
“Pattern” Script
Advantages Of Scripted Testing
Disadvantages Of Scripted Testing
18. What's a ‘Test Plan'?
A “Test plan” is a systematic approach to testing a system
such as a machine or software.
Templates used in a test plan:-
- Title
- References(requirements, design documents, other
test plans, etc.)
- Project risk analysis
- Scope and limitations of testing
- Approach(Strategy)
- Entry/Exit criteria
- Test deliverables, etc.
19. What's a ‘Test Design'?
“Test design” involves creation of high-quality tests to help
you discover and interpret the information that you want to
discover.
The most important consideration in software testing is the
design or invention of effective test cases.
The reason for the importance of test-case design stems
from the fact that “complete” testing is impossible.
Given constraints on time, cost etc., the key issue of
testing becomes What subset of all possible test cases has
the highest probability of detecting the most errors?
20. What is Test Script?
A “Test script” is a short program written in a programming
language used to test part of the functionality of a software
system.
A written set of steps that should be performed
automatically can also be called a test script.
Test scripts may be created or automatically generated
using test automation tools, or programming language
(such as C++, C#, Tcl, Expect, Java, Perl, Python, or more
recently, Ruby)
21. What is Scripted Testing?
Scripted, or Planned testing has a test planning and design
phase, followed by test execution.
In scripted testing, tests are first designed and recorded. Then
they may be executed at some later time or by a different
tester.
Scripted testing is about
controlling test execution.
Test
Scripts
22. Scripted Test Example
Small (but realistic) example:
How to script and test this login?
(Functional tests only – not security!)
23. Sample Test scripts (4 of “many”)
Sample test script 1:
– Launch the Login screen
– Enter User-id: “xyz”
– Enter Password: “pqr”
– Press <Enter>
– Expected result: login ok
Sample test script 2:
– Launch the Login screen
– Enter User-id: “xyz”
– Enter Password: “pqr”
– Click the “Login” button
– Expected result: login ok
Sample test script 3:
– Launch the Login screen
– Enter User-id: “”
– Enter Password: “pqr”
– Press <Enter>
– Expected: login rejected
Sample test script 4:
– Launch the Login screen
– Enter User-id: “”
– Enter Password: “pqr”
– Click the “Login” button
– Expected: login rejected
24. Sample Generic Scripts (2 of “many”)
Sample generic test script 1:
– Launch the Login screen
– Enter valid User-id
– Enter valid Password
– Press <Enter> or click
button
– Expected result: login ok
Sample generic test script 2:
– Launch the Login screen
– Enter invalid User-id
– Enter valid Password
– Press <Enter> or click
button
– Expected result:
login rejected
Generic scripts: Specify general test activities and apply
them to different parts of a test coverage outline.
25. Sample test “Pattern” script (checklist)
Input fields:
– Valid data
– Invalid data
– Length > max
– Length = max +1
– Length = max
– Length = max –1
– Combinations of
above
– …
Actions:
– Keyboard
– Buttons
– …
Operations:
– Add, Modify, Inquiry,
Delete
• What to test for
each…
– …
26. Advantages of Scripted Testing
Scripted testing provides a division of labor.
Scripted test are created from requirements design, and
code.
The test are documented.
The test are defined in detail, they are more easily
automated.
Scripted test, written to the appropriate level of detail.
27. Disadvantages Of Scripted Testing
Scripted testing is very dependent on the quality of the
system’s requirement.
Scripted testing is, by definition, inflexible.
Scripted testing is often used to “de-skill” the job of
testing.
32. Explore yourself !
Do you know your weak points ?
Do you know my weak points ?
No body is perfect ?
33. To qualify as exploration a journey had to be credible
Had to involve hardship and risk
Had to include the novelty of discovery
John Keay, The Permanent Book of Exploration
34. What actually Exploratory Testing is ?
“Exploratory testing is
simultaneous learning,
test design, and
test execution ”
“Exploratory testing is any testing to the extent
that the tester actively controls the design of
the tests as those tests are performed and
uses information gained while testing to
design new and better tests”
35. Qualities of Exploratory Tester
Questioning Strategies
Sense of risk
Heuristics
Knowledge
Training Explorers
“mental packrats who horde memories of every bug they’ve seen”
36. Characteristics of Exploratory Testing
Interactive
Concurrence of cognition and execution
Creativity
Drive towards fast results
De-emphasize archived testing materials
37. Exploratory V/S Scripted
In scripted testing, tests are first
designed and recorded. Then
they may be executed at some
later time or by a different tester.
In exploratory testing, tests are
designed and executed at the
same time, and they are not
necessarily recorded, but may
be.
Test
Scripts
Test Ideas
Product
38. Exploratory V/S Scripted
Scripted testing is like
making a prepared speech.
It is guided by pre-conceived
ideas.
Exploratory testing is like
having a conversation. It is
self-guided.
Test
Scripts
Test Ideas
Product
39. Exploratory V/S Scripted
Scripted testing is about
controlling test execution.
Exploratory testing is about
improving test design.
Test
Scripts
Test Ideas
Product
40. When to use exploratory testing ?
A common goal of exploration is to probe for weak
areas of the program
When there is little or no specifications and / or
requirements
When you have little or no domain knowledge
When you don’t have time to specify, script and test
continued……
41. Exploratory Testing is extremely useful when faced with
software that is
– Untested
– Unknown or
– Unstable
The tester must create a map of the application as he
goes on testing it
42. Every tester does Exploratory Testing
• When a tester finds a bug
• When the programmer reports that the bug
has been fixed
• When the tester first gets the product, with or
without a specification
43. Advantages of Exploratory testing !
It can start very early in the development life cycle
It is not dependant on anything other than an application, e.g.
no requirements or documentation or business use cases are
necessary
Since it is free form in nature, it can be extremely cost
effective
if you see something suspicious, you can explore it
immediately
It encourages creativity
It increases the chance of finding new and otherwise
undetectable bugs
It allows more time for testing interesting and complex cases.
Its greater efficiency enables the tester to find more bugs in a
shorter time period and make a faster assessment
It demonstrates an application’s ease of use
It is adaptable and flexible
44. Intermittent Bug
“Repeating the exact sequence of actions that
caused the problem in the first place doesn't
cause the failure to reoccur”
45. When to do ET to explore Intermittent Bugs
Product
Environment
Patterns
People
Tools & Techniques