Protocol Testing comes under software testing, as in this testing the structure of packets which travel through the network is checked and analyzed. Protocol testing is carried out in different layers of the network of different networks model.
Technically speaking, protocols in a network is nothing but a set of rules which govern the flow of packets through the network. And when we speak about the network it means, the different network elements which store and forward the packets such as the router, switch, hubs, etc.
Let us see what are the different protocols used in different layers of network and what is the basic structure of a packet.
A packet is an aggregation of data which can be seen as the smallest group of bits which can travel through the network. Now, this smallest unit has a different name when we address it in different layers of the network also the protocols used are also different.
|Application Layer||HTTP, FTP, TFPT,SSH, POP/POP3, Telnet|
|Presentation Layer||JPEG, MPEG, TFT,MIDI|
|Session Layer||NetBIOS, NFS, SQL, PAP, SCP, ZIP|
|Transport Layer||TCP, UDP|
|Network Layer||ICMP, IGMP, RIP,IPsec, IPV4, IPV6.|
|Data Link Layer||ARP, ATM, CDP, FDDI, Frame Relay, HDLC, MPLS, Token Ring, STP, PPP.|
|Physical Layer||Bluetooth, Ethernet, DSL,ISDN, Wifi , 802.11|
In the above table, it is clearly visible that which layer is using which protocol. Before preparing for the protocol testing one should be clear on which layer the testing is going to be performed and for which protocol.
Below we shall a basic structure of a TCP packet. As this protocol testing is all about testing the structure of the packet, therefore, its necessary to have the basic idea of how a network packet looks like.
As shown in the figure above, this is a TCP packet. Let us see what are the functions of different fields of this TCP packet.
For protocol testing, we need a protocol analyzer and a simulator. The process is to make a virtual environment by creating virtual devices, and then installing certain protocols on them. The devices under test are made to run with suitable protocols.
The protocols are provided with the help of simulators and the test is recorded by the analyzer. The analyzer traces the packet and records the behavior of the packet and see whether there is any change in the behavior of the packet.
There may be changes in the structure of the packet like the alteration of the data bit or the checksum may have an error which may result in mischecking of the data bit.
There are also tools for checking the performance and efficiency of the software.
There are different attributes and properties which are checked during protocol testing. Let us see the most important ones:
Protocol Testing can be divided into functional and non-functional categories, the same as that of software testing. Now we know that the elements such as performance, efficiency, speed, etc are the non-functional attributes whether the functional testing includes conformance testing, negative testing, etc.
Let us discuss only about the functional testing:
There can be different scenarios which may be considered while designing different types of protocol testing test cases. Here, we shall see only some examples of a test case with their descriptions.
Test Case ID: TC01
Test Case Name: Line Operating Speed.
Description: To test the operating speed of a device at a speed of 50 Mbps. Also to check whether, in the process, proper utilization of bandwidth is done and the traffic is handled properly.
Test Case ID: TC02
Test Case Name: Protocol Conversion Rate
Description: To test and check the protocol conversion(in TCP/IP) between devices for verifying their correct operating behavior.
Test Case ID: TC03
Test Case Name: Response Time:
Description: To test the Response Time in a device when a particular protocol is being used in the system.
This is an open source tool available on the internet. This tools can be used to create packets and encode and decode them into the network. Also, packets can be captured through this software can be analyzed from any part of the network.
This tool is also used to inject packets into the network arbitrarily for performing the test.
This is a powerful protocol testing, in which realtime packets can be captured and analyzed. Also, the property that makes this tool the most powerful is that it can track a packet when the packet is inside the traffic itself and can differentiate them by assigning different color codes to them.
TTCN is more of a programming language than a tool. Using TTCN, different test cases can be written and applied to check and test different behavior of packets.
This programming language is also used to write automation and performance test scripts for carrying out protocol testing.
This tool is used for testing network performance, which is using a specific protocol.