CN110336869A - The test method and system of data interaction - Google Patents
The test method and system of data interaction Download PDFInfo
- Publication number
- CN110336869A CN110336869A CN201910578008.9A CN201910578008A CN110336869A CN 110336869 A CN110336869 A CN 110336869A CN 201910578008 A CN201910578008 A CN 201910578008A CN 110336869 A CN110336869 A CN 110336869A
- Authority
- CN
- China
- Prior art keywords
- communication module
- server
- data
- client
- side communication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses the test method and system of the data interaction in a kind of TCP/IP network, the controller of the test macro establishes communication connection for controlling between server-side communication module and client communication module;Controller sends the first test data to client communication module for controlling server-side communication module, and control client communication module sends the second test data to server-side communication module;Controller, which is also used to determine, can successfully carry out data interaction between server-side communication module and client communication module.The present invention is substituted using server module by the way of third-party server, realize the automatic test course of the data interaction between server module and client modules, overcome existing can not continue to test based on existing break down of third-party server, the defects of at high cost, by the minimizing of influence of the intermediate link in data exchange process, unstable factor bring risk is avoided.
Description
Technical field
The present invention relates to data test technical field, in particular to the test method and system of a kind of data interaction.
Background technique
Currently, computer connection internet will make ICP/IP protocol (transmission control protocol/Internet Protocol), it is clear that
The agreement is at " agreement hand in hand " of current global village " person to person ".The following test relevant to TCP/IP is also got over
Come more important.
And data interaction is connected and carried out with client using third-party server in the prior art, it is inevitably present
Following defect:
(1) it will cause test abnormal end if third-party server breaks down dependent on third-party server, it can not
Guarantee that test smoothly completes;
(2) intermediate link being related to is more, therefore the uncontrollable factor of data transmission is also more therewith, it is difficult to guarantee data
The stability of transmission;
(3) because needing the support of third-party server, so there are the higher problems of input cost;
(4) artificial participation is needed, is existed and is wasted time, reduce testing efficiency, increase the problems such as human cost.
Summary of the invention
The technical problem to be solved by the present invention is to realize data based on third-party server in the prior art to overcome
Interactive testing exists excessively dependent on third-party server, is unable to complete successfully test if breaking down, and there are more shakinesses
Determine factor, the defects of input cost is higher, provides the test method and system of a kind of data interaction.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The present invention provides a kind of test macro of the data interaction in TCP/IP network, and the test macro includes server-side
Communication module, client communication module and controller;
The controller is communicated for controlling to establish between the server-side communication module and the client communication module
Connection;
The controller is also used to be successfully established between the server-side communication module and the client communication module
After connection, the server-side communication module is controlled to the client communication module and sends the first test data, and described in control
Client communication module sends the second test data to the server-side communication module;
The controller is also used to be successfully received first test data and described in the client communication module
When server-side communication module is successfully received second test data, the server-side communication module and the client are determined
Data interaction can be successfully carried out between communication module.
Preferably, the controller be also used between the server-side communication module and the client communication module at
After function establishes connection, the server-side communication module is controlled to the client communication module and sends first test data;
After the controller determines that the client communication module is successfully received first test data, institute is controlled
It states client communication module and sends second test data to the server-side communication module;
After the controller determines that the server-side communication module is successfully received second test data, the control
Device processed can successfully carry out data interaction for determining between the server-side communication module and the client communication module;
Or,
The controller sends described second to the server-side communication module for controlling the client communication module
Test data;
After the controller determines that the server-side communication module is successfully received second test data, institute is controlled
It states server-side communication module and sends the first test data to the client communication module;
After the controller determines that the client communication module is successfully received first test data, the control
Device processed can successfully carry out data interaction for determining between the server-side communication module and the client communication module.
Preferably, the controller establishes the first socket (socket) for controlling the server-side communication module;
The controller is also used to control the client communication module and establishes the 2nd socket;
The controller is also used to control the server-side communication module and the client communication module by described the
One socket and the 2nd socket establishes communication connection.
Preferably, the first socket include the server-side communication module (Internet protocol address) address IP and
Port numbers;
The controller is also used to control the 2nd socket of the client communication module according to the IP address
It establishes and communicates to connect with the port numbers and the first socket.
Preferably, the controller is used to obtain the first URC that the server-side communication module reports, (unified resource is special
Property) data, and judge whether the first URC data are correct, if so, determining the server-side communication module and the client
Connection is successfully established between the communication module of end;If not, it is determined that the server-side communication module and the client communication module
Between connection failure.
Preferably, the controller is for determining between the server-side communication module and the client communication module
After data interaction successfully capable of being carried out, the 2nd socket for controlling the client communication module is closed, and described in acquisition
The 2nd URC data that client communication module is reported to the server-side communication module;
The controller is also used to after receiving the 2nd URC data, controls the institute of the server-side communication module
State the first socket closing;Or,
The first socket that the controller is used to control the server-side communication module is closed, and obtains the clothes
The 3rd URC data that business end communication module is reported to the client communication module;
The controller is also used to after receiving the 3rd URC data, controls described the of the client communication module
Two socket are closed.
The present invention also provides a kind of test method of the data interaction in TCP/IP network, the test method is using above-mentioned
TCP/IP network in the test macro of data interaction realize that the test method includes:
S1, it controls and establishes communication connection between the server-side communication module and the client communication module;
S2, after being successfully established connection between the server-side communication module and the client communication module, institute is controlled
It states server-side communication module and sends the first test data, and the control client communication module to the client communication module
The second test data is sent to the server-side communication module;
When the client communication module be successfully received first test data and the server-side communication module at
When function receives second test data, determining can between the server-side communication module and the client communication module
Success carries out data interaction.
Preferably, step S2 is specifically included:
After determining that the client communication module is successfully received first test data, it is logical to control the client
Believe that module sends second test data to the server-side communication module;
After determining that the server-side communication module is successfully received second test data, determine that the server-side is logical
Data interaction can be successfully carried out between letter module and the client communication module;Or,
It controls the client communication module and sends second test data to the server-side communication module;
After determining that the server-side communication module is successfully received second test data, it is logical to control the server-side
Believe that module sends the first test data to the client communication module;
After determining that the client communication module is successfully received first test data, determine that the server-side is logical
Data interaction can be successfully carried out between letter module and the client communication module.
Preferably, step S1 is specifically included:
S11, the control server-side communication module establish the first socket;
S12, the control client communication module establish the 2nd socket;
S13, the control server-side communication module and the client communication module pass through the first socket and institute
It states the 2nd socket and establishes communication connection.
Preferably, the first socket includes the IP address and port numbers of the server-side communication module;
Step S13 is specifically included:
The 2nd socket of the client communication module is controlled according to the IP address and the port numbers and institute
It states the first socket and establishes communication connection.
Preferably, including: after step S1
The first URC data that the server-side communication module reports are obtained, and whether just to judge the first URC data
Really, connection is successfully established between the server-side communication module and the client communication module if so, determining;If it is not, then
Determine connection failure between the server-side communication module and the client communication module.
Preferably, the test method further include:
Data interaction can be successfully carried out between the server-side communication module and the client communication module determining
Afterwards, the 2nd socket for controlling the client communication module is closed, and obtains the client communication module to described
The 2nd URC data that server-side communication module reports;
After receiving the 2nd URC data, the first socket for controlling the server-side communication module is closed;
Or,
Control the server-side communication module the first socket close, and obtain the server-side communication module to
The 3rd URC data that the client communication module reports;
The controller is also used to after receiving the 3rd URC data, controls the institute of the client communication module
State the 2nd socket closing.
The positive effect of the present invention is that:
In the present invention, it is no longer based on third-party server, but uses the side of server module substitution third-party server
Formula realizes the automatic test course of the data interaction between server module and client modules, overcomes existing be based on
The defects of existing break down of third-party server can not continue to test, at high cost, by the intermediate ring in data exchange process
The minimizing of influence of section avoids unstable factor bring risk, and the TCP clothes for being suitable for realizing between all modules
The data interaction of business communicates, and has universality;Meanwhile reducing the investment of human cost, improve testing efficiency.
Detailed description of the invention
Fig. 1 is the module diagram of the test macro of the data interaction in the TCP/IP network of the embodiment of the present invention 1.
Fig. 2 is the flow chart of the test method of the data interaction in the TCP/IP network of the embodiment of the present invention 3.
Fig. 3 is the flow chart of the test method of the data interaction in the TCP/IP network of the embodiment of the present invention 4.
Specific embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to the reality
It applies among a range.
Embodiment 1
As shown in Figure 1, the test macro of the data interaction in the TCP/IP network of the present embodiment includes server-side communication mould
Block 1, client communication module 2 and controller 3.
Wherein it is possible to according to actual needs using any one communication module as server-side communication module 1, by another communication mould
Block is as server-side communication module, for example, server-side communication module 1 can connect to be a kind of with SIM card (subscriber identification card)
Connect the protenchyma connected network communication module for realizing wireless communication, the existing third party's service of the protenchyma connected network communication module simulation
Device realizes communication connection and data interaction between client communication module.
Controller 3 establishes communication connection for controlling between server-side communication module 1 and client communication module 2.
After being successfully established connection between server-side communication module 1 and client communication module 2, controller 3 is for controlling
Server-side communication module 1 sends the first test data to client communication module 2, and controls client communication module 2 to service
Communication module 1 is held to send the second test data;
Controller 3 is also used to be successfully received the first test data and server-side communication module 1 when client communication module 2
When being successfully received the second test data, determining can successfully be carried out between server-side communication module 1 and client communication module 2
Data interaction.
Wherein, the data type (two kinds of data types of such as TEXT and HEX) of the first test data and the second test data is wrapped
TCP data is included but be not limited to, also may include other kinds of data, as long as meeting TCP/IP network.
In the present embodiment, it is no longer based on third-party server, but uses server module substitution third-party server
Mode realizes the automatic test course of the data interaction between server module and client modules, overcomes existing base
The defects of failure existing for third-party server can not continue to test, at high cost, and will be in data exchange process
Between link minimizing of influence, avoid unstable factor bring risk, and be suitable for realizing between all modules
The data interaction communication of TCP service, has universality;Meanwhile reducing the investment of human cost, improve testing efficiency.
Embodiment 2
The test macro of data interaction in the TCP/IP network of the present embodiment is the further improvement to embodiment 1, tool
Body:
Controller 3 establishes the first socket for controlling server-side communication module 1;
Wherein, controller 3 is also used to judge whether server-side communication module 1 is successfully established the first socket, if not at
Function is established, then controls server-side communication module 1 and re-establish the first socket, until being successfully established.
Controller 3 is also used to control client communication module 2 and establishes the 2nd socket;
Controller 3 is also used to control server-side communication module 1 and client communication module 2 and passes through the first socket and second
Socket establishes communication connection.
Specifically, the first socket includes the IP address and port numbers of server-side communication module 1;
Controller 3 is also used to control the 2nd socket of client communication module 2 according to IP address and port numbers and first
Socket establishes communication connection.
Whether controller 3 judges the first URC data for obtaining the first URC data that server-side communication module 1 reports
Correctly, if so, determining that server-side communication module 1 and client communication module 2 are successfully established connection;If not, it is determined that service
Hold connection failure between communication module 1 and client communication module 2.
Wherein, the first URC data are the content that 1 not timing of server-side communication module reports, such as mark, instruction, message.
When the mark in the first URC data, instruction, message indicate that mistake occurs for current connection, it is determined that the first URC count it is existing not just
Really (there is a situation where mistakes).
After being successfully established connection between server-side communication module 1 and client communication module 2, controller 3 is for controlling
Server-side communication module 1 sends the first test data to client communication module 2;
After controller 3 determines that client communication module 2 is successfully received the first test data, client communication mould is controlled
Block 2 sends the second test data to server-side communication module 1;
After controller 3 determines that server-side communication module 1 is successfully received the second test data, controller 3 is for determining
Data interaction can be successfully carried out between server-side communication module 1 and client communication module 2;Or,
Controller 3 sends the second test data to server-side communication module 1 for controlling client communication module 2;
After controller 3 determines that server-side communication module 1 is successfully received the second test data, control server-side communicates mould
Block 1 sends the first test data to client communication module 2;
After controller 3 determines that client communication module 2 is successfully received the first test data, controller 3 is for determining
Data interaction can be successfully carried out between server-side communication module 1 and client communication module 2.
In addition, controller 3 is also used to succeed between server-side communication module 1 and client communication module 2 determining
When carrying out data interaction, the 2nd socket of control client communication module 2 is closed, and obtains client communication module 2 to clothes
The 2nd URC data that business end communication module 1 reports;
Controller 3 is also used to after receiving the 2nd URC data, and the first socket of control server-side communication module 1 is closed
It closes;Or,
The first socket for controlling server-side communication module 1 is closed, and obtains server-side communication module 1 to client communication
The 3rd URC data that module 2 reports;
Wherein, the 3rd URC data include that the information of the first socket is closed for server-side communication module 1.
Controller 3 is also used to after receiving the 3rd URC data, and the 2nd socket of control client communication module 2 is closed
It closes.
After the completion of each test, the first socket of server-side communication module 1 is closed and client communication respectively
2nd socket of module 2 is closed, and can be effectively saved electric energy in this way, reduces consuming cost.
In addition, counting server-side communication module and client communication module for multiple socket connecting test process
The number of successful connection and the number of connection failure;Count server-side communication module to client communication module send data at
The number of function and the number of failure;It is successfully secondary to count the data that client communication module reception server-side communication module is sent
The number of number and failure;It counts client communication module and sends the successful number of data and failure to server-side communication module
Number;The number that server-side communication module receives the successful number of data that client communication module is sent and failure is counted,
And then according to the number of success that counts and the frequency of failure calculate multiple socket connect in data transmission failure rate and at
Power.
Wherein, whether data transmit-receive feelings unanimously are determined by comparing the data length of received data length and transmission
Condition, if the two unanimously if indicate data receiver success;Alternatively, if it is successful to receive transmission at the appointed time after data transmission
URC data, it is determined that data are sent successfully, send successful URC data if not receiving at the appointed time, it is determined that data
Failure is sent, and then statistical data sends the number of successful number and failure;Similarly, data receiver success and reception failure
Determination process is similar to the above, therefore details are not described herein again.
In the present embodiment, it is no longer based on third-party server, but uses server module substitution third-party server
Mode realizes the automatic test course of the data interaction between server module and client modules, overcomes existing base
The defects of failure existing for third-party server can not continue to test, at high cost, and will be in data exchange process
Between link minimizing of influence, avoid unstable factor bring risk, and be suitable for realizing between all modules
The data interaction communication of TCP service, has universality;Meanwhile reducing the investment of human cost, improve testing efficiency.
Embodiment 3
The test method of data interaction in the TCP/IP network of the present embodiment uses the survey of the data interaction in embodiment 1
Test system is realized.
As shown in Fig. 2, the test method of the present embodiment includes:
It establishes and communicates to connect between S101, control server-side communication module and client communication module;
S102, after being successfully established connection between server-side communication module and client communication module, it is logical to control server-side
Believe that module sends the first test data to client communication module, and control client communication module is sent out to server-side communication module
Send the second test data;
When client communication module is successfully received the first test data and server-side communication module is successfully received second
When test data, data interaction can successfully be carried out by determining between server-side communication module and client communication module.
Wherein, the data type (two kinds of data types of such as TEXT and HEX) of the first test data and the second test data is wrapped
TCP data is included but be not limited to, also may include other kinds of data, as long as meeting TCP/IP network.
In the present embodiment, it is no longer based on third-party server, but uses server module substitution third-party server
Mode realizes the automatic test course of the data interaction between server module and client modules, overcomes existing base
The defects of failure existing for third-party server can not continue to test, at high cost, and will be in data exchange process
Between link minimizing of influence, avoid unstable factor bring risk, and be suitable for realizing between all modules
The data interaction communication of TCP service, has universality;Meanwhile reducing the investment of human cost, improve testing efficiency.
Embodiment 4
As shown in figure 3, the test macro of the data interaction in the TCP/IP network of the present embodiment is to embodiment 1 into one
Step is improved, specifically:
Step S101 is specifically included:
S1011, control server-side communication module establish the first socket;
S1012, control client communication module establish the 2nd socket;
S1013, control server-side communication module and client communication module are built by the first socket and the 2nd socket
Vertical communication connection.
Specifically, the first socket includes the IP address and port numbers of server-side communication module;
Step S1013 is specifically included:
The 2nd socket for controlling client communication module is communicated according to IP address and port numbers with the first socket foundation
Connection.
Include: after step S101, before step S102
S1020, the first URC data that server-side communication module reports are obtained, and judge whether the first URC data are correct,
If so, determining that server-side communication module and client communication module are successfully established connection;If not, it is determined that server-side communicates mould
Connection failure between block and client communication module.
Wherein, the first URC data are the content that the not timing of server-side communication module reports, such as mark, instruction, message.
When the mark in the first URC data, instruction, message indicate that mistake occurs for current connection, it is determined that the first URC count it is existing not just
Really (there is a situation where mistakes).
Step S102 is specifically included:
After determining that client communication module is successfully received the first test data, client communication module is controlled to service
Communication module is held to send the second test data;
After determining that server-side communication module is successfully received the second test data, server-side communication module and client are determined
Data interaction can be successfully carried out between the communication module of end;Or,
It controls client communication module and sends the second test data to server-side communication module;
After determining that server-side communication module is successfully received the second test data, server-side communication module is controlled to client
Communication module is held to send the first test data;
After determining that client communication module is successfully received the first test data, server-side communication module and client are determined
Data interaction can be successfully carried out between the communication module of end.
After step S102 further include:
When determining successfully can carry out data interaction between server-side communication module and client communication module, control visitor
2nd socket of family end communication module is closed, and obtains client communication module is reported to server-side communication module second
URC data;
Controller is also used to after receiving the 2nd URC data, and the first socket of control server-side communication module is closed;
Or,
The first socket for controlling server-side communication module is closed, and obtains server-side communication module to client communication mould
The 3rd URC data that block reports;
Wherein, comprising the information for the first socket of server-side communication module closing.
Controller is also used to after receiving the first URC data, and the 2nd socket of control client communication module is closed.
After the completion of each test, the first socket of server-side communication module is closed and client communication mould respectively
2nd socket of block is closed, and can be effectively saved electric energy in this way, reduces consuming cost.
In addition, counting server-side communication module and client communication module for multiple socket connecting test process
The number of successful connection and the number of connection failure;Count server-side communication module to client communication module send data at
The number of function and the number of failure;It is successfully secondary to count the data that client communication module reception server-side communication module is sent
The number of number and failure;It counts client communication module and sends the successful number of data and failure to server-side communication module
Number;The number that server-side communication module receives the successful number of data that client communication module is sent and failure is counted,
And then according to the number of success that counts and the frequency of failure calculate multiple socket connect in data transmission failure rate and at
Power.
Wherein, whether data transmit-receive feelings unanimously are determined by comparing the data length of received data length and transmission
Condition, if the two unanimously if indicate data receiver success;Alternatively, if it is successful to receive transmission at the appointed time after data transmission
URC data, it is determined that data are sent successfully, send successful URC data if not receiving at the appointed time, it is determined that data
Failure is sent, and then statistical data sends the number of successful number and failure;Similarly, data receiver success and reception failure
Determination process is similar to the above, therefore details are not described herein again.
In the present embodiment, it is no longer based on third-party server, but uses server module substitution third-party server
Mode realizes the automatic test course of the data interaction between server module and client modules, overcomes existing base
The defects of failure existing for third-party server can not continue to test, at high cost, by the centre in data exchange process
The minimizing of influence of link avoids unstable factor bring risk, and the TCP for being suitable for realizing between all modules
The data interaction of service communicates, and has universality;Meanwhile reducing the investment of human cost, improve testing efficiency.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that this is only
For example, protection scope of the present invention is to be defined by the appended claims.Those skilled in the art without departing substantially from
Under the premise of the principle and substance of the present invention, many changes and modifications may be made, but these change and
Modification each falls within protection scope of the present invention.
Claims (12)
1. a kind of test macro of the data interaction in TCP/IP network, which is characterized in that the test macro includes server-side
Communication module, client communication module and controller;
The controller establishes communication connection for controlling between the server-side communication module and the client communication module;
The controller is also used to be successfully established connection between the server-side communication module and the client communication module
Afterwards, it controls the server-side communication module and sends the first test data, and the control client to the client communication module
Communication module is held to send the second test data to the server-side communication module;
The controller is also used to be successfully received first test data and the service in the client communication module
When end communication module is successfully received second test data, the server-side communication module and the client communication are determined
Data interaction can be successfully carried out between module.
2. the test macro of the data interaction in TCP/IP network as described in claim 1, which is characterized in that the controller
After being successfully established connection between the server-side communication module and the client communication module, the server-side is controlled
Communication module sends first test data to the client communication module;
After the controller determines that the client communication module is successfully received first test data, the visitor is controlled
Family end communication module sends second test data to the server-side communication module;
After the controller determines that the server-side communication module is successfully received second test data, the controller
Data interaction can be successfully carried out between the server-side communication module and the client communication module for determining;Or,
The controller sends second test to the server-side communication module for controlling the client communication module
Data;
After the controller determines that the server-side communication module is successfully received second test data, the clothes are controlled
End communication module of being engaged in sends the first test data to the client communication module;
After the controller determines that the client communication module is successfully received first test data, the controller
Data interaction can be successfully carried out between the server-side communication module and the client communication module for determining.
3. the test macro of the data interaction in TCP/IP network as described in claim 1, which is characterized in that the controller
The first socket is established for controlling the server-side communication module;
The controller is also used to control the client communication module and establishes the 2nd socket;
The controller is also used to control the server-side communication module and the client communication module by described first
Socket and the 2nd socket establishes communication connection.
4. the test macro of the data interaction in TCP/IP network as claimed in claim 3, which is characterized in that described first
Socket includes the IP address and port numbers of the server-side communication module;
The controller is also used to control the 2nd socket of the client communication module according to the IP address and institute
It states port numbers and the first socket is established and communicated to connect.
5. the test macro of the data interaction in TCP/IP network as described in claim 1, which is characterized in that the controller
The first URC data reported for obtaining the server-side communication module, and judge whether the first URC data are correct, if
It is, it is determined that be successfully established connection between the server-side communication module and the client communication module;If not, it is determined that institute
State connection failure between server-side communication module and the client communication module.
6. the test macro of the data interaction in TCP/IP network as claimed in claim 3, which is characterized in that the controller
For after determining and successfully can carry out data interaction between the server-side communication module and the client communication module, control
The 2nd socket for making the client communication module is closed, and obtains the client communication module to the server-side
The 2nd URC data that communication module reports;
The controller is also used to after receiving the 2nd URC data, controls described the of the server-side communication module
One socket is closed;Or,
The first socket that the controller is used to control the server-side communication module is closed, and obtains the server-side
The 3rd URC data that communication module is reported to the client communication module;
The controller is also used to after receiving the 3rd URC data, controls described the of the client communication module
Two socket are closed.
7. a kind of test method of the data interaction in TCP/IP network, which is characterized in that the test method is wanted using right
The test macro of data interaction in TCP/IP network described in asking 1 realizes that the test method includes:
S1, it controls and establishes communication connection between the server-side communication module and the client communication module;
S2, after being successfully established connection between the server-side communication module and the client communication module, the clothes are controlled
End communication module of being engaged in sends the first test data to the client communication module, and controls the client communication module to institute
It states server-side communication module and sends the second test data;
When the client communication module is successfully received first test data and the server-side communication module successfully connects
When receiving second test data, determining can succeed between the server-side communication module and the client communication module
Carry out data interaction.
8. the test method of the data interaction in TCP/IP network as claimed in claim 7, which is characterized in that step S2 is specific
Include:
After determining that the client communication module is successfully received first test data, the client communication mould is controlled
Block sends second test data to the server-side communication module;
After determining that the server-side communication module is successfully received second test data, the server-side communication mould is determined
Data interaction can be successfully carried out between block and the client communication module;Or,
It controls the client communication module and sends second test data to the server-side communication module;
After determining that the server-side communication module is successfully received second test data, the server-side communication mould is controlled
Block sends the first test data to the client communication module;
After determining that the client communication module is successfully received first test data, the server-side communication mould is determined
Data interaction can be successfully carried out between block and the client communication module.
9. the test method of the data interaction in TCP/IP network as claimed in claim 7, which is characterized in that step S1 is specific
Include:
S11, the control server-side communication module establish the first socket;
S12, the control client communication module establish the 2nd socket;
S13, the server-side communication module and the client communication module are controlled pass through the first socket and described the
Two socket establish communication connection.
10. the test method of the data interaction in TCP/IP network as claimed in claim 9, which is characterized in that described first
Socket includes the IP address and port numbers of the server-side communication module;
Step S13 is specifically included:
The 2nd socket of the client communication module is controlled according to the IP address and the port numbers and described the
One socket establishes communication connection.
11. the test method of the data interaction in TCP/IP network as claimed in claim 7, which is characterized in that step S1 it
After include:
The first URC data that the server-side communication module reports are obtained, and judge whether the first URC data are correct, if
It is, it is determined that be successfully established connection between the server-side communication module and the client communication module;If not, it is determined that institute
State connection failure between server-side communication module and the client communication module.
12. the test method of the data interaction in TCP/IP network as claimed in claim 9, which is characterized in that the test
Method further include:
After determining and successfully can carry out data interaction between the server-side communication module and the client communication module, control
The 2nd socket for making the client communication module is closed, and obtains the client communication module to the server-side
The 2nd URC data that communication module reports;
After receiving the 2nd URC data, the first socket for controlling the server-side communication module is closed;Or,
The first socket for controlling the server-side communication module is closed, and obtains the server-side communication module to described
The 3rd URC data that client communication module reports;
The controller is also used to after receiving the 3rd URC data, controls described the of the client communication module
Two socket are closed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910578008.9A CN110336869B (en) | 2019-06-28 | 2019-06-28 | Data interaction test method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910578008.9A CN110336869B (en) | 2019-06-28 | 2019-06-28 | Data interaction test method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110336869A true CN110336869A (en) | 2019-10-15 |
CN110336869B CN110336869B (en) | 2022-08-30 |
Family
ID=68143666
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910578008.9A Active CN110336869B (en) | 2019-06-28 | 2019-06-28 | Data interaction test method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110336869B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1838618A (en) * | 2005-03-22 | 2006-09-27 | 华为技术有限公司 | Method for testing transmission control protocol client |
CN102131208A (en) * | 2010-01-12 | 2011-07-20 | 希姆通信息技术(上海)有限公司 | System and method for testing data transmission performance of wireless module embedded with TCP/IP protocol stack |
CN102510523A (en) * | 2011-10-13 | 2012-06-20 | 青岛海信宽带多媒体技术有限公司 | Socket communication interactive testing method and network television testing system using same |
CN102981986A (en) * | 2012-11-02 | 2013-03-20 | 上海移远通信技术有限公司 | System and method of data interaction |
CN102209010B (en) * | 2011-06-10 | 2013-09-25 | 北京神州绿盟信息安全科技股份有限公司 | Network test system and method |
CN104486146A (en) * | 2014-12-03 | 2015-04-01 | 中国航空工业集团公司第六三一研究所 | Communication method for testing console and testing equipment |
CN107562635A (en) * | 2017-09-15 | 2018-01-09 | 西南电子技术研究所(中国电子科技集团公司第十研究所) | Embedded software test accessory system |
-
2019
- 2019-06-28 CN CN201910578008.9A patent/CN110336869B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1838618A (en) * | 2005-03-22 | 2006-09-27 | 华为技术有限公司 | Method for testing transmission control protocol client |
CN102131208A (en) * | 2010-01-12 | 2011-07-20 | 希姆通信息技术(上海)有限公司 | System and method for testing data transmission performance of wireless module embedded with TCP/IP protocol stack |
CN102209010B (en) * | 2011-06-10 | 2013-09-25 | 北京神州绿盟信息安全科技股份有限公司 | Network test system and method |
CN102510523A (en) * | 2011-10-13 | 2012-06-20 | 青岛海信宽带多媒体技术有限公司 | Socket communication interactive testing method and network television testing system using same |
CN102981986A (en) * | 2012-11-02 | 2013-03-20 | 上海移远通信技术有限公司 | System and method of data interaction |
CN104486146A (en) * | 2014-12-03 | 2015-04-01 | 中国航空工业集团公司第六三一研究所 | Communication method for testing console and testing equipment |
CN107562635A (en) * | 2017-09-15 | 2018-01-09 | 西南电子技术研究所(中国电子科技集团公司第十研究所) | Embedded software test accessory system |
Also Published As
Publication number | Publication date |
---|---|
CN110336869B (en) | 2022-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8666385B2 (en) | Data download method and terminal | |
CN102223257B (en) | Heartbeat interval adjusting method, server, client terminal and communication system | |
CN101860716B (en) | Wireless video conference terminal reaccess system and method | |
CN105898893B (en) | Full-duplex communication method for mobile terminal and Internet of things equipment | |
CN110266794A (en) | Method for subscribing and system are acted on behalf of based on MQTT server | |
CN103517409B (en) | Information transferring method, system and equipment | |
CN108712485A (en) | A kind of resource subscription method and apparatus of internet of things equipment | |
CN101730123A (en) | M2M platform system, junction terminal and terminal control method | |
CN108200128A (en) | A kind of remote meter reading method and system based on eLTE-IoT technologies | |
CN106878987B (en) | Communication method, system and cloud server | |
CN107567107A (en) | A kind of method and device for transmitting data | |
CN111064552A (en) | Intelligent device control method and device, electronic device and storage medium | |
CN107529229A (en) | The method of data transfer, apparatus and system | |
CN104797004B (en) | The method that automatic network-building is realized between master-slave equipment | |
CN110166479A (en) | A kind of method that Transmission system promotes UDP transmitting efficiency | |
CN106685600B (en) | Message delivery method in local area network between work station | |
CN105554724A (en) | Roaming seamless authentication method and system based on virtual SIM card | |
CN110336869A (en) | The test method and system of data interaction | |
CN105072148A (en) | Method and device for building connection with terminal | |
CN102594892B (en) | Data access method and device | |
CN106102101A (en) | Processing method that a kind of WAP is connected with Radio Access Controller and system | |
CN109392196A (en) | Big data analysis method and system based on mobile terminal | |
CN109286575A (en) | Message priority configuration method, device and the network equipment | |
CN1905562B (en) | Method for determining link protocol on demand of edge device serial port | |
CN210274135U (en) | Remote connection system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |