CN104317717A - 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
CN104317717A
CN104317717A CN201410602648.6A CN201410602648A CN104317717A CN 104317717 A CN104317717 A CN 104317717A CN 201410602648 A CN201410602648 A CN 201410602648A CN 104317717 A CN104317717 A CN 104317717A
Authority
CN
China
Prior art keywords
variable
data
variables
source
transmission
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
CN201410602648.6A
Other languages
Chinese (zh)
Other versions
CN104317717B (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

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, particularly relate to the embedded software test method based on dimension conversion.
Background technology
Software test is as improving in each stage that the reliability of software and the important means of quality be widely used in software Life cycle.Compared with the software of general type, embeddedly more focus on real-time, specificity and hardware-dependent.The input and output of embedded software are substantially all realized by hardware interface.Embedded software test is considered that it is to the real-time also should considering software while the correctness of inputoutput data.Data a large amount of in test process, the data how we find out our real concern fast and effectively seem particularly important.
The data obtained in test process are generally some binary numerals, and user is it is desirable that these data are to the data with physical significance in deserved reality.How the physical quantity that these binary numerals convert user's real concern fast and effectively to is become embedded software test and need problems faced.Sometimes these numerical value and actual value are linear relationships, but are not sometimes again.Especially in real-time testing, whole test process can because the conversion sending and receive numerical value and actual value can consume a lot of resource, causes test process be subject to the restriction of test resource and make efficiency and the poor quality of test.So be necessary that finding a kind of method has fast and effectively reached to the conversion realized between numerical value the object solved the problem.
Summary of the invention
The technology of the present invention is dealt with problems: overcome the deficiencies in the prior art, provides a kind of embedded software test method based on dimension conversion, decreases the artificial operation to data reduction in test process, fully ensures the real-time of data transmit-receive.Can filter again interfering data only carrying out process to valid data improves efficiency simultaneously.
Technical scheme of the present invention realizes like this.
Based on an embedded software test method for dimension conversion, the method comprises:
A. configuration concurrency send data;
B. receive and resolution data;
Wherein steps A comprises:
A1. user defines source variable and choice variable type.So-called source variable is exactly the variable of user-defined corresponding actual physical amount, namely needs the variable doing dimension conversion.Source variable is if the selection cycle type variable of mechanical periodicity, if event triggers the selection event flip-over type variable of change.
A2. user defines and sends variable and choice variable type.So-called send variable be exactly according to measured piece between communications protocol definition test process in need from the actual transmission of real bus variable.Need the cycle to send if send variable, selection cycle type, if the transmission of variable with a certain event for condition triggers; select event flip-over type.
A3., the definition rule part of the dimension transformation rule between source variable and transmission variable is set.Definition rule part needs user oneself to define dimension transformation rule, comprises definition operation rule and sets up mapping table two kinds of modes.
Wherein steps A 3 comprises:
A31. user defines operation rule needs to provide source variable to the computing formula sending variable, needs dated type of variables in formula.
A32. when source variable and the conversion sent between variable cannot set up mapping table by calculating to obtain then to select.List the value of transmission variable corresponding to source variable in the mapping table.
A4., after source variable conversion is set, sending position corresponding in variable.
The executing rule part of the dimension transformation rule A5. between source variable and transmission variable.
Wherein steps A 5 comprises:
A51. sending variable is preiodic type, test environment according to the transmission cycle of definition send in variable all source variables of comprising after dimension conversion by bit manipulation assignment to correspondence position, send in real time;
A52. sending variable is event flip-over type, if transmission condition set up send in variable all source variables of comprising after dimension conversion by bit manipulation assignment to correspondence position, send in real time.
Wherein step B comprises:
B1. user defines reception variable.The so-called variable that receives is exactly by the variable of physical connection from measured piece actual reception data in test process.Configuration receives types of variables.Reception types of variables in real-time testing can be divided into two kinds of forms, and one is interruption one is poll.When selecting to interrupt, when board receives data will triggered interrupts, in interrupt service routine, collect data; In time selecting poll to receive, test environment according to polling cycle, can read data in board.
Wherein step B1 comprises:
If B11. in real-time testing, system under test (SUT) sends the data for testing according to the specific time interval, at this time just should adopt poll receive mode.
If B12. system under test (SUT) sends the cycle that test data is not fixed, adopt interrupting receive.
B2. user defines object variable.So-called object variable is exactly from receiving variable the variable extracting and do and obtain after dimension is changed, both having had the variable of physical significance.
B3. user defines dimension transformation rule.
Wherein step B3 comprises:
B31. set up and receive the transformation rule of variable to object variable, its rule comprises self-defined operation rule and sets up mapping table two kinds of modes.
B32. when reception variable can then be adopted self-defined operation rule by formulae discovery to object variable.The expression formula of user's formulas for calculating, and indicate types of variables.
B33. receive between variable and object variable and there is not calculated relationship, the contextual definition received between variable and object variable can be become mapping table.Table look-up according to reception variable and obtain object variable.
B4. object variable is selected to receive position corresponding in variable.
B5. complete the dimension conversion receiving all object variablees corresponding to variable after receiving data at once, then the data after conversion are saved in the position that user specifies, and show, be convenient to user's observation and analysis data.
The present invention's advantage is compared with prior art: the present invention completes actual value to the conversion sending data automatically according to rule, decreases the artificial operation to data reduction in test process, fully ensures the real-time of data transmit-receive.Can filter again interfering data only carrying out process to valid data improves efficiency simultaneously.Facilitate user's observed and recorded.
Accompanying drawing explanation
Fig. 1 is data transmitting portion process flow diagram;
Fig. 2 is data receiver partial process view.
Specific embodiments
Be described in further detail below in conjunction with accompanying drawing.
A kind of embedded software test method based on dimension conversion provided by the invention comprises data configuration and sends data and receive and resolution data part.Test environment runs on VxWorks real-time embedded operating system.
What real-time testing environment adopted is the vxworks operating system of Wind River company.It is widely used in the high field of requirement of real-time with its good reliability and remarkable real-time.This system can complete the function of regulation within the time limited, and within the time limited, can make response to the asynchronous event of outside.
The dimension conversion method step of data transmitting portion 1 is explained as follows by reference to the accompanying drawings:
S11: definition source variable.Definition source variable comprises defining variable and types of variables.Wherein types of variables comprises preiodic type and event flip-over type two kinds.Preiodic type source variable changes own value according to the cycle set according to the test script in test process, and event flip-over type judges whether to meet to impose a condition, and imposes a condition, change own value according to the test script in test process if met.
S12: definition sends variable.Definition sends variable and comprises defining variable length and variable transmission types.
Send variable and may comprise a lot of information, so sometimes can be very long.Here sending variable can use the structure comprising multiple char type variable to represent.As the variable that length is 3 bytes, structure { char sub_1 can be used; Char sub_2; Char sub_3} represents.
Variable transmission types is comprise preiodic type and event flip-over type equally.
S13: definition source variable is to the dimension conversion sending variable.Concrete steps are as follows:
A) source variable needing to set up dimension transformation rule with transmission variable is selected.
B) select the type of dimension conversion, its type comprises definition operation rule and sets up mapping table two kinds of modes.If select definition operation rule, need the computing formula providing variable, each type of variables and corresponding source variable should be indicated in formula.Such as (int) a+ (short) b+ (double) c+0x64.
If the corresponding relation that mapping table then needs the numerical value provided in the mapping table after source variable and source variable conversion is set up in selection.
C) set source variable and sending position corresponding in variable after dimension conversion.
S14: start test, test macro judges whether satisfied transmission condition according to transmission type of variables.Whether the criterion of the transmission variable of preiodic type meets transmission cycle request, the transmission condition of setting before whether the criterion of the transmission variable of event mode meets.If do not met, wait for the next judgement cycle.
S15: when variable meets transmission condition, test macro should do dimension conversion the source variable setting up dimension transformation rule with the transmission variable satisfied condition according to the dimension transformation rule set before, afterwards the position of the structure step-by-step operation assignment obtained to setting, finally send variable.
The dimension conversion method step of receiving unit 2 does following explanation by reference to the accompanying drawings:
S21: definition receives variable, comprises definition and receives variable-length and receive mode.The method of defining variable length sends the method for variable with definition in S12.Receive mode comprises poll and receives and interrupting receive.Receive all data of receiving of test port during interrupting receive, poll receives only the data that specific period sends over.
S22: definition object variable.Observe and record for facilitating user.
S23: definition receives the dimension transformation rule of variable to object variable.Concrete steps are as follows:
A) the object variable needing to set up dimension transformation rule with reception variable is selected.
B) select the type of dimension conversion, its type comprises definition operation rule and sets up mapping table two kinds of modes.If select definition operation rule, need the computing formula providing variable, each type of variables and corresponding source variable should be indicated in publicity.Its method is with S13 kind step b.
If the corresponding relation that mapping table then needs the numerical value provided in the mapping table after source variable and source variable conversion is set up in selection.
C) set object variable and receiving position corresponding in variable before dimension conversion.
S24: receive data according to the type of receipt of the reception variable set before, do dimension conversion afterwards, and assignment is to object variable to all object variablees receiving variable opening relationships, then data is saved in result and shows.
When method of testing provided by the invention is tested for real-time embedded software, the process of data proposes.Can for paying close attention to specific data offering method support when test.Be specially adapted to the test case extracting particular data in big data quantity.
Although the present invention discloses as above with preferred embodiment; so itself and be not used to limit the present invention, any those skilled in the art, without departing from the spirit and scope of the present invention; when doing a little amendment and perfect, therefore protection scope of the present invention is when being as the criterion of defining with claims.

Claims (2)

1., based on an embedded software test method for dimension conversion, it is characterized in that comprising:
Steps A. configuration concurrency send data;
Step B. receives and resolution data;
Wherein steps A comprises:
A1. user defines source variable and choice variable type, and so-called source variable is exactly the variable of user-defined corresponding actual physical amount, namely needs the variable doing dimension conversion; Source variable is if the selection cycle type variable of mechanical periodicity, if event triggers the selection event flip-over type variable of change;
A2. user defines and sends variable and choice variable type, so-called send variable be exactly according to measured piece between communications protocol definition test process in need from the actual transmission of real bus variable; Need the cycle to send if send variable, selection cycle type, if the transmission of variable with a certain event for condition triggers; select event flip-over type;
A3. arrange the definition rule part of the dimension transformation rule between source variable and transmission variable, definition rule part needs user oneself to define dimension transformation rule, comprises definition operation rule and sets up mapping table two kinds of modes;
Wherein steps A 3 comprises:
A31. user defines operation rule needs to provide source variable to the computing formula sending variable, needs dated type of variables in formula;
A32. when source variable and the conversion sent between variable cannot set up mapping table by calculating to obtain then to select, the value of transmission variable corresponding to source variable is listed in the mapping table;
A4., after source variable conversion is set, sending position corresponding in variable;
The executing rule part of the dimension transformation rule A5. between source variable and transmission variable;
Wherein steps A 5 comprises:
A51. sending variable is preiodic type, test environment according to the transmission cycle of definition send in variable all source variables of comprising after dimension conversion by bit manipulation assignment to correspondence position, send in real time;
A52. sending variable is event flip-over type, if transmission condition set up send in variable all source variables of comprising after dimension conversion by bit manipulation assignment to correspondence position, send in real time;
Wherein step B comprises:
B1. user defines reception variable, and the so-called variable that receives is exactly that configuration receives types of variables by the variable of physical connection from measured piece actual reception data in test process; Reception types of variables in real-time testing is divided into two kinds of forms, and one is interrupted, and another kind is poll, when selecting to interrupt, when board receives data will triggered interrupts, in interrupt service routine, collect data; In time selecting poll to receive, test environment according to polling cycle, can read data in board;
B2. user defines object variable, and so-called object variable is exactly from receiving variable the variable extracting and do and obtain after dimension is changed, both having had the variable of physical significance;
B3. user defines dimension transformation rule;
Wherein step B3 comprises:
B31. set up and receive the transformation rule of variable to object variable, its rule comprises self-defined operation rule and sets up mapping table two kinds of modes;
B32. when reception variable can then be adopted self-defined operation rule by formulae discovery to object variable, the expression formula of user's formulas for calculating, and types of variables is indicated;
B33. receive variable and there is not calculated relationship with between object variable, the contextual definition received between variable and object variable is become mapping relations table, tabling look-up according to reception variable obtains object variable;
B4. object variable is selected to receive position corresponding in variable;
B5. complete the dimension conversion receiving all object variablees corresponding to variable after receiving data at once, then the data after conversion are saved in the position that user specifies, and show, be convenient to user's observation and analysis data.
2. the embedded software test method based on dimension conversion according to claim 1, is characterized in that: in described step B1,
If in real-time testing, system under test (SUT) sends the data for testing according to the specific time interval, at this time just should adopt poll receive mode;
If system under test (SUT) sends the cycle that test data is not fixed, adopt interrupting receive.
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 true CN104317717A (en) 2015-01-28
CN104317717B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254260A (en) * 2015-06-09 2016-12-21 韩华泰科株式会社 For processing equipment and the method for data
CN106528784A (en) * 2016-11-08 2017-03-22 杭州电子科技大学 Dimensional homogeneity checking method based on ontology
CN110474894A (en) * 2019-07-31 2019-11-19 北京和利时系统工程有限公司 Data sending 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
BYEONGCHEOL LEE 等: "Debug All Your Code:Portable Mixed-Environment Debugging", 《OOPSLA 2009》 *
蒋崇武 等: "面向嵌入式软件测试的仿真建模", 《计算机工程》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254260A (en) * 2015-06-09 2016-12-21 韩华泰科株式会社 For processing equipment and the method for data
CN106528784A (en) * 2016-11-08 2017-03-22 杭州电子科技大学 Dimensional homogeneity checking method based on ontology
CN110474894A (en) * 2019-07-31 2019-11-19 北京和利时系统工程有限公司 Data sending and receiving method, system, storage medium and terminal
CN110474894B (en) * 2019-07-31 2022-08-05 北京和利时控制技术有限公司 Data transmitting and receiving method, system, storage medium and terminal

Also Published As

Publication number Publication date
CN104317717B (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN109460223B (en) API gateway management system and method thereof
CN111045911B (en) Performance test method, performance test device, storage medium and electronic equipment
CN103150238A (en) Service request processing method, simulation performance test method and simulation performance test device
CN109800270B (en) Data storage and query method and Internet of things system
CN107181821A (en) A kind of information push method and device based on SSE specifications
AU2017237704A1 (en) Control device for estimation of power consumption and energy efficiency of application containers
US20100131685A1 (en) Hardware configuration information system, method, and computer program product
CN105138679A (en) Data processing system and method based on distributed caching
CN114090366A (en) Method, device and system for monitoring data
CN112685248A (en) Intelligent network card monitoring log obtaining method and device, electronic equipment and storage medium
CN104317717A (en) Embedded software testing method on basis of dimension conversion
CN103997521A (en) File operating method and device based on router and router
US20190215262A1 (en) System and method for dynamically testing networked target systems
CN110046187A (en) Data processing system, method and device
US9903737B2 (en) Multi-tenant customer portal
CN111752916B (en) Data acquisition method and device, computer readable storage medium and electronic equipment
US11204936B2 (en) Utility meter reading type code conversion
CN104468337A (en) Message transmission method and device, message management center device and data centers
US20190306073A1 (en) Method and device for enhancing the throughput between smart meter and server
CN104462116A (en) Data selecting method and device
CN202385300U (en) Data transmission system of internet of things (IOT)
CN103927153A (en) System configuration method and device and system
CN110677463B (en) Parallel data transmission method, device, medium and electronic equipment
CN114661563B (en) Data processing method and system based on stream processing framework
JP2007179309A (en) Debug system for grid environment, grid service management device, debug method and program

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