Part 2 MBT and RV Flashcards

1
Q

What is the relationship between specification and implementation?

A

The implementation must be a subset of the behaviors allowed by the specification.

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

What is the purpose of runtime verification?

A

To ensure the system’s behavior during execution complies with the specification.

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

How does runtime verification differ from unit testing?

A

Unit testing checks specific code functions or modules, while runtime verification monitors system behavior during execution.

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

What is a finite state automaton (FSA)?

A

A model of system behavior with defined states and transitions.

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

What are the three key steps in designing an FSA?

A
  1. List possible inputs.
  2. Identify conditions for valid/invalid inputs.
  3. Define system states and transitions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Provide an example of a system state and transition in an FSA.

A

State: “On hook” (telephone).
Transition: “Lifting receiver” moves the phone to “Off hook” state.

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

What are the key components of runtime verification?

A

System, Monitor, and Verifier.

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

What is the role of the monitor in runtime verification?

A

To observe system events and ensure compliance with specifications.

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

What is a challenge associated with runtime verification?

A

Monitoring can cause delays, breaking real-time properties if the overhead is too high.

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

How does aspect-oriented programming (AOP) simplify cross-cutting concerns?

A

By modularizing functionality like logging without modifying individual methods.

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

Why is model-based testing (MBT) beneficial?

A

It automates the generation and execution of test cases, reducing manual effort and errors.

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

What are the main steps in model-based testing?

A
  1. Create a model of the system.
  2. Generate test cases.
  3. Execute tests (offline or online).
  4. Use an oracle to verify outputs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the three algorithms used for generating test cases in MBT?

A

Random, Greedy, and Lookahead.

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

What is the purpose of guards in MBT?

A

To specify conditions under which certain actions are valid.

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

What are the states in an FSA for a lighting system?

A

Off, Dim, Normal, Bright.

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

What actions can a coffee vending machine perform?

A

Insert money, choose a drink, add extras (milk, sugar), dispense drink.

17
Q

What is ModelJUnit?

A

A Java-based MBT tool that uses finite state machines to generate and execute tests.

18
Q

How does ModelJUnit measure test coverage?

A

By tracking states visited, transitions exercised, and transition pair combinations.

19
Q

What is the function of guards in ModelJUnit?

A

To restrict actions to only valid conditions.

20
Q

Name three features of ModelJUnit.

A
  1. Define models using FSMs.
  2. Add guards and actions.
  3. Measure test coverage.
21
Q

What are examples of coverage measures in MBT?

A

States visited, transitions exercised, transition pair combinations.

22
Q

How does runtime verification ensure system reliability?

A

By detecting and preventing system failures in real time.

23
Q

What is the primary benefit of lookahead test generation in MBT?

A

It considers future transitions to improve test coverage.