CN109522205A - A kind of method, apparatus of emulation testing, computer storage medium and terminal - Google Patents

A kind of method, apparatus of emulation testing, computer storage medium and terminal Download PDF

Info

Publication number
CN109522205A
CN109522205A CN201811096206.3A CN201811096206A CN109522205A CN 109522205 A CN109522205 A CN 109522205A CN 201811096206 A CN201811096206 A CN 201811096206A CN 109522205 A CN109522205 A CN 109522205A
Authority
CN
China
Prior art keywords
frame
test case
receiving frame
receiving
devices under
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811096206.3A
Other languages
Chinese (zh)
Other versions
CN109522205B (en
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 Watertek Information Technology Co Ltd
Original Assignee
Beijing Watertek Information 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 Watertek Information Technology Co Ltd filed Critical Beijing Watertek Information Technology Co Ltd
Priority to CN201811096206.3A priority Critical patent/CN109522205B/en
Publication of CN109522205A publication Critical patent/CN109522205A/en
Application granted granted Critical
Publication of CN109522205B publication Critical patent/CN109522205B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3652Software debugging using additional hardware in-circuit-emulation [ICE] arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • 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
    • 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/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

A kind of method, apparatus of emulation testing, computer storage medium and terminal, comprising: receive example element and be used for: receive according to predetermined manner obtains suitable for testing the test case being devices under;Parsing example element is used for: being parsed received test case, is obtained test case parsing result;Emulation testing unit is used for: test case parsing result based on the received, the emulation testing being devices under.The embodiment of the present invention is based on being suitable for testing the test case being devices under and realizing the emulation testing being devices under, when be devices under change when, it only needs to obtain applicable test case, avoid the repetition research and development of emulator, the efficiency of emulation testing is improved, the research and development duration being devices under is shortened.

Description

A kind of method, apparatus of emulation testing, computer storage medium and terminal
Technical field
Present document relates to but be not limited to emulation technology, espespecially a kind of method, apparatus of emulation testing, computer storage medium and Terminal.
Background technique
In science-and-technology enterprise Project-developing, the equipment (hereinafter referred to as: grinding equipment) researched and developed need by serial ports with Peripheral equipment is communicated, that there may be: volumes is big for peripheral equipment, should not move, supply voltage type disunity, by third party Situations such as providing or not developing product influences in the debugging for grinding equipment.
In order to guarantee in the development progress for grinding equipment, main way include: first develop peripheral equipment simulation software/set Standby (hereinafter referred to as: emulator) debug in the exploitation for grinding equipment by emulator.After the completion of grinding equipment development, Still using emulator to grind equipment and carry out include Black-box Testing, grey box testing, marginal testing, Alpha (alpha) test, Comprehensive test including beta (Beta) test etc..The exploitation of emulator needs software and hardware design, printed circuit board (PCB) processes such as plate-making, material procurement there are heavy workload, increase and are grinding equipment development cost, influencing asking for development progress Topic.In addition, emulator does not have versatility, it is different when existing in order frame data, response time, the echo port for grinding equipment When, emulator needs to develop again.
To sum up, the exploitation applicability of emulator is low, affects in the development efficiency for grinding equipment.
Summary of the invention
It is the general introduction to the theme being described in detail herein below.This general introduction is not the protection model in order to limit claim It encloses.
The embodiment of the present invention provides the method, apparatus, computer storage medium and terminal of a kind of emulation testing, can be avoided The repetition of emulator is researched and developed, and is promoted the efficiency of emulation testing, is shortened the research and development duration being devices under.
The embodiment of the invention provides a kind of methods of emulation testing, comprising:
It receives and is suitable for testing the test case being devices under according to what predetermined manner obtained;
Received test case is parsed, test case parsing result is obtained;
Test case parsing result based on the received, the emulation testing being devices under.
Optionally,
It is described to be suitable for testing the test case being devices under including in the following manner according to what predetermined manner obtained The test case acquired:
What is obtained from preset scheme database is used for the test case for being devices under progress emulation testing;
Wherein, the scheme database includes: on preset interactive interface, and according to test case, information editing is obtained Obtain the database comprising one or more test cases;The test case information includes: by pre-loaded parsing The information that protocol analysis expandable mark language XML file obtains;The XML file includes: to be devices under according to The file comprising test case information that operation information determines;The test case information includes following part or all of information: Data frame mark, one or more first receiving frames, the feedback frame corresponding to each first receiving frame, receiving port, response Port, delay time, sending times.Optionally,
The received test case of parsing, obtaining test case parsing result includes:
It is indicated according to the data frame, determines the data frame for including in the test case and each data frame in the emulation Function in test;
By the function of the data frame and each data frame that include in the determining test case in the emulation testing, make For the test case parsing result;
Wherein, the data frame includes: one or more first receiving frames, corresponding to the feedback of each first receiving frame Frame.
Optionally, the emulation testing being devices under includes:
It is received by preset physical serial interface from second receiving frame being devices under;
The feedback frame for corresponding to second receiving frame is determined from the test case parsing result;
By the determining feedback frame corresponding to second receiving frame feed back to it is described be devices under, to carry out institute State emulation testing;
It wherein, include the first receiving frame and the feedback frame corresponding to the first receiving frame in the test case parsing result; The feedback frame is for feeding back the second receiving frame identical with the first receiving frame data content received.
Optionally, described to receive after the second receiving frame being devices under, the method also includes:
Buffer queue is established in pre-set first storage medium;
All information frames received by the physical serial interface are stored in the buffer queue.
Optionally, the determination correspond to second receiving frame feedback frame include:
Determining and first frames received from the buffer queue will correspond to it is believed that identical second receiving frame of breath Feedback frame of the feedback frame of first receiving frame as second receiving frame.
Optionally, described to be determined with first frames received from the test case parsing result it is believed that breath is identical Second receiving frame includes:
Filter the information frame in the buffer queue with the first receiving frame length violation;
Each information frame after filtering is compared with first receiving frame respectively, determining and first receiving frame The identical information frame of data information is second receiving frame.
Optionally, described that the determining feedback frame corresponding to second receiving frame is fed back into described tested set It is standby to include:
Determine correspond to second receiving frame feedback frame after, according to preset strategy starting to second receiving frame into The event of row feedback;
According to the event of starting, the feedback of the feedback frame corresponding to second receiving frame is carried out.
Optionally, when the received test case of the parsing, the method also includes:
Feed back the analysis state of the test case.
It is optionally, described to be received before second receiving frame being devices under by preset physical serial interface, The method also includes:
Configure the messaging parameter of the physical serial interface;
The messaging parameter includes following part or all of parameter: serial ports rate, communication pattern.
On the other hand, the embodiment of the present invention also provides a kind of device of emulation testing, comprising: receives example element, parsing Example element and emulation testing unit;Wherein,
It receives example element to be used for: receiving and be suitable for testing the test reality being devices under according to what predetermined manner obtained Example;
Parsing example element is used for: being parsed received test case, is obtained test case parsing result;
Emulation testing unit is used for: test case parsing result based on the received, the emulation testing being devices under.
Optionally,
It is described to be suitable for testing the test case being devices under including in the following manner according to what predetermined manner obtained The test case acquired:
What is obtained from preset scheme database is used for the test case for being devices under progress emulation testing;
Wherein, the scheme database includes: on preset interactive interface, and according to test case, information editing is obtained Obtain the database comprising one or more test cases;The test case information includes: by pre-loaded parsing The information that protocol analysis expandable mark language XML file obtains;The XML file includes: to be devices under according to The file comprising test case information that operation information determines;The test case information includes following part or all of information: Data frame mark, one or more first receiving frames, the feedback frame corresponding to each first receiving frame, receiving port, response Port, delay time, sending times.
Optionally, the parsing example element is specifically used for:
It is indicated according to the data frame, determines the data frame for including in the test case and each data frame in the emulation Function in test;
By the function of the data frame and each data frame that include in the determining test case in the emulation testing, make For the test case parsing result;
Wherein, the data frame includes: one or more first receiving frames, corresponding to the feedback of each first receiving frame Frame.
Optionally, the emulation testing unit is specifically used for:
It is received by preset physical serial interface from second receiving frame being devices under;
The feedback frame for corresponding to second receiving frame is determined from the test case parsing result;
By the determining feedback frame corresponding to second receiving frame feed back to it is described be devices under, to carry out institute State emulation testing;
It wherein, include the first receiving frame and the feedback frame corresponding to the first receiving frame in the test case parsing result; The feedback frame is for feeding back the second receiving frame identical with the first receiving frame data content received.
Optionally, described device further includes the first storage unit, is used for:
Buffer queue is established in pre-set first storage medium;
All information frames received by the physical serial interface are stored in the buffer queue.
Optionally, the emulation testing unit includes: for determining the feedback frame for corresponding to second receiving frame
Determining and first frames received from the buffer queue will correspond to it is believed that identical second receiving frame of breath Feedback frame of the feedback frame of first receiving frame as second receiving frame.
Optionally, the emulation testing unit is received with first frames received it is believed that ceasing identical second for determining Frame includes:
Filter the information frame in the buffer queue with the first receiving frame length violation;
Each information frame after filtering is compared with first receiving frame respectively, determining and first receiving frame The identical information frame of data information is second receiving frame.
Optionally, the feedback frame corresponding to second receiving frame that the emulation testing unit is used to determine is anti- Being fed to described be devices under includes:
Determine correspond to second receiving frame feedback frame after, according to preset strategy starting to second receiving frame into The event of row feedback;
According to the event of starting, the feedback of the feedback frame corresponding to second receiving frame is carried out.
Optionally, the parsing example element is also used to:
Feed back the analysis state of the test case.
Optionally, described device further includes configuration unit, is used for:
Configure the messaging parameter of the physical serial interface;
The messaging parameter includes following part or all of parameter: serial ports rate, communication pattern.
On the other hand, the embodiment of the present invention also provides a kind of computer storage medium, deposits in the computer storage medium Contain computer executable instructions, the method that the computer executable instructions are used to execute above-mentioned emulation testing.
On the other hand, the embodiment of the present invention also provides a kind of terminal, comprising: memory and processor;Wherein,
Processor is configured as executing the program instruction in memory;
Program instruction reads in processor and executes following operation:
It receives and is suitable for testing the test case being devices under according to what predetermined manner obtained;
Received test case is parsed, test case parsing result is obtained;
Test case parsing result based on the received, the emulation testing being devices under.
Compared with the relevant technologies, technical scheme includes: to receive example element, parsing example element and emulation testing Unit;Wherein, it receives example element to be used for: receiving and be suitable for testing the test reality being devices under according to what predetermined manner obtained Example;Parsing example element is used for: being parsed received test case, is obtained test case parsing result;Emulation testing unit is used for: Test case parsing result based on the received, the emulation testing being devices under.The embodiment of the present invention is based on being suitable for surveying Trying the test case that is devices under realizes the emulation testing being devices under, when be devices under change when, only need Applicable test case is obtained, the repetition research and development of emulator is avoided, improves the efficiency of emulation testing, shorten The research and development duration being devices under.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical solution of the present invention, and constitutes part of specification, with this The embodiment of application technical solution for explaining the present invention together, does not constitute the limitation to technical solution of the present invention.
Fig. 1 is the flow chart of the method for emulation testing of the embodiment of the present invention;
Fig. 2 is the structural block diagram of the device of emulation testing of the embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application Feature can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable Sequence executes shown or described step.
Fig. 1 is the flow chart of the method for emulation testing of the embodiment of the present invention, as shown in Figure 1, comprising:
Step 101, reception are suitable for testing the test case being devices under according to what predetermined manner obtained;
It should be noted that the embodiment of the present invention receives the communication path of test case, it can be by those skilled in the art Analysis determination is carried out according to the content of test case and communicating requirement.
Optionally, the embodiment of the present invention is suitable for testing the test case packet being devices under according to what predetermined manner obtained Include the test case acquired in the following manner:
What is obtained from preset scheme database is used for the test case for being devices under progress emulation testing;
Wherein, the scheme database includes: on preset interactive interface, and according to test case, information editing is obtained Obtain the database comprising one or more test cases;The test case information includes: by pre-loaded parsing The information that protocol analysis expandable mark language XML file obtains;The XML file includes: to be devices under according to The file comprising test case information that operation information determines;The test case information includes following part or all of information: Data frame mark, one or more first receiving frames, the feedback frame corresponding to each first receiving frame, receiving port, response Port, delay time, sending times.
Optionally, the embodiment of the present invention can be by following processing mode suitable for testing the test case being devices under It obtains:
Extensible markup language (XML) file is parsed by pre-loaded analysis protocol, obtains test case information;
On preset interactive interface, being obtained according to the test case information editing of acquisition includes one or one The scheme database of a above test case;
From the scheme database, select and determine for the test case for being devices under progress emulation testing.
It should be noted that the scheme database that editor of the embodiment of the present invention includes multiple test cases may include: root According to test case information and test purpose, editor is obtained for inciting somebody to action to one or more test cases being devices under Test case is added in scheme database;Receiving port, echo port, delay time and sending times are mainly used for testing The communication rule of receiving frame and feedback frame is set in journey, what when those skilled in the art can determine according to common knowledge in It waits, how to use these parameters.
Optionally, the embodiment of the invention also includes: set the store path of scheme database, with carry out editor acquisition it is each The storage of test case;After storing test case, plan of establishment database is readable;
Step 102, the received test case of parsing, obtain test case parsing result;
Optionally, the embodiment of the present invention parses received test case, obtains test case parsing result and includes:
It is indicated according to the data frame, determines the data frame for including in the test case and each data frame in the emulation Function in test;
By the function of the data frame and each data frame that include in the determining test case in the emulation testing, make For the test case parsing result;
Wherein, the data frame includes: one or more first receiving frames, corresponding to the feedback of each first receiving frame Frame.
Step 103, based on the received test case parsing result, the emulation testing being devices under.
It should be noted that the embodiment of the present invention, which is devices under to be included in, grinds equipment.In addition, test case is greater than one When, the operation order of test case can be set by those skilled in the art.What is obtained from scheme database is used to test When the test case being devices under is greater than one, test case can be arranged according to test request by those skilled in the art Testing time.Optionally, the emulation testing that the embodiment of the present invention is devices under includes:
It is received by preset physical serial interface from second receiving frame being devices under;
The feedback frame for corresponding to second receiving frame is determined from the test case parsing result;
By the determining feedback frame corresponding to second receiving frame feed back to it is described be devices under, to carry out institute State emulation testing;
It wherein, include the first receiving frame and the feedback frame corresponding to the first receiving frame in the test case parsing result; The feedback frame is for feeding back the second receiving frame identical with the first receiving frame data content received.
It should be noted that first and second in the first receiving frame and the second receiving frame are mainly used for distinguishing tests example In receiving frame and from the receiving frame being devices under.
Optionally, after obtaining test case parsing result, present invention method further include:
The test case parsing result of acquisition is stored in pre-set second storage medium.
Optionally, the present invention method after the second receiving frame being devices under is received further include:
Buffer queue is established in pre-set first storage medium;
All information frames received by the physical serial interface are stored in the buffer queue.
It should be noted that information frame of the embodiment of the present invention includes the second receiving frame and from other kinds being devices under The frame of class.
Optionally, the embodiment of the present invention determines that the feedback frame for corresponding to second receiving frame includes:
Determining and first frames received from the buffer queue will correspond to it is believed that identical second receiving frame of breath Feedback frame of the feedback frame of first receiving frame as second receiving frame.
Optionally, the embodiment of the present invention is determined with first frames received it is believed that identical second receiving frame of breath includes:
Filter the information frame in the buffer queue with the first receiving frame length violation;
Each information frame after filtering is compared with first receiving frame respectively, determining and first receiving frame The identical information frame of data information is second receiving frame.
It should be noted that the embodiment of the present invention can be lost when determining current data frame not is the first receiving frame The processing of first byte is abandoned, and continues the determination of the first receiving frame after abandoning first byte.
Optionally, the embodiment of the present invention feeds back to the determining feedback frame corresponding to second receiving frame described It is devices under and includes:
Determine correspond to second receiving frame feedback frame after, according to preset strategy starting to second receiving frame into The event of row feedback;
According to the event of starting, the feedback of the feedback frame corresponding to second receiving frame is carried out.
It should be noted that the event of starting can be based on by those skilled in the art the relevant technologies enable, disable, The settings such as time started, end time operation;
Optionally, when parsing received test case, present invention method further include:
Feed back the analysis state of the test case.
It is shown it should be noted that the analysis state of test case can carry out feedback by preset interactive interface Show.
Optionally, this hair before second receiving frame being devices under is received by preset physical serial interface Bright embodiment method further include:
Configure the messaging parameter of the physical serial interface;
The messaging parameter includes following part or all of parameter: serial ports rate, communication pattern.
It is shown it should be noted that the configuration of messaging parameter can carry out feedback by preset interactive interface.
Compared with the relevant technologies, technical scheme includes: to receive to be suitable for test quilt according to what predetermined manner obtained The test case of test equipment;Received test case is parsed, test case parsing result is obtained;Test case based on the received Parsing result, the emulation testing being devices under.The embodiment of the present invention is based on suitable for testing the test being devices under Example realizes the emulation testing being devices under, when be devices under change when, it is only necessary to it is real to obtain applicable test Example avoids the repetition research and development of emulator, the efficiency of emulation testing is improved, when shortening the research and development being devices under It is long.
Fig. 2 is the structural block diagram of the device of emulation testing of the embodiment of the present invention, as shown in Figure 2, comprising: receives example list Member, parsing example element and emulation testing unit;Wherein,
It receives example element to be used for: receiving and be suitable for testing the test reality being devices under according to what predetermined manner obtained Example;
It should be noted that the embodiment of the present invention receives the communication path of test case, it can be by those skilled in the art Analysis determination is carried out according to the content of test case and communicating requirement.
Parsing example element is used for: being parsed received test case, is obtained test case parsing result;
Emulation testing unit is used for: test case parsing result based on the received, the emulation testing being devices under.
It should be noted that the embodiment of the present invention, which is devices under to be included in, grinds equipment.It receives example element and parsing is real Example unit can carry out load operating by the embedded device including single-chip microcontroller.
Optionally, the embodiment of the present invention
It is described to be suitable for testing the test case being devices under including in the following manner according to what predetermined manner obtained The test case acquired:
What is obtained from preset scheme database is used for the test case for being devices under progress emulation testing;
Wherein, the scheme database includes: on preset interactive interface, and according to test case, information editing is obtained Obtain the database comprising one or more test cases;The test case information includes: by pre-loaded parsing The information that protocol analysis expandable mark language XML file obtains;The XML file includes: to be devices under according to The file comprising test case information that operation information determines;The test case information includes following part or all of information: Data frame mark, one or more first receiving frames, the feedback frame corresponding to each first receiving frame, receiving port, response Port, delay time, sending times.It should be noted that editor of the embodiment of the present invention includes the scheme number of multiple test cases It may include: according to test case information and test purpose according to library, editor obtains for one be devices under or one The above test case, test case is added in scheme database;Receiving port, echo port, delay time and repeating transmission time Number is mainly used for setting the communication rule of receiving frame and feedback frame in test process, and those skilled in the art can be according to known normal Knowledge determines when, how with these parameters.
In addition, resolution file of embodiment of the present invention unit, editing example element, determining that example element can construct and have It executes in the terminal applies of these Elementary Functions, this terminal applies can load in computer or server.
Optionally, the embodiment of the invention also includes: set the store path of scheme database, with carry out editor acquisition it is each The storage of test case;After storing test case, plan of establishment database is readable;
Optionally, parsing of embodiment of the present invention example element is specifically used for:
It is indicated according to the data frame, determines the data frame for including in the test case and each data frame in the emulation Function in test;
By the function of the data frame and each data frame that include in the determining test case in the emulation testing, make For the test case parsing result;
Wherein, the data frame includes: one or more first receiving frames, corresponding to the feedback of each first receiving frame Frame.
Optionally, emulation testing of embodiment of the present invention unit is specifically used for:
It is received by preset physical serial interface from second receiving frame being devices under;
The feedback frame for corresponding to second receiving frame is determined from the test case parsing result;
By the determining feedback frame corresponding to second receiving frame feed back to it is described be devices under, to carry out institute State emulation testing;
It wherein, include the first receiving frame and the feedback frame corresponding to the first receiving frame in the test case parsing result; The feedback frame is for feeding back the second receiving frame identical with the first receiving frame data content received.
It should be noted that first and second in the first receiving frame and the second receiving frame are mainly used for distinguishing tests example In receiving frame and from the receiving frame being devices under.
Optionally, the device of that embodiment of the invention further includes the second storage unit, is used for: by the test case solution of acquisition Analysis result is stored in pre-set second storage medium.
Optionally, the device of that embodiment of the invention further includes the first storage unit, is used for: being situated between in pre-set first storage Buffer queue is established in matter;
All information frames received by the physical serial interface are stored in the buffer queue.
Optionally, emulation testing of embodiment of the present invention unit is for determining the feedback frame packet for corresponding to second receiving frame It includes:
Determining and first frames received from the buffer queue will correspond to it is believed that identical second receiving frame of breath Feedback frame of the feedback frame of first receiving frame as second receiving frame.
Optionally, emulation testing of embodiment of the present invention unit is for determining with first frames received it is believed that breath is identical Second receiving frame includes:
Filter the information frame in the buffer queue with the first receiving frame length violation;
Each information frame after filtering is compared with first receiving frame respectively, determining and first receiving frame The identical information frame of data information is second receiving frame.
It should be noted that the embodiment of the present invention can be lost when determining current data frame not is the first receiving frame The processing of first byte is abandoned, and continues the determination of the first receiving frame after abandoning first byte.
Optionally, what emulation testing of embodiment of the present invention unit was used to determine corresponds to the described of second receiving frame Feedback frame feeds back to described be devices under
Determine correspond to second receiving frame feedback frame after, according to preset strategy starting to second receiving frame into The event of row feedback;
According to the event of starting, the feedback of the feedback frame corresponding to second receiving frame is carried out.
It should be noted that the event of starting can be based on by those skilled in the art the relevant technologies enable, disable, The settings such as time started, end time operation;
Optionally, parsing of embodiment of the present invention example element is also used to:
Feed back the analysis state of the test case.
It is shown it should be noted that the analysis state of test case can carry out feedback by preset interactive interface Show.
Optionally, the device of that embodiment of the invention further includes configuration unit, is used for:
Configure the messaging parameter of the physical serial interface;
The messaging parameter includes following part or all of parameter: serial ports rate, communication pattern.
It is shown it should be noted that the configuration of messaging parameter can carry out feedback by preset interactive interface.
Compared with the relevant technologies, technical scheme includes: to receive example element, parsing example element and emulation testing Unit;Wherein, it receives example element to be used for: receiving and be suitable for testing the test reality being devices under according to what predetermined manner obtained Example;Parsing example element is used for: being parsed received test case, is obtained test case parsing result;Emulation testing unit is used for: Test case parsing result based on the received, the emulation testing being devices under.The embodiment of the present invention is based on being suitable for surveying Trying the test case that is devices under realizes the emulation testing being devices under, when be devices under change when, only need Applicable test case is obtained, the repetition research and development of emulator is avoided, improves the efficiency of emulation testing, shorten The research and development duration being devices under.
The embodiment of the present invention also provides a kind of computer storage medium, is stored with computer in the computer storage medium Executable instruction, the method that the computer executable instructions are used to execute above-mentioned emulation testing.
The embodiment of the present invention also provides a kind of terminal, comprising: memory and processor;Wherein,
Processor is configured as executing the program instruction in memory;
Program instruction reads in processor and executes following operation:
It receives and is suitable for testing the test case being devices under according to what predetermined manner obtained;
Received test case is parsed, test case parsing result is obtained;
Test case parsing result based on the received, the emulation testing being devices under.
Those of ordinary skill in the art will appreciate that all or part of the steps in the above method can be instructed by program Related hardware (such as processor) is completed, and described program can store in computer readable storage medium, as read-only memory, Disk or CD etc..Optionally, one or more integrated circuits also can be used in all or part of the steps of above-described embodiment It realizes.Correspondingly, each module/unit in above-described embodiment can take the form of hardware realization, such as pass through integrated electricity Its corresponding function is realized on road, can also be realized in the form of software function module, such as is stored in by processor execution Program/instruction in memory realizes its corresponding function.The present invention is not limited to the hardware and softwares of any particular form In conjunction with.
Although disclosed herein embodiment it is as above, the content only for ease of understanding the present invention and use Embodiment is not intended to limit the invention.Technical staff in any fields of the present invention is taken off not departing from the present invention Under the premise of the spirit and scope of dew, any modification and variation, but the present invention can be carried out in the form and details of implementation Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.

Claims (22)

1. a kind of method of emulation testing characterized by comprising
It receives and is suitable for testing the test case being devices under according to what predetermined manner obtained;
Received test case is parsed, test case parsing result is obtained;
Test case parsing result based on the received, the emulation testing being devices under described in progress.
2. the method according to claim 1, wherein described be tested according to the test that is suitable for that predetermined manner obtains The test case for trying equipment includes the test case acquired in the following manner:
What is obtained from preset scheme database is used for the test case for being devices under progress emulation testing;
Wherein, the scheme database includes: on preset interactive interface, and according to test case, information editing is wrapped Database containing one or more test cases;The test case information includes: by pre-loaded analysis protocol Parse the information that expandable mark language XML file obtains;The XML file includes: the operation being devices under according to The file comprising test case information that information determines;The test case information includes following part or all of information: data Frame mark, one or more first receiving frames, the feedback frame corresponding to each first receiving frame, receiving port, echo port, Delay time, sending times.
3. according to the method described in claim 2, it is characterized in that, the received test case of parsing, obtains test case Parsing result includes:
It is indicated according to the data frame, determines the data frame for including in the test case and each data frame in the emulation testing In function;
By the function of the data frame and each data frame that include in the determining test case in the emulation testing, as institute State test case parsing result;
Wherein, the data frame includes: one or more first receiving frames, corresponding to the feedback frame of each first receiving frame.
4. according to the method in claim 2 or 3, which is characterized in that the emulation testing being devices under includes:
It is received by preset physical serial interface from second receiving frame being devices under;
The feedback frame for corresponding to second receiving frame is determined from the test case parsing result;
By the determining feedback frame corresponding to second receiving frame feed back to it is described be devices under, it is described imitative to carry out True test;
It wherein, include the first receiving frame and the feedback frame corresponding to the first receiving frame in the test case parsing result;It is described Feedback frame is for feeding back the second receiving frame identical with the first receiving frame data content received.
5. according to the method described in claim 4, it is characterized in that, the reception is from the second receiving frame being devices under Afterwards, the method also includes:
Buffer queue is established in pre-set first storage medium;
All information frames received by the physical serial interface are stored in the buffer queue.
6. according to the method described in claim 5, it is characterized in that, described determine from the test case parsing result corresponds to Include: in the feedback frame of second receiving frame
From the buffer queue it is determining with first frames received it is believed that identical second receiving frame of breath, will correspond to this Feedback frame of the feedback frame of one receiving frame as second receiving frame.
7. according to the method described in claim 6, it is characterized in that, the determination is with first frames received it is believed that manner of breathing is same The second receiving frame include:
Filter the information frame in the buffer queue with the first receiving frame length violation;
Each information frame after filtering is compared with first receiving frame respectively, determining and the first frames received evidence The identical information frame of information is second receiving frame.
8. according to the method described in claim 4, it is characterized in that, described by the determining institute corresponding to second receiving frame It states feedback frame and feeds back to described be devices under and include:
It determines after corresponding to the feedback frame of second receiving frame, second receiving frame is carried out according to preset strategy starting anti- The event of feedback;
According to the event of starting, the feedback of the feedback frame corresponding to second receiving frame is carried out.
9. described in any item methods according to claim 1~3, which is characterized in that when the received test case of the parsing, institute State method further include:
Feed back the analysis state of the test case.
10. according to the method described in claim 4, it is characterized in that, described received by preset physical serial interface from described Before the second receiving frame being devices under, the method also includes:
Configure the messaging parameter of the physical serial interface;
The messaging parameter includes following part or all of parameter: serial ports rate, communication pattern.
11. a kind of device of emulation testing characterized by comprising receive example element, parsing example element and emulation testing Unit;Wherein,
It receives example element to be used for: receiving and be suitable for testing the test case being devices under according to what predetermined manner obtained;
Parsing example element is used for: being parsed received test case, is obtained test case parsing result;
Emulation testing unit is used for: test case parsing result based on the received, the emulation testing being devices under.
12. device according to claim 11, which is characterized in that described to be suitable for test quilt according to what predetermined manner obtained The test case of test equipment includes the test case acquired in the following manner:
What is obtained from preset scheme database is used for the test case for being devices under progress emulation testing;
Wherein, the scheme database includes: on preset interactive interface, and according to test case, information editing is wrapped Database containing one or more test cases;The test case information includes: by pre-loaded analysis protocol Parse the information that expandable mark language XML file obtains;The XML file includes: the operation being devices under according to The file comprising test case information that information determines;The test case information includes following part or all of information: data Frame mark, one or more first receiving frames, the feedback frame corresponding to each first receiving frame, receiving port, echo port, Delay time, sending times.
13. device according to claim 12, which is characterized in that the parsing example element is specifically used for:
It is indicated according to the data frame, determines the data frame for including in the test case and each data frame in the emulation testing In function;
By the function of the data frame and each data frame that include in the determining test case in the emulation testing, as institute State test case parsing result;
Wherein, the data frame includes: one or more first receiving frames, corresponding to the feedback frame of each first receiving frame.
14. device described in 2 or 134 according to claim 1, which is characterized in that the emulation testing unit is specifically used for:
It is received by preset physical serial interface from second receiving frame being devices under;
The feedback frame for corresponding to second receiving frame is determined from the test case parsing result;
By the determining feedback frame corresponding to second receiving frame feed back to it is described be devices under, it is described imitative to carry out True test;
It wherein, include the first receiving frame and the feedback frame corresponding to the first receiving frame in the test case parsing result;It is described Feedback frame is for feeding back the second receiving frame identical with the first receiving frame data content received.
15. according to the method for claim 14, which is characterized in that described device further includes the first storage unit, is used for:
Buffer queue is established in pre-set first storage medium;
All information frames received by the physical serial interface are stored in the buffer queue.
16. device according to claim 15, which is characterized in that the emulation testing unit is for determining corresponding to described The feedback frame of second receiving frame includes:
From the buffer queue it is determining with first frames received it is believed that identical second receiving frame of breath, will correspond to this Feedback frame of the feedback frame of one receiving frame as second receiving frame.
17. device according to claim 16, which is characterized in that the emulation testing unit is for determining and described first Frames received is it is believed that identical second receiving frame of breath includes:
Filter the information frame in the buffer queue with the first receiving frame length violation;
Each information frame after filtering is compared with first receiving frame respectively, determining and the first frames received evidence The identical information frame of information is second receiving frame.
18. device according to claim 14, which is characterized in that the emulation testing unit was used to determine corresponds to The feedback frame of second receiving frame feeds back to described be devices under
It determines after corresponding to the feedback frame of second receiving frame, second receiving frame is carried out according to preset strategy starting anti- The event of feedback;
According to the event of starting, the feedback of the feedback frame corresponding to second receiving frame is carried out.
19. 1~13 described in any item devices according to claim 1, which is characterized in that the parsing example element is also used to:
Feed back the analysis state of the test case.
20. device according to claim 14, which is characterized in that described device further includes configuration unit, is used for:
Configure the messaging parameter of the physical serial interface;
The messaging parameter includes following part or all of parameter: serial ports rate, communication pattern.
21. a kind of computer storage medium, computer executable instructions, the calculating are stored in the computer storage medium Method of the machine executable instruction for emulation testing described in any one of perform claim requirement 1~10.
22. a kind of terminal, comprising: memory and processor;Wherein,
Processor is configured as executing the program instruction in memory;
Program instruction reads in processor and executes following operation:
It receives and is suitable for testing the test case being devices under according to what predetermined manner obtained;
Received test case is parsed, test case parsing result is obtained;
Test case parsing result based on the received, the emulation testing being devices under.
CN201811096206.3A 2018-09-19 2018-09-19 Simulation test method and device, computer storage medium and terminal Active CN109522205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811096206.3A CN109522205B (en) 2018-09-19 2018-09-19 Simulation test method and device, computer storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811096206.3A CN109522205B (en) 2018-09-19 2018-09-19 Simulation test method and device, computer storage medium and terminal

Publications (2)

Publication Number Publication Date
CN109522205A true CN109522205A (en) 2019-03-26
CN109522205B CN109522205B (en) 2022-02-22

Family

ID=65772397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811096206.3A Active CN109522205B (en) 2018-09-19 2018-09-19 Simulation test method and device, computer storage medium and terminal

Country Status (1)

Country Link
CN (1) CN109522205B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749076A (en) * 2019-10-30 2021-05-04 腾讯科技(深圳)有限公司 Test method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530209A (en) * 2013-09-17 2014-01-22 福建升腾资讯有限公司 Automated testing method for code keyboard
CN104868599A (en) * 2015-05-29 2015-08-26 国网河南省电力公司电力科学研究院 Intelligent substation message simulation test and association analysis system, and simulation method
US20160154728A1 (en) * 2009-09-11 2016-06-02 International Business Machines Corporation System and method for resource modeling and simulation in test planning
CN105974297A (en) * 2016-04-12 2016-09-28 烽火通信科技股份有限公司 Virtual test instrument capable of realizing efficient testing and test method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160154728A1 (en) * 2009-09-11 2016-06-02 International Business Machines Corporation System and method for resource modeling and simulation in test planning
CN103530209A (en) * 2013-09-17 2014-01-22 福建升腾资讯有限公司 Automated testing method for code keyboard
CN104868599A (en) * 2015-05-29 2015-08-26 国网河南省电力公司电力科学研究院 Intelligent substation message simulation test and association analysis system, and simulation method
CN105974297A (en) * 2016-04-12 2016-09-28 烽火通信科技股份有限公司 Virtual test instrument capable of realizing efficient testing and test method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749076A (en) * 2019-10-30 2021-05-04 腾讯科技(深圳)有限公司 Test method and device and electronic equipment
CN112749076B (en) * 2019-10-30 2023-10-20 腾讯科技(深圳)有限公司 Test method and device and electronic equipment

Also Published As

Publication number Publication date
CN109522205B (en) 2022-02-22

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
CN111159049B (en) Automatic interface testing method and system
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
CN108563579B (en) White box testing method, device and system and storage medium
CN107704393B (en) Data test method, apparatus and electronic equipment
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
KR20100041447A (en) Apparatus and method for automatic testing of softwares or digital divices
CN110196809B (en) Interface testing method and device
CN111258913A (en) Automatic algorithm testing method and device, computer system and readable storage medium
CN109918289A (en) More equipment on-line test methods, device, computer equipment and storage medium
CN113157508B (en) Test method, system, device, equipment and storage medium of embedded system
DE102019122934A1 (en) AUTOMATED PREBOOT PERFORMANCE MEASUREMENT
DE10004198C2 (en) System and method for an intelligent analysis probe
CN105760307A (en) Testing method, device and system of intelligent terminal
CN109522205A (en) A kind of method, apparatus of emulation testing, computer storage medium and terminal
CN104796929B (en) Network debugging method and device
US7099813B2 (en) Simulating program instruction execution and hardware device operation
CN103176903B (en) The test method and equipment of MapReduce distributed system program
CN111142861B (en) Method and device for integrating structured comprehensive control system
US9442826B2 (en) Kernel functionality checker
CN112241356B (en) Page test method, device, equipment and storage medium
JP5327019B2 (en) Software automatic test method
CN114564387A (en) Scene type automatic testing method and system for OpenStack cloud platform
CN113610242A (en) Data processing method and device and server
CN112199229A (en) Data processing method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant