CN112527678A - Method, apparatus, device and storage medium for testing protocol - Google Patents

Method, apparatus, device and storage medium for testing protocol Download PDF

Info

Publication number
CN112527678A
CN112527678A CN202011543110.4A CN202011543110A CN112527678A CN 112527678 A CN112527678 A CN 112527678A CN 202011543110 A CN202011543110 A CN 202011543110A CN 112527678 A CN112527678 A CN 112527678A
Authority
CN
China
Prior art keywords
protocol
test data
data stream
transmission test
abnormal
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.)
Pending
Application number
CN202011543110.4A
Other languages
Chinese (zh)
Inventor
姬灵
王斌
刘真真
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011543110.4A priority Critical patent/CN112527678A/en
Publication of CN112527678A publication Critical patent/CN112527678A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application discloses a method, a device, equipment and a storage medium for testing protocols, and relates to the fields of computer technology and artificial intelligence, in particular to the fields of Internet of things, intelligent transportation, intelligent search and information flow. The specific implementation scheme is as follows: receiving a protocol transmission test data stream uploaded by a mobile terminal, wherein the protocol transmission test data stream is obtained based on information transmission based on a target protocol between a vehicle terminal and the mobile terminal provided with a target protocol test packet; and positioning abnormal data in the protocol transmission test data stream based on the protocol transmission test data stream and the correct target protocol timing diagram, and outputting the position of the abnormal data. According to the implementation mode, the correctness of the target protocol can be effectively verified by automatically judging the protocol time sequence, the target protocol is guaranteed not to have connection problems, the user experience is improved, the test verification process is greatly simplified, the resource consumption of a developer and an acceptance checker is reduced, and the efficiency of each link of development, test and acceptance of the target protocol is improved.

Description

Method, apparatus, device and storage medium for testing protocol
Technical Field
The present application relates to the field of computer technology and artificial intelligence, in particular to the field of internet of things, intelligent transportation, intelligent search and information flow, and more particularly to a method, an apparatus, a device and a storage medium for testing a protocol.
Background
CarLife is a mobile phone and vehicle machine interconnection product, and realizes the screen projection function through protocol transmission between a mobile terminal and a vehicle machine terminal. The CarLife protocol layer comprises functions of acquiring touch screen/physical key information, discovering and authenticating management of equipment of CarLife and a mobile terminal of a vehicle, data transmission, video decoding, playing and managing audio and the like, the information type is multiple, the information structure is complex, the information time sequence requirement is strict, the development and testing difficulty of the vehicle terminal is high, the root cause of the problem is difficult to judge through the phenomenon, the problem cannot be fundamentally solved, the time consumption is long through log analysis, the technical requirement is high, a large amount of resources need to be invested by a vehicle manufacturer and a CarLife testing receiver, and the efficiency is not high.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, and storage medium for testing a protocol.
According to an aspect of the present disclosure, there is provided a method for testing a protocol, including: receiving a protocol transmission test data stream uploaded by a mobile terminal, wherein the protocol transmission test data stream is obtained based on information transmission based on a target protocol between a vehicle terminal and the mobile terminal provided with a target protocol test packet; and positioning abnormal data in the protocol transmission test data stream based on the protocol transmission test data stream and the correct target protocol timing diagram, and outputting the position of the abnormal data.
According to another aspect of the present disclosure, there is provided an apparatus for testing a protocol, including: the receiving unit is configured to receive the protocol transmission test data stream uploaded by the mobile terminal, wherein the protocol transmission test data stream is obtained based on information transmission based on a target protocol between the vehicle terminal and the mobile terminal provided with a target protocol test packet; and the abnormal data positioning unit is configured to position the abnormal data in the protocol transmission test data stream and output the position of the abnormal data based on the protocol transmission test data stream and the correct target protocol timing diagram. .
According to yet another aspect of the present disclosure, there is provided an electronic device for testing a protocol, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method for testing a protocol as described above.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method for testing a protocol as described above.
According to yet another aspect of the disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method for testing a protocol as described above.
According to the technology of the application, the problem that when the internet products are checked and accepted, a large amount of resources are required to be input by an issuer and a checking and accepting party, the efficiency is not high is solved, the correctness of the target protocol can be effectively verified by automatically judging the protocol time sequence, the connection problem of the target protocol can be avoided, the user experience is improved, the test verification flow is greatly simplified, the resource consumption of the issuer and the checking and accepting party is reduced, and the efficiency of each link of development, test and acceptance of the target protocol is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram for one embodiment of a method for testing a protocol, in accordance with the present application;
FIG. 3 is a schematic diagram of one application scenario of a method for testing a protocol according to the present application;
FIG. 4 is a flow diagram of another embodiment of a method for testing a protocol according to the present application;
FIG. 5 is a flow diagram of another embodiment of a method for testing a protocol according to the present application;
FIG. 6 is a schematic block diagram illustrating one embodiment of an apparatus for testing protocols in accordance with the present application;
FIG. 7 is a schematic block diagram of another embodiment of an apparatus for testing protocols according to the present application;
FIG. 8 is a block diagram of an electronic device used to implement the method for testing a protocol of an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the method for testing a protocol or apparatus for testing a protocol of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a vehicle end 101, a mobile end 102, and a test platform end 103. The mobile terminal 102 may be connected to the vehicle terminal 101 in a wired or wireless manner, and may be connected to the test platform terminal 103 in a wireless manner. The test platform end 103 may be connected to the vehicle end 101 in a wired or wireless manner, and may be connected to the mobile end 102 in a wireless manner.
The vehicle end 101, the mobile end 102, and the test platform end 103 may be different terminal devices. The terminal device may be various electronic devices having a display screen and supporting network communication, including but not limited to a smart phone, a tablet computer, an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), a laptop portable computer, a desktop computer, and the like. The test platform end 103 may be one or more computers, and may display the result of the protocol test performed between the vehicle end 101 and the mobile end 102 in a dialog form through the computers.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for testing a protocol according to the present application is shown. It should be noted that the method for testing the protocol provided by the present embodiment may be executed by the test platform end 103 in fig. 1. The method for testing the protocol of the embodiment comprises the following steps:
step 201, receiving a protocol transmission test data stream uploaded by a mobile terminal.
In this embodiment, an execution subject (for example, the test platform end 103 in fig. 1) of the method for testing the protocol may receive the protocol transmission test data stream uploaded by the mobile end by means of wired transmission or wireless transmission. The protocol transmission test data stream is obtained based on information transmission based on a target protocol between a vehicle end and a mobile end installed with a target protocol test packet. Specifically, the PROTOCOL transmission test data stream may be, for example, the MSG _ CMD _ HU _ PROTOCOL _ VERSION transmitted from the vehicle end to the mobile terminal at a time of 2020-07-1515:22: 2201, the MSG _ CMD _ PROTOCOL _ VERSION _ MATCH _ HSTATUS transmitted from the mobile terminal to the vehicle end at a time of 2020-07-1515:22: 2312, the MSG _ CMD _ MD _ INFO transmitted from the mobile terminal to the vehicle end at a time of 2020-07-1515:22: 2531, the MSG _ CMD _ MODULE _ STATUS transmitted from the mobile terminal to the vehicle end at a time of 2020-07-1515:22: 2730, and the MSG _ CMD _ HU _ INFO transmitted from the vehicle end to the mobile terminal at a time of 2020-07-1515:22: 3113.
Step 202, based on the protocol transmission test data stream and the correct target protocol timing diagram, locate the abnormal data in the protocol transmission test data stream, and output the position of the abnormal data.
After receiving the protocol transmission test data stream uploaded by the mobile terminal, the execution main body can locate abnormal data in the protocol transmission test data stream and output the position of the abnormal data based on the protocol transmission test data stream and the correct target protocol timing diagram. Firstly, a correct target protocol timing diagram may be stored at the test platform end, and the correct target protocol timing diagram may also be stored in a form of the protocol transmission test data stream, where the difference may be one or more differences in transmission time, data stream transmission direction, data stream transmission content, fields, and the like of a certain timing sequence in the target protocol timing diagram and the protocol transmission test data stream, which may cause abnormal data, and what the execution main body needs to monitor is the difference, and locates the abnormal data in the protocol transmission test data stream according to the difference, and outputs the position of the abnormal data. The abnormal data can be information omission, information sending sequence errors (normally, after the vehicle end sends information to the mobile end, the mobile end can return information to the vehicle end, when the information sending is abnormal, the mobile end can actively send one or more pieces of information to the vehicle end when the vehicle end does not send the information to the mobile end), incomplete fields, wrong field formats and the like, and specific contents of the abnormal data are not limited by the method.
With continued reference to fig. 3, a schematic diagram of one application scenario of a method for testing a protocol according to the present application is shown. In the application scenario of fig. 3, the test platform 303 receives the protocol transmission test data stream a uploaded by the mobile terminal 302, where the protocol transmission test data stream a is obtained based on information transmission based on a target protocol between the vehicle terminal 301 and the mobile terminal 302 installed with the target protocol test packet b. The test platform 303 locates the abnormal data 304 in the protocol transmission test data stream a (where the protocol transmission test data stream may include transmitted data 12345, yyxx, zw, 11, etc.) based on the protocol transmission test data stream a and the correct target protocol timing chart c, and outputs the position of the abnormal data 304 (the position of the abnormal data 304 may be, for example, the position of the information "yyxx" sent from the mobile terminal to the vehicle terminal at time 2020-07-1515:22: 2312).
According to the embodiment, the protocol time sequence is automatically judged, the test data stream and the correct target protocol time sequence diagram are transmitted based on the protocol of the vehicle end and the mobile end, the position of abnormal data is determined, the position of the abnormal data is output, the correctness of the target protocol can be effectively verified, the target protocol is guaranteed not to have connection problems, the user experience is improved, the test verification flow is greatly simplified, the resource consumption of an issuer and an acquirer is reduced, and the efficiency of developing, testing and accepting all links of the target protocol is improved.
With continued reference to FIG. 4, a flow 400 of another embodiment of a method for testing a protocol according to the present application is shown. As shown in fig. 4, the method for testing a protocol of the present embodiment may include the following steps:
step 401, receiving a protocol transmission test data stream uploaded by a mobile terminal.
In this embodiment, the protocol transmission test data stream is obtained based on information transmission based on the target protocol between the vehicle end and the mobile end installed with the target protocol test packet.
Step 402, based on the protocol transmission test data stream and the correct target protocol timing diagram, locating the abnormal data in the protocol transmission test data stream, and outputting the position of the abnormal data.
The principle of step 401 to step 402 is similar to that of step 201 to step 202, and is not described herein again.
Specifically, the step 402 of "transmitting test data stream based on protocol and correct target protocol timing diagram, and locating abnormal data in the protocol transmission test data stream" may also be implemented through the steps 4021 to 4022:
step 4021, receiving the screening conditions input by the user.
The execution main body can receive the screening condition input by the user after receiving the protocol transmission test data stream uploaded by the mobile terminal. The filtering condition may be to filter information of viewing different data channels, for example, the filtering condition may be a data channel such as control, video, navigation, media, voice or anti-control. The screening condition can also be a preset time interval, for example, the screening condition can be that the time is 2020-07-1515:22: 2730-2020-07-1715: 25: 2730.
Step 4022, according to the protocol transmission test data flow and the correct target protocol timing diagram, positioning the abnormal data in the protocol transmission test data flow under the screening condition.
After receiving the screening condition input by the user, the execution main body can transmit the test data stream and the correct target protocol sequence diagram according to the protocol, and can obtain the difference between the protocol transmission test data stream and the correct target protocol sequence diagram after automatically comparing the protocol transmission test data stream and the correct target protocol sequence diagram under the screening condition, thereby determining the abnormal data in the protocol transmission test data stream according to the obtained difference.
By setting the screening condition, whether abnormal data exists in the protocol transmission test data stream in the time period concerned by the user or other conditions concerned by the user can be determined, so that the determination of the abnormal data is more flexible and faster, the determination efficiency of the abnormal data is improved, and the user experience is improved.
Specifically, the "position where abnormal data is output" in step 402 can also be realized by steps 4023 to 4025:
step 4023, displaying the protocol transmission test data stream in a dialogue form.
The execution body may display the protocol transmission test chamber data stream in a dialog form after determining the abnormal data in the protocol transmission test data stream. The dialogue may be a dialogue in which the vehicle end and the mobile end are separated into left and right sides. Specifically, the left side may be a vehicle end, the right side may be a mobile end, and the test platform end serves as a carrier for displaying the data stream to display interaction information of the protocol transmission test data stream corresponding to the vehicle end on the left side and the mobile end on the right side. Of course, the left side may be a mobile end, and the right side may be a vehicle end, and the present application does not specifically limit which side of the dialog form the vehicle end and the mobile end are located on, and it may be determined that the mobile end and the vehicle end are located on two sides of the dialog form respectively.
Step 4024, marking abnormal data on the protocol transmission test data flow displayed in the form of conversation.
After determining the abnormal data and displaying the protocol transmission test data stream in a dialog form, the execution subject may mark the determined time, position, transmission direction, and the like of the abnormal data on the protocol transmission test data stream displayed in the dialog form. For example, if the abnormal data is a transmission time error, the execution subject may mark the abnormal data at the transmission time of the error with a preset identifier, for example, an "x" which may be red to identify that the abnormal data exists here. For example, the mark may be "a" or "major", and the present application is not limited to specific manifestations of the mark.
Step 4025, displaying the location of the marked anomaly data.
After the execution body marks the abnormal data on the protocol transmission test data stream displayed in the form of a dialog, the execution body may display the position of the marked abnormal data. Specifically, the execution main body may display the marked position of the abnormal data on a display screen of the test platform end of the execution main body, or may broadcast the position of the abnormal data by voice. Of course, the execution main body can also automatically send the position of the abnormal data marked on the protocol transmission test data stream displayed in a conversation form to the mobile end or the vehicle end, so that the mobile end or the vehicle end displays the position of the abnormal data marked on the protocol transmission test data stream displayed in a conversation form on respective display screens, and a product developer or a product receiver can check the position where the abnormal data appears in a more intuitive form, so that the problem of reaction of the abnormal data can be solved in time, and the efficiency of each link of product development, test and acceptance is improved.
In some optional implementations of this embodiment, the method for testing a protocol may further include: and step 403, displaying the name and the transmission direction of the abnormal information, the field name and the field value contained in the abnormal information and the sending time of the abnormal information on the protocol transmission test data stream displayed in the form of conversation.
After determining the abnormal data in the protocol transmission test data stream, the execution body may display the name and transmission direction of the abnormal information, the field name and field value contained in the abnormal information (e.g., majorVersion: 2, minorVersion: 3, where minorVersion: 3 is wrong and majorVersion: 2 is correct) on the protocol transmission test data stream displayed in a dialog form, and the execution body may display the wrong field name and field value in bold, or in red or other colors different from the correct information, and the same may be applied to the display of related information of other abnormal information), the sending time of the abnormal information, and other information that may be of interest to the user. The display form of the related information of the abnormal information is not particularly limited in the present application.
The realization mode transmits the relevant information of abnormal data in the test data stream through the visual and comprehensive display protocol, automatically judges the protocol time sequence, effectively verifies the correctness of the target protocol, ensures that the target protocol does not have the connection problem any more, and improves the user experience; meanwhile, the test verification process of the target protocol is greatly simplified, the access threshold of the target protocol is reduced, the resource consumption of a vehicle-mounted developer and a protocol receiver is reduced, and the efficiency of each link of protocol development, test and acceptance is improved. The test platform end can display the protocol transmission data flow of the vehicle end and the mobile end in a dialogue mode, compare a correct target protocol sequence diagram, quickly locate problems, automatically judge the correctness of information sequence diagrams and the accuracy and the integrity of information field values, and generate a complete test report. The test platform end can export the generated information conversation flow and the positioning problem in a document mode, provides a downloading function, facilitates downloading of users with requirements, and improves user experience.
With continued reference to FIG. 5, a flow 500 of another embodiment of a method for testing a protocol according to the present application is shown. It should be noted that the method for testing the protocol provided by the present embodiment may be executed by the mobile terminal 102 in fig. 1. As shown in fig. 5, the method for testing a protocol of the present embodiment may include the following steps:
step 501, under the operating environment with the target protocol test packet, performing information transmission with the vehicle end based on the target protocol to obtain a protocol transmission test data stream.
In this embodiment, an execution main body (for example, the mobile terminal 102 in fig. 1) of the method for testing the protocol may perform information transmission with the vehicle terminal based on the target protocol in an operating environment in which the target protocol test packet is installed by means of wired connection or wireless connection, so as to obtain the protocol transmission test data stream. Specifically, the execution main body can receive an installation instruction of the target protocol test packet, install the target protocol test packet to be operated, respond to an operation test instruction sent by a user, operate the target protocol test packet, send test information to the vehicle end based on the target protocol, receive test information returned by the vehicle end, achieve information transmission with the vehicle end based on the target protocol, and finally obtain a protocol transmission test data stream. The target protocol test packet may upload a test log (i.e., a protocol transport test data stream) to the test platform side.
For example, generally from the perspective of a user, the user may install an android protocol test package at the mobile terminal, and open a protocol test tool switch, where the tool switch may be a map search box input openlogfile in the protocol test APP, and click to search, that is, the protocol test tool switch may be opened. Then, the user clicks 'about' and clicks the logo of the target protocol five times (the logo can be opened by clicking 5 times or more continuously, misoperation is mainly avoided, the logo is a hidden switch, after clicking 5 times of the logo continuously, a bullet box appears, information (protocol analysis serial number) required by analysis is contained in the bullet box, the bullet box can be copied by clicking), the analysis serial number (15 digits) of the target protocol is copied, the 'adding equipment' is clicked at the visual test platform end, and the equipment name and the protocol analysis serial number (15 digits) copied at the mobile end are input. After the mobile terminal device is connected with the vehicle terminal, whether the transmission data based on the target protocol is consistent with the correct protocol sequence diagram can be checked in a dialogue mode at the test platform terminal.
Specifically, the target protocol inter-transmission includes two ends: a vehicle end (HHU), a mobile end (MD). The testing platform end can display the information name and the information transmission direction which are mutually transmitted, such as MSG _ CMD _ HU _ PROTOCOL _ VERSION, and the vehicle end sends the information name and the information transmission direction to the mobile end; the field names and field values contained in the information can be checked, the' field name: field value(s); each piece of information shows the sending time, "yyyy-mm-dd hh: mm: ssn"; information to view different data channels may be filtered, for example: control, video, navigation, media, voice, counter control; the information can be checked in a screening time interval; the test platform end can automatically judge whether the information is omitted, whether the sequence is correct, whether the field is complete and whether the field format is correct by taking a correct time sequence chart as a standard.
Step 502, sending the protocol transmission test data stream to the test platform end, so that the test platform end locates the abnormal data in the protocol transmission test data stream based on the protocol transmission test data stream and the correct target protocol timing diagram, and outputs the position of the abnormal data.
After the execution main body obtains the protocol transmission test data stream, the protocol transmission test data stream can be uploaded to the test platform end by a target protocol test packet installed in the execution main body, so that the test platform end locates abnormal data in the protocol transmission test data stream and outputs the position of the abnormal data based on the protocol transmission test data stream and a correct target protocol timing diagram.
In this embodiment, a target protocol test packet capable of uploading a test log is installed in the mobile terminal, so that the transmission information of the vehicle terminal and the mobile terminal based on the target protocol is acquired and uploaded to the test platform terminal, so that the test platform terminal can display the protocol transmission test data stream on the web page terminal in a conversational flow form, and display the identified abnormal data in the protocol transmission test data stream and the position of the abnormal data on the protocol transmission test data stream displayed in the conversational flow form more intuitively. The method has the advantages that the relevant information of abnormal data in the test data stream is transmitted through the visual and comprehensive display protocol, the protocol time sequence is automatically judged, the correctness of the target protocol is effectively verified, the target protocol is guaranteed not to have a connection problem any more, and the user experience is improved; meanwhile, the test verification process of the target protocol is greatly simplified, the access threshold of the target protocol is reduced, the resource consumption of a vehicle-mounted developer and a protocol receiver is reduced, and the efficiency of each link of protocol development, test and acceptance is improved.
With further reference to fig. 6, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for testing a protocol, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 6, the apparatus 600 for testing a protocol of the present embodiment includes: a receiving unit 601 and an abnormal data positioning unit 602.
The receiving unit 601 is configured to receive a protocol transmission test data stream uploaded by a mobile terminal, where the protocol transmission test data stream is obtained based on information transmission based on a target protocol between a vehicle terminal and the mobile terminal installed with a target protocol test packet.
An abnormal data positioning unit 602 configured to position abnormal data in the protocol transmission test data stream based on the protocol transmission test data stream and the correct target protocol timing diagram, and output a position of the abnormal data.
In some optional implementations of the present embodiment, the anomaly data positioning unit 602 is further configured to: receiving a screening condition input by a user; and positioning abnormal data in the protocol transmission test data flow under the screening condition according to the protocol transmission test data flow and the correct target protocol timing diagram.
In some optional implementations of the present embodiment, the anomaly data positioning unit 602 is further configured to: displaying a protocol transmission test data stream in a conversation form; marking abnormal data on the protocol transmission test data flow displayed in a dialogue mode; the location of the marked anomaly data is displayed.
In some optional implementations of this embodiment, the means for testing the protocol further includes what is not shown in fig. 6: and a display unit configured to display a name and a transmission direction of the abnormality information, a field name and a field value included in the abnormality information, and a transmission time of the abnormality information on the protocol transmission test data stream displayed in a dialog form.
It should be understood that the units 601 to 602 recited in the apparatus 600 for testing a protocol correspond to respective steps in the method described with reference to fig. 2. Thus, the operations and features described above for the method for testing a protocol are equally applicable to the apparatus 600 and the units included therein and will not be described in detail here.
With further reference to fig. 7, as an implementation of the methods shown in the above-mentioned figures, the present application provides another embodiment of an apparatus for testing a protocol, which corresponds to the method embodiment shown in fig. 5, and which is particularly applicable to various electronic devices.
As shown in fig. 7, the apparatus 700 for testing a protocol of the present embodiment includes: an acquisition unit 701 and a transmission unit 702.
The obtaining unit 701 is configured to perform information transmission with the vehicle end based on the target protocol in an operating environment in which the target protocol test packet is installed, and obtain a protocol transmission test data stream.
The sending unit 702 is configured to send the protocol transmission test data stream to the test platform end, so that the test platform end locates abnormal data in the protocol transmission test data stream based on the protocol transmission test data stream and the correct target protocol timing diagram, and outputs the position of the abnormal data.
It should be understood that the units 701 to 702 recited in the apparatus 700 for testing a protocol correspond to the respective steps in the method described with reference to fig. 5, respectively. Thus, the operations and features described above for the method for testing a protocol are equally applicable to the apparatus 700 and the units included therein and will not be described in detail here.
The present disclosure also provides an electronic device for testing a protocol, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 8 illustrates a schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 801 executes the respective methods and processes described above, such as the method for testing a protocol. For example, in some embodiments, the method for testing a protocol may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the method for testing a protocol described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the above-described method for testing a protocol by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
Computer program product comprising a computer program which, when being executed by a processor, carries out the method for testing a protocol as described above.
According to the technical scheme of the embodiment of the application, the correctness of the target protocol can be effectively verified by automatically judging the protocol time sequence, the target protocol is guaranteed not to have a connection problem, the user experience is improved, the test verification process is greatly simplified, the resource consumption of a developer and an acceptance checker is reduced, and the efficiency of each link of development, test and acceptance of the target protocol is improved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (13)

1. A method for testing protocol, applied to a test platform end, includes:
receiving a protocol transmission test data stream uploaded by a mobile terminal, wherein the protocol transmission test data stream is obtained based on information transmission based on a target protocol between a vehicle terminal and the mobile terminal provided with a target protocol test packet;
and positioning abnormal data in the protocol transmission test data stream based on the protocol transmission test data stream and the correct target protocol timing diagram, and outputting the position of the abnormal data.
2. The method of claim 1, wherein said locating anomalous data in said protocol transport test data stream based on said protocol transport test data stream and a correct target protocol timing graph comprises:
receiving a screening condition input by a user;
and positioning abnormal data in the protocol transmission test data stream under the screening condition according to the protocol transmission test data stream and the correct target protocol timing diagram.
3. The method of claim 1, wherein said outputting the location of the anomaly data comprises:
displaying the protocol transmission test data flow in a conversation form;
marking the abnormal data on the protocol transmission test data flow displayed in a dialogue mode;
displaying the location of the marked anomaly data.
4. The method of claim 3, wherein the method further comprises:
and displaying the name and the transmission direction of the abnormal information, the field name and the field value contained in the abnormal information and the sending time of the abnormal information on the protocol transmission test data flow displayed in a dialogue mode.
5. A method for testing protocol, applied to a mobile terminal, includes:
under the operating environment with the target protocol test packet, carrying out information transmission with a vehicle end based on a target protocol to obtain a protocol transmission test data stream;
and sending the protocol transmission test data stream to a test platform end so that the test platform end positions abnormal data in the protocol transmission test data stream based on the protocol transmission test data stream and a correct target protocol timing diagram and outputs the position of the abnormal data.
6. An apparatus for testing a protocol, comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is configured to receive a protocol transmission test data stream uploaded by a mobile terminal, and the protocol transmission test data stream is obtained based on information transmission based on a target protocol between a vehicle terminal and the mobile terminal provided with a target protocol test packet;
and the abnormal data positioning unit is configured to position the abnormal data in the protocol transmission test data flow and output the position of the abnormal data based on the protocol transmission test data flow and the correct target protocol timing chart.
7. The apparatus of claim 6, wherein the anomaly data locating unit is further configured to:
receiving a screening condition input by a user;
and positioning abnormal data in the protocol transmission test data stream under the screening condition according to the protocol transmission test data stream and the correct target protocol timing diagram.
8. The apparatus of claim 6, wherein the anomaly data locating unit is further configured to:
displaying the protocol transmission test data flow in a conversation form;
marking the abnormal data on the protocol transmission test data flow displayed in a dialogue mode;
displaying the location of the marked anomaly data.
9. The apparatus of claim 8, wherein the apparatus further comprises:
a display unit configured to display a name and a transmission direction of the abnormality information, a field name and a field value included in the abnormality information, and a transmission time of the abnormality information on the protocol transmission test data stream displayed in a dialog form.
10. An apparatus for testing a protocol, comprising:
the acquisition unit is configured to perform information transmission with a vehicle end based on a target protocol under an operating environment provided with a target protocol test packet, and acquire a protocol transmission test data stream;
and the sending unit is configured to send the protocol transmission test data stream to the test platform end so that the test platform end locates abnormal data in the protocol transmission test data stream based on the protocol transmission test data stream and a correct target protocol timing diagram and outputs the position of the abnormal data.
11. An electronic device for testing a protocol, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-5.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.
CN202011543110.4A 2020-12-22 2020-12-22 Method, apparatus, device and storage medium for testing protocol Pending CN112527678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011543110.4A CN112527678A (en) 2020-12-22 2020-12-22 Method, apparatus, device and storage medium for testing protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011543110.4A CN112527678A (en) 2020-12-22 2020-12-22 Method, apparatus, device and storage medium for testing protocol

Publications (1)

Publication Number Publication Date
CN112527678A true CN112527678A (en) 2021-03-19

Family

ID=74976111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011543110.4A Pending CN112527678A (en) 2020-12-22 2020-12-22 Method, apparatus, device and storage medium for testing protocol

Country Status (1)

Country Link
CN (1) CN112527678A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925725A (en) * 2021-04-09 2021-06-08 网易(杭州)网络有限公司 Data testing method and device, readable storage medium and electronic equipment
CN113595781A (en) * 2021-07-26 2021-11-02 陕西中科启元信息技术有限公司 Internet of things communication protocol configuration method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478449A (en) * 2009-01-22 2009-07-08 凌阳科技股份有限公司 Protocol automatic test method and system thereof
US20150370675A1 (en) * 2014-06-21 2015-12-24 Ixia Methods, systems, and computer readable media for utilizing abstracted user-defined data to conduct network protocol testing
US20180329813A1 (en) * 2017-01-11 2018-11-15 Smartlytics Llc, Dba Quantyzd System and method for automated intelligent mobile application testing
CN109857654A (en) * 2019-01-17 2019-06-07 珠海金山网络游戏科技有限公司 A kind of method, apparatus and system of the timing flow chart automatically generating test case
CN111897718A (en) * 2020-07-03 2020-11-06 重庆长安汽车股份有限公司 Vehicle machine automatic test method based on big data and storage medium
CN112087354A (en) * 2020-08-06 2020-12-15 广州小鹏汽车科技有限公司 Communication protocol testing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478449A (en) * 2009-01-22 2009-07-08 凌阳科技股份有限公司 Protocol automatic test method and system thereof
US20150370675A1 (en) * 2014-06-21 2015-12-24 Ixia Methods, systems, and computer readable media for utilizing abstracted user-defined data to conduct network protocol testing
US20180329813A1 (en) * 2017-01-11 2018-11-15 Smartlytics Llc, Dba Quantyzd System and method for automated intelligent mobile application testing
CN109857654A (en) * 2019-01-17 2019-06-07 珠海金山网络游戏科技有限公司 A kind of method, apparatus and system of the timing flow chart automatically generating test case
CN111897718A (en) * 2020-07-03 2020-11-06 重庆长安汽车股份有限公司 Vehicle machine automatic test method based on big data and storage medium
CN112087354A (en) * 2020-08-06 2020-12-15 广州小鹏汽车科技有限公司 Communication protocol testing method and device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925725A (en) * 2021-04-09 2021-06-08 网易(杭州)网络有限公司 Data testing method and device, readable storage medium and electronic equipment
CN112925725B (en) * 2021-04-09 2024-03-15 网易(杭州)网络有限公司 Data testing method and device, readable storage medium and electronic equipment
CN113595781A (en) * 2021-07-26 2021-11-02 陕西中科启元信息技术有限公司 Internet of things communication protocol configuration method and device
CN113595781B (en) * 2021-07-26 2024-03-29 北京创程科技有限公司 Internet of things communication protocol configuration method and device

Similar Documents

Publication Publication Date Title
WO2021259013A1 (en) Data processing method and apparatus, electronic device, and computer-readable medium
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
CN108768730B (en) Method and device for operating intelligent network card
CN107404418B (en) Internet product testing method, device, equipment and storage medium
CN109684188B (en) Test method and device
CN110674047B (en) Software testing method and device and electronic equipment
US20150242380A1 (en) Checking testing coverage
CN114024884B (en) Test method, test device, electronic equipment and storage medium
US11743155B2 (en) Systems and methods of monitoring and controlling remote assets
US10630399B2 (en) Testing distributed applications that have an established exchange in an advanced message queuing protocol (AMQP) message broker
CN112527678A (en) Method, apparatus, device and storage medium for testing protocol
CN110336781A (en) A kind of method and apparatus based on browser identification terminal uniqueness
CN112015654A (en) Method and apparatus for testing
CN109582524A (en) A kind of test method, system and electronic equipment and storage medium
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
CN111736951A (en) Simulation method for automatic driving, computer device, and storage medium
CN108282542A (en) Remote operation method and device for test equipment
CN111181771A (en) Security changing abnormity positioning method and device based on fort machine and electronic equipment
CN109634838A (en) Position method, apparatus, storage medium and the electronic equipment of application failure
CN113852610B (en) Message processing method, device, computer equipment and storage medium
CN107247661B (en) Method and system for supporting automatic verification of installation package of application
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN112379967B (en) Simulator detection method, device, equipment and medium
CN111382058A (en) Service testing method and device, server and storage medium
CN114091909A (en) Collaborative development method, system, device and electronic equipment

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
TA01 Transfer of patent application right

Effective date of registration: 20211009

Address after: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Apollo Zhilian (Beijing) Technology Co.,Ltd.

Address before: 2 / F, baidu building, 10 Shangdi 10th Street, Haidian District, Beijing 100085

Applicant before: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right