chapter 4 Flashcards

1
Q

What is The purpose of a test design technique

A

to identify test condition, test case, and test data

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

Why is A testing Technique important?

A

Effective
- Find more faults
- Focus attention on specific types of faults
- Know you are testing the right thing

Efficient
- Find faults with less efforts
- Avoid duplication
- Systematic techniques are measurable

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

What are the Categories of Test Design Techniques

A
  • Specification-based
  • Structure-based
  • Experience based
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

… is Specification-based while … is Structure-based

A

Black Box , White Box

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

What are the Advantages of black-box testing

A
  • focus on the functional behavior
  • Independent from the internal code
  • Can catch logic defects early
  • Applicable at all levels of granularity
  • allows for early test design
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the Black-box testing process

A

Analyze requirements
Choose valid and invalid inputs
Determine expected outputs for those inputs

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

List the Black box testing techniques

A

Equivalence Partitioning
Boundary Value Analysis
Decision tables testing
State transition testing
Use case testing

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

What is Equivalence Partitioning (EP)

A

is a black-box testing technique that divides the input domain of a software system into different equivalence classes or partitions.

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

EP divides the possible inputs into groups called …

A

equivalence classes.

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

The rule for EP is to select one representative value from each equivalence class as a test case.

A

t
This ensures that each class is adequately tested, covering both valid and invalid inputs.

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

In EC, The partitioning is based on …

A

requirements of the software system

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

What is Challenging for the tester when using EC Testing?

A
  • Different testers find different equivalence classes
  • Finding an appropriate partition not knowing how the program looks inside.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does Ep test invalid inputs

A
  • For invalid equivalence classes, boundary values are often tested to ensure the system behaves as expected.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

… is used only for valid inputs

A

Testing by contract

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

… and … weaken the need to
use defensive testing

A
  • GUIs &
  • Strong typed programming languages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

how do GUIs and strong typed programming languages weaken the need to use defensive testing

A
  • GUI elements often enforce certain constraints on user input and can prevent users from entering invalid data.
  • GUI frameworks include built-in validation mechanisms
  • Strongly typed programming languages enforce strict type checking at compile-time
  • So they type-related errors before runtime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Given this Req : Age field can take the values in the range of 20 to 50. What is the best EP approach to test it?

A

Include these partitions :

  • Below range - 10
  • Within Range 20 to 50 - 40
  • Above range - 60
  • Whole numbers - 40
  • Real numbers - 30.4
  • Numbers - 40
  • Characters - xyz
  • +ve numbers - 40
  • -ve numbers - -30
  • 0-0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is Failure Masking in Equivalence Partitioning

A

Failures can be masked when several failures occur at the same time but only one is visible, causing the other failures to undetected

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

What must be done To achieve 100% coverage with Equivalence Partitioning?

A

Test cases must cover all identified partitions (including invalid partitions) by using a minimum of one value from each partition

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

How do we calculate Equivalence Partitioning Coverage %

A

Total Number of Tested EP
/
Total Number of EP

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

How does Equivalence Partitioning work with Discrete Values?

A
  • equivalence classes are formed based on the distinct values

Example : if a field accepts colors as input, the equivalence classes could be “Red,” “Blue,” “Green,” etc.

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

How does Equivalence Partitioning Multiple Conditions work given :

Age : (< 20),(20 >= and <=50), ( >50)

Country: (Egypt), (Canada), (USA), (India)

A

3 partitions + 4 partitions = 7 Partitions

Test cases
TC1:(10,Egypt)
TC2: (40,Canda)
TC3:(60,USA)
TC4:(45,India)

23
Q

How did Boundary values testing (BV) come about?

A

a surprising nr. of faults turned out to be boundary value faults

24
Q

BVT is most applicable when …

A
  • inputs are constrained and fall within certain minimum and maximum limits.
  • For boolean values has no sense.
25
Q

BVT focuses on the boundary of the…

A

input domain

26
Q

If x is an input variable with values in the range [xmin,xmax] then test the system is:

A
  • xmin
  • just above xmin
  • a nominal value, xnom
  • just below xmax
  • xmax
27
Q

Explain The “single fault assumption”.

A

is a principle used in black-box testing. It posits that a failure in the system is caused by only one fault at a time.

28
Q

how does The “single fault assumption” work?

A
  1. Hold all but one variable at nominal values: In this approach, all input variables except one are kept at their nominal or typical values.
  2. Let only one variable take extreme values: One input variable is manipulated to take on extreme or boundary values.
29
Q

What are Boundary Value Extensions

A

These are additional strategies or techniques applied to Boundary Value Testing to increase its effectiveness.

30
Q

Give types of Boundary Value Extensions

A
  • Robustness testing
  • Worst case testing
  • Robust worst case testing
  • Special value testing
  • Random testing
31
Q

… aims to evaluate the ability of the software system to handle invalid or unexpected inputs.

A
  • Robustness testing

subjecting the system to inputs that lie outside the normal operating range

32
Q

… involves testing the system under conditions that represent the most unfavorable or extreme scenarios.

A

Worst case testing

33
Q

… involves selecting specific input values that are known to trigger certain behaviors or edge cases within the system.

A

Special value testing

34
Q

explain Decision Table Testing

A

is a black-box testing technique used to test systems where the output depends on multiple input conditions or combinations of conditions.

35
Q

What is The state transition technique

A

is a black-box testing approach, suitable for systems where the response varies depending on the current state or previous history of the system.

35
Q

Requirements for Calculating Car Insurance Premiums:

  • For female between 18 and 64 years of age, the premium is 500
  • For males between 18 and 64 year of age, the premium is 1000
  • For anyone 65 years of age or more, the premium is 1500
  • Anyone less than 18 years of age, can’t get insurance
    What is the minimum number of test cases needed to test this requirements?
A

Gender: Female, Male
Age :18 <= Age <= 64, Age >= 65, Age < 18

Total combinations = 2 (Gender) * 3 (Age) = 6 combinations

So, for Age < 18, the output is not applicable (N/A), and there’s no need to test it further.

-> the minimum number of test cases needed is 5

36
Q

explain State Transition Diagram

A
  • This diagram visually represents the various states that the system can be in and the transitions between these states.
  • State = node
  • Transitions between states = arrows
37
Q

A transition is initiated by …

A

an event

38
Q

The system may behave differently to the same trigger or transition according to its current state.

A

t

39
Q

What is a State Transition Table

A

A state table records all the possible valid or invalid transitions, guard conditions and their effect on all the possible states.

40
Q

Explain Use Case Testing

A

it is a black-box testing technique that focuses on deriving test cases from use cases

41
Q

… are very useful for designing acceptance tests with user participation

A

use cases

42
Q

… is an excellent basis for system level testing

A

use case

43
Q

Explain use cases

A
  • describe interactions between actors and the system
44
Q

Test cases derived from use cases are most useful in …

A

uncovering defects in the process flows during real-world use of the system

45
Q

A use case usually has … components?

A
  • a most likely scenario
  • alternative paths
  • preconditions
  • postconditions and
  • final state of the system
46
Q

White Box Testing, is also known as …

A

structural testing or glass-box testing,

47
Q

White Box Testing derives test cases from …

A

the internal structure or code of the system being tested.

48
Q

Coverage of White box testing is measured based on …

A

the items tested within a selected structure(e.g the code or interfaces)

49
Q

In white box testing … are used as an additional source of information to determine the expected outcome of test cases.

A

Specifications

50
Q

… are used to assess the amount of testing performed by tests derived from black-box techniques.

A

White Box Testing techniques

51
Q

How do we determine Statement coverage in WBT

A

the number of executable statements covered by test cases
/
the number of all executables statements in the code

52
Q
A
53
Q
A