Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The aim of this problem is to develop a test suite based on the N + approach. The following state machine models an E -
The aim of this problem is to develop a test suite based on the N approach. The following state machine models an Ebooking system used in airports for passenger selfcheckin Ebook.zip contains an implementation of the Ebooking system's state machine system the EbookingControl class with a basic simulator. Question Draw up a roundtrip path tree based on the state model of the Ebooking system. Question Provide compliance test suites and sneak paths for the Ebooking system. Each test case must have : An identifier A description of the test preparation eg the objects required for the the test case A test sequence in terms of start state, event, guard condition expected action conditionexpected action and expected system response new state Here's the ebooking class: package ebook.controller; public class EbookingControl enum Status IDLE LOOKINGUPRESERVATION, DISPLAYINGFLIGHT, WAITFORRESPONSE, WAITFORBAGGAGENUMBERS,WAITFORDOCUMENTSWITHRAWAL, SOUNDINGALARM private Status current; private IEbookingReaction reactions; public EbookingControlIEbookingReaction react setReactionsreact; set initial state setCurrentStatusIDLE; public Status getCurrent return current; public void setCurrentStatus current this.current current; public IEbookingReaction getReactions return reactions; public void setReactionsIEbookingReaction reactions this.reactions reactions; public void reservationNumber throws EbookingEventNotDefineException if current Status.IDLE reactions.lookupReservation; setCurrentStatusLOOKINGUPRESERVATION; else throw new EbookingEventNotDefineExceptionreservationNumber; public void found throws EbookingEventNotDefineException if current Status.LOOKINGUPRESERVATION reactions.displayFlight; setCurrentStatusDISPLAYINGFLIGHT; else throw new EbookingEventNotDefineExceptionfound; public void notFound throws EbookingEventNotDefineException if current Status.LOOKINGUPRESERVATION reactions.errorMessage; reactions.askForReservationNumber; setCurrentStatusIDLE; else throw new EbookingEventNotDefineExceptionnotFound; public void confirm throws EbookingEventNotDefineException if current Status.DISPLAYINGFLIGHT reactions.askForBaggages; setCurrentStatusWAITFORRESPONSE; else throw new EbookingEventNotDefineExceptionconfirm; public void change throws EbookingEventNotDefineException if current Status.DISPLAYINGFLIGHT reactions.displayReservationDetails; reactions.askCustomerWishToChange; else throw new EbookingEventNotDefineExceptionchange; public void cancel throws EbookingEventNotDefineException if current Status.DISPLAYINGFLIGHT current Status.WAITFORBAGGAGENUMBERS current Status.WAITFORDOCUMENTSWITHRAWAL current Status.WAITFORRESPONSE reactions.askForReservationNumber; setCurrentStatusIDLE; else throw new EbookingEventNotDefineExceptioncancel; public void no throws EbookingEventNotDefineException if current Status.WAITFORRESPONSE reactions.printBoardingPass; reactions.ejectBoardingPass; setCurrentStatusWAITFORDOCUMENTSWITHRAWAL; else throw new EbookingEventNotDefineExceptionno; public void yes throws EbookingEventNotDefineException if current Status.WAITFORRESPONSE reactions.askForNumberOfPieces; setCurrentStatusWAITFORBAGGAGENUMBERS; else throw new EbookingEventNotDefineExceptionyes; public void numberOfPieces throws EbookingEventNotDefineException if current Status.WAITFORBAGGAGENUMBERS reactions.printBoardingPass; reactions.ejectBoardingPass; reactions.printBaggageSlips; reactions.ejectBaggageSlips; reactions.displayProceedsToAgentMessage; setCurrentStatusWAITFORDOCUMENTSWITHRAWAL; else throw new EbookingEventNotDefineExceptionnumberOfPieces; public void withdrawDocuments throws EbookingEventNotDefineException if current Status.WAITFORDOCUMENTSWITHRAWAL reactions.askForReservationNumber; setCurrentStatusIDLE; else if current Status.SOUNDINGALARM reactions.stopAlarm; reactions.askForReservationNumber; setCurrentStatusIDLE; else throw new EbookingEventNotDefineExceptionwithdrawDocuments; public void timeout throws EbookingEventNotDefineException if current Status.WAITFORDOCUMENTSWITHRAWAL reactions.startAlarm; setCurrentStatusSOUNDINGALARM; else throw new EbookingEventNotDefineException event:"timeout";
The aim of this problem is to develop a test suite based on the N approach.
The following state machine models an Ebooking system used in airports
for passenger selfcheckin
Ebook.zip contains an implementation of the Ebooking system's state machine
system the EbookingControl class with a basic simulator.
Question
Draw up a roundtrip path tree based on the state model of the
Ebooking system.
Question
Provide compliance test suites and sneak paths for the
Ebooking system. Each test case must have :
An identifier
A description of the test preparation eg the objects required for the
the test case
A test sequence in terms of start state, event, guard condition expected action
conditionexpected action and expected system response new state Here's the ebooking class: package ebook.controller;
public class EbookingControl
enum Status IDLE LOOKINGUPRESERVATION, DISPLAYINGFLIGHT, WAITFORRESPONSE,
WAITFORBAGGAGENUMBERS,WAITFORDOCUMENTSWITHRAWAL, SOUNDINGALARM
private Status current;
private IEbookingReaction reactions;
public EbookingControlIEbookingReaction react
setReactionsreact;
set initial state
setCurrentStatusIDLE;
public Status getCurrent
return current;
public void setCurrentStatus current
this.current current;
public IEbookingReaction getReactions
return reactions;
public void setReactionsIEbookingReaction reactions
this.reactions reactions;
public void reservationNumber throws EbookingEventNotDefineException
if current Status.IDLE
reactions.lookupReservation;
setCurrentStatusLOOKINGUPRESERVATION;
else
throw new EbookingEventNotDefineExceptionreservationNumber;
public void found throws EbookingEventNotDefineException
if current Status.LOOKINGUPRESERVATION
reactions.displayFlight;
setCurrentStatusDISPLAYINGFLIGHT;
else
throw new EbookingEventNotDefineExceptionfound;
public void notFound throws EbookingEventNotDefineException
if current Status.LOOKINGUPRESERVATION
reactions.errorMessage;
reactions.askForReservationNumber;
setCurrentStatusIDLE;
else
throw new EbookingEventNotDefineExceptionnotFound;
public void confirm throws EbookingEventNotDefineException
if current Status.DISPLAYINGFLIGHT
reactions.askForBaggages;
setCurrentStatusWAITFORRESPONSE;
else
throw new EbookingEventNotDefineExceptionconfirm;
public void change throws EbookingEventNotDefineException
if current Status.DISPLAYINGFLIGHT
reactions.displayReservationDetails;
reactions.askCustomerWishToChange;
else
throw new EbookingEventNotDefineExceptionchange;
public void cancel throws EbookingEventNotDefineException
if current Status.DISPLAYINGFLIGHT
current Status.WAITFORBAGGAGENUMBERS
current Status.WAITFORDOCUMENTSWITHRAWAL
current Status.WAITFORRESPONSE
reactions.askForReservationNumber;
setCurrentStatusIDLE;
else
throw new EbookingEventNotDefineExceptioncancel;
public void no throws EbookingEventNotDefineException
if current Status.WAITFORRESPONSE
reactions.printBoardingPass;
reactions.ejectBoardingPass;
setCurrentStatusWAITFORDOCUMENTSWITHRAWAL;
else
throw new EbookingEventNotDefineExceptionno;
public void yes throws EbookingEventNotDefineException
if current Status.WAITFORRESPONSE
reactions.askForNumberOfPieces;
setCurrentStatusWAITFORBAGGAGENUMBERS;
else
throw new EbookingEventNotDefineExceptionyes;
public void numberOfPieces throws EbookingEventNotDefineException
if current Status.WAITFORBAGGAGENUMBERS
reactions.printBoardingPass;
reactions.ejectBoardingPass;
reactions.printBaggageSlips;
reactions.ejectBaggageSlips;
reactions.displayProceedsToAgentMessage;
setCurrentStatusWAITFORDOCUMENTSWITHRAWAL;
else
throw new EbookingEventNotDefineExceptionnumberOfPieces;
public void withdrawDocuments throws EbookingEventNotDefineException
if current Status.WAITFORDOCUMENTSWITHRAWAL
reactions.askForReservationNumber;
setCurrentStatusIDLE;
else if current Status.SOUNDINGALARM
reactions.stopAlarm;
reactions.askForReservationNumber;
setCurrentStatusIDLE;
else throw new EbookingEventNotDefineExceptionwithdrawDocuments;
public void timeout throws EbookingEventNotDefineException
if current Status.WAITFORDOCUMENTSWITHRAWAL
reactions.startAlarm;
setCurrentStatusSOUNDINGALARM;
else
throw new EbookingEventNotDefineException event:"timeout";
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started