CN100507871C - Method and system for testing embedded file system - Google Patents

Method and system for testing embedded file system Download PDF

Info

Publication number
CN100507871C
CN100507871C CNB2006101441257A CN200610144125A CN100507871C CN 100507871 C CN100507871 C CN 100507871C CN B2006101441257 A CNB2006101441257 A CN B2006101441257A CN 200610144125 A CN200610144125 A CN 200610144125A CN 100507871 C CN100507871 C CN 100507871C
Authority
CN
China
Prior art keywords
order
file system
management function
embedded
tested
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.)
Expired - Fee Related
Application number
CNB2006101441257A
Other languages
Chinese (zh)
Other versions
CN1963782A (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.)
Vimicro Corp
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CNB2006101441257A priority Critical patent/CN100507871C/en
Publication of CN1963782A publication Critical patent/CN1963782A/en
Application granted granted Critical
Publication of CN100507871C publication Critical patent/CN100507871C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

This invention discloses one imbed file system and its test method, which comprises the following steps: user transplanting the imbedded file system application interface API function to test system API database; the said test system receives and analyzes user input imbed file system for test order to transfer order relative file management function; the said file management function transfers the relative API of the system to test imbedded files sent back to user through API.

Description

The method of testing of embedded file system and system
Technical field
The present invention relates to field of computer technology, relate in particular to the method for testing and the system of embedded file system.
Background technology
At present, embedded system such as handheld multimedia devices etc. have wherein used file system, i.e. embedded file system in a large number.Because the customizing functions and the interface function of embedded file system have nothing in common with each other, therefore when carrying out the test of embedded file system, existing implementation all is at the different different testing tools of embedded file system design.
In the design process of above-mentioned testing tool, the developer not only needs by the interface function design management program of calling embedded file system and some synthetic test programs, but also need the test interface program that design can man-machine interaction, therefore the developer time of understanding overspending removes to design the testing tool of embedded file system, cause the development efficiency of embedded file system low, the cycle is long, is unfavorable for the renewal of product.And, since relatively poor at the different testing tool versatility of different embedded file system designs, cause each project all can face the comparatively problem of complicated testing tool of design, influenced development progress even product quality, also increased cost of development.
Summary of the invention
The invention provides a kind of method of testing and system of embedded file system, in order to solve the problem that the Design of Test System time that has embedded file system in the prior art is long and need design different test macros at different embedded file systems; The problem that embedded file system development efficiency is low, the cycle is long, cost is high that further solution causes thus.
The invention provides following technical scheme:
A kind of method of testing of embedded file system, the method comprising the steps of:
The application programming interface api function that the user is relevant with embedded file system to be tested calls in the API storehouse of being transplanted to test macro;
Described test macro receives the order that described embedded file system is tested of user's input, and described order is the order of predetermined format;
Described test macro is resolved described order, and calls described order corresponding file management function;
The API relevant with described embedded file system in the described API of the described file management function call storehouse tests described embedded file system;
Described embedded file system returns to described file management function by described API with test result, and described file management function returns to the user with this test result.
In the said method, described order is order line or batch processing script file.
Described order line is made up of command string, one or more operand character string; Described batch processing script file is made up of a plurality of described order lines.
Resolve described order line and directly call the corresponding file management function; Perhaps, described batch processing script file is saved in buffer memory after, resolve described batch processing script file line by line and call the corresponding file management function.
Resolve described order by the querying command storehouse.
Store the order that embedded file system is tested and the corresponding relation of file management function in the described command library, resolve described order, obtain the sign of described order corresponding file management function according to this corresponding relation; And, call the corresponding file management function according to described sign.
The corresponding relation of described order that embedded file system is tested and file management function is pre-defined in described command library; Perhaps, add in described command library by the user.
Described file management function is pre-defined in the file management function library; Perhaps, add in described file management function library by the user.
A kind of command processing device comprises:
Receiving element is used to receive the order that embedded file system is tested of user's input, and described order is the order of predetermined format;
Command library is used to store the order that embedded file system is tested and the corresponding relation of this order and file management function;
Resolution unit is used for resolving the order that embedded file system is tested of user's input by inquiring about described command library, obtains the sign of this order corresponding file management function;
Call unit is used for calling the corresponding file management function according to described sign.
A kind of document management apparatus comprises:
Call unit is used for by the file management function call API relevant with embedded file system to be tested described embedded file system being tested;
Receiving element is used to receive the test result that described embedded file system returns by described API;
Transmitting element is used for test result is returned to the user.
A kind of test macro of embedded file system comprises:
Operation-interface is used to receive the order that embedded file system is tested of user's input, and described order is the order of predetermined format; And, output test result to the user;
Command processing device is used to resolve described order, and calls described order corresponding file management function;
The API storehouse is used to store the relevant API of described embedded system;
Document management apparatus is used for the storehouse API relevant with described embedded file system by the described API of described file management function call, and described embedded file system is tested; And, receive the test result that described embedded file system returns by described API, and test result is returned to described operation-interface.
Described command processing device comprises:
Receiving element is used to receive the order that embedded file system is tested of user's input, and described order is the order of predetermined format;
Command library is used to store the order that embedded file system is tested and the corresponding relation of this order and file management function;
Resolution unit is used for resolving the order that embedded file system is tested of user's input by inquiring about described command library, obtains the sign of this order corresponding file management function;
Call unit is used for calling the corresponding file management function according to described sign.
Described document management apparatus comprises:
Call unit is used for by the file management function call API relevant with embedded file system to be tested described embedded file system being tested;
Receiving element is used to receive the test result that described embedded file system returns by described API;
Transmitting element is used for test result is returned to the user.
Beneficial effect of the present invention is as follows:
1, test macro among the present invention is resolved the order of user's input earlier and is called the corresponding file management function according to analysis result again, and call relevant API by this document management function embedded file system is tested, described order, file management function and both corresponding relations are pre-defined by test macro, promptly as long as user input commands, test macro just can be tested embedded file system automatically, need not the user again at the different different test macros of embedded file system design, thus can be rapid, all sidedly embedded file system is tested.
2, test macro of the present invention is an open system, the user can be easily calls form in the API storehouse of being transplanted to test macro by the api function with embedded file system to be tested, adds the order of own file management, trial function and correspondence to test macro.Make this test macro go for the test of different embedded file systems, the embedded file system that can design the user rapidly and easily carries out full test, thereby shortens the construction cycle, reduces cost of development.
Description of drawings
Figure 1A is the structural representation of the test macro of embedded file system in the embodiment of the invention;
Figure 1B is the structural representation of command processing device in the embodiment of the invention;
Fig. 1 C is the structural representation of document management apparatus in the embodiment of the invention;
The process flow diagram of Fig. 2 in the embodiment of the invention embedded file system being tested.
Embodiment
In order to solve the problem that the Design of Test System time that has embedded file system in the prior art is long and need design different test macros at different embedded file systems; The problem that embedded file system development efficiency is low, the cycle is long, cost is high that further solution causes thus, the present invention designs a general test macro embedded file system is tested.
Below in conjunction with accompanying drawing the preferred embodiment of the present invention is elaborated.
Consult shown in Figure 1A, the test macro of the embedded file system in the present embodiment comprises: operation-interface 100, command processing device 101, document management apparatus 102, application programming interface API (ApplicationProgram Interface) storehouse 103.
Described operation-interface 100 runs on PC, be used for the order that embedded file system is tested of user input is handed down to embedded file system with the form of character string by modes such as serial ports, and receive the test result that embedded file system is uploaded by modes such as serial ports with the form of character string, and this be the results are shown in the input output window of graphic interface.
Described order is order line or batch processing script file; The form of described order is pre: command string+operand character string, described operand character string can be for one or more.Can realize basic document manipulation by input command is capable, as creating, delete, browse etc.; Can be combined into complicated testing process to a large amount of basic document manipulations by writing with download batch processing scripts file.
The user can write test script according to the performance requirement of embedded file system, also can adopt more predefined typical test scripts in the test macro.For example:
Balance is write in test: it is full to subregion to write file, revises a filename 100000 times; It is full to subregion 99% to write file, creates a file, this file is covered be written to subregion completely, covers and writes 100000 times; It is full to subregion 70% to write file, creates 100 files, and it is full to subregion that these files are write the random-length number, deletes this 100 files then, repeats to create, writes, deletes flow process 100000 times.
For with the test of the similar more complicated of last example, the user only need write a brief batch processing script, downloads to test macro and gets final product.
Described command processing device 101 runs on test macro, is used for resolving by the querying command storehouse order of user's input, obtains the sign of described order corresponding file management function, and calls the corresponding file management function according to this sign.
Consult shown in Figure 1B, described command processing device 101 further comprises: receiving element 1010, command library 1011, resolution unit 1012, call unit 1013; Wherein, described receiving element 1010 is used to receive the order that embedded file system is tested of user's input, and described order is the order of predetermined format; Described command library 1011 is used to store the order that embedded file system is tested and the corresponding relation of described order and file management function; Described resolution unit 1012 is used for resolving the order that embedded file system is tested of users' input by inquiring about described command library 1011, obtains the sign of this order corresponding file management function; Described call unit 1013 is used for calling the corresponding file management function according to described sign.
Store basic file test command and combined test order commonly used in the described command library 1011, the user also can be to the interpolation custom command in the described command library 1011.Also store the order that embedded file system is tested and the corresponding relation of file management function in the described command library 1011.Described corresponding relation can be the order that embedded file system is tested and the concordance list of file management function, has enumerated the corresponding relation of the sign of order that embedded file system is tested and file management function in this concordance list.Described sign can be function name, address of file management function etc.Described resolution unit 1012 is resolved the sign that obtains described order corresponding file management function by the corresponding relation of order described in the described command library 1011 of inquiry with the file management function.
Capable for individual command, after described resolution unit 1012 was resolved it, the sign of the described order line corresponding file management function that is directly obtained according to parsing by described call unit 1013 was called the corresponding file management function; For the batch processing script file, earlier it is saved in buffer memory, after being resolved line by line by described resolution unit 1012, the sign of the described batch processing script file corresponding file management function that is obtained according to parsing by described call unit 1013 is called the corresponding file management function again.
Described document management apparatus 102 runs on test macro, be used to provide a file management function library, the described command processing device 101 of confession calls file management function wherein, and, described embedded file system is tested by the API relevant in the described API of the described file management function call storehouse 103 with described embedded file system; And, receive the test result that described embedded file system returns by described API, and this test result is returned to described operation-interface 100.
Consult shown in Fig. 1 C, described document management apparatus 102 further comprises: call unit 1020, receiving element 1021, transmitting element 1022; Described call unit 1020 is used for by the described application programming interface API of file management function call storehouse 103 API relevant with described embedded file system described embedded file system being tested; Described receiving element 1021 is used to receive the test result that described embedded file system returns by described API; Described transmitting element 1022 is used for test result is returned to described operation-interface 100.
Function in the described file management function library is pre-defined by test macro; Perhaps, added voluntarily by the user, the user can add the function of the test command correspondence of input in described file management function library here.
When described file management function is tested embedded file system by calling described API, can format embedded file system, the establishment of label setting, file or folder, delete, browse, copy, and file content operation such as browse.
Described API storehouse 103 is the application programming interface storehouse of test macro and embedded file system, the user writes the relevant api function of embedded file system to be tested and calls in described API storehouse 103 when transplanting embedded file system, described document management apparatus 102 is tested embedded file system by calling described relevant API.
The user needs earlier test macro to be transplanted to the user test platform, and transplant the embedded file system that will test in test macro before the use test system tests embedded file system.
Consult shown in Figure 2ly, the flow process that user's use test system tests embedded file system is as follows:
The order that step 200, user test embedded file system by the operation-interface input.
Step 201, command processing device are resolved the order that the user imports by the querying command storehouse, obtain the sign of described order corresponding file management function.
Step 202, command processing device call corresponding file management function in the document management apparatus according to the sign of the file management function that parsing obtains.
API relevant in step 203, the described file management function call API storehouse tests described embedded file system.
Step 204, described embedded file system return test result by described API to described document management apparatus, and described document management apparatus returns to described operation-interface with this test result.
In the step 200, it is capable that the user can import individual command, this moment is in step 203, when calling relevant API described embedded file system being tested, can carry out basic test to file according to described individual command is capable, as print partition information, format, browse, create, deletion, revised file name, copy, print file content etc., here, system can circulate and carry out some order line; In the step 200, the user also can write test script voluntarily, and this script downloaded to test macro, this moment is in step 203, when calling relevant API described embedded file system being tested, can carry out integration test to file according to described script, as garbage reclamation, write balance etc., write the example of balance as above-mentioned test, check in the process that embedded file system is tested whether FAT and data field be intact, all can pass through if write in the balance each pacing examination, prove this embedded file system to write the balancing performance qualified.
From the foregoing description as can be known, test macro among the present invention is resolved the order of user's input earlier and is called the corresponding file management function according to analysis result again, and call relevant API by this document management function embedded file system is tested, described order, file management function and both corresponding relations are pre-defined by test macro, promptly as long as user input commands, test macro just can be tested embedded file system automatically, need not the user again at the different different test macros of embedded file system design, thus can be rapid, all sidedly embedded file system is tested; Further, among the present invention, the user can write the API storehouse that test macro provides by the API that embedded file system to be tested is relevant, and the embedded file system that can design the user rapidly and easily carries out full test, thereby shorten the construction cycle, reduce cost of development.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (13)

1, a kind of method of testing of embedded file system is characterized in that, the method comprising the steps of:
The application programming interface api function that the user is relevant with embedded file system to be tested calls in the API storehouse of being transplanted to test macro;
Described test macro receives the order that described embedded file system is tested of user's input, and described order is the order of predetermined format;
Described test macro is resolved described order, and calls described order corresponding file management function;
The API relevant with described embedded file system in the described API of the described file management function call storehouse tests described embedded file system;
Described embedded file system returns to described file management function by described API with test result, and described file management function returns to the user with this test result.
2, the method for claim 1 is characterized in that, described order is order line or batch processing script file.
3, method as claimed in claim 2 is characterized in that, described order line is made up of command string, one or more operand character string; Described batch processing script file is made up of a plurality of described order lines.
4, method as claimed in claim 3 is characterized in that, resolves described order line and directly calls the corresponding file management function; Perhaps, described batch processing script file is saved in buffer memory after, resolve described batch processing script file line by line and call the corresponding file management function.
5, the method for claim 1 is characterized in that, resolves described order by the querying command storehouse.
6, method as claimed in claim 5, it is characterized in that, store the order that embedded file system is tested and the corresponding relation of file management function in the described command library, resolve described order, obtain the sign of described order corresponding file management function according to this corresponding relation; And, call the corresponding file management function according to described sign.
As claim 5 or 6 described methods, it is characterized in that 7, the corresponding relation of described order that embedded file system is tested and file management function is pre-defined in described command library; Perhaps, add in described command library by the user.
8, the method for claim 1 is characterized in that, described file management function is pre-defined in the file management function library; Perhaps, add in described file management function library by the user.
9, a kind of command processing device is characterized in that, comprising:
Receiving element is used to receive the order that embedded file system is tested of user's input, and described order is the order of predetermined format;
Command library is used to store the order that embedded file system is tested and the corresponding relation of this order and file management function;
Resolution unit is used for resolving the order that embedded file system is tested of user's input by inquiring about described command library, obtains the sign of this order corresponding file management function;
Call unit is used for calling the corresponding file management function according to described sign.
10, a kind of document management apparatus is characterized in that, comprising:
Call unit is used for by the file management function call API relevant with embedded file system to be tested described embedded file system being tested;
Receiving element is used to receive the test result that described embedded file system returns by described API;
Transmitting element is used for test result is returned to the user.
11, a kind of test macro of embedded file system is characterized in that, comprising:
Operation-interface is used to receive the order that embedded file system is tested of user's input, and described order is the order of predetermined format; And, output test result to the user;
Command processing device is used to resolve described order, and calls described order corresponding file management function;
The API storehouse is used to store the relevant API of described embedded system;
Document management apparatus is used for the storehouse API relevant with described embedded file system by the described API of described file management function call, and described embedded file system is tested; And, receive the test result that described embedded file system returns by described API, and test result is returned to described operation-interface.
12, system as claimed in claim 11 is characterized in that, described command processing device comprises:
Receiving element is used to receive the order that embedded file system is tested of user's input, and described order is the order of predetermined format;
Command library is used to store the order that embedded file system is tested and the corresponding relation of this order and file management function;
Resolution unit is used for resolving the order that embedded file system is tested of user's input by inquiring about described command library, obtains the sign of this order corresponding file management function;
Call unit is used for calling the corresponding file management function according to described sign.
13, system as claimed in claim 11 is characterized in that, described document management apparatus comprises:
Call unit is used for by the file management function call API relevant with embedded file system to be tested described embedded file system being tested;
Receiving element is used to receive the test result that described embedded file system returns by described API;
Transmitting element is used for test result is returned to the user.
CNB2006101441257A 2006-11-28 2006-11-28 Method and system for testing embedded file system Expired - Fee Related CN100507871C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101441257A CN100507871C (en) 2006-11-28 2006-11-28 Method and system for testing embedded file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101441257A CN100507871C (en) 2006-11-28 2006-11-28 Method and system for testing embedded file system

Publications (2)

Publication Number Publication Date
CN1963782A CN1963782A (en) 2007-05-16
CN100507871C true CN100507871C (en) 2009-07-01

Family

ID=38082846

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101441257A Expired - Fee Related CN100507871C (en) 2006-11-28 2006-11-28 Method and system for testing embedded file system

Country Status (1)

Country Link
CN (1) CN100507871C (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247292B (en) * 2008-02-22 2011-08-10 中兴通讯股份有限公司 Test equipment and method based on universal test meter API
CN101950267B (en) * 2010-08-20 2011-11-30 深圳市共济科技有限公司 Monitoring device and control method and device thereof
CN102063326B (en) * 2010-12-31 2013-01-02 中国传媒大学 System for testing file system capacity based on virtualization and method thereof
CN102355515A (en) * 2011-10-13 2012-02-15 广东欧珀移动通信有限公司 Automatic test method of cell phone file operation
CN103034501B (en) * 2012-12-25 2016-08-03 广东威创视讯科技股份有限公司 The function calling method of a kind of linux platform and function call device
CN105354145B (en) * 2015-12-08 2019-09-06 浪潮电子信息产业股份有限公司 A kind of optimization method of file system POSIX uniformity test tool PJD-FSTEST
US10740303B2 (en) * 2017-03-28 2020-08-11 Oracle International Corporation Composite file system commands
CN109871312B (en) * 2017-12-05 2022-08-12 航天信息股份有限公司 Interface testing method, device, equipment and readable storage medium
CN108536431A (en) * 2018-04-04 2018-09-14 浙江小泰科技有限公司 A kind of global command's row creates front end project approach and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
API自动测试系统的设计. 林游.《中国优秀硕士学位论文全文数据库》电子期刊. 2005
API自动测试系统的设计. 林游.《中国优秀硕士学位论文全文数据库》电子期刊. 2005 *

Also Published As

Publication number Publication date
CN1963782A (en) 2007-05-16

Similar Documents

Publication Publication Date Title
CN100507871C (en) Method and system for testing embedded file system
KR101105177B1 (en) Data container for user interface content data
CN102779151B (en) The searching method of application program, Apparatus and system
US11016785B2 (en) Method and system for mirror image package preparation and application operation
US20110010700A1 (en) Virtualization of configuration settings
US20030093420A1 (en) Method and system for retrieving sharable information using a hierarchically dependent directory structure
CN108829378A (en) A kind of development approach of application software, device and electronic equipment
CN105808428A (en) Method for performing unified performance test on distributed file system
CN112817657B (en) Application program starting item loading method, device, system and storage medium
CN101951529A (en) Method and system for testing functions of set top box
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
US20130198333A1 (en) Method and device for recording and reproducing web operation
CN110389764A (en) Dead code method for cleaning, equipment, storage medium and device
KR20080039080A (en) Terminal having an interfacing function of the heterogeneity language compile library, api calling method and compile function generating method
CN101093477B (en) Data process method for electronic form, and data process system for electronic form
CN106648569A (en) Target serialization achieving method and device
CN101136780A (en) Method, system to obtain user command information, and user command registered device
KR20110117560A (en) System and method for providing automatically update
CN111552503B (en) Project file processing method and device, computer equipment and storage medium
CN108762765A (en) Development board program based on contiki systems compiles method for down loading
CN113656005A (en) Application component library construction method, application component configuration method and related device
CN110347454A (en) Application program theme setting method, terminal equipment control method and device, terminal device and computer readable storage medium
CN110941471A (en) Method and device for internationalizing basic data of software system
CN110046317A (en) Page info recording method, terminal and the storage medium of IOS application
CN109634690A (en) Data clearing method, device, terminal and storage medium based on WinPE system

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090701

Termination date: 20121128