Professional Documents
Culture Documents
Confidential
2
Nataliia Shevchuk
(Senior Test Engineer)
Confidential
3
Table of Contents:
1. Fundamentals of testing
2. Testing throughout the software life cycle
3. Static techniques
4. Test design techniques
5. Test management
6. Tool support for testing
Confidential
4
Fundamentals of Testing
Confidential
5
1. Fundamentals of Testing
1.1 Why is Testing necessary? (K2)
Confidential
6
➢ Software defects or bugs can cause problems for people, the environment
or a company.
➢ For tester it is important to draw distinctions between defects, their root
causes and their effects.
➢ Testing helps to find these defects and trace effects therefore promoting
quality, and becoming the part of quality assurance process.
Confidential
7
Terms to use:
• Requirement is a condition or capability needed by a user to solve a problem or achieve an objective.
• Quality is the degree to which a component, system or process meets specified requirements and/or
user/customer needs and expectations.
• Test basis is all documents from which the requirements of a component or a system can be inferred.
• Deliverable is any (work) product that must be delivered to someone other than the (work) product
creator.
• Testware is artifacts produced during the test process, produced by both verification and validation
testing methods.
Confidential
8
- COTS
Role of testing – to reduce the risk of problems occurring during software creation and
contribute to the quality of the software system, if the defects found are corrected before
the system is released to operational use.
Confidential
9
Confidential
10
Terms to use:
Confidential
11
• Intentional damage
Confidential
12
➢ Testing helps to measure risks and to reduce failures. Also may be required to meet
contractual or legal requirements, or industry-specific standards.
Confidential
13
➢ Testing ensures that key functional and non-functional requirements are met.
➢ Testing measures the quality of software in terms of the number of defects found,
the tests run, and the system covered by the test.
➢ Testing reduces the overall level of risk in a system.
➢ Testing gives confidence in the quality of the software, if no defects are found.
➢ Testing helps to improve the quality when defects found and fixed.
➢ Testing is one of the quality assurance activities.
When lessons are learned and root causes are analyzed processes can be
enhanced and as a consequence quality is improved.
Confidential
14
Reliability: Maintainability:
1.Maturity 1.Analyzability
2.Fault Tolerance 2.Changeability
3.Recoverability 3.Stability
4.Reliability 4.Testability
Compliance 5.Maintainability Compliance
Portability:
Efficiency:
1.Adaptability
1.Time Behavior
2.Installability
2.Resource Utilization
3.Co-Existence
3.Efficiency
4.Replaceability
Compliance
5.Portability Compliance
Confidential
15
Confidential
16
Confidential
17
Confidential
18
Confidential
19
Development Testing:
Confidential
20
Confidential
21
Debugging vs Testing
Confidential
22
Confidential
23
Confidential
24
Confidential
25
Confidential
26
Confidential
27
Confidential
28
Confidential
29
Confidential
30
Confidential
31
Confidential
32
Confidential
33
- Analyze test basis and test objectives defined on a planning stage to be testable and
unambiguous. Update them if needed.
Major tasks:
➢ Create and prioritize test conditions and expected results.
➢ Create prioritized high level test cases.
➢ Verify bi-directional traceability between test basis and test cases.
➢ Prepare needed test data and environment.
Confidential
34
Confidential
35
Major tasks:
Confidential
36
Confidential
37
Major tasks:
Confidential
38
Confidential
39
Closure activities
Major tasks:
Confidential
40
Confidential
41
Psychology of Testing
Make sure that team does not see testing as a destructive activity, but as a very
constructive in a management of the product risk.
Communication skill:
➢ Avoid criticism.
➢ Use neutral, fact-focused way to communicate without criticizing.
➢ Try to understand how the other person feels and why they react as they do.
➢ Confirm that the other person has understood what you have said and vice versa.
Confidential
42
Independence of Testing
Independence of Testing is a
separation of responsibilities, that
encourages the accomplishments of
objective testing.
Confidential
43
Colleagues - SEs should be fair to and supportive of their colleagues. Management – SE managers and leaders should subscribe to an
promote an ethical approach to the management of soft ware
Self - SEs should participate in lifelong learning regarding the practice of development and maintenance.
their profession and should promote an ethical approach to the practice of
the profession. Profession – SEs should advance the integrity and reputation of
the profession consistent with the public interest.
Confidential
44
Confidential
45
Confidential
46
Confidential
47
4 levels:
Confidential
48
Examples:
1. Prototyping
2. Rapid Application Development
(RAD)
3. Rational Unified Process (RUP)
4. Agile development model
Confidential
49
Confidential
50
Confidential
51
Terms: Unit, Module, Program testing, Driver, Stub ➢ Lowest level of testing.
➢ Also known as unit, module, program testing.
➢ Unit testing is intended to ensure that the code
written for the unit meets its specification, prior
to its integration with other units.
➢ Usually done by programmer.
Notes:
Confidential
52
Notes:
Confidential
53
Incremental integration
Confidential
54
Confidential
55
Confidential
57
Confidential
58
Notes:
• Functional tests are based on functions and features and may be performed at all test levels.
• Specification-based (black-box testing) techniques are used because it considers the externals
behavior of the software.
Confidential
59
Notes:
• Non-functional testing may be performed at all test levels.
• Quality model defined in ‘Software Engineering – Software Product Quality’ (ISO-9126).
Confidential
60
• Best used after specification-based techniques. of the actual code that has been written has
Confidential
61
Notes:
• May be performed at all test levels,
and includes functional, non-
functional and structural testing.
Confidential
62
Confidential
63
Static techniques
Confidential
65
3. Static techniques
3.1 Static techniques and the Test Process (K2)
3.2 Review process (K2)
3.3 Static analysis by tools (K2)
Terms: Manager, Moderator (review leader, mediator), Author, Reviewers (checkers, inspectors),
Scribe (recorder)
Confidential
66
Confidential
67
Benefits of Reviews
Confidential
68
Confidential
69
Confidential
70
Manager - decides on the execution of reviews, allocates time in project schedules and determines if the
review objectives have been met.
Moderator - leads the review, including planning the review, running the meeting, and following-up after
the meeting. Moderator can mediate between the various points of view and is often the person upon
whom the success of the review rests.
Author - the writer or person with chief responsibility for the document(s) to be reviewed.
Reviewers - individuals with a specific technical or business background who, after the necessary
preparation, identify and describe findings in the product under review.
Scribe – documents all the issues, problems and open points that were identified during the meeting.
Confidential
71
Confidential
72
Confidential
73
Confidential
74
Confidential
75
Code metrics
When performing static code analysis, information is calculated about structural attributes of the code such as:
• comment frequency
• depth of nesting
• cyclomatic number
• number of lines of code
Cyclomatic complexity
Cyclomatic complexity is the maximum number of linear, independent paths through a program.
The easiest way is to sum the number of binary decision statements (e.g. if, while, for, etc.) and add 1 to it.
More formal cyclomatic complexity may be computed as: L - N + 2
where
L = the number of edges/links in a graph,
N = the number of nodes in a graph.
Confidential
76
IF A = 354
THEN IF B > C
THEN A = B
ELSEA= C
ENDIF
ENDIF
Print A
The control flow shows seven nodes (shapes) and eight edges (lines), thus using the formal formula the
cyclomatic complexity is 8-7 + 2 = 3. In this case there is no graph called or subroutine.
Alternatively one may calculate the cyclomatic complexity using the decision points rule.
Since there are two decision points, the cyclomatic complexity is 2 + 1 = 3.
Confidential
77
Confidential
78
Terms: Test case specification, test design, test execution schedule, test procedure specification,
test script, traceability.
Confidential
79
Test script: commonly used to refer to a test procedure specification, especially an automated.
Confidential
80
Traceability
Traceability: the ability to identify related items in documentation and software, such as
requirements with associated tests. Can be horizontal and vertical.
Confidential
81
Confidential
82
Confidential
83
Confidential
84
Confidential
85
Confidential
86
Confidential
87
Question
Confidential
88
Answer
Confidential
89
Confidential
90
Question
Confidential
91
Answer
Confidential
92
Example:
✓ A black-box test design technique
in which test cases are designed to
execute the combinations of inputs
and/or stimuli (causes) shown in a
decision table.
Confidential
93
✓ A black-box test design technique in which • Tests can be designed to cover a typical
test cases are designed to execute valid and sequence of states, to cover every state, to
invalid state transitions. exercise specific sequences of transitions or to
test invalid transitions.
✓ The state transition technique is concerned
with systems that may exhibit a different • Creating a state-transition table often show
response depending on current conditions or combinations that were not identified in the
previous history (its state). requirements. It is highly beneficial to discover
these defects before coding begins.
✓ It allows the tester to view the software in
terms of its states, transitions between
states, the inputs or events that trigger state
changes (transitions) and the actions which
may result from those transitions.
Confidential
94
Example:
Confidential
95
Confidential
96
Example:
Confidential
97
Confidential
99
Confidential
100
Confidential
101
Memorize these:
Confidential
102
Confidential
103
A commonly used experience-based technique is error guessing or fault attack: enumerate a list of
possible defects and to design tests that attack these defects.
Fault attack: directed and focused attempt to evaluate the quality, especially reliability, of a test
object by attempting to force specific failures to occur.
Confidential
104
Experience-based Techniques
Confidential
105
Confidential
106
Test management
Confidential
107
5. Test management
5.1 Test Organization(K2)
5.2 Test Planning and Estimation (K3)
5.3 Test Progress Monitoring and Control (K2)
5.4 Configuration Management (K2)
5.5 Risk and Testing (K2)
5.6 Incident Management (K3)
Confidential
108
Confidential
109
Confidential
110
Confidential
111
For large, complex or safety critical projects, it is usually best to have multiple levels of testing, with
some or all of the levels done by independent testers.
Confidential
112
Confidential
113
Required skills:
• knowledge in business-domain
• knowledge of different testing types
• opportunities and limitations of the different
technologies
Confidential
114
➢ Planning is influenced by the test policy of the organization, the scope of testing, objectives, risks,
constraints, criticality, and the availability of resources.
➢ Test planning is a continuous activity and is performed in all life cycle processes and activities.
Feedback from test activities is used to recognize changing risks so that planning can be adjusted.
Confidential
115
What to test, what roles will perform the test activities, what resources needed and who is going to use
them.
How the test activities should be done, how the test results will be evaluated.
Metrics for monitoring and controlling test preparation end execution, defect resolution and risk issues.
Scheduling test analysis and design activities, test implementation, execution and evaluation.
Integrating and coordinating the testing activities into the software life cycle activities.
Confidential
116
Test plan
Confidential
117
Confidential
118
Confidential
119
Confidential
120
Confidential
121
Confidential
122
Confidential
123
Confidential
124
Confidential
125
Confidential
126
Confidential
127
Project risks are the risks that surround the Potential failure areas in the software or
project’s capability to deliver its objectives. system are known as product risks.
Confidential
128
Risks Analysis
Confidential
129
Risk-based approach
Confidential
130
Confidential
131
Confidential
132
Confidential
133
Confidential
134
Confidential
135
Confidential
136
Also Tool Support for Specific Testing Needs can be used – Data quality assessment
Confidential
137
❖ Repetitive work is reduced (e.g. running regression ❖ Unrealistic expectations for the tool (including functionality
tests, re-entering the same test data, and checking and ease of use).
against coding standards).
❖ Underestimating the time, cost and effort for the initial
❖ Greater consistency and repeatability (e.g. tests introduction of a tool (including training and external
executed by a tool, and tests derived from expertise).
requirements).
❖ Underestimating the time and effort needed to achieve
❖ Objective assessment (e.g. static measures, coverage significant and continuing benefits from the tool (including
and system behavior). the need for changes in the testing process and continuous
improvement of the way the tool is used).
❖ Ease of access to information about tests or testing
(e.g. statistics and graphs about test progress, incident ❖ Underestimating the effort required to maintain the test
rates and performance). assets generated by the tool.
Confidential
139
➢Adapting and improving processes to fit with the use of the tool
Confidential
140
Standards
Confidential
141
• Q&A
Thanks!
Confidential