CN109656831A - Test packet centralization generation method, device, equipment and storage medium - Google Patents

Test packet centralization generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN109656831A
CN109656831A CN201811604346.7A CN201811604346A CN109656831A CN 109656831 A CN109656831 A CN 109656831A CN 201811604346 A CN201811604346 A CN 201811604346A CN 109656831 A CN109656831 A CN 109656831A
Authority
CN
China
Prior art keywords
message
test packet
test
call instruction
default
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
CN201811604346.7A
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.)
BEIJING CORE TECHNOLOGY Co Ltd
Original Assignee
BEIJING CORE 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 CORE TECHNOLOGY Co Ltd filed Critical BEIJING CORE TECHNOLOGY Co Ltd
Priority to CN201811604346.7A priority Critical patent/CN109656831A/en
Publication of CN109656831A publication Critical patent/CN109656831A/en
Pending legal-status Critical Current

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of test packet centralization generation method, device, equipment and storage mediums, a kind of test packet centralization generation method includes: the message call instruction of acquisition test case transmission, and message call instruction includes type of message and message transmitting party formula;Test packet is called from default message store according to the type of message in message call instruction, presetting includes all test packets for supporting to send in message store;Configuration is sent from reading message in configuration file is sent according to the message transmitting party formula in message call instruction, sending in configuration file includes message transmitting party formula and message transmission interval;The message that configuration successively sends calling is sent according to the message of reading.Test packet centralization generation method, device, equipment and storage medium disclosed by the invention write efficiency for improve test case.

Description

Test packet centralization generation method, device, equipment and storage medium
Technical field
The present embodiments relate to computer technology more particularly to a kind of test packet centralization generation method, device, set Standby and storage medium.
Background technique
In computer field, various hardware products are required by largely testing, in R&D process to verify it Whether actual performance meets design objective, and mode used by testing is carried out using test case.Test case It is a series of test packets write in advance, hardware product to be tested is sequentially input, according to the various of hardware product Response judges whether to meet design objective.
In traditional test process, tests test case used and need to be needed in test case by manual compiling The specified type of message sent, constrains the value in certain domains in message.But the huge number of test packet, during the test often The value in each domain is adjusted in type or message to test packet, and test case is caused to be frequently necessary to adjust.If being used in test Needing to send the combination of various types message in example, the test case quantity needed is very huge, and size of code is huge, once message In certain domains convert, or need increase support type of message when, need to re-start each test case and write, It needs to expend a large amount of manpower rewriting and writes test case, influence testing efficiency, and very big to the maintenance difficulties of test case.
Summary of the invention
The present invention provides a kind of test packet centralization generation method, device, equipment and storage medium, is used with improving test Example writes efficiency.
In a first aspect, the embodiment of the present invention provides a kind of test packet centralization generation method, comprising:
The message call instruction that test case is sent is obtained, message call instruction includes type of message and message transmitting party Formula;
Test packet is called from default message store according to the type of message in message call instruction, is wrapped in default message store Include all test packets for supporting to send;
Configuration is sent from reading message in configuration file is sent according to the message transmitting party formula in message call instruction, is sent It include that message transmitting party formula and message send interval in configuration file;
The message that configuration successively sends calling is sent according to the message of reading.
In a kind of possible implementation of first aspect, according to the type of message in message call instruction from default message Test packet is called in library, comprising:
All test packets are read from default message store into buffer queue, and according to the message in message call instruction Type deletes the test packet for not needing to call from buffer queue.
Or the test packet called needed for being read from default message store according to the type of message in message call instruction Into buffer queue.
It, should after obtaining the message call instruction that test case is sent in a kind of possible implementation of first aspect Method further include:
If test packet not corresponding with the type of message in message call instruction in default message store, if sending Message not corresponding with the message transmitting party formula in message call instruction sends configuration in configuration file, then sends test packet Failed regeneration information.
In a kind of possible implementation of first aspect, message send configuration include sequence send, it is random send or with Default timing is sent;
The message that configuration successively sends calling is sent according to the message of reading, comprising:
It is sent and is configured according to the message of reading, according to the sequence that test packet arranges in default message store, sequence is called Test packet simultaneously sends perhaps random call test packet and sends or call test packet simultaneously according to default transmission sequence It sends.
In a kind of possible implementation of first aspect, according to the type of message in message call instruction from default message Test packet is called in library, comprising:
Test packet is called from default message store according to the type of message in message call instruction, and constrains the survey of calling Try the value in each domain in message.
Second aspect, the embodiment of the invention also provides a kind of test packet centralization generating means, comprising:
Instruction acquisition module, for obtaining the message call instruction of test case transmission, message call instruction includes message Type and message transmitting party formula;
Message calling module, for being called test to report from default message store according to the type of message in message call instruction Text, presetting includes all test packets for supporting to send in message store;
Read module is configured, for reading from transmission configuration file according to the message transmitting party formula in message call instruction Message sends configuration, and sending in configuration file includes that message transmitting party formula and message send interval;
Message sending module, for sending the message that configuration successively sends calling according to the message of reading.
In a kind of possible implementation of second aspect, message calling module, specifically for being read from default message store It takes all test packets into buffer queue, and is deleted and be not required to from buffer queue according to the type of message in message call instruction The test packet to be called;Or called needed for being read from default message store according to the type of message in message call instruction Test packet is into buffer queue.
In a kind of possible implementation of second aspect, message send configuration include sequence send, it is random send or with Default timing is sent;
Message sending module is configured specifically for being sent according to the message of reading, according to test packet in default message store The sequence of middle arrangement, sequence call test packet and send perhaps random call test packet and send or according to default hair It send sequence to call test packet and sends.
The third aspect, the embodiment of the invention also provides a kind of test packet centralization generating devices, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more programs are executed by one or more processors, so that one or more processors realize such as first The test packet centralization generation method of any implementation of aspect.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program, which is characterized in that the test packet collection such as any implementation of first aspect is realized when the program is executed by processor Middleization generation method
Test packet centralization generation method, device, equipment and storage medium provided in an embodiment of the present invention are surveyed obtaining After the message call instruction that example on probation is sent, survey is called from default message store according to the type of message in message call instruction Message is tried, wherein including all test packets for supporting to send in default message store, is sent out according to the message in message call instruction Mode is sent to send configuration from reading message in configuration file is sent, wherein sending includes message transmitting party formula and report in configuration file Text sends interval, then sends the message that configuration successively sends calling according to the message of reading, so that tester is without writing A large amount of test case, improve test case writes efficiency.
Detailed description of the invention
Fig. 1 is the flow chart of test packet generation method embodiment one provided in an embodiment of the present invention;
Fig. 2 is the data structure schematic diagram of IPV4 message;
Fig. 3 is the structural schematic diagram of test packet generating means embodiment one provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of test packet generating device provided in an embodiment of the present invention.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Fig. 1 is the flow chart of test packet centralization generation method embodiment one provided in an embodiment of the present invention, such as Fig. 1 institute Show, method provided in this embodiment includes:
Step S101 obtains the message call instruction that test case is sent, and message call instruction includes type of message and report Literary sending method.
In order to which the prior art is the problems of when carrying out test to hardware is to generate test packet, the present embodiment is mentioned It is one message manager of Test Sample Design for a kind of test packet centralization generation method, which is used for root Required message in test case is automatically generated according to test packet call instruction, tester need to only set required test packet class The parameters such as type, sending method can automatically generate all required messages in test case, provide a kind of test of centralization Message forming method to improve the efficiency of writing of test case, and improves maintainability.
Firstly, it is necessary to obtain the message call instruction of test case transmission, test case is device under test (Device Under Test, DUT) set of test packet tested, device under test different performance, different phase test may Need the set using different test packets, i.e., different test cases.It is needed in traditional test case according to test need It asks and successively writes each test packet according to message transmission sequence, and in the present embodiment, it only needs to write message tune in test case With instruction.Message call instruction is not actual test packet, but to the dependent instruction that test packet is called, including Type, sending method of the test packet of calling of the test packet of required calling etc..Tester is not necessarily in test case A large amount of test packet is write, only need to write the call instruction to test packet according to testing requirement.So in tester Member is according to features such as type, the sending methods of test packet of test packet needed for testing, after having write message call instruction, when Test case starts to execute, then each message call instruction that will be read in test case solves message call instruction After analysis, you can learn that the information such as test packet type, test packet sending method needed for test case.Report in test case Literary call instruction can be write using the programming language that test macro is supported, such as based on System Verilog, test is used Message call instruction in example may include " delete_rpt (IPV4) " (mark deletes the message that type is IPV4), " set_ Mode (sequence is sent) " (indicating that message transmitting party formula is that sequence is sent) etc..
Step S102 calls test packet from default message store according to the type of message in message call instruction, presets It include all test packets for supporting to send in message store.
In the present embodiment, message call instruction is responded, completes the device of the generation of test packet, referred to as reports Literary manager, message manager can use hardware or software form.Other than message manager, it is also necessary to which there is default message The two component cooperations processing in library and transmission configuration file.In default message store, including all test packets for supporting to send, in advance If included test packet, can be and carry out testing required all test packets to specific Devices to test in message store, It can be and a variety of test equipments are carried out to test required all test packets.If including being set to a variety of tests in default message store It is standby to carry out testing required all test packets that then test packet generation method provided in this embodiment can be adapted for a variety of Devices to test is tested, this reality if including carrying out testing required test packet to fc-specific test FC equipment in default message store The test packet generation method for applying example offer can be used for testing specific Devices to test.
Message manager needs simultaneously from default message store after the message call instruction for getting test case transmission Test packet is called, and reads message transmission configuration in configuration file from sending, to complete required test report in test case The calling of text.Namely step S102 and step S103 are carried out simultaneously.A caching team can be set in message manager Column, according to the type of message in message call instruction after having invoked test packet in default message store, can be by calling Test packet is stored in buffer queue.Type of message in message call instruction can be one or more, can use one Message call instruction indicates the type of message for needing to call, and a message call instruction also can be used and indicate multiple need The type of message to be called can also use a message call instruction to indicate that one or more does not need the message class called Type.
In addition, can also include the constraint of the value in each domain in the test packet called in message call instruction.Default In message store, the test packet of each type is prestored, but for different Devices to test, since configuration is different, using unified Test packet carry out test and be unable to satisfy demand, it is therefore desirable to for different Devices to test, adjust in each test packet each The random range in domain.Namely according to message call instruction in default message store after read test message, it is also necessary to reading The value in each domain is adjusted in the test packet taken, to meet testing requirement.It so, just include supporting hair in default message store The random range in each domain in all test packets and all types of messages sent.Various types of test packets and all types of messages In the random range in each domain be combined, various specific test packets needed for test can be obtained.Wherein, the report of each type Include multiple domains in the data structure of text, includes a part of feature of the type message in each domain, from each domain of each message Required range or desirable value are selected in random range, then available specific test packet.
Such as IPV4 message, as shown in Fig. 2, Fig. 2 is the data structure schematic diagram of IPV4 message, including for indicating The domain (Version) of version, 4 bit fields, it is indicated that currently used IP version.For indicating the domain (IP of message protocol head length Header Length, IHL), refer to Datagram Protocol head length, presentation protocol head has the quantity of 32 word lengths, is directed toward data Starting point.Correct protocol header minimum value is 5.Service type domain (Type-of-Service, TOS), it is indicated that upper-layer protocol works as processing The preceding desired service quality of datagram, and datagram is allocated according to importance information.These 8 bit fields are for distributing Priority, delay, handling capacity and reliability.Total length domain (Total Length), specifies the byte long of entire IP data packet Degree, including data and protocol header.Its maximum value is 65,535 bytes.Typical host can receive the datagram of 576 bytes.Know Other domain (Identification) includes an integer, for identification current data message.The field distributes help by transmitting terminal Receiving end intensive data is called the score piece.It indicates domain (Flags), is made of 3 bit fields, wherein lowest order (MF) controls fragment, exists Next fragment is set to 1, and otherwise setting 0 representative terminates fragment.Interposition (DF) points out whether data packet can carry out fragment.Third position That is highest order reservation does not use, but is necessary for 0.Fragment offset domain (Fragment Offset), 13 bit fields, it is indicated that with source The relevant fragment data position in the starting point of datagram supports Target IP suitably to rebuild source data report.Life span domain (Time- To-Live, TTL), it is a kind of counter, successively subtracts 1 in each point value for abandoning datagram until being reduced to 0.Ensure to count in this way According to the endless loop procedure of packet.Protocol domain (Protocol), it is indicated that after the completion of IP treatment process, there is which kind of upper-layer protocol It receives and imports data packet.Header check domain (Header Checksum) assists in ensuring that the integrality of IP agreement head.Due to certain associations The change of head file is discussed, such as life span (Time to Live), this just needs that each point is recalculated and examined. Internet protocol head is handled.Source address field (Source Address), source host IP address.Destination address field (Destination Address), destination host IP address.Option field (Options) allows IP to support various options, such as pacifies Quan Xing.Data field (Data), including upper layer information, wherein filling data (Padding).Specifically, it is adjusted from default message store It may include various ways with the concrete mode of test packet, for example, reading all test packets from default message store to slow It deposits in queue, and deletes the test packet for not needing to call from buffer queue according to message call instruction.Or according to message The test packet that call instruction calls needed for reading from default message store is into buffer queue.
It is illustrated with a specific example, such as includes following type message in default message store: (ETHNET, IPV4, IPV4_TCP, IPV4_UDP, IPV6, IPV6_TCP, IPV6_UDP).
It in test case 1 (test 1), writes delete_rpt (IPV4), that is, deletes the test report that type is IPV4 Text, then the message called be ETHNET, IPV4_TCP, IPV4_UDP, IPV6, IPV6_TCP, IPV6_UDP, ETHNET, IPV4_TCP, IPV4_UDP, IPV6, IPV6_TCP, IPV6_UDP.
In test case 2 (test 2), delete_rpt (ALL) is write;Add_rpt (ETHNET, IPV4_UDP, IPV6_UDP), i.e., queue is emptied first, then adds ETHNET, several test packet classes of IPV4_UDP, IPV6_UDP wherein Type, then the message called is ETHNET, IPV4_UDP, IPV6_UDP.
Step S103 is sent according to the message transmitting party formula in message call instruction from reading message in configuration file is sent Configuration, sending in configuration file includes that message transmitting party formula and message send interval.
Message manager can also read message transmission configuration from sending according to message call instruction in configuration file, wherein Interval etc. is sent including message transmitting party formula, message.It further include sending configuration text in addition to presetting message store in message manager Part sends the various transmission intervals of the various sending methods and test packet in configuration file including test packet.Due to test Message is many kinds of, and different transmission sequences and transmission interval might mean that different test results, therefore device under test In test case used in being tested, the transmission sequence of message and transmission interval are also to need special setting, according to survey The demand of examination chooses required sending method and transmission interval from sending in configuration file.It sends when reading message with postponing, The test packet called from default message store can be adjusted, the row including adjusting each test packet in buffer queue Transmission interval etc. between column sequence and each test packet.It can not also include reading message to send in message call instruction The instruction of configuration only need to read default message transmission configuration from sending at this time in configuration file, such as according to test packet The successively sequence transmission etc. that puts in order in default message store.
Specifically, message is sent to configure and includes sequence transmission, random transmission or sent with default timing, in addition, may be used also To include the transmission interval of message.
For example, being divided into 6-15 period between default transmission sending configuration file.
In above-mentioned test case 1 (test 1), write set_mode (sequence is sent), i.e., message is sent in sequence, The transmission sequence of namely test packet is determined according to the message sequence stored in message store is preset, then the transmission sequence of message As ETHNET, IPV4_TCP, IPV4_UDP, IPV6, IPV6_TCP, IPV6_UDP, ETHNET, IPV4_TCP, IPV4_UDP, IPV6, IPV6_TCP, IPV6_UDP.
In above-mentioned test case 2 (test 2), set_mode (random to send) is write, i.e., message is sent out according to random sequence It send, that is, the transmission sequence of test packet randomly selects, then the transmission sequence of message for example can be IPV4_UDP, IPV6_UDP, IPV6_UDP, IPV4_UDP, IPV4_UDP ....
Step S104 sends the message that configuration successively sends calling according to the message of reading.
When having invoked test packet from default message store, and from sending message is had read in configuration file send configuration Afterwards, test packet needed for test case just completes calling, only need to send configuration according to the message of reading and successively send calling Message, that is, complete the transmission of test case.During as the message needed for generating test case, tester is only needed The call instruction to test packet is write in test case, without writing a large amount of test packet, so that test case It writes work to greatly simplify, improve test case writes efficiency.If the type of test packet needed for test case becomes Change or message transmitting party formula change, it is only necessary to default message store and send configuration file be adjusted, without pair Each test case is adjusted.
Test packet centralization generation method provided in this embodiment, in the message call instruction for obtaining test case transmission Later, test packet is called from default message store according to the type of message in message call instruction, wherein in default message store Including all test packets for supporting to send, read from transmission configuration file according to the message transmitting party formula in message call instruction Message is taken to send configuration, wherein sending in configuration file includes that message transmitting party formula and message send interval, then according to reading Message send configuration and successively send the message of calling so that tester improves survey without writing a large amount of test case Example on probation writes efficiency.
Further, in the above-described embodiments, although storing all test reports for supporting to send in default message store Text, but due to default message store be write in advance and stored in memory, wherein the test packet stored be it is static, It will not generally change.But it may be since there are the changes or system environments of special testing requirement perhaps test method Transformation, test packet needed for leading to test case is not stored in default message store.It is same for sending configuration file It is sent in configuration file in this way, message transmitting party formula needed for test case may be not stored in.Such as in test packet library In include IPV4, IPV4_TCP, IPV4_UDP and IPV6, IPV6_TCP, IPV6_UDP these be based on IPV4 agreement and IPV6 The association message of agreement, but with the development of communication technology, in fact it could happen that the IP agreement of later release and relevant message, that When test case needs the IP agreement message using later release, preset message store in and these not stored test packets, It will be unable to provide test case calling.Therefore, after obtaining the message call instruction that test case is sent, if in default message store Test packet not corresponding with the type of message in message call instruction, if send configuration file in not with message tune Configuration is sent with the corresponding message of message transmitting party formula in instruction, then sends test packet failed regeneration information.Send test Message failed regeneration information is not available test packet generation method provided in an embodiment of the present invention for knowing tester Test packet is generated, so that tester carries out writing for test case using other modes, or to default message store and hair It send configuration file to modify, increases required test packet and message and send configuration.
Fig. 3 is the structural schematic diagram of test packet centralization generating means embodiment one provided in an embodiment of the present invention, such as Shown in Fig. 3, test packet centralization generating means provided in this embodiment include:
Instruction acquisition module 31, for obtaining the message call instruction of test case transmission, message call instruction includes report Literary type and message transmitting party formula.
Message calling module 32, for calling test from default message store according to the type of message in message call instruction Message, presetting includes all test packets for supporting to send in message store.
Read module 33 is configured, for reading from transmission configuration file according to the message transmitting party formula in message call instruction Message is taken to send configuration, sending in configuration file includes that message transmitting party formula and message send interval.
Message sending module 34, for sending the message that configuration successively sends calling according to the message of reading.
Test packet generating means provided in this embodiment generate for realizing the test packet that embodiment illustrated in fig. 1 provides Method, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Further, on the basis of embodiment shown in Fig. 3, message calling module 32 is specifically used for from default message store Middle all test packets of reading are deleted from buffer queue into buffer queue, and according to the type of message in message call instruction The test packet called is not needed;Or tune needed for being read from default message store according to the type of message in message call instruction Test packet is into buffer queue.
Further, on the basis of embodiment shown in Fig. 3, test packet centralization generating means further include unsuccessfully believing Sending module is ceased, if for test packet not corresponding with the type of message in message call instruction in default message store, or If person sends message not corresponding with the message transmitting party formula in message call instruction in configuration file and sends configuration, send Test packet failed regeneration information.
Further, on the basis of embodiment shown in Fig. 3, message send configuration include sequence send, it is random send or It is sent with default timing.Message sending module 34 is configured specifically for being sent according to the message of reading, according to test packet pre- If the sequence arranged in message store, sequence calls test packet and sends or random call test packet and send, Huo Zhegen Test packet is called according to default transmission sequence and is sent
Further, on the basis of embodiment shown in Fig. 3, message calling module 32, specifically for being called according to message Type of message in instruction calls test packet from default message store, and constrains the value in each domain in the test packet of calling.
Fig. 4 is the structural schematic diagram of test packet centralization generating device provided in an embodiment of the present invention, as shown in figure 4, The test packet centralization generating device includes processor 41 and memory 42;Processor in test packet centralization generating device 41 quantity can be one or more, in Fig. 4 by taking a processor 41 as an example;Place in test packet centralization generating device Reason device 41 can be connected with memory 42 by bus or other modes, in Fig. 4 for being connected by bus.
Memory 42 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, such as the corresponding program instruction of test packet centralization generation method/module (example in the application Fig. 1 embodiment Such as, the instruction acquisition module 31 in test packet centralization generating means, message calling module 32, configuration read module 33, report Literary sending module 34).Software program, instruction and the module that processor 41 is stored in memory 42 by operation, to survey The various function application and data processing for trying message centralization generating device realize that above-mentioned test packet centralization generates Method.
Memory 42 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area can be stored to be made according to test packet centralization generating device With the data etc. created.In addition, memory 42 may include high-speed random access memory, it can also include non-volatile deposit Reservoir, for example, at least a disk memory, flush memory device or other non-volatile solid state memory parts.
The embodiment of the present application also provides a kind of storage medium comprising computer executable instructions, computer executable instructions When being executed by computer processor for executing a kind of test packet centralization generation method, this method comprises:
The message call instruction that test case is sent is obtained, message call instruction includes type of message and message transmitting party Formula;
Test packet is called from default message store according to the type of message in message call instruction, is wrapped in default message store Include all test packets for supporting to send;
Configuration is sent from reading message in configuration file is sent according to the message transmitting party formula in message call instruction, is sent It include that message transmitting party formula and message send interval in configuration file;
The message that configuration successively sends calling is sent according to the message of reading.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, in the embodiment of above-mentioned test packet centralization generating means, included each unit and Module is only divided according to the functional logic, but is not limited to the above division, as long as corresponding functions can be realized ?;In addition, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection being not intended to restrict the invention Range.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of test packet centralization generation method characterized by comprising
The message call instruction that test case is sent is obtained, the message call instruction includes type of message and message transmitting party Formula;
Test packet, the default message store are called from default message store according to the type of message in the message call instruction In include support send all test packets;
Configuration is sent from reading message in configuration file is sent according to the message transmitting party formula in the message call instruction, it is described Send in configuration file includes that message transmitting party formula and message send interval;
The message that configuration successively sends calling is sent according to the message of reading.
2. the method according to claim 1, wherein the type of message according in the message call instruction Test packet is called from default message store, comprising:
All test packets are read from default message store into buffer queue, and according to the message in the message call instruction Type deletes the test packet for not needing to call from buffer queue;
Or the test packet called needed for being read from default message store according to the type of message in the message call instruction Into buffer queue.
3. the method according to claim 1, wherein it is described obtain test case send message call instruction it Afterwards, the method also includes:
If test packet not corresponding with the type of message in the message call instruction, Huo Zheruo in the default message store Message not corresponding with the message transmitting party formula in the message call instruction sends configuration in the transmission configuration file, then Send test packet failed regeneration information.
4. described in any item methods according to claim 1~3, which is characterized in that it includes that sequence is sent out that the message, which sends configuration, It send, send at random or is sent with default timing;
It is described that the message that configuration successively sends calling is sent according to the message of reading, comprising:
It is sent and is configured according to the message of reading, according to the sequence that test packet arranges in the default message store, sequence is called Test packet simultaneously sends perhaps random call test packet and sends or call test packet simultaneously according to default transmission sequence It sends.
5. described in any item methods according to claim 1~3, which is characterized in that described according in the message call instruction Type of message call test packet from default message store, comprising:
Test packet is called from default message store according to the type of message in the message call instruction, and constrains the survey of calling Try the value in each domain in message.
6. a kind of test packet centralization generating means characterized by comprising
Instruction acquisition module, for obtaining the message call instruction of test case transmission, the message call instruction includes message Type and message transmitting party formula;
Message calling module, for being called test to report from default message store according to the type of message in the message call instruction Text includes all test packets for supporting to send in the default message store;
Read module is configured, for reading from transmission configuration file according to the message transmitting party formula in the message call instruction Message sends configuration, includes that message transmitting party formula and message send interval in the transmission configuration file;
Message sending module, for sending the message that configuration successively sends calling according to the message of reading.
7. device according to claim 6, which is characterized in that the message calling module is specifically used for from default message All test packets are read in library into buffer queue, and according to the type of message in the message call instruction from buffer queue Middle deletion does not need the test packet called;Or according to the type of message in the message call instruction from default message store The test packet called needed for reading is into buffer queue.
8. device according to claim 6 or 7, which is characterized in that it includes that sequence sends, is random that the message, which sends configuration, It sends or is sent with default timing;
The message sending module is configured specifically for being sent according to the message of reading, according to test packet in the default report The sequence arranged in library, sequence call test packet and send perhaps random call test packet and send or according to pre- If transmission sequence is called test packet and is sent.
9. a kind of test packet centralization generating device characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now test packet centralization generation method as described in any in Claims 1 to 5.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The test packet centralization generation method as described in any in Claims 1 to 5 is realized when execution.
CN201811604346.7A 2018-12-26 2018-12-26 Test packet centralization generation method, device, equipment and storage medium Pending CN109656831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811604346.7A CN109656831A (en) 2018-12-26 2018-12-26 Test packet centralization generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811604346.7A CN109656831A (en) 2018-12-26 2018-12-26 Test packet centralization generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109656831A true CN109656831A (en) 2019-04-19

Family

ID=66116428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811604346.7A Pending CN109656831A (en) 2018-12-26 2018-12-26 Test packet centralization generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109656831A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958155A (en) * 2019-11-08 2020-04-03 深圳市元征科技股份有限公司 Test configuration method and related device
CN111585642A (en) * 2020-05-11 2020-08-25 中电科航空电子有限公司 Airborne short message communication method, device, equipment, system and readable storage medium
CN111796578A (en) * 2020-06-29 2020-10-20 中国第一汽车股份有限公司 Vehicle controller testing method, device and system and storage medium
CN112235157A (en) * 2020-09-30 2021-01-15 广州鲁邦通物联网科技有限公司 Router equipment testing method and system based on two-layer network
CN113225232A (en) * 2021-05-12 2021-08-06 中国第一汽车股份有限公司 Hardware testing method and device, computer equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080066009A1 (en) * 2006-08-14 2008-03-13 Soasta, Inc. Visual test automation tool for message-based applications, web applications and SOA systems
CN101202739A (en) * 2006-12-11 2008-06-18 中兴通讯股份有限公司 Device for processing ASN.1 message OO
CN103338475A (en) * 2013-06-09 2013-10-02 福建星网锐捷网络有限公司 AP (Access Point) testing method, device and terminal
US20130318223A1 (en) * 2012-05-25 2013-11-28 Pro Design Electronic Gmbh Communication system and communicaton method
CN105915529A (en) * 2016-05-19 2016-08-31 微梦创科网络科技(中国)有限公司 Message generation method and device
CN106933745A (en) * 2017-03-30 2017-07-07 携程计算机技术(上海)有限公司 WEB automatic interface testing methods and system
CN107168873A (en) * 2017-05-11 2017-09-15 南京南瑞继保电气有限公司 A kind of network test system and method based on script
CN107547299A (en) * 2017-06-01 2018-01-05 新华三信息安全技术有限公司 A kind of method of testing and system
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
CN108595320A (en) * 2018-04-03 2018-09-28 新华三信息安全技术有限公司 a kind of test method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080066009A1 (en) * 2006-08-14 2008-03-13 Soasta, Inc. Visual test automation tool for message-based applications, web applications and SOA systems
CN101202739A (en) * 2006-12-11 2008-06-18 中兴通讯股份有限公司 Device for processing ASN.1 message OO
US20130318223A1 (en) * 2012-05-25 2013-11-28 Pro Design Electronic Gmbh Communication system and communicaton method
CN103338475A (en) * 2013-06-09 2013-10-02 福建星网锐捷网络有限公司 AP (Access Point) testing method, device and terminal
CN105915529A (en) * 2016-05-19 2016-08-31 微梦创科网络科技(中国)有限公司 Message generation method and device
CN106933745A (en) * 2017-03-30 2017-07-07 携程计算机技术(上海)有限公司 WEB automatic interface testing methods and system
CN107168873A (en) * 2017-05-11 2017-09-15 南京南瑞继保电气有限公司 A kind of network test system and method based on script
CN107547299A (en) * 2017-06-01 2018-01-05 新华三信息安全技术有限公司 A kind of method of testing and system
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
CN108595320A (en) * 2018-04-03 2018-09-28 新华三信息安全技术有限公司 a kind of test method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958155A (en) * 2019-11-08 2020-04-03 深圳市元征科技股份有限公司 Test configuration method and related device
CN110958155B (en) * 2019-11-08 2023-02-28 深圳市元征科技股份有限公司 Test configuration method and related device
CN111585642A (en) * 2020-05-11 2020-08-25 中电科航空电子有限公司 Airborne short message communication method, device, equipment, system and readable storage medium
US11923959B2 (en) 2020-05-11 2024-03-05 China Electronics Technology Avionics Co., Ltd. Airborne short message communication method, apparatus, device and system, and readable storage medium
CN111796578A (en) * 2020-06-29 2020-10-20 中国第一汽车股份有限公司 Vehicle controller testing method, device and system and storage medium
CN112235157A (en) * 2020-09-30 2021-01-15 广州鲁邦通物联网科技有限公司 Router equipment testing method and system based on two-layer network
CN112235157B (en) * 2020-09-30 2022-05-17 广州鲁邦通物联网科技股份有限公司 Router equipment testing method and system
CN113225232A (en) * 2021-05-12 2021-08-06 中国第一汽车股份有限公司 Hardware testing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109656831A (en) Test packet centralization generation method, device, equipment and storage medium
US6892231B2 (en) Method and apparatus for verifying the contents of a global configuration file
CN109726128A (en) A kind of method for generating test case, device and server
JP2012157056A (en) Protocol emulator
CN107613037A (en) A kind of domain name reorientation method and system
CN112732572A (en) Service testing method, device and system, storage medium and electronic device
CN109525679A (en) A kind of web file server test method based on http protocol
CN110413594A (en) A kind of more example method for testing pressure of Redis and device
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN110109656A (en) Interface analogy method, device, computer equipment and storage medium
CN113900925A (en) Test environment building and utilizing method, device, equipment and storage medium
CN113238965B (en) Interface test script generation method, system and storage medium
CN106708717B (en) A kind of exploitation adjustment method and device
CN107231305B (en) A kind of route agent and buffer memory management method and device
CN108089972A (en) interface test method and device
US9729404B2 (en) Quality of service monitoring device and method of monitoring quality of service
CN110445658A (en) A kind of message processing method and system
CN105302731A (en) Testing system and method for upgrading website configuration
CN109375946A (en) A kind of method and system of the component packet of management node package manager
CN113068216B (en) Network dial testing method, network dial testing system and computer readable storage medium
KR100397468B1 (en) Network management device and method using mib name server
CN112765038A (en) Distributed cluster software testing method, device, equipment and storage medium
CN114500348A (en) CDN gateway test method and system
CN111464383A (en) System capacity testing method and device based on production environment
CN115037794B (en) Data acquisition method, device, computer equipment and readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190419

RJ01 Rejection of invention patent application after publication