TESTING

Run the following command to test the message parser:

$sh testParser

to test the available messages against the test library

the parser apparently parses the reply-to parameter correctly but it doesn't print it

the uerdefined parameter(from the agentAID expansion) must be uncommented and finished

all the test messages left that fail the parsing involve userdefined parmeters for agentAID so once that is fixed they should all parse

-----------------------------------------------------------------------------------------------------------


The following test files were generated by creating different messages in the test.cpp and using the generator to write their binary encodings to the respective output files. The files were then passed as arguments to the parser. Where needed, some were manually checked.


TestMessage.txt --> simple acl message, preset performative --> passes test

TestMessage2.txt --> simple acl message, user defined performative --> does not pass(checked manually it does)

TestMessage3.txt --> simple acl message, preset performative, conversationID field also set --> does not pass(checked manually it does)

TestMessage4.txt --> simple acl message, preset performative, an user defined parameter added --> does not pass(checked manually it does)

TestMessage5.txt --> simple acl message, preset performative, two user defined parameters were added(one of which identical to the userdef from TestMessage4.txt example) --> does not pass(checked manually it does)

TestMessage6.txt --> simple acl message, preset performative, reply_by1 parameter set(time of reply as string) --> does not pass(checked manually it does)

TestMessage7.txt --> simple acl message, preset performative, and Agent AID object set as sender -->passes test(don't understand why, relative to the previous ones)

TestMessage8.txt & TestMessage9.txt --> simple acl messages, preset performative, and Agent AID object as sender and one or two respectively Agent AID objects as receivers --> pass test

TestMessage10.txt - TestMessage13.txt --> played with agent AIDs as parameters for message added one and more receivers, added one or more resolvers for some, modiffied res_depth parameter in the encoding, and added some url adresses for some. --> all passed the test(seems to work well with agentAIDs)

TestMessage14.txt --> like TestMessage13.txt but with an userdefined parameter added to one of the agentAIDs --> did not pass(manual check not very thorough due to complexity but i think it should have passed)

Byte-wise specification for TestMessage16.txt -> message with predefined message perfrmative and one userdefined parameter set.

the encoding generated by the message generator was:
fa 10 15 00 10 63 72 65 74 7a 75 00 14 22 6d 61 72 65 22 00 01

fa - message id
10 - message version
15 - message type(preset performative)
00 - begin user-defined parameter marker
10 .... 00 - mark a binWord (the parameter name)

63 72 65 74 7a 75 - ascii for the parameter name binWord(cretzu)

14 ....00 - mark a binString(the parameter value)

22 6d 61 72 65 22 - ascii for the parameter value plus the surounding quotation marks("mare")

01 - endOfMessage
