Click here to Skip to main content
15,893,508 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hello,
I'm developing an application in windows which interacts with another application in a remote system via TCP connection or serial connection. The interaction happens with the use of custom message formats (not xml but defined as classes). There is an endian difference between the windows and the remote system, so i need to handle the endian conversion too.
My problem is with the testing. I'm finding hard to test all the messages with all the combinations of data. Building a simulator to do the same will increase the development time
Is there any automated testing tool, which can generate my message formats, which i can use to test my data interface messages.
Thanks in Advance
Posted

1 solution

It's a bit hard to guess how you implemented your protocol. I think you should have at least something like List<YourProtocolStatements> or just a simple List<String>.
Having this you can easily iterate through your list and do your tests inside a try/catch.
Same applies to your data. As long as you have a finit amount of possible data just test it inside a loop.
If not you can only test all possible data types which should be a finit list.
Hope I could help with this
 
Share this answer
 
v2
Comments
pragenius 19-Apr-11 14:41pm    
Thank You mjbohn for the suggestion
The message cannot be implemented as List<string> because i need to convert it to the corresponding number of bytes (where as each character is a byte in a string). If i use string then if i have a 5 digit number it'll be sent as five bytes where as the integer is 4 bytes.
I have about 40 messages to be sent across network. Each message has a structure, but every message is identified by a value of a byte at a known location in the byte stream.
When i get the stream i check the value of byte and match it with corresponding message and decode the message.
The Problem is that the location of the message identifier field changes from system to system and i need to modify according and also i have to implement all the message classes in order to me to decode the message. I'm just looking for a way to overcome this location.
I need a software where i can define message formats and it decodes automatically
Hope i explained the situation clearly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900