Fundamentals of testing Flashcards

1 Describe, with examples, the way in which a defect in software can cause harm to a person, to the environment or to a company. (K2) 2 Distinguish between the root cause of a defect and its effects. (K2) 3 Give reasons why testing is necessary by giving examples. (K2) 4 Describe why testing is part of quality assurance and give examples of how testing contributes to higher quality. (K2) 5 Recall the terms 'mistake', 'defect', 'fault', 'failure' and the correspon ding terms 'e

1
Q

What is testing? (simple)

A

when we are testing something we are checking whether it is OK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why testing is needed?

A

Testing is necessary because we all make mis-
takes. Some of those mistakes are unimportant, but some of them are expensive
or dangerous.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is “testing is context dependent” principle?

A

Testing is done differently in different contexts. For example, safety-critical software is
tested differently from an e-commerce site.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is risk?

A

A risk is something that has not hap-pened yet and it may never happen; it is a potential problem. When we discuss risks, we need to consider how likely it is that
the problem would occur and the impact if it happens.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is likelihood and impact of risk

A

For example, whenever
we cross the road, there is some risk that we’ll be injured by a car. The likeli-
hood depends on factors such as how much traffic is on the road, whether there
is a safe crossing place, how well we can see, and how fast we can cross. The
impact depends on how fast the car is going, whether we are wearing protective
gear, our age and our health. The risk for a particular person can be worked out
and therefore the best road-crossing strategy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is error or mistake?

A

If someone makes an error or mistake in using the software, this may lead
directly to a problem - the software is used incorrectly and so does not behave
as we expected.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is deffect (bug/fault)?

A

people also design and build the software and they
can make mistakes during the design and build. These mistakes mean that there
are flaws in the software itself. These are called defects or sometimes bugs or faults.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a failure?

A

When the software code has been built, it is executed and then any defects may
cause the system to fail to do what it should do (or do something it shouldn’t),
causing a failure. Not all defects result in failures; some stay dormant in the code
and we may never notice them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What failures and defects may arise from?

A

• errors in the specification, design and implementation of the software and
system;
• errors in use of the system;
• environmental conditions;
• intentional damage;
• potential consequences of earlier errors, intentional damage, defects and
failures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When do defects arise?

A
stages:
requirements
design
build
product work
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a role of testing in software development, maintenance and
operations?

A

Rigorous
testing is necessary during development and maintenance to identify defects, in
order to reduce failures in the operational environment and increase the quality
of the operational system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In which terms testing can measure quality of software?

A

In terms of number of

defects found, the tests run, and the system covered by the tests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Quality of what attributes of software can be tested?

A

We can do this
for both the functional attributes of the software (for example, printing a report
correctly) and for the non-functional software requirements and characteristics
(for example, printing a report quickly enough).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a specification validation and verification?

A

validation (‘is
this the right specification?’) and verification (‘is the system correct to spec-
ification?’).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is root cause analysis?

A

When we detect failures, we might try to track them back to their root cause,
the real reason that they happened.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is “exhaustive testing is impossible” principle?

A
Testing everything (all combinations of inputs and preconditions) is not feasible except for 
trivial cases. Instead of exhaustive testing, we use risks and priorities to focus testing efforts.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

ISTQB definition of software

testing as a process

A

• Process - Testing is a process rather than a single activity - there are a series
of activities involved
• All life cycle activities - testing as a process that takes
place throughout the software development life cycle.
• Both static and dynamic
• Planning - activities take place before and after test execution. We need to
manage the testing; for example, we plan what we want to do; we control the
test activities; we report on testing progress and the status of the software
under test; and we finalize or close testing when a phase completes.
• Preparation - We need to choose what testing we’ll do, by selecting test con
ditions and designing test cases.
• Evaluation - As well as executing the tests, we must check the results and
evaluate the software under test and the completion criteria, which help us
decide whether we have finished testing and whether the software product
has passed the tests.
• Software products and related work products - we don’t just test code. We test
the requirements and design specifications, and we test related documents
such as operation, user and training material.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is test basis?

A

the thought process of designing tests early in the life cycle can help to prevent defects from being introduced into code. We sometimes refer to this as ‘verifying the test basis via the test design’. The test basis includes documents such as the requirements and design specifications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

ISTQB definition of software

testing regarding objectives of testing

A

• Determine that (software products) satisfy specified requirements.
• Demonstrate that (software products) are fit for purpose.
• Detect defects - We most often think of software testing as a means of
detecting faults or defects that in operational use will cause failures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is “Early testing”principle?

A

Testing activities should start as early as possible in the software or system development life
cycle and should be focused on defined objectives.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What testing objectives can be?

A
  • finding defects
  • gaining confidence in and providing information about the level of quality;
  • preventing defects.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is a “development testing” and its main objective?

A

Once the code is written, programmers
and testers often run a set of tests so that they can identify and fix defects in
the software. In this ‘development testing’ (which includes component, inte-
gration and system testing), the main objective may be to cause as many fail-
ures as possible so that defects in the software are identified and can be fixed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is regression testing?

A

It is testing to ensure
nothing has changed that should not have changed.

Testing of a previously tested program following modification to ensure that defects have not been introduced or uncovered in unchanged areas of the software, as a result of the changes made. It is performed when the software or its environment is changed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is “defect clustering” testing principle?

A

A small number of modules contain most of the defects discovered during pre-release
testing or show the most operational failures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Why defects tend to cluster?

A

This can happen because an area of the code is particularly
complex and tricky, or because changing software and other products tends
to cause knock-on defects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is “pesticide paradox” testing principle?

A

If the same tests are repeated over and over again, eventually the same set of test cases will no longer find any new bugs. To overcome this ‘pesticide paradox’, the test cases need to be regularly reviewed and revised, and new and different tests need to be written to exercise
different parts of the software or system to potentially find more defects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is debugging?

A

When a test finds a defect that must be fixed, a programmer must do some work
to locate the defect in the code and make the fix. In this process a programmer will examine the code for the immediate cause of the
problem, repair the code and check that the code now executes as expected.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is the difference beteen testing and debugging

A

Developers
may test their own fixes, in which case the very tight cycle of identifying faults, debugging, and retesting is often loosely referred to as debugging. However,
often following the debugging cycle the fixed code is tested independently both
to retest the fix itself and to apply regression testing to the surrounding
unchanged software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What is “Testing shows presence of defects “ principle?

A

Testing can show that defects are present, but cannot prove that there are no defects.
Testing reduces the probability of undiscovered defects remaining in the software but, even if
no defects are found, it is not a proof of correctness.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is “Absence of errors fallacy” testing principle?

A

Finding and fixing defects does not help if the system built is unusable and does not fulfill the
users’ needs and expectations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Please, list the testing principles

A
Testing shows presence of defects
Exhaustive testing is impossible
Early testing
Defect clustering
Pesticide paradox
Testing is context dependent
Absence-of-errors fallacy
32
Q

What are the basic steps in the activities within the fundamental test process

A
  • planning and control;
  • analysis and design;
  • implementation and execution;
  • evaluating exit criteria and reporting;
  • test closure activities.
33
Q

What is test planning?

A

During test planning, we make sure we understand the goals and objectives of
the customers, stakeholders, and the project, and the risks which testing is
intended to address. This will give us what is sometimes called the mission of
testing or the test assignment.

34
Q

What is test policy?

A

Test policy gives rules for testing, e.g.

‘we always review the design documents’.

35
Q

What is test strategy?

A

est strategy is the overall high-level
approach, e.g. ‘system testing is carried out by an independent team reporting
to the program quality manager.

36
Q

What are the major tasks in test planning which hel us build a test plan?

A

Determine the test approach (techniques, test items, coverage, identifying and interfacing with the teams involved in testing, testware)

Implement the test policy and/or the test strategy

Determine the required test resources

Schedule test analysis and design tasks

Determine the exit criteria

37
Q

Tell more about “Determine the scope and risks and identify the objectives of testing” task in test planning activity

A

we con
sider what software, components, systems or other products are in scope for
testing; the business, product, project and technical risks which need to be
addressed; and whether we are testing primarily to uncover defects, to show
that the software meets requirements, to demonstrate that the system is fit
for purpose or to measure the qualities and attributes of the software.

38
Q

Tell more about “Determine the test approach” task in test planning activity

A

we consider
how we will carry out the testing, the techniques to use, what needs testing
and how extensively (i.e. what extent of coverage). We’ll look at who needs
to get involved and when (this could include developers, users, IT infrastruc
ture teams); we’ll decide what we are going to produce as part of the testing
(e.g. testware such as test procedures and test data). This will be related to
the requirements of the test strategy.

39
Q

Tell more about “Implement the test policy and/or the test strategy” task in test planning activity

A

we mentioned that there
may be an organization or program policy and strategy for testing. If this is
the case, during our planning we must ensure that what we plan to do
adheres to the policy and strategy or we must have agreed with stakeholders,
and documented, a good reason for diverging from it.

40
Q

Tell more about “Determine the required test resources” task in test planning activity

A

from the planning we have already done we can now go into detail; we decide
on our team make-up and we also set up all the supporting hardware and
software we require for the test environment.

41
Q

Tell more about “Schedule test analysis and design tasks, test implementation, execution and
evaluation” task in test planning activity

A

we will need a schedule of all the tasks and activities, so that we
can track them and make sure we can complete the testing on time.

42
Q

Tell more about “Determine the exit criteria” task in test planning activity

A

we need to set criteria such as coverage criteria (for
example, the percentage of statements in the software that must be executed
during testing) that will help us track whether we are completing the test activ
ities correctly. They will show us which tasks and checks we must complete for
a particular level of testing before we can say that testing is finished.

43
Q

What is test control?

A

test control is an ongoing
activity. We need to compare actual progress against the planned progress, and
report to the project manager and customer on the current status of testing,
including any changes or deviations from the plan. We’ll need to take actions
where necessary to meet the objectives of the project.

44
Q

What are the major tasks in test control activity?

A

Measure and analyze the results of reviews and testing
Monitor and document progress, test coverage and exit criteria
Provide information on testing
Initiate corrective actions
Make decisions

45
Q

Tell more about “Measure and analyze the results of reviews and testing” task in test control activity

A

We need to know
how many reviews and tests we have done. We need to track how many
tests have passed and how many failed, along with the number, type and
importance of the defects reported.

46
Q

Tell more about “Monitor and document progress, test coverage and exit criteria” task in test control activity

A

It is important
that we inform the project team how much testing has been done, what the
results are, and what conclusions and risk assessment we have made. We must
make the test outcome visible and useful to the whole team.

47
Q

Tell more about “Provide information on testing” task in test control activity

A

We should expect to make regular and
exceptional reports to the project manager, project sponsor, customer and
other key stakeholders to help them make informed decisions about
project status. We should also use the information we have to analyze the
testing itself.

48
Q

Tell more about “Initiate corrective actions” task in test control activity

A

For example, tighten exit criteria for defects fixed,
ask for more effort to be put into debugging or prioritize defects for fixing
test blockers.

49
Q

Tell more about “Make decisions” task in test control activity

A

Based on the measures and information gathered during
testing and any changes to business and project risks or our increased under
standing of technical and product risks, we’ll make decisions or enable others
to make decisions: to continue testing, to stop testing, to release the software
or to retain it for further work for example.

50
Q

What is test analysis and design?

A

Test analysis and design is the activity where general testing objectives are trans-
formed into tangible test conditions and test designs. During test analysis and
design, we take general testing objectives identified during planning and build
test designs and test procedures (scripts).

51
Q

What are the major tasks in test analysis and design activity?

A

Review the test basis (such as the product risk analysis, requirements, architecture, design specifications, and interfaces), examining the specifications
for the software we are testing

Identify test conditions based on analysis of test items, their specifications,
and what we know about their behavior and structure

Design the tests (you’ll see how to do this in Chapter 4), using techniques to
help select representative tests that relate to particular aspects of the soft
ware which carry risks or which are of particular interest, based on the test
conditions and going into more detail

Evaluate testability of the requirements and system

Design the test environment set-up and identify any required infrastructure
and tools

52
Q

What is test implementation and execution activity?

A

During test implementation and execution, we take the test conditions and
make them into test cases and testware and set up the test environment. This
means that, having put together a high-level design for our tests, we now start
to build them. We transform our test conditions into test cases and procedures,
other testware such as scripts for automation. We also need to set up an envi-
ronment where we will run the tests and build our test data.

53
Q

What are the major tasks in test iplementation and execution activity?

A

Implementation:
Develop and prioritize our test cases, using the techniques you’ll see in Chapter 4, and create test data for those tests
Create test suites from the test cases for efficient test execution
Implement and verify the environment

Execution:
Execute the test suites and individual test cases, following our test procedures
Log the outcome of test execution and record the identities and versions of the software under test, test tools and testware
Log the outcome of test execution and record the identities and versions of the software under test, test tools and testware.
Where there are differences between actual and expected results, report discrepancies as incidents.
Repeat test activities as a result of action taken for each discrepancy.

54
Q

What is evaluating exit criteria and reporting activity?

A

Evaluating exit criteria is the activity where test execution is assessed against
the defined objectives. This should be done for each test level, as for each we
need to know whether we have done enough testing. Based on our risk assess-
ment, we’ll have set criteria against which we’ll measure ‘enough’. These crite-
ria vary for each project and are known as exit criteria.

55
Q

What are the major tasks in Evaluating exit criteria activity?

A

Check test logs against the exit criteria specified in test planning
Assess if more tests are needed or if the exit criteria specified should be
changed
Write a test summary report for stakeholders

56
Q

What is test closure activities?

A

During test closure activities, we collect data from completed test activities to
consolidate experience, including checking and filing testware, and analyzing
facts and numbers.

57
Q

What are the major tasks in test closure activities?

A

Check which planned deliverables we actually delivered and ensure all
incident reports have been resolved through defect repair or deferral.
Finalize and archive testware, such as scripts, the test environment, and any
other test infrastructure, for later reuse.
Hand over testware to the maintenance organization who will support the
software and make any bug fixes or maintenance changes, for use in con
firmation testing and regression testing.
Evaluate how the testing went and analyze lessons learned for future
releases and projects.

58
Q

What psychoogical factors influence success of testing?

A
  • clear objectives;
  • a balance of self-testing and independent testing;
  • recognition of courteous communication and feedback on defects.
59
Q

What are the advantages of independent testing?

A

Early in the life cycle, reviews of requirements and design
documents by someone other than the author helps find defects before coding
starts and helps us build the right software. Following coding, the software can
be tested independently. This degree of independence avoids author bias and is
often more effective at finding defects and failures.

60
Q

What are the levels of indepence?

A

• tests by the person who wrote the item under test
• tests by another person within the same team, such as another programmer;
• tests by a person from a different organizational group, such as an independ
ent test team
• tests designed by a person from a different-organization or company, such as
outsourced testing or certification by an external body.

61
Q

What are the testing principles from psychological perspective?

A

• Communicate findings on the product in a neutral, fact-focused way without
criticizing the person who created it. For example, write objective and factual
incident reports and review findings.
- Don’t gloat - you are not perfect either!
- Don’t blame - any mistakes are probably by the group rather than an
individual.
- Be constructively critical and discuss the defect and how you are going to
log it.
• Explain that by knowing about this now we can work round it or fix it so the
delivered system is better for the customer.
- Say what you liked and what worked, as well as what didn’t work.
- Show what the risk is honestly - not everything is high priority.
- Don’t just see the pessimistic side - give praise as well as criticism.
- Show what risks have been uncovered and the benefits of the review or
test.
• Start with collaboration rather than battles. Remind everyone of the
common goal of better quality systems.
- Be polite and helpful, collaborate with your colleagues.
- 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.
- Explain how the test or review helps the author - what’s in it for him
or her.
- Offer your work to be reviewed, too.

62
Q

What is requirement?

A

A condition or capability needed by a user to solve a problem or achieve an objective
that must be met or possessed by a system or system component to satisfy a contract, standard,
specification, or other formally imposed document. [After IEEE 610

63
Q

What is review?

A

An evaluation of a product or project status to ascertain discrepancies from planned
results and to recommend improvements. Examples include management review, informal review,
technical review, inspection, and walkthrough. [After IEEE 1028]

64
Q

What is test case?

A

A set of input values, execution preconditions, expected results and execution postconditions, developed for a particular objective or test condition, such as to exercise a
particular program path or to verify compliance with a specific requirement.

65
Q

What is confirmation testing?

A

Confirmation testing or re-testing: When a test fails because of the defect then that defect is reported and a new version of the software is expected that has had the defect fixed. In this case we need to execute the test again to confirm that whether the defect got actually fixed or not. This is known as confirmation testing and also known as re-testing. It is important to ensure that the test is executed in exactly the same way it was the first time using the same inputs, data and environments.

Hence, when the change is made to the defect in order to fix it then confirmation testing or re-testing is helpful.

66
Q

What is incident?

A

While executing a test, you might observe that the actual results vary from expected results. When the actual result is different from the expected result then it is called as incidents, bugs, defects, problems or issues.
To be specific, we sometimes make difference between incidents and the defects or bugs. An incident is basically any situation where the system exhibits questionable behavior, but often we refer to an incident as a defect only when the root cause is some problem in the item we are testing.
Other causes of incidents include misconfiguration or failure of the test environment, corrupted test data, bad tests, invalid expected results and tester mistakes.

67
Q

What is test coverage?

A

The degree, expressed as a percentage, to which a specified coverage item has been
exercised by a test suite.

68
Q

What is software?

A

Computer programs, procedures, and possibly associated documentation and data
pertaining to the operation of a computer system.

69
Q

What is test data?

A

Data that exists (for example, in a database) before a test is executed, and that affects or is
affected by the component or system under test.

70
Q

What is test execution?

A

The process of running a test on the component or system under test, producing actual result(s).

71
Q

What is test log?

A

A chronological record of relevant details about the execution of tests. [IEEE 829]

72
Q

What is test plan?

A

A document describing the scope, approach, resources and schedule of intended test activities. It identifies amongst others test items, the features to be tested, the testing tasks, who will do each task, degree of tester independence, the test environment, the test design
techniques and entry and exit criteria to be used, and the rationale for their choice, and any risks requiring contingency planning. It is a record of the test planning process. [After IEEE 829]

73
Q

What is test summary report?

A

A document summarizing testing activities and results. It also contains an evaluation of the corresponding test items against exit criteria. [After IEEE 829]

74
Q

What is testware?

A

Artifacts produced during the test process required to plan, design, and execute tests, such as documentation, scripts, inputs, expected results, set-up and clear-up procedures, files, databases, environment, and any additional software or utilities used in testing. [After Fewster
and Graham]

75
Q

What is independence of testing?

A

Separation of responsibilities, which encourages the accomplishment of objective testing. [After DO-178b]

76
Q

What is quality?

A

The degree to which a component, system or process meets specified requirements and/or user/customer needs and expectations. [After IEEE 610]

77
Q

What is exhaustive testing?

A

A test approach in which the test suite comprises all combinations of input values
and preconditions.