CN105893232A - Abnormal data generation method based on RS422 interface - Google Patents

Abnormal data generation method based on RS422 interface Download PDF

Info

Publication number
CN105893232A
CN105893232A CN201410558548.8A CN201410558548A CN105893232A CN 105893232 A CN105893232 A CN 105893232A CN 201410558548 A CN201410558548 A CN 201410558548A CN 105893232 A CN105893232 A CN 105893232A
Authority
CN
China
Prior art keywords
data
abnormal data
software
interface
hardware
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
CN201410558548.8A
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 Jinghang Computing Communication Research Institute
Original Assignee
Beijing Jinghang Computing Communication Research Institute
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 Jinghang Computing Communication Research Institute filed Critical Beijing Jinghang Computing Communication Research Institute
Priority to CN201410558548.8A priority Critical patent/CN105893232A/en
Publication of CN105893232A publication Critical patent/CN105893232A/en
Pending legal-status Critical Current

Links

Landscapes

  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The invention belongs to a embedded software test method and specifically relates to an abnormal data generation method based on RS422 interface. The method comprises following steps: abnormal data types and features tested by the RS422 interface are tested by analysis software dynamically, factors that affect test adequacy are extracted, and therefore suitable abnormal data types are selected as generation objects through extracting and analyzing common features of RS422 interface abnormal data; for tested software with data response, the response data of the tested software must be read back and is displayed in an abnormal data generating software interface; for generated abnormal data, suitable devices and methods are applied for data output; the generated abnormal data is injected into a tested system by means of a simulation device. The advantages of the abnormal data generation method are that generated abnormal data is injected into the tested software, the test adequacy, integrity and effectiveness are increased, and the quality of military software dynamic testing about RS422 use case execution is increased.

Description

A kind of abnormal data based on RS422 interface generates method
Technical field
The invention belongs to a kind of embedded software test method, be specifically related to one and weigh its survey in testing A kind of method of examination adequacy, is applied to embedded/non-embedded software RS422 interface testing by the method In, thus ensure the adequacy that software interface is tested.
Background technology
Near several next, along with digitized and intelligence degree quickly improve, software category and quantity are in equipment Proportion gradually steps up, and the effect of performance increases day by day, and software quality also becomes affects model quality One key factor.In equipment preparation and sizing, the payment course of receiving, dynamic test is checking software Function, lookup software issue, a key link of lifting software quality, the most various configuration management machines Structure requires the core work must carried out before software is shaped.But due to experimental enviroment focus on checking soft The every normal function of part, it is impossible to checking software is to various most common failures and abnormal disposition, and this is the most Become the key factor that restriction software dynamic testing is normally carried out.Therefore, the present invention designs and Implements A kind of abnormal data generation technique based on RS422 interface, with RS422 interface card as platform, interface Data set Frame Protocol, for relying on, generates the abnormal data meeting test request, meets tested software RS422 Fault-tolerant, the exception handling ability of mouth are tested.
Summary of the invention
It is an object of the invention to provide a kind of abnormal data based on RS422 interface and generate method, it can Generate and meet the interface testing method to abnormal data requirement.
The present invention is achieved in that a kind of abnormal data based on RS422 interface generates method, its bag Containing following steps:
(1) the abnormal data type of software dynamic testing RS422 interface testing, feature are analyzed, therefrom Extract the factor affecting testing adequacy, and then by extracting, analyzing being total to of RS422 interface abnormal data Same characteristic, selects suitable abnormal data kind as generating object, fault mould common in serial communication Formula is exception and the exception in the cycle of transmission of data, and the exception of data includes frame head, postamble, frame length, school Test and etc. mistake.In system under test (SUT), inject fault by fault simulation equipment, thus examine system under test (SUT) Mistake proofing ability, according to arrange serial ports passage, baud rate, data bit, parity check system, delay Time etc. carry out the write of data;
(2) for there being the tested software of data answering, it is necessary to the reply data of retaking of a year or grade tested software, And shown at abnormal data generation software interface;
(3) for the abnormal data produced, apply mechanically suitable Apparatus and method for and carry out data output, profit With simulator, the abnormal data of generation is injected in system under test (SUT).
Described step (3) comprises the steps:
1) from the standpoint of according to application scenarios, industrial requirements, interface module characteristic, convenience, hardware Resource should select the PXI bus industrial control computer of NI, model PXI-1042, selects 1 block controller, One back side bus is the RS422 board of PXI, and a Shielded Twisted Pair turns the connecting line of 9 needle serial ports, Article one, 9 needle serial ports turn the connecting line of jumper holders;
2) write software according to above-mentioned hardware resource, complete hardware driving, control;Data genaration, send out Send;The function such as data receiver, process, the software write should possess hardware configuration, self-checking function, can examine Look into hardware board and whether connect intact, hardware board port number, hardware board baud rate, data bit, The scopes such as parity check system and information.And automatically distribute serial ports passage according to resource situation in cabinet;
3) use initializing resource to set port according to RS422 board and open data with queue Mode carry out read/write close port and empty channel data release hardware resource handle Mode has write driver, and starts driver after hardware check is normally;
4) opening configuration parameter after RS422 direct fault location model, parameter should comprise hardware resource parameter institute Select port numbers, corresponding serial ports passage, baud rate, data bit, even-odd check, stopping position;
5) design abnormal data generates kind, comprises the often frame head of bag data, frame length, data volume, frame Tail, if having verification and, verification mode, data volume contain spcial character, often bag data transmission time interval, The number of times that often bag data send, sends out the time interval mistake of number every time;
6) can determine that and generate the abnormal data of selection type after setting parameter, and all data are carried out Serial ports sends.
It is an advantage of the invention that the abnormal data of generation can be injected into tested software by it, thus improve survey Examination adequacy, integrity, effectiveness, and finally improve Military Software dynamic test about RS422 use-case The quality performed.
Accompanying drawing explanation
Fig. 1 is that a kind of abnormal data based on RS422 interface provided by the present invention generates method flow Figure;
Fig. 2 is that a kind of abnormal data based on RS422 interface generates method application note figure.
Detailed description of the invention
With embodiment, the present invention is described in detail below in conjunction with the accompanying drawings:
A kind of abnormal data based on RS422 interface generates method, and it comprises the steps of:
(1) the abnormal data type of software dynamic testing RS422 interface testing, feature are analyzed, therefrom Extract the factor affecting testing adequacy, and then by extracting, analyzing being total to of RS422 interface abnormal data Same characteristic, selects suitable abnormal data kind as generating object, fault mould common in serial communication Formula is exception and the exception in the cycle of transmission of data, and the exception of data includes frame head, postamble, frame length, school Test and etc. mistake.In system under test (SUT), inject fault by fault simulation equipment, thus examine system under test (SUT) Mistake proofing ability, according to arrange serial ports passage, baud rate, data bit, parity check system, delay Time etc. carry out the write of data;
(2) for there being the tested software of data answering, it is necessary to the reply data of retaking of a year or grade tested software, And shown at abnormal data generation software interface.Such as serial ports reply data bag, action executing result Packet etc..It is generally also the interaction of user-defined protocol.
(3) for the abnormal data produced, apply mechanically suitable Apparatus and method for and carry out data output, profit With simulator, the abnormal data of generation is injected in system under test (SUT).
1) from the standpoint of according to application scenarios, industrial requirements, interface module characteristic, convenience, hardware Resource should select the PXI bus industrial control computer of NI, model PXI-1042.Select 1 piece of control Device, a back side bus is the RS422 board of PXI, and a Shielded Twisted Pair turns the connection of 9 needle serial ports Line, 9 needle serial ports turn the connecting line of jumper holders;
2) write software according to above-mentioned hardware resource, complete hardware driving, control;Data genaration, send out Send;The function such as data receiver, process.The software write should possess hardware configuration, self-checking function, can examine Look into hardware board and whether connect intact, hardware board port number, hardware board baud rate, data bit, The scopes such as parity check system and information.And automatically distribute serial ports passage according to resource situation in cabinet.
3) use initializing resource to set port according to RS422 board and open data with queue Mode carry out read/write close port and empty channel data release hardware resource handle Mode has write driver.And after hardware check is normally, start driver.
4) opening configuration parameter after RS422 direct fault location model, parameter should comprise hardware resource parameter such as Selected end slogan, corresponding serial ports passage, baud rate, data bit, even-odd check, stopping position etc..
5) design abnormal data generates kind, comprises the often frame head of bag data, frame length, data volume, frame Tail, if having verification and, verification mode, data volume contain spcial character, often bag data transmission time interval, The number of times that often bag data send, sends out the mistakes such as several time intervals every time.
6) can determine that and generate the abnormal data of selection type after setting parameter, and all data are carried out Serial ports sends.

Claims (2)

1. an abnormal data based on RS422 interface generates method, it is characterised in that: it comprise as Lower step:
(1) the abnormal data type of software dynamic testing RS422 interface testing, feature are analyzed, therefrom Extract the factor affecting testing adequacy, and then by extracting, analyzing being total to of RS422 interface abnormal data Same characteristic, selects suitable abnormal data kind as generating object, fault mould common in serial communication Formula is exception and the exception in the cycle of transmission of data, and the exception of data includes frame head, postamble, frame length, school Test and etc. mistake.In system under test (SUT), inject fault by fault simulation equipment, thus examine system under test (SUT) Mistake proofing ability, according to arrange serial ports passage, baud rate, data bit, parity check system, delay Time etc. carry out the write of data;
(2) for there being the tested software of data answering, it is necessary to the reply data of retaking of a year or grade tested software, And shown at abnormal data generation software interface;
(3) for the abnormal data produced, apply mechanically suitable Apparatus and method for and carry out data output, profit With simulator, the abnormal data of generation is injected in system under test (SUT).
A kind of abnormal data based on RS422 interface generates method, its It is characterised by: described step (3) comprises the steps,
1) from the standpoint of according to application scenarios, industrial requirements, interface module characteristic, convenience, hardware Resource should select the PXI bus industrial control computer of NI, model PXI-1042, selects 1 piece of control Device, a back side bus is the RS422 board of PXI, and a Shielded Twisted Pair turns the connection of 9 needle serial ports Line, 9 needle serial ports turn the connecting line of jumper holders;
2) write software according to above-mentioned hardware resource, complete hardware driving, control;Data genaration, send out Send;The function such as data receiver, process, the software write should possess hardware configuration, self-checking function, can examine Look into hardware board and whether connect intact, hardware board port number, hardware board baud rate, data bit, The scopes such as parity check system and information.And automatically distribute serial ports passage according to resource situation in cabinet;
3) use initializing resource to set port according to RS422 board and open data with queue Mode carry out read/write close port and empty channel data release hardware resource handle Mode has write driver, and starts driver after hardware check is normally;
4) opening configuration parameter after RS422 direct fault location model, parameter should comprise hardware resource parameter institute Select port numbers, corresponding serial ports passage, baud rate, data bit, even-odd check, stopping position;
5) design abnormal data generates kind, comprises the often frame head of bag data, frame length, data volume, frame Tail, if having verification and, verification mode, data volume contain spcial character, often bag data transmission time interval, The number of times that often bag data send, sends out the time interval mistake of number every time;
6) can determine that and generate the abnormal data of selection type after setting parameter, and all data are carried out Serial ports sends.
CN201410558548.8A 2014-10-21 2014-10-21 Abnormal data generation method based on RS422 interface Pending CN105893232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410558548.8A CN105893232A (en) 2014-10-21 2014-10-21 Abnormal data generation method based on RS422 interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410558548.8A CN105893232A (en) 2014-10-21 2014-10-21 Abnormal data generation method based on RS422 interface

Publications (1)

Publication Number Publication Date
CN105893232A true CN105893232A (en) 2016-08-24

Family

ID=57000442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410558548.8A Pending CN105893232A (en) 2014-10-21 2014-10-21 Abnormal data generation method based on RS422 interface

Country Status (1)

Country Link
CN (1) CN105893232A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115008A (en) * 2020-09-16 2020-12-22 天津津航计算技术研究所 Method and system for testing one-to-many data recorder

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101865705A (en) * 2010-06-03 2010-10-20 长春奥普光电技术股份有限公司 Automatic fault diagnosis device of encoder and diagnosis solving method thereof
CN202230386U (en) * 2011-09-19 2012-05-23 中国人民解放军军械工程学院 Circuit system automatic control oriented fault injection system
CN103235591A (en) * 2013-03-25 2013-08-07 中国航空工业集团公司沈阳飞机设计研究所 Online fault injection method on basis of combination of hardware fault injection and software fault injection
CN103631717A (en) * 2013-12-09 2014-03-12 北京京航计算通讯研究所 RS422 serial communication interface fault model construction method based on NI platform
CN103699112A (en) * 2013-11-29 2014-04-02 中国航空无线电电子研究所 Aviation electronic self-detection verification equipment based on IO (Input/Output) signal failure simulation, and verification method of equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101865705A (en) * 2010-06-03 2010-10-20 长春奥普光电技术股份有限公司 Automatic fault diagnosis device of encoder and diagnosis solving method thereof
CN202230386U (en) * 2011-09-19 2012-05-23 中国人民解放军军械工程学院 Circuit system automatic control oriented fault injection system
CN103235591A (en) * 2013-03-25 2013-08-07 中国航空工业集团公司沈阳飞机设计研究所 Online fault injection method on basis of combination of hardware fault injection and software fault injection
CN103699112A (en) * 2013-11-29 2014-04-02 中国航空无线电电子研究所 Aviation electronic self-detection verification equipment based on IO (Input/Output) signal failure simulation, and verification method of equipment
CN103631717A (en) * 2013-12-09 2014-03-12 北京京航计算通讯研究所 RS422 serial communication interface fault model construction method based on NI platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115008A (en) * 2020-09-16 2020-12-22 天津津航计算技术研究所 Method and system for testing one-to-many data recorder

Similar Documents

Publication Publication Date Title
CN105738854B (en) The analog memory test board system and test method of intelligent electric meter Embedded Application
US8572529B2 (en) System and method for dynamically injecting errors to a user design
US20170337116A1 (en) Application testing on different device types
CN103150238B (en) A kind of service request processing method, simulated performance method of testing and device
CN106354634A (en) Interface testing method and device
US8661536B2 (en) Side channel attack analysis
US10341215B2 (en) Methods, systems, and computer readable media for emulating network traffic patterns on a virtual machine
CN106528400A (en) MOCK testing method and device
KR101414720B1 (en) Functional safety testing device for train control system software and the method thereof
Perrone et al. SAFE: Simulation automation framework for experiments
CN106354645A (en) Test method and test platform based on background system service or interface
CN108459850B (en) Method, device and system for generating test script
US10162742B2 (en) System and method for end to end performance response time measurement based on graphic recognition
CN106293625A (en) A kind of method and apparatus of configuration register
CN103838899A (en) Simulation verification system and method for interrupt controller of hard-core MCU
CN109871312A (en) A kind of interface test method, device, equipment and readable storage medium storing program for executing
CN103530166B (en) Verification platform and verification method for multi-channel chip based on virtual RAM
CN103631717A (en) RS422 serial communication interface fault model construction method based on NI platform
CN104536884B (en) Code test method and device
CN105893232A (en) Abnormal data generation method based on RS422 interface
US9280627B1 (en) GUI based verification at multiple abstraction levels
CN108334443A (en) Generate method, apparatus, equipment and the computer readable storage medium of test case
CN104679963B (en) A kind of simulating, verifying apparatus and method based on TCL
CN107622013B (en) Distributed system testing method and device
CN105446867B (en) A kind of generation method and device of test data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160824

WD01 Invention patent application deemed withdrawn after publication