Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Windows IP testing Networking , +
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 9-Apr-11 7:34am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
v2
Comments
pragenius at 19-Apr-11 14:41pm
   
Thank You mjbohn for the suggestion
The message cannot be implemented as List 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)



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 11 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100