Você está na página 1de 2

SYSC 3303 - Project: Elevator System

Test Plan

Functional Testing
This test ensures that the system functions properly - starting the dispatcher and
elevator(s) and verifying that they send and receive messages properly. Here is an example test
we plan to run once the system is functioning.
Initialization of system
Input: Start the dispatcher and elevators
Output: Console/Log file
Expected output:
Dispatcher: Started on localhost:1000
Elevator 1: Started on localhost:2000
Elevator 1: Found dispatcher on localhost:1000
Dispatcher: Elevator 1 registered at localhost:2000
Elevator 2: Started on localhost:3000
Elevator 2: Found dispatcher on localhost:1000
Dispatcher: Elevator 2 registered at localhost:3000

For the dispatcher request every 500ms and elevator response within 15ms
Input: None
Output: Console/Log file
Expected output:
Dispatcher: Requested status at 0ms
Elevator: Sent status at 7ms
Dispatcher: Requested status at 500ms
Elevator: Sent status at 502ms
...

Input: Click Up button on floor 5 on the GUI
Output: Console/Log file
Expected output:
Dispatcher: Dispatched Elevator 2 to Floor 5
Elevator 2: Arrived at Floor 5

Input: Select destination as floor 8 in elevator 2 on the GUI
Output: Console/Log file
Expected output:
Elevator 2: Next destination - Floor 8
Elevator 2: Arrived at Floor 8




Concurrency Testing
This test ensures that the dispatcher can communicate with multiple clients
instantaneously. In this test we will run the dispatcher on one computer, and 2-3 elevators on
other computers.
We would then run similar tests as in the functional testing case, except that the whole
system would be distributed among different computers.
We would make sure that the messages are received and sent asynchronously i.e. Each
send and receive would be a different thread of execution making the system faster.


Performance/Stress Testing
These set of tests would test the timing aspects of the system. They would also test the
system for user satisfaction.
Ensure that the system can fulfill the users request as quickly as possible. This will act
as a stress test for the dispatch algorithm of the dispatcher.
Log the start time when the user presses Up or Down button on a floor
Triggers dispatch algorithm in dispatcher. The dispatcher dispatches an elevator.
Elevator takes time to reach requested floor.
Log the end time when elevator arrives at requested floor.
Calculate the duration of wait time for the user.
Can provide a best, worst, and average time based on different initial positioning
of elevators.

Test the system with multiple users farthest apart from each other.
Multiple requests from bottom and top floor.
Log the duration and get best, worst and average time from multiple runs.

Stress test for high number of requests during peak period.
Test whether 10 requests can be completed in 1 minute, with 5 elevators and 20
floors.
Log the best, worst and average time based on requests from random floors and
random initial positioning of elevators.

Você também pode gostar