CN104317717B - Embedded software testing method on basis of dimension conversion - Google Patents

Embedded software testing method on basis of dimension conversion Download PDF

Info

Publication number
CN104317717B
CN104317717B CN201410602648.6A CN201410602648A CN104317717B CN 104317717 B CN104317717 B CN 104317717B CN 201410602648 A CN201410602648 A CN 201410602648A CN 104317717 B CN104317717 B CN 104317717B
Authority
CN
China
Prior art keywords
variable
data
variables
transmission
source
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.)
Active
Application number
CN201410602648.6A
Other languages
Chinese (zh)
Other versions
CN104317717A (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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201410602648.6A priority Critical patent/CN104317717B/en
Publication of CN104317717A publication Critical patent/CN104317717A/en
Application granted granted Critical
Publication of CN104317717B publication Critical patent/CN104317717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to an embedded software testing method on the basis of dimension conversion. The embedded software testing method includes configuration and transmission data and receiving and analysis data; the data configuration and transmission includes the configuration and transmission data include user-defined source variables, selected variable types, definition rule part of dimension conversion rules between setting source variables and transmission variables and execution rule part of dimension conversion rules between corresponding position and source variables and the transmission variables in the transmission variables after conversion of the setting source variables; the receiving and analysis data include user-defined receiving variables, configuration receiving variable types, the corresponding positions of selected target variables in the receiving variables and immediate dimension conversion of all target variables corresponding to the receiving variables after the data are received. Manual operation of data revaluation in the process of testing is reduced, and instantaneity of data transceiving is sufficiently guaranteed. Meanwhile, interference data can be filtered, only effective data are processed, and thereby efficiency is improved.

Description

A kind of embedded software test method based on dimension conversion
Technical field
The present invention relates to computer software real-time testing field, the more particularly, to embedded software test based on dimension conversion Method.
Background technology
Software test is widely used in software Life cycle as the important means of the reliability and quality that improve software Each stage in.Compared with the software of general type, embedded more emphasis real-time, specificity and hardware-dependent.Embedded The input and output of software are substantially to be realized by hardware interface.Consider it to input and output for Embedded software test It is also contemplated that the real-time of software while the correctness of data.Substantial amounts of data in test process, we how Fast and effectively search out our data of real concern to be particularly important.
The data obtaining in test process is generally some binary numerals, and user is it is desirable that these count According to the data with physical significance in deserved reality.How these binary numerals are fast and effectively converted into user true The physical quantity of just care becomes embedded software test needs problems faced.Sometimes these numerical value and actual value are linear closing System, but sometimes and be not.Especially in real-time testing, whole test process can be because send and receive numerical value and actual value Conversion can consume a lot of resources, cause test process to be subject to the restriction of test resource to make efficiency and the poor quality of test. It is therefore necessary to finding a kind of fast and effectively method reached the purpose solving the above problems realizing the conversion between numerical value.
Content of the invention
The technology of the present invention solve problem:Overcome the deficiencies in the prior art, a kind of embedded software based on dimension conversion is provided Part method of testing, decreases the artificial operation to data reduction in test process, fully ensures that the real-time of data transmit-receive.Simultaneously Interference data can be filtered, and only carrying out process to valid data improves efficiency again.
The technical scheme is that and be achieved in that.
A kind of embedded software test method based on dimension conversion, the method includes:
A. configuration concurrency send data;
B. receive and parse through data;
Wherein step A includes:
A1. user defines source variable and selects types of variables.So-called source variable is exactly the true thing of user-defined correspondence The variable of reason amount, that is, need to do the variable of dimension conversion.Source variable if the selection cycle type variable of mechanical periodicity, if The selection event flip-over type variable of event triggering change.
A2. user's definition sends variable and selects types of variables.So-called transmission variable be exactly according to measured piece between The test process of communications protocol definition in need from the actual transmission of real bus variable.The cycle is needed to send out if sending variable Send then selection cycle type, if the transmission of variable is triggered for condition with a certain event, select event flip-over type.
A3. setting source variable and the definition Rule section sending the dimension transformation rule between variable.Define Rule section Need user oneself define dimension transformation rule, include define operation rule with set up mapping table two ways.
Wherein step A3 includes:
A31. user defines operation rule and needs to provide source variable to the computing formula sending variable, needs to indicate in formula Type of variables.
A32. the conversion between source variable and transmission variable cannot be obtained by calculating, select and set up mapping table.? The corresponding value sending variable of source variable is included in mapping table.
A4. setting source variable conversion after send variable in corresponding position.
A5. source variable and the executing rule part sending the dimension transformation rule between variable.
Wherein step A5 includes:
A51. sending variable is preiodic type, and test environment is all comprise in transmission variable according to the transmission cycle of definition Source variable after dimension conversion by bit manipulation assignment to correspondence position, in real time transmission;
A52. sending variable is event flip-over type, if transmission condition is set up become sending all of source comprising in variable Amount passes through bit manipulation assignment to correspondence position after dimension conversion, sends in real time.
Wherein step B includes:
B1. user's definition receives variable.So-called reception variable is exactly to pass through physical connection in test process from measured piece in fact The variable of border receiving data.Configuration receives types of variables.Reception types of variables in real-time testing is segmented into two kinds of forms, and one Kind is interruption one kind is poll.When selecting to interrupt, interruption will be triggered when board receives data, in interrupt service routine Middle collection data;When selecting poll to receive, test environment can read data according to polling cycle in board.
Wherein step B1 includes:
If B11. in real-time testing, system under test (SUT) sends the data for test according to specific time interval, at this moment Wait and just mode should be received using poll.
If B12. system under test (SUT) sends the cycle that test data is not fixed, received using interruption.
B2. user defines purpose variable.So-called purpose variable is exactly to do dimension and change it from receiving to extract variable The variable obtaining afterwards, had both had the variable of physical significance.
B3. user defines dimension transformation rule.
Wherein step B3 includes:
B31. set up the transformation rule receiving variable to purpose variable, its rule includes self-defined operation rule and foundation is reflected Firing table two ways.
B32. then adopt self-defined operation rule when reception variable to purpose variable can be calculated by formula.User The expression formula of formulas for calculating, and indicate types of variables.
B33. receive and there is not calculated relationship between variable and purpose variable, can be between reception variable and purpose variable Contextual definition become mapping table.Obtain purpose variable according to receiving variable and tabling look-up.
B4. select purpose variable corresponding position in receiving variable.
B5. after receiving data at once complete receive variable corresponding all purposes variable dimension conversion, then turn Data after alternatively is saved in the position that user specifies, and shows, is easy to user and observes and analyze data.
Present invention advantage compared with prior art is:The present invention is automatically performed actual value to transmission number according to rule According to conversion, decrease in test process the artificial operation to data reduction, fully ensure that the real-time of data transmit-receive.Again simultaneously Interference data can be filtered, and only carrying out process to valid data improves efficiency.Facilitate user's observed and recorded.
Brief description
Fig. 1 is data is activation partial process view;
Fig. 2 is data receiver partial process view.
Specific embodiments
It is described in further detail below in conjunction with the accompanying drawings.
The a kind of of present invention offer is included data configuration and is sent number based on the embedded software test method of dimension conversion According to receive and parse through data division.Test environment runs on VxWorks real-time embedded operating system.
Real-time testing environment uses the vxworks operating system of Wind River company.It is with its good reliability It is widely used in the high field of requirement of real-time with remarkable real-time.This system can complete within the time limiting The function of regulation, and within the time limiting, outside asynchronous event can be responded.
The dimension conversion method step of data is activation part combines accompanying drawing 1 and is explained as follows:
S11:Define source variable.Define source variable and include defined variable and types of variables.Wherein types of variables includes the cycle Type and two kinds of event flip-over type.Preiodic type source variable is to be changed according to the test script in test process according to the cycle setting Own value, event flip-over type is to judge whether that satisfaction imposes a condition, if meet imposed a condition, according in test process Test script changes own value.
S12:Definition sends variable.Definition sends variable and includes defined variable length and variable transmission types.
Send variable and potentially include a lot of information, so sometimes can be very long.Here send variable and can use and comprise The structure of multiple char type variables represents.The variable being 3 bytes as length, it is possible to use structure { char sub_1;char sub_2;Char sub_3 } representing.
Variable transmission types are equally to comprise preiodic type and event flip-over type.
S13:Define source variable to the dimension conversion sending variable.Comprise the following steps that:
A) select the source variable needing to set up dimension transformation rule with sending variable.
B) select the type of dimension conversion, its type includes defining operation rule and sets up mapping table two ways.If Selecting to define operation rule then needs to provide the computing formula of variable, it should be noted that each type of variables and correspondence in formula Source variable.Such as (int) a+ (short) b+ (double) c+0x64.
If selection is set up mapping table and is then needed to provide the numerical value after source variable and source variable conversion in the mapping table Corresponding relation.
C) set source variable corresponding position in sending variable after dimension conversion.
S14:Start to test, test system judges whether to meet transmission condition according to sending type of variables.Preiodic type The criterion sending variable is whether to meet transmission cycle request, and the criterion of the transmission variable of event mode is whether to meet The transmission condition before setting.If be unsatisfactory for, wait the next judgement cycle.
S15:When variable meets transmission condition, test system should be set up dimension the transmission variable with meeting condition and turn The source variable changing rule does dimension conversion according to the dimension transformation rule setting before, afterwards the structure step-by-step operation obtaining is assigned It is worth the position setting, finally send variable.
The dimension conversion method step of receiving portion combine accompanying drawing 2 do as described below:
S21:Definition receives variable, receives variable-length including definition and receives mode.The method of defined variable length is same The method sending variable defined in S12.Reception mode includes poll and receives and interrupt receiving.Test port is received when interrupting receiving The all data receiving, poll is only to receive the data that specific period sends over.
S22:Define purpose variable.For facilitating user to observe and recording.
S23:Definition receives variable to the dimension transformation rule of purpose variable.Comprise the following steps that:
A) select the purpose variable needing to set up dimension transformation rule with receiving variable.
B) select the type of dimension conversion, its type includes defining operation rule and sets up mapping table two ways.If Selecting to define operation rule then needs to provide the computing formula of variable, it should be noted that each type of variables and correspondence in publicity Source variable.Its method is with S13 kind step b.
If selection is set up mapping table and is then needed to provide the numerical value after source variable and source variable conversion in the mapping table Corresponding relation.
C) set purpose variable corresponding position in receiving variable before dimension conversion.
S24:According to set before reception variable reception type reception data, afterwards to receive variable opening relationships All purposes variable do dimension conversion, and be assigned to purpose variable, then data be saved in result and show.
The present invention provide method of testing be when testing for real-time embedded software the process of data and propose.Permissible It is to pay close attention to specific data offering method when test to support.It is particularly well-suited in big data quantity, extract the survey of particular data Examination situation.
Although the present invention is disclosed as above with preferred embodiment, so it is not limited to the present invention, any this area skill Art personnel, without departing from the spirit and scope of the present invention, when can make a little modification and perfect, therefore the protection model of the present invention Enclose when by being defined that claims are defined.

Claims (2)

1. a kind of embedded software test method based on dimension conversion is it is characterised in that include:
Step A. configuration concurrency send data;
Step B. receives and parses through data;
Wherein step A includes:
A1. user defines source variable and selects types of variables, and described source variable is exactly user-defined corresponding actual physical amount Variable, that is, need to do the variable of dimension conversion;Source variable if the selection cycle type variable of mechanical periodicity, if event The selection event flip-over type variable of triggering change;
A2. user's definition sends variable and select types of variables, described transmission variable be exactly according to measured piece between logical The variable from the actual transmission of real bus is needed in the test process of news protocol definition;The cycle is needed to send if sending variable, Selection cycle type, if the transmission of variable is triggered with a certain event for condition, selects event flip-over type;
A3. setting source variable and the definition Rule section sending the dimension transformation rule between variable, defining Rule section needs User oneself define dimension transformation rule, include define operation rule with set up mapping table two ways;
Wherein step A3 includes:
A31. user defines operation rule and needs to provide source variable to the computing formula sending variable, needs to indicate variable in formula Type;
A32. the conversion between source variable and transmission variable cannot be obtained by calculating, from setting up mapping table, in mapping The corresponding value sending variable of source variable is included in table;
A4. setting source variable conversion after send variable in corresponding position;
A5. source variable and the executing rule part sending the dimension transformation rule between variable;
Wherein step A5 includes:
A51. sending variable is preiodic type, and test environment is according to the transmission cycle defining all of source comprising in transmission variable Variable passes through bit manipulation assignment to correspondence position after dimension conversion, sends in real time;
A52. sending variable is event flip-over type, if transmission condition is set up all of source variable warp comprising in transmission variable Pass through bit manipulation assignment after crossing dimension conversion to correspondence position, send in real time;
Wherein step B includes:
B1. user's definition receives variable, and described reception variable is exactly to pass through physical connection in test process to connect from measured piece is actual Receive the variable of data, configuration receives types of variables;Reception types of variables in real-time testing is divided into two kinds of forms, during one kind is Disconnected, another kind is poll, when selecting to interrupt, will trigger interruption when board receives data, in interrupt service routine Collect data;When selecting poll to receive, test environment can read data according to polling cycle in board;
B2. user defines purpose variable, and described purpose variable is exactly to extract to do after dimension is changed from reception variable to obtain The variable arriving, had both had the variable of physical significance;
B3. user defines dimension transformation rule;
Wherein step B3 includes:
B31. set up the transformation rule receiving variable to purpose variable, its rule includes self-defined operation rule and sets up mapping table Two ways;
B32. then adopt self-defined operation rule when reception variable to purpose variable can be calculated by formula, user provides The expression formula of computing formula, and indicate types of variables;
B33. receive variable and there is not calculated relationship between purpose variable, determine receiving the relation between variable and purpose variable Justice becomes mapping table, obtains purpose variable according to receiving variable and tabling look-up;
B4. select purpose variable corresponding position in receiving variable;
B5. complete after receiving data to receive the dimension conversion of variable corresponding all purposes variable, then conversion at once Data afterwards is saved in the position that user specifies, and shows, is easy to user and observes and analyze data.
2. the embedded software test method based on dimension conversion according to claim 1 it is characterised in that:Described step In B1,
If in real-time testing, system under test (SUT) sends the data for test according to specific time interval, at this time just should Mode is received using poll;
If system under test (SUT) sends the cycle that test data is not fixed, received using interruption.
CN201410602648.6A 2014-10-31 2014-10-31 Embedded software testing method on basis of dimension conversion Active CN104317717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410602648.6A CN104317717B (en) 2014-10-31 2014-10-31 Embedded software testing method on basis of dimension conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410602648.6A CN104317717B (en) 2014-10-31 2014-10-31 Embedded software testing method on basis of dimension conversion

Publications (2)

Publication Number Publication Date
CN104317717A CN104317717A (en) 2015-01-28
CN104317717B true CN104317717B (en) 2017-02-15

Family

ID=52372952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410602648.6A Active CN104317717B (en) 2014-10-31 2014-10-31 Embedded software testing method on basis of dimension conversion

Country Status (1)

Country Link
CN (1) CN104317717B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102335649B1 (en) * 2015-06-09 2021-12-03 한화테크윈 주식회사 Apparatus and method for processing data
CN106528784B (en) * 2016-11-08 2020-04-03 杭州电子科技大学 Dimension homogeneous inspection method based on ontology
CN110474894B (en) * 2019-07-31 2022-08-05 北京和利时控制技术有限公司 Data transmitting and receiving method, system, storage medium and terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6044346A (en) * 1998-03-09 2000-03-28 Lucent Technologies Inc. System and method for operating a digital voice recognition processor with flash memory storage
CN101819552A (en) * 2010-01-04 2010-09-01 深圳市共进电子有限公司 Method for improving debugging speed during process of system development

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6044346A (en) * 1998-03-09 2000-03-28 Lucent Technologies Inc. System and method for operating a digital voice recognition processor with flash memory storage
CN101819552A (en) * 2010-01-04 2010-09-01 深圳市共进电子有限公司 Method for improving debugging speed during process of system development

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Debug All Your Code:Portable Mixed-Environment Debugging;Byeongcheol Lee 等;《OOPSLA 2009》;20091029;第207-225页 *
面向嵌入式软件测试的仿真建模;蒋崇武 等;《计算机工程》;20080228;第34卷(第4期);第87-89页 *

Also Published As

Publication number Publication date
CN104317717A (en) 2015-01-28

Similar Documents

Publication Publication Date Title
WO2020103737A1 (en) Network performance bottleneck value determination method and apparatus
EP2574084B1 (en) Method for reconfiguring a protocol of an application program
CN102882746B (en) Measuring method and measuring system of flow table adding rate in Openflow switchboard system
CN103763396A (en) Energy consumption data acquisition unit and method based on multi-protocol parallel acquisition technology
CN111181800B (en) Test data processing method and device, electronic equipment and storage medium
CN104317717B (en) Embedded software testing method on basis of dimension conversion
US20200274943A1 (en) Data Processing Method and Apparatus, Server, and Controller
CN105354268A (en) Meter reading data management system
CN107992403B (en) IO performance test method, device, equipment and computer readable storage medium
CN112685248A (en) Intelligent network card monitoring log obtaining method and device, electronic equipment and storage medium
CN111404270A (en) Low-voltage distribution area topology level identification method, device and equipment based on synchronous counting method
CN110336876A (en) A kind of method of calibration of energy data, apparatus and system
CN102404760B (en) Method and device for real-time measurement of system performance
CN114916033B (en) Data transmission method, system, electronic equipment and storage medium
CN101931986B (en) Indication method of network energy efficiency, indicator and system
CN107368404A (en) A kind of method of auditing administration and system
CN103607731A (en) Method and device for processing measurement reports
CN110347546B (en) Dynamic adjustment method, device, medium and electronic equipment for monitoring task
CN102075363A (en) Management method and equipment for performance index
US11204936B2 (en) Utility meter reading type code conversion
CN116578911A (en) Data processing method, device, electronic equipment and computer storage medium
CN114661563A (en) Data processing method and system based on stream processing framework
CN104787634A (en) Monitoring method of elevator all-in-one machine, elevator all-in-one machine and monitoring system thereof
CN115696441A (en) Call bill processing method, device, equipment and storage medium
CN107548543A (en) Reprocess probability forecasting method, device, server, terminal and storage medium

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