Pdf.1 Flashcards

1
Q

tries to find differences between the specified
(expected) and the observed (actual) system behavior.

Goal: To design tests that will systematically find ______.

A

Testing
defects

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

_________ makes sure that we have built the right product.

We check that the system meets its stated _______ and each
system function derives from some requirement.

☞ _________ deal mainly with validation.

A

Validation
requirements
Acceptance tests

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

________ makes sure that we have built the product right.

We check the __________ by ensuring that each
function works correctly and has no defects.

☞ Most _____ is targeted at doing verification

A

Verification
quality of the implementation
testing

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

Testing cannot show the __________.
(But it can increase quality and confidence!)

A

absence of software errors.

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

It is impossible to completely test a ___________.
(Most systems will have bugs in them that either users uncover
or that are never uncovered!)

A

nontrivial system.

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

Testing is a __________.
(We try to make the software fail!)

A

destructive activity

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

It is often difficult for software engineers
to effectively test their ______.
(Since they have no incentive to make their software fail!)

A

own software

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

It is imperative to have a plan for testing
if we want to uncover as _____ as
possible in the _______ possible time

Design tests that have the _____ likelihood of finding
defects with the ______ amount of time and effort.

A

many defects
shortest

highest
minimum

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

A test plan specifies:
1. A _________: what tests to perform; how to perform them;
required test and code coverage; percentage that should
execute with a specific result.

  1. A _______ for the testing: when to run which tests.
  2. An estimate of ______ required: human/system.
A

testing strategy
schedule
resources

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

Key problem: choosing a test suite (input set) that is:
_______ enough to finish quickly;
 _____ enough to validate and verify the software.

A

small
large

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

A program’s behaviour is the
_______ for ________ input sets.

A

“same”
“equivalent”

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

________ - A partition of the inputs into sets with the same behavior so that we
can test with one value from each set.

 Two problems
1. The notion of same behaviour is _____.
 ______: execution equivalence
 _________: revealing subdomains

  1. Discovering the sets of inputs requires perfect knowledge.
     Need to use _______ to approximate the sets cheaply.
A

Ideal test suite

subtle

Naïve approach
Better approach

heuristics

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

We say a program has the “same behaviour” for two inputs if it
1. gives a ________ on both, or
2. gives an ___________ on both

A

correct result
incorrect result

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

A _________ is a subset of the set of possible inputs.

 A subdomain is revealing for an error, E,
1. if each element in the subdomain has the __________.
2. if the program has error E, then it is _______ by the test.

A

subdomain
same behaviour
revealed

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

To partition the inputs/outputs into revealing subdomains we use _______ based on
– ____________ (i.e., the actual code).
– ______________ (e.g., requirements specification,
algorithm used, input/output data structures).

 A good heuristic gives:
– _________
– for all errors in some class of errors E, ___________ that some
subdomain is revealing for E.

 Different heuristics target different classes of errors.
– In practice, we usually combine __________.

A

heuristics
program-dependent information
program-independent information

few subdomains
high probability

multiple heuristics.

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

_______ is one way of testing the system.

17
Q

Basic steps of a test case
1. Choose _____________.
2. Define the ____________.
3. Run the ___________ and record the
_____.
4. Compare the _______________

A

input data/software configuration
expected outcome
program/method against the input, result
results against the expected outcome

18
Q

__________
“testing-in-the-small”
Verify component logic based on data or control structures.
Test cases use knowledge of the _______________.
☞ Availability of source code is _________.

________
“testing-in-the-large”
Verify component functionality based on the inputs and outputs.
Test cases use knowledge of ______________.
☞ Availability of source code is ________.

Verify no _____________ after making a change.
Uses selective White Box and Black Box test cases.

A

White Box, internal workings of a component, required

Black Box, specified functionality of a component, not required

Regression
new defects are introduced

19
Q

independent paths in the code at least once.
☞ __________

logical decisions on their true and false sides.
☞ ____________

loops at their boundaries and within their bounds.
☞ ___________

internal data structures to ensure their validity.
☞__________

A

Basis Path Testing
Condition Testing
Loop Testing
Data Flow Testing

20
Q

BASIS PATH TESTING
Overview
1. From the code, draw a _____________.
2. Determine the ____________ of the flow graph.
3. Determine a basis set of ______________ based
on the cyclomatic complexity.
4. Prepare test cases that force the ___________ in
the basis set.

A

corresponding flow graph
cyclomatic complexity
linearly independent paths
execution of each path

21
Q

BASIS PATH TESTING
Each circle represents one or more
____________

A

non-branching source code statements

22
Q

BASIS PATH TESTING

___________ - A quantitative measure of the
logical complexity of the code.
- provides an upper bound on the
number of paths that need to be tested in the code

A

cyclomatic complexity V(G)

23
Q

☞ V(G) = the number of _______ (areas bounded by nodes and
edges—area outside the graph is also a region)

☞ V(G) = the number of _______ - the number of ______ + 2

☞ V(G) = the number of _________ nodes + 1

A

regions

edges, nodes

(simple) predicate

24
Q

BASIS PATH TESTING

__________. a path that introduces at least one new set of processing statements or a new condition.

☞An independent path must traverse at least _____ in the flow graph
that has not been traversed _______ the path is defined.

________. the set of linearly independent paths through the code.
☞A basis set in not unique.

Test cases derived from a basis set are guaranteed to execute every
statement at least one time during testing.
☞This is only the minimum number of test cases required.

A

Independent path
before
Basis set:

25
Test cases derived from a basis set are ________ to execute every statement at least one time during testing. ☞This is only the _________ of test cases required.
guaranteed minimum number
26
BASIS PATH TESTING the statement numbers in the program.  Count each logical test—compound tests count as the number of __________ + 1 (i.e., count each simple predicate).  Basis path testing should be applied to all components, if possible, and to ________ always. Basis path testing does not test all possible combinations of all paths through the code; it just tests every path at least _____.
The basis set Boolean operators critical components once