CN108959103A - Method for testing software based on BWDSP library function - Google Patents
Method for testing software based on BWDSP library function Download PDFInfo
- Publication number
- CN108959103A CN108959103A CN201810857972.0A CN201810857972A CN108959103A CN 108959103 A CN108959103 A CN 108959103A CN 201810857972 A CN201810857972 A CN 201810857972A CN 108959103 A CN108959103 A CN 108959103A
- Authority
- CN
- China
- Prior art keywords
- function
- bwdsp
- library function
- measured
- library
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention belongs to software testing technology field, the method for testing software based on BWDSP library function is disclosed.This method comprises: design test case;Generate the reference library function file and excitation file of BWDSP library function to be measured;Reference library function file and excitation file are compiled, dynamic link library file is generated;Packaging and testing instruction, obtains test file;Test file and dynamic link library file are run, BWDSP library function to be measured and its implementing result with reference to library function are obtained;Error Graph is generated, determines whether the function of BWDSP library function to be measured is correct according to Error Graph.The present invention efficiently and automatically can carry out large batch of test to BWDSP library function, and visualization is higher, and tester can be made to be visually observed that the error result of tested library function.
Description
Technical field
The present invention relates to software testing technology field more particularly to a kind of method for testing software, are to be based on specifically
The method for testing software of BWDSP library function.
Background technique
As Digital Signal Processing develops by leaps and bounds, dsp chip is widely used in image procossing, communication skill
The fields such as art, radar detection, speech processes, network-control, instrument and meter and household electrical appliances.
Multicore BWDSP family chip is by a series of property of the 38th research institute's independent development of China Electronic Science and Technology Corporation
The superior dsp chip of energy, it is more to be widely used in Radar Signal Processing, electronic countermeasure, precision guided weapon, communication support etc.
A technical field.
The bottom core process (i.e. library function) of dsp chip is the emphasis of whole system, a set of to write and excellent meticulously
The library function of change can give full play to the resources advantage of dsp chip, meet the radar letter that data throughout is big, requirement of real-time is high
Number processing task.DSP development platform is added after visualization encapsulation in library function in modular form, is able to use family for energy
The design on upper layer is placed on without being concerned about low-level details, significantly facilitates the exploitation of dsp system, it can be seen that the exploitation of DSP library function
Importance.And software test is to guarantee an important means of library function function accuracy, directly decide chip can
By property.It is therefore desirable to accurately be tested the library function write, the correctness of verification library function algorithm.
To reach test request, need to each library function carry out multiple groups test, since function numbers are larger, if using by
The method of a manual testing is tested one by one, is necessarily taken time and effort.
Summary of the invention
In view of this, the present invention proposes a kind of method for testing software based on BWDSP library function, it can not only efficiently, certainly
Large batch of test dynamicly is carried out to BWDSP library function, and visualization is higher, tester can be made to be visually observed that
The error result of tested library function.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that
The present invention provides a kind of method for testing software based on BWDSP library function, comprising the following steps:
Step 1, it is BWDSP library function design test case to be measured, and successively each test case is numbered, it will be each
Test and excitation number of the corresponding number of test case as the test case;
Step 2, it according to the specific function performance of the BWDSP library function to be measured, selects in MATLAB standard library function
Function or the MATLAB function write using the function in MATLAB standard library function are as the ginseng of the BWDSP library function to be measured
Library function is examined, it is described identical as the BWDSP library function function to be measured with reference to library function;It is written described with reference to library function
MATLAB file, the reference library function file as the BWDSP library function to be measured;
Step 3, the excitation file of the BWDSP library function to be measured is generated, the excitation file is used for according to test and excitation
Number random value is carried out to test case, while generating corresponding data file to record the value of test case, and according to institute
After data file is stated to the input parameter progress assignment of the reference library function of the BWDSP library function to be measured, the reference is called
Library function;
Step 4, the reference library function file of the BWDSP library function to be measured and excitation file are compiled, are generated dynamic
State links library file;
Step 5, according to the function name of the BWDSP library function to be measured and excitation number to be measured, according to preset instruction format
Composition test instruction, and test instruction is encapsulated in text file, obtain the test text of the BWDSP library function to be measured
Part;Wherein, the test and excitation number of any test case of the excitation number to be measured for the BWDSP library function to be measured;
The test file and the dynamic link library file of step 6, the operation BWDSP library function, obtain described to be measured
The implementing result of BWDSP library function and its reference library function;
Step 7, according to the BWDSP library function to be measured and its with reference to the implementing result of library function, Error Graph is generated;According to
The Error Graph determines whether the function of the BWDSP library function to be measured is correct.
Method for testing software provided in an embodiment of the present invention based on BWDSP library function facilitates tester according to set
The test case of meter fast and efficiently test b WDSP library function, establishes and saves test result information, while generating visualization
Error result figure, the low problem of BWDSP library function test coverage is able to solve, to effectively detect the library function function
Correctness, and guarantee the stability of developed chip.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the flow diagram of the method for testing software provided in an embodiment of the present invention based on BWDSP library function.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Fig. 1 show the flow diagram of the method for testing software provided in an embodiment of the present invention based on BWDSP library function.
As shown in Figure 1, the method for testing software provided in an embodiment of the present invention based on BWDSP library function, including following step
It is rapid:
Step 1, it is BWDSP library function design test case to be measured, and successively each test case is numbered, it will be each
Test and excitation number of the corresponding number of test case as the test case.
It should be noted that the common Test Sample Design such as equivalence class partition, boundary value analysis, cause effect graph can be used
Method design test case.Wherein, parameter is divided into vector value and scalar according to input parameter type by equivalence class classifying method
Value, and consider parameter constraints, the entire input domain of input data is divided into several subsets (namely equivalence class), in turn
Condition according to parameter judges whether it is effective equivalence class, and a small number of representative data are then chosen from each subset
As test case;Boundary analysis chooses the value for being equal to boundary as survey according to the boundary value of equivalence class in equivalence class
Example on probation, the border condition for capableing of parity price class are tested emphatically;Cause-and-effect diagram rule is by considering the connection between input condition
System, be combined with each other etc., using a kind of combination for being suitable for describing for a variety of conditions, generate the form of multiple movements accordingly to set
Count test case.
Step 2, according to the specific function performance of BWDSP library function to be measured, the function in MATLAB standard library function is selected
Or the MATLAB function write using the function in MATLAB standard library function is as the reference library letter of BWDSP library function to be measured
Number, and MATLAB file, the reference library function file as BWDSP library function to be measured will be written with reference to library function.
Wherein, identical as BWDSP library function function to be measured with reference to library function.
Step 3, the excitation file of BWDSP library function to be measured is generated, excitation file is used for according to test and excitation number to test
Use-case carries out random value, while generating corresponding data file to record the value of test case, and according to data file pair
After the input parameter of the reference library function of BWDSP library function to be measured carries out assignment, calls and refer to library function.
Specifically, excitation file can be written into excitation function, by excitation function to test by writing excitation function
Use-case realizes random value.In a kind of concrete implementation mode, sentence switch can be switched by situation and realized to different tests
The value of use-case, concrete form are as follows:
switch Seed
case 1
Parameter value sentence;
case N
Parameter value sentence;
end
Wherein, N is the total number of test case.Switch executes phase according to the value { 1,2...N } of Seed variable respectively
The sentence answered realizes the value to different test cases, can test high-volume data or selectively test one simultaneously
Divided data verifies the function accuracy of library function.
Step 4, the reference library function file of BWDSP library function to be measured and excitation file are compiled, generate dynamic chain
Connect library file.
MATLAB provides routine interface abundant, to make to put down directly as reference library function in test with reference to library function
Be called, speed up the work in platform, need to the reference library function file of the specific function performance of realization independently write or by
The MATLAB file and excitation file being elected to be with reference to library function are compiled to generate dynamic link library file, run the dynamic
Link library file can be called directly with reference to library function.
The detailed process for generating dynamic link library file is illustrated below:
1) tool and environment: installation MATLAB software and Visual Studio software add environmental variance, prepare operation
Environment.
2) VC compiler is associated with for MATLAB.It can be directly independent by C/C++ compilation of source code by mbuild order
Run program.Specifically: mbuild-setup is inputted in MATLAB instruction box, and VC compiler is selected under prompt information
?.
3) dynamic link library file is generated.Using the configuration tool order deploytool of MATLAB, and related ginseng is set
Number, can add function file and excitation function file in subsequent occurrences of window and be compiled, i.e. meeting after compiling successfully
Generate corresponding dynamic link library file.
Step 5, it according to the function name of BWDSP library function to be measured and excitation number to be measured, is formed according to preset instruction format
Test instruction, and test instruction is encapsulated in text file, obtain the test file of BWDSP library function to be measured.
Wherein, the test and excitation number of any test case of the excitation number to be measured for BWDSP library function to be measured.
The preset instruction format is as follows :-n BWDSP library function function name-sti to be measured excitation number to be measured.For example,-n
Vectsub-sti 12 16, wherein vectsub, that is, BWDSP to be measured library function function name, 1,2,16 excitations number i.e. to be measured.
Step 6, run BWDSP library function test file and dynamic link library file, obtain BWDSP library function to be measured and
Its implementing result for referring to library function.
Brief description executes test instruction process:
(1) running environment is changed to catalogue where test platform.
For example, the directory name where the test platform is ' release ', be currently located path be ' E: release ', then
It is corresponding to execute instruction are as follows:
Beginning → operation → input ' cmd ' → input ' e: ' → input ' cd E: release '.
(2) test platform of algorithm library function is run by executing instruction test.exe-f test.txt.
(3) systematic function test result information.Test platform automatic running when executing functional test generates test result
Information.
Step 7, according to BWDSP library function to be measured and its with reference to the implementing result of library function, Error Graph is generated;According to error
Figure, determines whether the function of BWDSP library function to be measured is correct.
Wherein, the abscissa of Error Graph is excitation number to be measured, and ordinate is BWDSP library function to be measured and its refers to library function
The error amount of the two implementing result.
Further, the calculation formula of error amount are as follows:Wherein, e indicate BWDSP library function to be measured and
Its error amount for referring to both library functions implementing result, X indicate the implementing result of BWDSP library function to be measured, and Y indicates reference library letter
Several implementing results.
Particularly, when X, Y are simultaneously 0, formula can be passed through: e=| X-Y | calculate error amount.
In a kind of concrete implementation mode, in step 7, according to Error Graph, determine BWDSP library function to be measured function whether
Correctly, it can specifically include:
Whether each excitation number corresponding error amount to be measured is less than preset error value in error in judgement figure, if so, really
The function of fixed BWDSP library function to be measured is correct;Otherwise, it determines the capability error of BWDSP library function to be measured.
Wherein, the preset error value can specifically take 10-6Or smaller numerical value, the embodiment of the present invention are not made this specifically
It limits.
Method for testing software provided in an embodiment of the present invention based on BWDSP library function facilitates tester according to set
The test case of meter fast and efficiently test b WDSP library function, establishes and saves test result information, while generating visualization
Error result figure, the low problem of BWDSP library function test coverage is able to solve, to effectively detect the library function function
Correctness, and guarantee the stability of developed chip.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light
The various media that can store program code such as disk.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (5)
1. a kind of method for testing software based on BWDSP library function, which comprises the following steps:
Step 1, it is BWDSP library function design test case to be measured, and successively each test case is numbered, by each test
Test and excitation number of the corresponding number of use-case as the test case;
Step 2, according to the specific function performance of the BWDSP library function to be measured, the function in MATLAB standard library function is selected
Or the MATLAB function write using the function in MATLAB standard library function is as the reference library of the BWDSP library function to be measured
Function is described identical as the BWDSP library function function to be measured with reference to library function;By described with reference to library function write-in MATLAB text
Part, the reference library function file as the BWDSP library function to be measured;
Step 3, the excitation file of the BWDSP library function to be measured is generated, the excitation file is used for right according to test and excitation number
Test case carries out random value, while generating corresponding data file to record the value of test case, and according to the number
After carrying out assignment according to input parameter of the file to the reference library function of the BWDSP library function to be measured, the reference library letter is called
Number;
Step 4, the reference library function file of the BWDSP library function to be measured and excitation file are compiled, generate dynamic chain
Connect library file;
Step 5, it according to the function name of the BWDSP library function to be measured and excitation number to be measured, is formed according to preset instruction format
Test instruction, and test instruction is encapsulated in text file, obtain the test file of the BWDSP library function to be measured;
Wherein, the test and excitation number of any test case of the excitation number to be measured for the BWDSP library function to be measured;
The test file and the dynamic link library file of step 6, the operation BWDSP library function, obtain the BWDSP to be measured
The implementing result of library function and its reference library function;
Step 7, according to the BWDSP library function to be measured and its with reference to the implementing result of library function, Error Graph is generated;According to described
Error Graph determines whether the function of the BWDSP library function to be measured is correct.
2. the method according to claim 1, wherein in step 5, the preset instruction format are as follows:-n is to be measured
BWDSP library function function name-sti excitation number to be measured.
3. the method according to claim 1, wherein the abscissa of the Error Graph is excitation to be measured in step 7
Number, ordinate is the BWDSP library function to be measured and its error amount with reference to both library functions implementing result.
4. according to the method described in claim 3, it is characterized in that, the calculation formula of the error amount are as follows:
Wherein, e indicates that BWDSP library function to be measured and its error amount with reference to both library functions implementing result, X indicate the library BWDSP to be measured
The implementing result of function, Y indicate to refer to the implementing result of library function.
5. according to the method described in claim 3, it is characterized in that, according to the Error Graph, being determined described to be measured in step 7
Whether the function of BWDSP library function is correct, specifically includes: judging that each excitation number corresponding error amount to be measured is in the Error Graph
It is no to be less than preset error value, if so, determining that the function of the BWDSP library function to be measured is correct;Otherwise, it determines it is described to
Survey the capability error of BWDSP library function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810857972.0A CN108959103A (en) | 2018-07-31 | 2018-07-31 | Method for testing software based on BWDSP library function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810857972.0A CN108959103A (en) | 2018-07-31 | 2018-07-31 | Method for testing software based on BWDSP library function |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108959103A true CN108959103A (en) | 2018-12-07 |
Family
ID=64466405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810857972.0A Pending CN108959103A (en) | 2018-07-31 | 2018-07-31 | Method for testing software based on BWDSP library function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108959103A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110489356A (en) * | 2019-08-06 | 2019-11-22 | 上海商汤智能科技有限公司 | Information processing method, device, electronic equipment and storage medium |
CN110990279A (en) * | 2019-12-02 | 2020-04-10 | 小唐科技(上海)有限公司 | Method for jointly verifying DSP codes |
CN111625446A (en) * | 2020-04-30 | 2020-09-04 | 库卡机器人制造(上海)有限公司 | Software testing method and device, computer readable medium and electronic equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302950A (en) * | 2015-10-19 | 2016-02-03 | 北京精密机电控制设备研究所 | Software and hardware cooperation based cross-linking simulation test method for programmable logic device |
-
2018
- 2018-07-31 CN CN201810857972.0A patent/CN108959103A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302950A (en) * | 2015-10-19 | 2016-02-03 | 北京精密机电控制设备研究所 | Software and hardware cooperation based cross-linking simulation test method for programmable logic device |
Non-Patent Citations (1)
Title |
---|
张杏: "雷达信号处理函数库设计和优化", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110489356A (en) * | 2019-08-06 | 2019-11-22 | 上海商汤智能科技有限公司 | Information processing method, device, electronic equipment and storage medium |
CN110990279A (en) * | 2019-12-02 | 2020-04-10 | 小唐科技(上海)有限公司 | Method for jointly verifying DSP codes |
CN110990279B (en) * | 2019-12-02 | 2023-05-12 | 小唐科技(上海)股份有限公司 | Method for joint verification of DSP codes |
CN111625446A (en) * | 2020-04-30 | 2020-09-04 | 库卡机器人制造(上海)有限公司 | Software testing method and device, computer readable medium and electronic equipment |
CN111625446B (en) * | 2020-04-30 | 2023-05-23 | 库卡机器人制造(上海)有限公司 | Software testing method and device, computer readable medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101173972B (en) | Method and apparatus for testing to determine minimum operating voltages in electronic devices | |
EP0988558B1 (en) | Low cost, easy to use automatic test system software | |
US7506211B2 (en) | Automated atomic system testing | |
EP1085417A2 (en) | Method and system for forming skeletons for generating verification systems | |
CN108959103A (en) | Method for testing software based on BWDSP library function | |
KR20090088605A (en) | Method and apparatus for generating virtual software platform based on component model and validating software platform architecture using thereof | |
CN109508981A (en) | Method and apparatus for testing intelligent contract | |
CN102375778A (en) | Method and system for automatically testing digital signal processor (DSP) | |
US11144434B2 (en) | Refining coverage analyses using context information | |
US6453437B1 (en) | Method and system for performing transition fault simulation along long circuit paths for high-quality automatic test pattern generation | |
CN107038120A (en) | A kind of method for testing software and equipment | |
US6707313B1 (en) | Systems and methods for testing integrated circuits | |
CN110362469A (en) | Based on modular testing use-case control method, device, terminal and storage medium | |
CN114429103A (en) | Chip verification method and device, electronic equipment and storage medium | |
CN115510804A (en) | Full-chip pin multiplexing automatic verification method, device, equipment and storage medium | |
CN106681905A (en) | Software testing device and software testing method thereof | |
WO2023207973A1 (en) | Compiler test method and apparatus, case generation method and apparatus, and instruction storage structure | |
US11182279B1 (en) | Optimizing test case execution | |
WO2024103838A1 (en) | Code analysis method and apparatus, and electronic device and storage medium | |
CN105652182A (en) | Circuit board fault positioning system and circuit board fault positioning method based on circuit network and graph search | |
CN109902001A (en) | To the detection method and terminal device of uninitialized variable | |
CN105718373B (en) | Meet the code coverage generation method of DO-178C | |
CN108763092A (en) | A kind of aacode defect detection method and device based on cross validation | |
AU2021227739B2 (en) | Executing tests in deterministic order | |
CN106815133A (en) | System detection method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181207 |