[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN103077114A - Automatic testing method based on communication protocol of temperature measuring device - Google Patents

Automatic testing method based on communication protocol of temperature measuring device Download PDF

Info

Publication number
CN103077114A
CN103077114A CN2012105783136A CN201210578313A CN103077114A CN 103077114 A CN103077114 A CN 103077114A CN 2012105783136 A CN2012105783136 A CN 2012105783136A CN 201210578313 A CN201210578313 A CN 201210578313A CN 103077114 A CN103077114 A CN 103077114A
Authority
CN
China
Prior art keywords
temperature measuring
test
measuring equipment
case
terminal
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
CN2012105783136A
Other languages
Chinese (zh)
Other versions
CN103077114B (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.)
WUHAN FIBERHOME ELECTRIC CO Ltd
Original Assignee
WUHAN FIBERHOME ELECTRIC 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 WUHAN FIBERHOME ELECTRIC CO Ltd filed Critical WUHAN FIBERHOME ELECTRIC CO Ltd
Priority to CN201210578313.6A priority Critical patent/CN103077114B/en
Publication of CN103077114A publication Critical patent/CN103077114A/en
Application granted granted Critical
Publication of CN103077114B publication Critical patent/CN103077114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Maintenance And Management Of Digital Transmission (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an automatic testing method based on a communication protocol of a temperature measuring device. The automatic testing method not only can expose errors of the communication protocol of terminal software rapidly, but also can generate more detailed testing report automatically. The defects of temperature-measuring terminal software can be accurately positioned by analyzing the testing report. The automatic testing method disclosed by the invention has the advantages that comprehensive inspection can be carried out in the whole process of the protocol of the temperature measuring device, and the testing efficiency is improved on the basis of saving the labor cost of the software of the testing terminal, so that the whole testing work can be optimized from the time and the resource.

Description

Automated testing method based on temperature measuring equipment communication protocol
Technical field
The present invention relates to the automatic test category of embedded device communication protocol, especially based on the automated testing method of temperature measuring equipment communication protocol.
Background technology
Software test is an important step that improves and guarantee software quality.But at present, embedded software test still rests on according to demand document of tester, finishes writing test case with natural language first, operates by hand embedded device again, observe user interface information with eyes, and such manual test stage of sound of sending with the ear system.Software automated testing is relative manual test, mainly is that the Software Testing Tool passing through to develop, script etc. realize having the characteristics such as good operability, repeatability and high-level efficiency.Software test automation is undertaken by testing tool usually.Testing tool can carry out the test design of part, the work that realizes, carries out and compare.
Although so many advantage is arranged, because embedded device is of a great variety, purposes is different, and the unified feature of its test operation and not obvious.So the development of embedded software automatic test is still very slow, automated test tool ripe and that application is wider is fewer.
The temperature measuring equipment of mentioning in the present invention is a kind of embedded device, and its Main Function is that connection is connected the temperature of tie point with bus in the contact of detecting switch in the high-tension switch cabinet.Because in electric system, the temperature of power equipment is whether normal one of important indicator of operation of equipment.Generally at the beginning of design, will do strict defining to serviceability temperature, therefore in operational process, very necessary to the real time on-line monitoring of temperature, both can monitor running status, also serviceable life of extension device to a certain extent.Analyze the characteristics of temperature measuring equipment, we can recognize, temperature measuring equipment generally is installed in the high-tension switch cabinet, and are simple in structure, without liquid crystal interface, on-keyboard, and the function of whole device is carried out real time monitoring and control by daemon software.So, for the test of single device, we mainly for be the communication protocol of proving installation.
In fact, in the embedded software test field, the test of communication protocol is not only important, operation but also a relatively loaded down with trivial details module.Importance be embodied in it both related to terminal software design rationality, be sent to the correctness of other equipment message, relate to again and upper computer software between mutual; Property simple to operate then is because when test only needs by some debugging softwares, by serial port connector, send protocol instructions, correctness that the answer of checking terminal just can verification terminal software.Although " COM Debug Assistant " similarly software can well accomplish this point, manually inputs instruction, the whole process repeatability of then comparing return information is high, data volume is large, instruction is more, with regard to easily owing to human negligence leads to errors.
Summary of the invention
The purpose of this invention is to provide a kind of automatization test system based on temperature measuring equipment communication protocol, realize the automatic test course of its communication protocol.
For achieving the above object, technical scheme of the present invention provides a kind of automated testing method based on temperature measuring equipment communication protocol, and it may further comprise the steps:
Step 1), the temperature measuring equipment configuration parameter is set: the configuration parameter of temperature measurement terminal is set according to the actual conditions such as environment temperature of power equipment, and its content comprises the parameter of dispatching from the factory, probe calibration parameter, operational factor, filtering parameter;
Step 2), case script is used in importing: preprepared is directed into automated test tool with case script;
Step 3), automated test tool are carried out script, read the preprepared use-case, carry out successively in order; First use-case is the dispatch from the factory frame of supplemental characteristic of inquiry terminal, carry out this use-case after, the actual data frame that terminal is returned deposits the corresponding register of temperature measuring equipment in;
Step 4), comparing result will compare with expection output valve and the actual rreturn value of terminal in the case script, if the terminal rreturn value with conform to the execution next line with case script; If the rreturn value of temperature measuring equipment is then carried out the scope comparison with variant with expection output valve in the case script, as within allowed band, think normal, carry out next line, otherwise, then after the misregistration information, carry out again next line;
Step 5, execute all use-cases after, automatically generate test report, this report comprises the total number that this test case carries out, the percent of pass of test, concrete error message and BUG number.
Concrete, in the step 4), also comprise following concrete steps: for the holding register content of temperature measuring equipment, described holding register content comprises the parameter of dispatching from the factory, filtering parameter, if be provided with the configuration parameter of temperature measuring equipment, expected result is exactly unique value, if comparison result is consistent, be true; If comparison result is inconsistent, then be false; Input register content, output frequency, power for temperature measuring equipment carry out the comparison of scope to the byte in the part territory, if frequency, temperature value within the limits prescribed, think then that the result is true, if transfinite, and then output error report.
The contrast prior art, the present invention has following technique effect: the inventive method is carried out automatic test by importing script, make test more flexible, controlled, avoid random and this testing tool of test can carry out automatic comparison, automatically performed, saved human resources, improved test speed, shortened the construction cycle, reduced the cost of test, and can produce high-quality test result.Automated testing method of the present invention is the mistake of exposed terminal soft communication agreement rapidly, and can automatically generate comparatively detailed test report.By analyzing this test report, just can locate exactly the defective of temperature measurement terminal software.Automatization test system based on temperature measuring equipment communication protocol provided by the invention, can investigate the whole process of temperature measuring equipment protocol test comprehensively, improve testing efficiency on the human cost basis of saving test terminal software, whole test job can be optimized from time and resource.
Description of drawings
The system architecture schematic diagram of Fig. 1 embodiment of the invention;
The idiographic flow schematic diagram of Fig. 2 embodiment of the invention.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for explanation the present invention, but are not used for limiting the scope of the invention.
A kind of automatization test system based on temperature measuring equipment communication protocol of the embodiment of the invention, for temperature measuring equipment, this automatization test system is the mistake of exposed terminal communication protocol as far as possible rapidly, and can automatically generate comparatively detailed test report.
Wherein, load module: comprise the terminal configuration part and import use-case the Script section.The terminal configuration part can supply to fill in the terminal configuration parameter relevant with this use-case, and preserves; Import use-case the Script section by the importing use-case script module of system software, the preprepared test case is directed in the system.
Agreement automatic test module: carry out automatically according to the use-case in the script, the answer instruction of terminal and the answer instruction of expectation are compared, finish automatically the judgement of test case execution result, and report.
Test report output module: according to the result of this execution, generate automatically comparatively detailed test report.Comprise the percent of pass of number that this test case carries out, test, concrete error message and BUG rank etc.
Principle and the implementation method of this scheme are as follows: the temperature measurement terminal in this example is a kind of embedded device that is installed in the high-tension switch cabinet.Because the power system device chamber has unmanned, monitoring all is to realize by daemon software, so relatively simple for structure, the on-keyboard of temperature measurement terminal, without the interface etc.And nearly all function is all by communication protocol and background communication, and is therefore, particularly important for the test of the communication protocol of temperature measurement terminal.The temperature measurement terminal communication mode of this example is take MODBUS communication protocol as example.The communication of this agreement regulation is used main---and from technology, namely main equipment can the initialization transmission inquery.Make respective reaction from the equipment data that inquiry provides according to main equipment.Main equipment can be separately and from devices communicating, also can with broadcast mode and all are from devices communicating.Agreement has been set up the form of main equipment inquiry: equipment (or broadcasting) address, function code, data, error-detecting territory that all will send.Receiveing the response from equipment also is made of this agreement, comprises territory, any data that will return and error-detecting territory that affirmation will be taken action.This example specific implementation method is at load module the terminal configuration parameter to be set, with the standard that temperature measurement terminal satisfied, namely based on the Standard conformance test use-case of MODBUS agreement, be directed into the agreement automated test tool by script mode, carry out automatic test, and compare with the actual rreturn value of terminal, judge by algorithm, export at last test report.
Below, will describe each ingredient of system of the present invention and implementation step thereof in detail:
System of the present invention is comprised of four modules, referring to accompanying drawing 1.Load module comprises the terminal configuration parameter being set and importing uses two parts of case script.Wherein, the information that the terminal configuration argument section mainly fills in is set calibration temperature, factory set parameter, filtering parameter etc., only has and correctly fills in parameter information, and the rreturn value of terminal just has unique judging; Import use-case the Script section and will be directed into automated test tool to preprepared with case script, comprise the rank (A, B, C, D) of each use-case, so that execution content and the basis for estimation of test to be provided.Also have in addition the actual rreturn value load module of terminal, agreement automatic test module, test report output module, can pass through the following examples, and 2 be described in detail by reference to the accompanying drawings.
A kind of automated testing method based on temperature measuring equipment communication protocol, it may further comprise the steps:
Step 1), the temperature measuring equipment configuration parameter is set: the configuration parameter of temperature measurement terminal is set according to the actual conditions such as environment temperature of power equipment, and its content comprises the parameter of dispatching from the factory, probe calibration parameter, operational factor, filtering parameter.The parameter of dispatching from the factory of terminal for example is set: the year-moon-Ri-version number.
Step 2), case script is used in importing: preprepared is directed into automated test tool with case script.Be the parameter information that dispatches from the factory of reading terminals with a certain use-case in the case script for example, the frame format of these use-case inquiry terminal data is: slave terminal address, function code read the slave parameter, require the data field start address of returning and require return data section length, crc error check code; And the frame format of replying with the output of the expection in the case script is: slave terminal address, function code read slave parameter, data field length and data field, crc error check code; In addition, the BUG level setting is category-B.
Step 3), automated test tool are carried out script, read the preprepared use-case, carry out successively in order; First use-case is the dispatch from the factory frame of supplemental characteristic of inquiry terminal, carry out this use-case after, the actual data frame that terminal is returned deposits the corresponding register of temperature measuring equipment in;
Step 4), comparing result will compare with expection output valve and the actual rreturn value of terminal in the case script, if the terminal rreturn value with conform to the execution next line with case script; If the rreturn value of temperature measuring equipment is then carried out the scope comparison with variant with expection output valve in the case script, as within allowed band, think normal, carry out next line, otherwise, then after the misregistration information, carry out again next line.Concrete, for the holding register content of temperature measuring equipment, described holding register content comprises the parameter of dispatching from the factory, filtering parameter, if be provided with the configuration parameter of temperature measuring equipment, expected result is exactly unique value, if comparison result is consistent, is true; If comparison result is inconsistent, then be false; Input register content, output frequency, power for temperature measuring equipment carry out the comparison of scope to the byte in the part territory, if frequency, temperature value within the limits prescribed, think then that the result is true, if transfinite, and then output error report;
Step 5), execute all use-cases after, automatically generate a test report, this report comprises the total number that this test case carries out, the percent of pass of test, concrete error message and BUG number.
As can be seen from the above embodiments, the embodiment of the invention provides a kind of effective automatic test scheme for the test based on temperature measuring equipment communication protocol.Can improve testing efficiency in the situation that save human resources, upper and resource is optimized from the time.Traditional embedded protocol test by contrast connects serial ports, manually inputs instruction, comparison return information, and then return information is compared in manually another instruction of input again.Whole process repeatability is high, data volume is large, instruction is more, easily owing to human negligence leads to errors.During particularly for regression test, the automated testing method that the present invention mentions more can embody its superiority, does not need to go from the beginning to the end manually to carry out all use-cases again, only needs to click automatic test, carry out the again execution of use-case, just can see test result.
The present invention is directed to temperature measuring equipment, this automatization test system as far as possible rapidly the exposed terminal soft communication agreement mistake, Report a Problem fast, and can automatically generate comparatively detailed test report, can be by importing the mode with case script, demand and standard in the given whole automatic test course, carry out the value of expection output in the result of script and the script by comparison terminal, determine the result of automatic test, can for the result of whole automatic test, automatically generate comparatively detailed test report.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the technology of the present invention principle; can also make some improvement and modification, these improve and modification also should be considered as protection scope of the present invention.

Claims (2)

1. automated testing method based on temperature measuring equipment communication protocol, it is characterized in that: it may further comprise the steps:
Step 1), the temperature measuring equipment configuration parameter is set: the configuration parameter of temperature measurement terminal is set according to the actual conditions such as environment temperature of power equipment, and its content comprises the parameter of dispatching from the factory, probe calibration parameter, operational factor, filtering parameter;
Step 2), case script is used in importing: preprepared is directed into automated test tool with case script;
Step 3), automated test tool are carried out script, read the preprepared use-case, carry out successively in order; First use-case is the dispatch from the factory frame of supplemental characteristic of inquiry terminal, carry out this use-case after, the actual data frame that terminal is returned deposits the corresponding register of temperature measuring equipment in;
Step 4), comparing result will compare with expection output valve and the actual rreturn value of terminal in the case script, if the terminal rreturn value with conform to the execution next line with case script; If the rreturn value of temperature measuring equipment is then carried out the scope comparison with variant with expection output valve in the case script, as within allowed band, think normal, carry out next line, otherwise, then after the misregistration information, carry out again next line;
Step 5, execute all use-cases after, automatically generate test report, this report comprises the total number that this test case carries out, the percent of pass of test, concrete error message and BUG number.
2. the automated testing method based on temperature measuring equipment communication protocol as claimed in claim 1, it is characterized in that: in the described step 4), also comprise following concrete steps: for the holding register content of temperature measuring equipment, described holding register content comprises the parameter of dispatching from the factory, filtering parameter, if be provided with the configuration parameter of temperature measuring equipment, expected result is exactly unique value, if comparison result is consistent, is true; If comparison result is inconsistent, then be false; Input register content, output frequency, power for temperature measuring equipment carry out the comparison of scope to the byte in the part territory, if frequency, temperature value within the limits prescribed, think then that the result is true, if transfinite, and then output error report.
CN201210578313.6A 2012-12-27 2012-12-27 Based on the automated testing method of temperature measuring equipment communication protocol Active CN103077114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210578313.6A CN103077114B (en) 2012-12-27 2012-12-27 Based on the automated testing method of temperature measuring equipment communication protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210578313.6A CN103077114B (en) 2012-12-27 2012-12-27 Based on the automated testing method of temperature measuring equipment communication protocol

Publications (2)

Publication Number Publication Date
CN103077114A true CN103077114A (en) 2013-05-01
CN103077114B CN103077114B (en) 2016-02-17

Family

ID=48153647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210578313.6A Active CN103077114B (en) 2012-12-27 2012-12-27 Based on the automated testing method of temperature measuring equipment communication protocol

Country Status (1)

Country Link
CN (1) CN103077114B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544108A (en) * 2013-11-12 2014-01-29 福建联迪商用设备有限公司 System and method for testing embedded software integration strength
CN104503911A (en) * 2014-12-19 2015-04-08 广东欧珀移动通信有限公司 Software debugging method and device for terminal
CN105676757A (en) * 2015-12-22 2016-06-15 北京大唐兴业国际控制技术有限公司 BAC monitoring system
CN107992405A (en) * 2016-10-27 2018-05-04 中兴通讯股份有限公司 application software testing method and device
CN108471368A (en) * 2018-03-19 2018-08-31 天筑科技股份有限公司 Communication base station room internally-powered device test system and method based on serial ports connection
CN108959082A (en) * 2018-06-27 2018-12-07 郑州云海信息技术有限公司 A kind of the hardware compatibility test method and system of Openstack
CN110618942A (en) * 2019-09-20 2019-12-27 北京天地和兴科技有限公司 Rapid test method for fine-grained control of industrial control protocol
CN112363418A (en) * 2019-07-23 2021-02-12 西安和其光电科技股份有限公司 Fluorescent optical fiber temperature controller and temperature control method thereof
CN113032276A (en) * 2021-04-16 2021-06-25 上海寰果信息科技有限公司 Positioning product test system and test method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1932774A (en) * 2006-10-13 2007-03-21 福建师范大学 Embedded system software fast testing system and method based on multi-serial port resource
CN101677277A (en) * 2008-09-17 2010-03-24 许昌开普电器检测研究院 MODBUS-RTU protocol conformance test method
CN1677277B (en) * 2004-01-27 2010-05-05 株式会社理光 Service providing method, service provider apparatus, information processing method and apparatus
CN202103859U (en) * 2011-03-11 2012-01-04 上海泰捷通信技术有限公司 Automatic test tool of terminal protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1677277B (en) * 2004-01-27 2010-05-05 株式会社理光 Service providing method, service provider apparatus, information processing method and apparatus
CN1932774A (en) * 2006-10-13 2007-03-21 福建师范大学 Embedded system software fast testing system and method based on multi-serial port resource
CN101677277A (en) * 2008-09-17 2010-03-24 许昌开普电器检测研究院 MODBUS-RTU protocol conformance test method
CN202103859U (en) * 2011-03-11 2012-01-04 上海泰捷通信技术有限公司 Automatic test tool of terminal protocol

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡能辉: "《Modbus 通信协议自动测试系统研究与开发》", 《中国优秀硕士学位论文全文数据库》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544108A (en) * 2013-11-12 2014-01-29 福建联迪商用设备有限公司 System and method for testing embedded software integration strength
CN104503911A (en) * 2014-12-19 2015-04-08 广东欧珀移动通信有限公司 Software debugging method and device for terminal
CN104503911B (en) * 2014-12-19 2017-07-07 广东欧珀移动通信有限公司 The software debugging method and device of a kind of terminal
CN105676757A (en) * 2015-12-22 2016-06-15 北京大唐兴业国际控制技术有限公司 BAC monitoring system
CN107992405A (en) * 2016-10-27 2018-05-04 中兴通讯股份有限公司 application software testing method and device
CN108471368A (en) * 2018-03-19 2018-08-31 天筑科技股份有限公司 Communication base station room internally-powered device test system and method based on serial ports connection
CN108959082A (en) * 2018-06-27 2018-12-07 郑州云海信息技术有限公司 A kind of the hardware compatibility test method and system of Openstack
CN112363418A (en) * 2019-07-23 2021-02-12 西安和其光电科技股份有限公司 Fluorescent optical fiber temperature controller and temperature control method thereof
CN110618942A (en) * 2019-09-20 2019-12-27 北京天地和兴科技有限公司 Rapid test method for fine-grained control of industrial control protocol
CN113032276A (en) * 2021-04-16 2021-06-25 上海寰果信息科技有限公司 Positioning product test system and test method

Also Published As

Publication number Publication date
CN103077114B (en) 2016-02-17

Similar Documents

Publication Publication Date Title
CN103077114B (en) Based on the automated testing method of temperature measuring equipment communication protocol
CN102662828B (en) A kind of method and device realizing software automatic test
CN109840207B (en) AutoSAR-based network management automation test system and test method
CN109361562B (en) Automatic testing method based on associated network equipment access
WO2021159710A1 (en) Bbu fault diagnosis method and apparatus, electronic device, and storage medium
WO2017000424A1 (en) Protocol detection method and apparatus
CN105425201B (en) metering chip simulation test method for software reliability detection of intelligent electric energy meter
CN107783873B (en) Method for realizing automatic testing platform of burner
WO2018148405A1 (en) Real-time capture of traffic upon failure for protocol debug
CN107943008B (en) Automated diagnosis test method based on VT system
CN106407059A (en) Server node testing system and method
CN103412817A (en) Automation testing script offline debugging method and system
CN111786854A (en) Network card testing method and device, electronic equipment and readable storage medium
CN102750143B (en) Based on the DSP development approach that MATLAB com component calls
CN113064618B (en) System and method for simulating new energy vehicle conformance detection
TW201321765A (en) Automatic test system of communication device
US7721260B2 (en) Embedded Test I/O Engine
CN108536587A (en) A kind of automated testing method and system based on Appium
CN101191818A (en) Chip test method, system and apparatus
CN103308844B (en) The adjustment method of test sample plate, Fault Locating Method, control panel and fixture
CN112882876A (en) PLD device remote debugging and configuration system
CN106446400B (en) Method and device for testing performance of electromechanical system
CN104486779A (en) Slow clock test method for mobile communication terminal and test system thereof
CN115065628B (en) Automatic test method and test system for fault code self-clearing of controller without sleep strategy
Hwang et al. Black-box testing tool of railwaysignalling system software with a focus on user convenience

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant