Week 8 & 9 Flashcards

(43 cards)

1
Q

In a Use Case we describe?

A

How a system will respond to a given scenario?

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

Use case is?

A

User-oriented

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

What does user-oriented mean?

A

We specify the actions done by the user

The actors see in a system

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

What SW testing level is a use case testing?

A

Unit testing

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

What are the 2 main steps when writing testing for use cases?

A
  1. Write test cases for normal flow

2. Write exceptions test cases

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

Sunny day use cases?

A

Primarily cases that are most likely to happen, where everything goes well (normal flow)

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

Rainy day use cases?

A

Edge cases

Take priority after sunny day use cases

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

White Box testing should cover?

A

Statement coverage
Control flow testing
Path & Basis path coverage
Branch coverage

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

What is Statement Coverage?

A

Execution of all executable statements in the source code atleast once

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

Which SW testing technique is statement coverage?

A

White box testing technique

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

Why use Statement Coverage?

A

To calculate the number of source code statements which can be executed

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

Statement Coverage formula?

A

(# of executed statements/total # of statements) * 100

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

What is covered by Statement Coverage?

A

Unused statements
Unused branches
Dead code

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

What is NOT covered by Statement Coverage?

A

Missing statements in the source code

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

How can we identify missing code statements?

A

Control Flow Coverage

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

Cons of Statement Coverage?

A

Expensive in time and money required

Doesn’t reveal missing code or statements

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

Pros of Statement Coverage?

A

Identifies unused code
Identifies unused branches
Identifies dead code

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

Control Flow depicts a program as?

19
Q

What does Control Flow graph contain?

A

Nodes and Edges

20
Q

What is a node?

A

Represents an indivisible group if code statements

21
Q

What is the purpose of edge?

A

Connects 2 nodes

* If the 2nd statement might be executed immediately after the 1st statement

22
Q

What is Path Testing?

A

Also called structural testing

Execute every path atleast once

23
Q

Is Path Testing challenging and time consuming and why?

A

It is time consuming

Testing each point is challenging and time consuming

24
Q

How to reduce the challenges and time required to perform Path Testing?

A

Reduce redundant tests
Achieve maximum test coverage
By using basis path testing

25
Basis Path Coverage?
Executes every path at least once
26
Basis Path Coverage is the same as path testing except?
It defines test cases based on the flow or logical paths that can be taken Independent path has at least one edge not traversed before in any other paths
27
How is basis path coverage different from path coverage?
Achieves maximum path coverage with least number of test cases
28
What is Cyclometric Complexity?
A metric determining the number of paths
29
Independent path has?
At least one edge not traversed before in any other paths
30
Basis Set?
A set of all independent paths of a program
31
Cyclometric Complexity can be calculated with respect to?
Functions Modules Methods Classes
32
How to reduce cyclomatic complexity?
Limit the complexity of routines during development
33
Cyclomatic Complexity number 1-10 meaning?
Structured & well written code High testability Cost and Effort is less
34
Cyclomatic Complexity number 10-20 meaning?
Complex code Medium testability Cost and effort is medium
35
Cyclomatic Complexity number 20-40 meaning?
Very complex code Low Testability Cost and effort are high
36
Cyclomatic Complexity number >40 meaning?
Not at all testable | Very high cost and effort
37
Basis Path Testing guarantees execution of atleast?
One statement during testing
38
Basis Path Testing benefits?
Helps to reduce the redundant tests Focuses attention on program logic Helps facilitate analytical vs arbitrary test case design
39
100% Path coverage implies?
100% Branch Coverage
40
100% Path coverage implies?
100% Statement coverage
41
Branch Coverage?
Excecute all branches - Branches are outgoing edges of a decision point Covers missing statements
42
Branch Coverage function?
BC = (# of executed branches/total number of branches)
43
100% branch coverage implies?
100% statement coverage