Test type・Semi-normal test in communication protocol processing 

23/09/2020Test qualityy

Semi-normal test and abnormal test in the code that processes the communication protocol

First, let’s consider a semi-normal test and an abnormal test, taking as an example the processing that handles communication protocols that are often used in embedded software . Here, we will focus on the definition of communication protocol errors rather than source code processing, and sort out normal, semi-normal, and abnormal systems. As an example, assume a pseudo communication protocol in which the sender and receiver exchange the following telegrams (data to be communicated) with each other.

① Request command ② Response status ③ Data ④ Check code

In this communication protocol, the sender creates a telegram that specifies the request command in (1) and sends it to the receiver. In response to this, the recipient creates a telegram with the response status of (2) and the data of (3) set, and sends it back to the sender. It is assumed that a check code is attached to the end of each telegram so that it can be confirmed that the communication data from ① to ④ are not corrupted in the middle of the communication path.

Protocol processing when no error occurs is normal

In such a communication protocol, the process in which the request command and response status of (1) and (2) proceed in the defined order without error and the data of (3) is returned to the sender is defined first. This is the part that defines the functions provided by this protocol, and is the definition of normal processing .

Protocol processing when a defined error occurs is a semi-normal 

Next, what kind of procedure and what kind of response should be taken when some error occurs in the middle of communication is also defined as an error status in the response status of ②, and the content and procedure of the response for each error status. Has been decided. This is the definition of semi-normal processing because it is the processing for the defined error . For example, various pre-defined error handling is quasi-normal, such as re-sending data by resending because a timeout occurred in the middle of communication, or giving up resending because the data was not delayed correctly after repeating resending three times. It is defined as a system process.

Processing when an undefined error occurs is an abnormal 

As a communication protocol, only the procedures defined as normal processing and semi-normal processing defined by the combination of the request command (1) and the response status (2) are within the range that can be processed by that protocol . Other than that, nothing is defined in the communication protocol . However, in reality, there may be cases where a value not defined as a protocol is set in the response status of (2) due to a malfunction of the hardware of the communication path or a bug in the driver software that controls the hardware . This is an anomalous condition that is not defined in the protocol . And the actual error can occur, whether or not it is defined in the protocol.

To the communication protocol normal test in, the normal process to verify that the procedures defined as to operate as defined, semi-normal test the semi-normal processing that operates as a procedure defined as is defined Make sure. Then, in the abnormal  test , the operation when an abnormal state occurs , which is not defined in the normal system processing or the quasi-normal system processing, is confirmed.

Next : Test type・Semi-normal test in state transition
Back :  Test type・Normal test, abnormal test and semi-normal test
Return to :  Testing is the only way to guarantee software quality