C2 Flashcards

1
Q

black box testing

A
  • test design against a specification, no implementation needed
  • test values are derived from the specification or type information
  • for each test value the expected result is derived from the specification (do not use the source code!)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

input domain of a program

A

contains all possible inputs to that program

testing is about choosing finite sets of values from the input domain

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

input parameters

A

define the scope of the input domain (method parameters, data read from file, global variables, user input)

Domain for each input parameter is partitioned into regions of essentially equivalent values, at least one value is chosen from each region

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

domain partitions

A

a partition of D defines a set of blocks such that:
1. blocks must be pairwise disjoint (no overlap)
2. together the blocks cover the complete domain

for testing, choose a value from each block

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

5 steps to modeling the input domain

A
  1. identify testable functions
  2. find all the parameters
  3. model the input domain
  4. apply a test criterion to choose combinations of values
  5. refine combinations of blocks into test inputs (choose appropriate values from each block)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

characteristics (examples)

A
  • array (null, zero-length, arbitrary length)
  • order of the input file (sorted, reverse sorted, abitrary)
  • input device (DVD, CD, computer)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

2 approaches to modeling the input domain

A
  1. interface-based: develop characteristics directly from individual input parameters (simplest application, can be partially automated)
  2. functionality-based approach: develops characteristics from a behavioral view of the program under test (harder to develop, may result in better tests)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

interface-based approach

A
  • mechanically consider each parameter in isolation
  • relies mostly on syntax
  • no use of domain and semantic information
  • ignores relationships among parameters
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

functionality-based approach

A
  • identify characteristics that correspond to the intended functionality (can incorporate domain and semantic knowledge and use relationships among parameters)
  • modeling can be based on requirements but not on implementation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

choosing combinations of values

A
  • all combinations: all combinations from all characteristics (3 by 3 => 27 tests)
  • each choice: one value from each block for each characteristic must be used in at least one test case (3 by 3 =?> 3 tests)
  • pair-wise: a pair of values from two blocks from two characteristics must be combined with a value from every block for each other characteristic (3 by 3 => 9 tests)
  • n-wise: a value from each block for each group of n characteristics must be combined (same as AC if n = nr of characteristics)
  • (multiple) base choice: A (or multiple) base choice block is chosen for each characteristic, and a base test is formed by using the base choice for each characteristic. Subsequent tests are chosen by holding all but one base choice constant and using each non-base choice in each other characteristic (used if certain values are important, domain knowledge used)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

constraints among characteristics

A

some combinations of blocks are infeasible => constraints among blocks
2 types:
- a block from one characteristic cannot be combined with a specific block from another
- a block from one characteristic can ONLY BE combined with a specific block form another characteristic

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

input space partitioning analysis and design

A

analysis:
- find all implicit and explicit parameters
- find the value range for each parameter

design:
- select suitable equivalence partitions
- choose coverage criteria
- select test values for coverage criteria and calculate expected result: choose values (possibly randomly) in the middle of partition, not at boundary
- if needed add test cases to cover all partitions of the return value/output parameters

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

input space partitioning strengths/weaknesses

A

strengths:
- fairly easy to apply, good basic level of black-box testing
- applicable to all levels of testing – unit, class, integration, system, etc.
- based only on the input space of the program, not on its implementation

weaknesses:
- correctness at the boundary is not tested
- interface based approach does not test combinations of inputs

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

boundary value analysis: analysis and design

A

analysis:
- identify boundary values for each partition

design:
- identify normal and error boundary values
- choose coverage criteria for normal boundary value
- select normal test values for coverage criteria and error test values for EC coverage
- eliminate redundant test cases
- calculate expected result

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

boundary value analysis stengths/weaknesses

A

strengths:
- test values are immediately given by the boundary values
- focus on area where faults are more likely

weaknesses:
- doubles the number of test cases for each partition
- combinations of values are not tested

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

decision table testing

A

combine test values from different inputs supplementing the interface based approach when we use weaker coverage than AC

  • map combinations of input values (causes) with matching output values (effect) through rules
  • error partitions and unfeasible combination are removed
  • causes and effect are combined verifying the feasibility of the combination against the specification
17
Q

decision table strengths/weaknesses

A

strengths:
- decision tables exercises combination of test values and expected results
- expected results are part of the process

weaknesses:
- decision table tends to be large
- filling the table costs effort (good knowledge of specification) and time