Software Testing Strategies

ClearMarigold avatar
ClearMarigold
·
·
Download

Start Quiz

Study Flashcards

10 Questions

What is the significance of parameters associated with events in a system, and provide an example?

Parameters associated with events provide additional information about the event, and an example is the Pay Money event having parameters such as Cash, Check, Debit Card, or Credit Card.

What happens when a ticket is printed, and what state does the system enter?

When a ticket is printed, the system goes into the Ticketed State.

What is the significance of the PayTimer expiration in the system, and what happens to the reservation?

The PayTimer expiration leads to the cancellation of the reservation for non-payment.

Can a reservation be cancelled after payment, and what is the condition for a refund?

Yes, a reservation can be cancelled after payment, and a refund can be given only if the printed ticket is returned to the agent.

What is the purpose of square brackets in the state-transition diagram, and what do they contain?

The square brackets contain a conditional that can be evaluated either True or False, acting as a guard allowing the transition only if the condition is true.

What is the advantage of using a state-transition table in modeling system behavior?

The advantage of a state-transition table is that it lists all possible state-transition combinations, not just the valid ones.

How is a state-transition table built, and what are the four columns it consists of?

A state-transition table is built by iterating through each state of the system, each event/trigger of the system, and documenting the corresponding (Action, Next State) if any, and it consists of four columns: Current State, Event, Action/output, and Next State.

What is the significance of testing every state-transition pair in critical systems, and what is the purpose of this testing?

Testing every state-transition pair is required in critical systems, such as avionics or medical devices, to ensure that all possible combinations are validated, including those that are not valid.

How does a state-transition table help in identifying invalid state transitions, and what is the benefit of this?

A state-transition table helps in identifying invalid state transitions by listing all possible state-transition combinations, which allows for validation of invalid transitions and ensures that the system behaves as expected.

What is the relationship between use case testing and state-transition diagrams, and how do they complement each other?

Use case testing and state-transition diagrams are related in that they both model system behavior, with use case testing focusing on user interactions and state-transition diagrams focusing on system states, and they complement each other by providing a comprehensive view of system behavior.

Study Notes

State-Transition Diagrams and Testing

  • State-Transition diagrams are excellent tools to capture system requirements that describe states and their associated transitions.
  • They direct testing efforts by identifying the states, events, and transitions that should be tested.
  • The generally recommended level of testing using state-transition diagrams is to create a set of test cases that exercise all transitions at least once.

Levels of Testing

  • Create a set of test cases such that all states are "visited" at least once under test (weak level of coverage).
  • Create a set of test cases such that all events are triggered at least once under test (weak level of coverage).
  • Create a set of test cases such that all paths are executed at least once under test (most preferred but may not be feasible).
  • Create a set of test cases such that all transitions are exercised at least once under test.

State-Transition Tables

  • State-Transition tables consist of four columns: Current State, Event, Action/output, and Next State.
  • They provide a complete and systematic way to document system behavior.
  • They list all possible state-transition combinations, including invalid ones.
  • They are useful for testing critical, high-risk systems where every state-transition pair needs to be tested.

Advantages and Limitations

  • State-Transition diagrams are not applicable when the system has no state or does not need to respond to real-time events from outside the system.
  • The disadvantage of state-transition tables is that they become very large and sparse as the number of states and events increases.
  • Using state-transition tables can help detect defects in implementation that enable invalid paths from one state to another.

This quiz covers software testing strategies, including testing levels and state transition tables. It explores the recommended level of testing and the importance of testing invalid state/event pairs.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser