Week 8 & 9 Flashcards

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?

A

Graph

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
Q

Basis Path Coverage?

A

Executes every path at least once

26
Q

Basis Path Coverage is the same as path testing except?

A

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
Q

How is basis path coverage different from path coverage?

A

Achieves maximum path coverage with least number of test cases

28
Q

What is Cyclometric Complexity?

A

A metric determining the number of paths

29
Q

Independent path has?

A

At least one edge not traversed before in any other paths

30
Q

Basis Set?

A

A set of all independent paths of a program

31
Q

Cyclometric Complexity can be calculated with respect to?

A

Functions
Modules
Methods
Classes

32
Q

How to reduce cyclomatic complexity?

A

Limit the complexity of routines during development

33
Q

Cyclomatic Complexity number 1-10 meaning?

A

Structured & well written code
High testability
Cost and Effort is less

34
Q

Cyclomatic Complexity number 10-20 meaning?

A

Complex code
Medium testability
Cost and effort is medium

35
Q

Cyclomatic Complexity number 20-40 meaning?

A

Very complex code
Low Testability
Cost and effort are high

36
Q

Cyclomatic Complexity number >40 meaning?

A

Not at all testable

Very high cost and effort

37
Q

Basis Path Testing guarantees execution of atleast?

A

One statement during testing

38
Q

Basis Path Testing benefits?

A

Helps to reduce the redundant tests
Focuses attention on program logic
Helps facilitate analytical vs arbitrary test case design

39
Q

100% Path coverage implies?

A

100% Branch Coverage

40
Q

100% Path coverage implies?

A

100% Statement coverage

41
Q

Branch Coverage?

A

Excecute all branches
- Branches are outgoing edges of a decision point
Covers missing statements

42
Q

Branch Coverage function?

A

BC = (# of executed branches/total number of branches)

43
Q

100% branch coverage implies?

A

100% statement coverage