REMARK 1: To be abe to execute the test server you must have a correct java environnement compatible with the sun JDK v 1.4.java Testing.TestServerMain [Product] [in_file] [out_file]
- [Product] : the server product to build (Demo, Personal or Enterprise).
- [in_file] : optional input file.
- [out_file]: optional output file.
Here is an exemple of input file (You can find more exemples in the "tests" sub-directory of the project) :[channel] [COMMAND] [ARGS]
# 3 users connecting
1 CONNECT buffy
2 CONNECT tara
3 CONNECT willow
# the user 1 creates a standard meeting
1 CREATE standard magicbox
# user 1 sets Title, Agenda and Moderator for the created meeting
1 SET magicbox TITLE vampires and deamons
1 SET magicbox AGENDA Reserches on paranormal activities
1 SET magicbox MODERATOR tara
# Opening meeting and all users entering
2 OPEN magicbox
1 ENTER magicbox
2 ENTER magicbox
3 ENTER magicbox
# check if all users are InMeeting and meeting is open
DUMP
# test speaking features
1 ASK
2 HANDOVER buffy
1 SPEAK Hi everyone !
3 ASK
1 SPEAK Welcome to the magic box !
2 OVER
1 ASK
2 HANDOVER willow
3 SPEAK guys! what are you doing ?
2 OVER
2 ASK
# check that 1 and 2 are waiting to speak and meeting open
DUMP
2 HANDOVER buffy
1 SPEAK hey! I can speak again !
2 OVER
2 HANDOVER tara
2 SPEAK Moderator or not I can also speak !
1 LEAVE
2 SPEAK where is buffy
3 ASK
# check that 3 is waiting, 2 is speaking.
DUMP
2 OVER
2 HANDOVER willow
3 SPEAK Aparently she left...
2 OVER
3 LEAVE
2 LEAVE
2 CLOSE magicbox
# check all users are Registred and meeting is closed
DUMP
EXIT
Virtual meeting test server outputs are quite simples. Every times the server sends a message, the first fiels is the channel that the server used to send the message, then the server writes the message origin and last the message itself :Virtual meeting server starting...
-> EXIT to quit server.
-> DUMP to view server internal state.
Server is ready !
COMMENT : 3 users connecting
COMMENT : the user 1 creates a standard meeting
COMMENT : user 1 sets Title, Agenda and Moderator for the created meeting
COMMENT : Opening meeting and all users entering
COMMENT : check if all users are InMeeting and meeting is open
Virtual Meeting Server dump :
USERS :
3 willow English MtgServer.InMeeting magicbox
2 tara English MtgServer.InMeeting magicbox
1 buffy English MtgServer.InMeeting magicbox
MEETINGS :
magicbox MtgServer.Opened
--------------------------------
COMMENT : test speaking features
2| Server:magicbox -> buffyAskingToSpeak
3| magicbox:buffy -> Hi everyone !
2| magicbox:buffy -> Hi everyone !
1| magicbox:buffy -> Hi everyone !
2| Server:magicbox -> willowAskingToSpeak
3| magicbox:buffy -> Welcome to the magic box !
2| magicbox:buffy -> Welcome to the magic box !
1| magicbox:buffy -> Welcome to the magic box !
2| Server:magicbox -> buffyAskingToSpeak
3| magicbox:willow -> guys! what are you doing ?
2| magicbox:willow -> guys! what are you doing ?
1| magicbox:willow -> guys! what are you doing ?
2| Server:magicbox -> taraAskingToSpeak
COMMENT : check that 1 and 2 are waiting to speak and meeting open
Virtual Meeting Server dump :
USERS :
3 willow English MtgServer.InMeeting magicbox
2 tara English MtgServer.WaitingToSpeak magicbox
1 buffy English MtgServer.WaitingToSpeak magicbox
MEETINGS :
magicbox MtgServer.Opened
--------------------------------
3| magicbox:buffy -> hey! I can speak again !
2| magicbox:buffy -> hey! I can speak again !
1| magicbox:buffy -> hey! I can speak again !
3| magicbox:tara -> Moderator or not I can also speak !
2| magicbox:tara -> Moderator or not I can also speak !
1| magicbox:tara -> Moderator or not I can also speak !
3| magicbox:tara -> where is buffy
2| magicbox:tara -> where is buffy
2| Server:magicbox -> willowAskingToSpeak
COMMENT : check that 3 is waiting, 2 is speaking.
Virtual Meeting Server dump :
USERS :
3 willow English MtgServer.WaitingToSpeak magicbox
2 tara English MtgServer.Speaking magicbox
1 buffy English MtgServer.Registered
MEETINGS :
magicbox MtgServer.ThereIsASpeaker
--------------------------------
3| magicbox:willow -> Aparently she left...
2| magicbox:willow -> Aparently she left...
COMMENT : check all users are Registred and meeting is closed
Virtual Meeting Server dump :
USERS :
3 willow English MtgServer.Registered
2 tara English MtgServer.Registered
1 buffy English MtgServer.Registered
MEETINGS :
magicbox MtgServer.Closed
--------------------------------
The comments are preceded by "COMMENT" and dumps are quite clear no ?[channel] | [Origin] -> Message
java Testing.TraceServerMain [trace_file] [Product] [in_file] [out_file]
- [trace_file]: the file to write trace into.
- [Product] : the server product to build (Demo, Personal or Enterprise).
- [in_file] : input file of the server.
- [out_file] : output file of the server.
**** Method call trace ****
CALL Testing.DummyServer.run
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.getNextCommand
| CALL MtgServer.Server.exec
| | CALL MtgServer.Connect.run
| | | CALL MtgServer.Server.getUser
| | | CALL MtgServer.Server.getUserByName
| | | CALL MtgServer.Server.createAndAddUser
| | | | CALL MtgServer.User.<init>
| | | | | CALL MtgServer.ServerMessages.getInstance
| | | | | CALL MtgServer.ServerMessages.getDefaultLanguage
| | | | CALL MtgServer.User.connect
| | | | | CALL MtgServer.Registered.<clinit>
| | | | | CALL MtgServer.Registered.getInstance
| | | | | | CALL MtgServer.Registered.<init>
| | | | | | | CALL MtgServer.UserState.<init>
| | | | | CALL MtgServer.User.setCurrentState
| CALL Testing.DummyInterface.getNextCommand
[...]
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.getNextCommand
*************************************************************************************
**** Line of code covered ****
languages.java : 28.
DummyInterface.java : 69, 70, 71, 72, 77.
Command.java : 44, 46, 49, 52, 53.
LanguageMsg.java : 41, 42, 43.
User.java : 72, 73, 74, 75, 76, 123, 161, 162, 165, 166, 167, 168, 169.
Connect.java : 23, 28, 30, 35, 38, 44, 45.
Message.java : 66, 67, 68, 69, 70.
DummyServer.java : 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46.
UserState.java : 6.
Server.java : 142, 145, 146, 148, 149, 150, 156, 158, 164, 238, 239, 240,244, 255, 257,
259, 261, 265, 266, 267, 269, 270, 271, 273, 274, 276, 280, 281.
ServerMessages.java : 80, 81.
Registered.java : 18, 24.
*************************************************************************************
**** Contract repartition ****
**-*-----*-*-----*-*-----*-*-----*--*-*------*---------*-*-*-----*----*--*-*----*--*-*-
*--*--*-***-*-*-*-*--*-*--*-*--*-*-*--*-*------*---------*-*-*-----*-----*-*---*--*-*--
--*--*-*-*--*--*-*--*-*--*-*--*-*-*--*-*------*---------*-*-*-----*-----*-*----*-*---*-
-*-*----*--*-*-*--*--*-*--*-*--*-*--*-*-*--*-*------*---------*-*-*-----*-----*-*----*-
*----*-*---*--*-*----*--*-*-*--*--*-*--*-*--*-*--*-*-*--*-*------*---------*-*-*-----*-
----*-*----*-*----*-*----*-*-*--*--*--*--*-*-*-*--*-*---*-*-*-*--*--*--*-*-*-*--*---*-*
-*-*-----*-*-*-*-*-*-*-----*-*-*-*-*--*-*------*---------*-*-*--*--*--*---*-*-*-*--*-*-
--*-*-*-*--*--*---*-*-*-*--*---*-*-*-*-----*-*-*-*-*-*-*-----*-*-*-*-*--*-*---*-----*-*
--*--*-*----*---*-*--*--*-*----*---*-*--*--*-*----*---*-*--*--*-*----*-------*-*-----*-
-*-*---*
Contracts on execution path : 250
Length of execution path : 540.0
Contracts distribution indice : 0.5216594
*************************************************************************************