CN109656821A - Test method and device - Google Patents
Test method and device Download PDFInfo
- Publication number
- CN109656821A CN109656821A CN201811512381.6A CN201811512381A CN109656821A CN 109656821 A CN109656821 A CN 109656821A CN 201811512381 A CN201811512381 A CN 201811512381A CN 109656821 A CN109656821 A CN 109656821A
- Authority
- CN
- China
- Prior art keywords
- font
- module
- test
- font information
- information
- 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
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/3684—Test management for test design, e.g. generating new test cases
-
- 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
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)
- Document Processing Apparatus (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a kind of test method and device, is related to software test field.This method comprises: carrying out taxonomic revision to the text of sample files according to font coding and font type, font test resource is obtained;Font test resource is read using module to be tested, obtains the first font information;First font information is compared with raw font information, obtains the first comparison result;Pre-set text is inserted into font test resource using module to be tested to edit to font test resource, and reads the second font information of pre-set text in the font test resource being inserted into after pre-set text;Second font information is compared with the first font information, obtains the second comparison result;Obtain treating the result of test module test according to the first comparison result and the second comparison result.The application can enrich font test resource, save the time of frequent progress manual iteration test, improve test job efficiency.
Description
Technical field
This application involves software test fields, in particular to a kind of test method and device.
Background technique
Currently, be usually iteration tests to the test of the software module of font matching, i.e., test is required to having surveyed every time
The software module of examination is tested repeatedly, can be related to the thousands of irregular characters of milli in the process.It is existing to pass through people
The mode that work is iterated test needs to expend a large amount of manpower and a large amount of time, can not realize within the limited time pair
The spreadability of software module is tested, and manual testing's error rate is higher, inaccurate test result will exploitation to module or
Maintenance causes adverse effect.
Summary of the invention
In view of this, the embodiment of the present application is designed to provide a kind of test method and device, to solve the above problems.
In a first aspect, the embodiment of the present application provides a kind of test method, which comprises
Taxonomic revision is carried out to the text of sample files according to font coding and font type, obtains font test resource,
It wherein, include raw font information in the font test resource;
The font test resource is read using module to be tested, obtains the first font information;
First font information is compared with the raw font information, obtains the first comparison result;
Be inserted into using module to be tested into the font test resource pre-set text with to the font test resource into
Edlin, and read in the font test resource being inserted into after pre-set text the second font information of the pre-set text;
Second font information is compared with first font information, obtains the second comparison result;
The result to the module testing to be tested is obtained according to first comparison result and the second comparison result.
Optionally, taxonomic revision is carried out to the text of sample files according to font coding and font type, obtains font survey
Try resource, comprising:
A subseries is carried out according to text of the font coding to the sample files, by the text of corresponding font coding
It is stored in corresponding primary documents;
Subseries again is carried out to the text in the primary documents according to the font type, by the text of corresponding font type
In the corresponding secondary documents of this deposit;
Optionally, the primary documents include primary documents mark, and the secondary documents include secondary documents mark,
First font information is compared with the raw font information, comprising:
Primary documents in first font information are identified and corresponding primary documents in the raw font information
Mark is compared;
Secondary documents in first font information are identified and corresponding secondary documents in the raw font information
Mark is compared.
Optionally, it is inserted into pre-set text into the font test resource using module to be tested to test the font
Resource is edited, comprising:
Pre-set text is inserted into the secondary documents of the font test resource using the module to be tested.
Optionally, second font information is compared with first font information, comprising:
Primary documents in second font information are identified and corresponding primary documents in first font information
It identifies into comparison;
Secondary documents in second font information are identified and corresponding secondary documents in first font information
Mark is compared.
Second aspect, the embodiment of the present application also provide a kind of test device, and described device includes:
Categorization module is obtained for carrying out taxonomic revision to the text of sample files according to font coding and font type
Font test resource, wherein include raw font information in the font test resource;
Calling module obtains the first font information for reading the font test resource using module to be tested;
Comparison module obtains the first ratio for first font information to be compared with the raw font information
To result;
The calling module is also used to be inserted into pre-set text into the font test resource using module to be tested with right
The font test resource is edited, and reads the pre-set text in the font test resource being inserted into after pre-set text
The second font information;
The comparison module is also used to for second font information being compared with first font information, obtains
Two comparison results;
The comparison module is also used to be obtained according to first comparison result and the second comparison result to described to be tested
The result of module testing.
Optionally, it for carrying out taxonomic revision to the text of sample files according to font coding and font type, obtains
When font test resource, the categorization module is specifically used for:
A subseries is carried out according to text of the font coding to the sample files, by the text of corresponding font coding
It is stored in corresponding primary documents;
Subseries again is carried out to the text in the primary documents according to the font type, by the text of corresponding font type
In the corresponding secondary documents of this deposit.
Optionally, the primary documents include primary documents mark, and the secondary documents include secondary documents mark,
For when first font information is compared with the raw font information, the comparison module to be specific
For:
Primary documents in first font information are identified and corresponding primary documents in the raw font information
Mark is compared;
Secondary documents in first font information are identified and corresponding secondary documents in the raw font information
Mark is compared.
Optionally, for being inserted into pre-set text into the font test resource to the word using module to be tested
When body test resource is edited, the calling module is specifically used for:
Pre-set text is inserted into the secondary documents of the font test resource using the module to be tested.
Optionally, when being used to for second font information being compared with first font information, the comparison
Module is specifically used for:
Primary documents in second font information are identified and corresponding primary documents in first font information
It identifies into comparison;
Secondary documents in second font information are identified and corresponding secondary documents in first font information
Mark is compared
In terms of existing technologies, the application has the advantages that
Test method provided by the embodiments of the present application and device, according to font coding and font type to the texts of sample files
This progress taxonomic revision, can iteration increase include different fonts document, realize to the conversion of sample files and to test
Font test resource is enriched in the expansion of font range.Test module is treated to the read functions of font test resource and editor's function
It can be tested respectively, obtain accurate integrative test as a result, saving the time of frequent progress manual iteration test, improve
Test job efficiency, so that test result be enable preferably to feed back the matter for guaranteeing tested module in Development of Module and maintenance
Amount.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore should not be viewed as to model
The restriction enclosed for those of ordinary skill in the art without creative efforts, can also be according to these
Attached drawing obtains other relevant attached drawings.
Fig. 1 is the structural block diagram of electronic equipment provided by the embodiments of the present application;
Fig. 2 is the flow diagram of test method provided by the embodiments of the present application;
Fig. 3 is the sub-step flow diagram of step S10 in Fig. 2;
Fig. 4 is the module diagram of test device provided by the embodiments of the present application.
Icon: 10- electronic equipment;20- test device;11- processor;12- memory;13- module to be tested;21- points
Generic module;22- calling module;23- contrast module.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.Therefore, below to the embodiments herein provided in the accompanying drawings
Detailed description be not intended to limit claimed scope of the present application, but be merely representative of the selected embodiment of the application.
Based on the embodiment in the application, obtained by those of ordinary skill in the art without making creative efforts all
Other embodiments shall fall in the protection scope of this application.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.
In order to overcome above-mentioned problems of the prior art, applicant provides what following example provided after study
Solution.
Incorporated by reference to referring to Fig.1, Fig. 1 is the structural block diagram of a kind of electronic equipment 10 provided by the embodiments of the present application, the electricity
Sub- equipment 10 includes processor 11, memory 12, module to be tested 13 and test device 20.The electronic equipment 10 can be a
People's computer (personal computer, PC), tablet computer, personal digital assistant (personal digital
Assistant, PDA) etc., the operating system (operating system, OS) of the electronic equipment 10 can be, but unlimited
In, Android (Android) system, IOS (iPhone operating system) system, Windows phone system,
Windows system etc..
The processor 11 and each element of memory 12 are directly or indirectly electrically connected between each other, to realize data
Transmission or interaction.It is electrically connected for example, these elements can be realized between each other by one or more communication bus or signal wire.
The module to be tested 13 and test device 20 include that at least one can be stored in the memory in the form of software or firmware
In 12 or the software function module that is solidificated in the operating system of the electronic equipment 10.The processor 11 is described for executing
The executable module stored in memory 12, including software function mould included by the module 13 to be tested and test device 20
Block and computer program etc..
Wherein, the processor 11 can be general processor, including central processing unit (Central Processing
Unit, CPU), network processing unit (Network Processor, NP) etc.;Can also be digital signal processor (DSP)), specially
With integrated circuit (ASIC), ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or crystal
Pipe logical device, discrete hardware components.It may be implemented or execute the disclosed each method in the embodiment of the present application, step and patrol
Collect block diagram.General processor can be microprocessor or the processor is also possible to any conventional processor etc..
The memory 12 may be, but not limited to, random access memory (Random Access Memory, RAM),
Read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only
Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM),
Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..
The memory 12 is for storing program or data.
It is understood that electronic equipment 10 provided by the embodiments of the present application can also include input-output unit and display
Unit (does not mark) in Fig. 1.The input-output unit includes but is not limited to keyboard and mouse etc., for being supplied to user's input
Data are to realize the interaction of user Yu the electronic equipment 10.The display unit includes but is not limited to liquid crystal display, touch-control
Formula display etc., for providing the interactive interface for being used for display information between the electronic equipment 10 and user.
Referring to figure 2., Fig. 2 is a kind of flow diagram of test method provided by the embodiments of the present application, the test side
Method is applied to electronic equipment 10 shown in FIG. 1.The detailed process of the test method will be described in detail below.
Step S10 carries out taxonomic revision to the text of sample files according to font coding and font type, obtains font survey
Try resource.
It in the present embodiment, may include any text, including but not limited to Chinese character, English words in the sample files
Symbol, Japanese character etc..Character in text can be different fonts coding (such as GBK, UTF-16, BIG5, GB2312,
GB18030, Unicode etc.) under different fonts type.The font type includes font information (as upright Yao's body, Chinese are color
Cloud, Chinese-language imitation Song-Dynasty-style typeface, the Song typeface, Meiryo, MSGothic, Batang, AdobeSongStd-Light etc.), it also include such as text
The other informations such as character boundary, color, overstriking, italic.In existing test process, since the sample files needed for testing include
Huge volumes of content is taken a substantial amount of time by tester's manual identified font coding and font type needs, and treatment effeciency is extremely low.
In the present embodiment, by carrying out taxonomic revision automatically to sample files, by the sample files according to font coding and font
It is font test resource that classification of type, which arranges, improves treatment effeciency, in order to follow-up test use.
Referring to figure 3., specifically, above-mentioned steps S10 includes following sub-step.
Sub-step S11 carries out a subseries according to text of the font coding to the sample files, by corresponding font
The text of coding is stored in corresponding primary documents.
Firstly, the character that font same in the sample files encodes is divided into one kind.As a kind of optional embodiment party
Formula can arrange the sample files as font document, which includes multiple primary documents, and the primary documents can be with
It is file.Each primary documents are corresponded to a kind of font coding and are encoded with font and named, and the text of same font coding is deposited
It is stored in corresponding primary documents.
In the present embodiment, as an alternative embodiment, the coding range that can also be encoded according to the font
The sample files are carried out with more careful classification.For example, different coding ranges is corresponding different in Unicode coding
Character (e.g., coding range 0600-06FF corresponds to Arabic, and coding range 0980-09FF corresponds to Bengali etc.), to institute
When stating sample files and being classified, the character of font coding range same in the sample files is divided into one kind and is stored in correspondence
Primary documents, the primary documents encoded with corresponding font and coding range name.
Sub-step S12 carries out subseries again to the text in the primary documents according to the font type, by corresponding word
The text of body type is stored in corresponding secondary documents.
Secondly, by being divided again with the character document stored in the primary documents of font coding name according to font type
Class.It may include multiple secondary documents in the primary documents, each secondary documents correspond to a kind of font type and with font name
Name, the text of same font type are stored in corresponding secondary documents.
It should be noted that the testing time is saved to simplify test process, according only to institute in font type in the present embodiment
The font information for including carries out the classification of secondary documents, also only includes text in the subsequent font type that will be described of the present embodiment
Font information.In the other embodiments of the application, can also according to include in the font type any one or it is more
Kind information carries out the classification of secondary documents.
The font document obtained after sub-step S11- sub-step S12 processing is font test resource.It is understood that
It is, if subsequent need to introduce other sample files, need to only above-mentioned steps S10 to be executed to the sample files newly introduced, by same word
The text of body coding or same font type is stored to the corresponding position in above-mentioned font document, without to whole sample files
It re-execute the steps S10.This step can iteration increase include different fonts document, realize to the conversions of sample files and
Font test resource is enriched in expansion to test font range.
As an alternative embodiment, csv file can be used, (Comma-Separated Values, comma separate
Value file) the raw font information in the font test resource is stored.Wherein, the raw font information includes institute
The primary documents mark of primary documents and the secondary documents mark of the secondary documents are stated, the primary documents mark can be institute
The document name of primary documents, i.e., the title of the described font coding are stated, the secondary documents mark can be the secondary documents
The title (in the present embodiment, can be the title of font) of document name and the font type.
S20 is entered step after obtaining the font test resource turning back in conjunction with Fig. 2.
Step S20 reads the font test resource using module 13 to be tested, obtains the first font information.
In the present embodiment, the module 13 to be tested is called to be read out the font test resource, to test
The read functions of module 13 to be tested are stated, optionally, the module 13 to be tested is font matching module.Reading process are as follows: first
First, it is identified using the primary documents that the module 13 to be tested reads the font test resource;Then, using described to be tested
Module 13 reads the secondary documents mark of the font test resource.Primary documents mark that the module to be tested 13 is read and
Secondary documents mark is the first font information.
First font information is compared with the raw font information, obtains the first comparison knot by step S30
Fruit.
It in the present embodiment, can also be by the csv file as an alternative embodiment, before executing comparison
The font information of middle storage is converted to Excel file, combs to the font information in the Excel file, removes font
Unnecessary space or identifier etc. in encoding name and font type title make the font encoding name and font type name
Title more standardizes, and keeps comparison result more acurrate.
In the present embodiment, it before first font information is compared with the raw font information, can incite somebody to action
First font information is also stored into the csv file, and is executed and above-mentioned converted Excel file for the csv file
The step of row information of going forward side by side combs.When comparing, by the first font information and raw font letter in the Excel file
Breath is compared.Specific comparison process is as follows:
Firstly, the primary documents in first font information are identified and corresponding level-one in the raw font information
Document identification is compared;
Then, the secondary documents in first font information are identified and corresponding second level in the raw font information
Document identification is compared.
If the primary documents in first font information identify and corresponding primary documents in the raw font information
Mark is consistent, then the reading result that the module to be tested 13 encodes font is correct.If in first font information
Secondary documents mark is consistent with secondary documents corresponding in raw font information mark, then 13 pairs of institutes of the module to be tested
It is correct for stating the reading result of font type.
After the result of first font information and the raw font information comparison is saved as the first comparison result, into
Enter step S40.
Step S40 is inserted into pre-set text using module 13 to be tested to the font into the font test resource
Test resource is edited, and the second word of the pre-set text is read in the font test resource being inserted into after pre-set text
Body information.
In the present embodiment, pre-set text is inserted into the font test resource using module 13 to be tested to described
Font test resource is edited, and the second font information of the pre-set text is read, to test the module to be tested 13
Font editting function.Specifically, it is inserted into using the module 13 to be tested into the secondary documents of the font test resource pre-
If text, wherein the pre-set text can be the character field won at random from any text library.The pre-set text is only wrapped
Containing character information (e.g., Chinese character, English character, Arabic character, Greek character etc.), and font information is not included (such as
Font, size, color etc.).The module to be tested 13 is when being inserted into the preset characters into the secondary documents, according to tool
Primary documents corresponding to the secondary documents and the secondary documents of body insertion convert corresponding font for the pre-set text and encode
And the character of font type.For example, being inserted into one section of pre-set text, the corresponding level-one of the secondary documents into secondary documents " Song typeface "
Document is " GBK ", if this section of pre-set text is Chinese character, the module 13 to be tested converts this section of pre-set text to
" GBK ", " Song typeface " character.If this section of pre-set text is English character, the module 13 to be tested is according to preset rules to the section
Pre-set text is converted, such as converts " TimesNewRoman " character for this section of pre-set text.
After editing the font test resource, also need be inserted into pre-set text using the module 13 to be tested
The second font information of the pre-set text is read in font test resource afterwards.Reading process is similar with above-mentioned steps S20, can
To refer to above description.After reading, the second font information of the pre-set text is obtained, wherein the second font information packet
The primary documents mark for including the primary documents that the pre-set text is inserted into and the font type after pre-set text conversion
Corresponding secondary documents mark.
After obtaining second font information, it is transferred to step S50.
Second font information is compared with first font information, obtains the second comparison knot by step S50
Fruit.
In the present embodiment, optionally, it is being compared with first font information in second font information
Before, second font information can be also stored into the csv file, and execute and above-mentioned convert the csv file to
Excel file go forward side by side row information combing the step of.Compare when, by the Excel file the second font information with it is described
First font information is compared.Specific comparison process is as follows:
Firstly, the primary documents in second font information are identified and corresponding level-one in first font information
Document identification is into comparison;
Then, the secondary documents in second font information are identified and corresponding second level in first font information
Document identification is compared.
If the primary documents in second font information identify and corresponding primary documents in first font information
Mark is consistent, and the secondary documents in second font information identify and corresponding secondary documents in first font information
Mark is consistent, then the module to be tested 13 is correct to the edited result of the font test resource.
In the present embodiment, if the content of the pre-set text of insertion with the content of text of secondary documents that is inserted into not
With (for example, the content of text for the secondary documents being inserted into is Chinese character, and the content of text of the pre-set text is English words
Symbol), after the module 13 to be tested converts the pre-set text according to preset rules, the font class of the pre-set text
Type may be different from the font type for the secondary documents being inserted into.Secondary documents mark and institute in i.e. described second font information
Stating corresponding secondary documents mark in the first font information may be identified as inconsistent, then needs the incorrect reading in this part
Take modified result be it is correct, with exclusive PCR, keep test result more accurate.Correcting mode can be automatic according to preset rules
Amendment can also carry out manual correction according to the result of output by tester, be not particularly limited herein.
After the result that second font information and first font information compare is saved as the second comparison result, into
Enter step S60.
Step S60 obtains treating the knot of the test of test module 13 according to first comparison result and the second comparison result
Fruit.
In the present embodiment, after obtaining the result tested the module 13 to be tested, the result can also be carried out
Output, enables tester intuitively to check test result.As an alternative embodiment, according to described to be tested
It is that module 13 is tested to read incorrect, incorrect to font type reading to font coding or compile as a result, filtering out
Volume incorrect content (including read incorrect primary documents and its all second-order document for being included, read it is incorrect
Secondary documents, the incorrect secondary documents of editor), the content is arranged and generation error content document exports.As
Another optional embodiment can also carry out the reading result of all second-order document under the same primary documents whole
It closes, is counted using PivotTables to result is read in Excel file, accuracy is read in output.
Referring to figure 4., Fig. 4 is the functional block diagram of test device 20 shown in Fig. 1 in the embodiment of the present application.It can manage
Solution, the concrete function of each functional module of the test device 20 have elaborated in above method step embodiment
It crosses, only briefly introduces below to the functional module of the test device 20.
Categorization module 21 is obtained for carrying out taxonomic revision to the text of sample files according to font coding and font type
To font test resource, wherein include raw font information in the font test resource.
Calling module 22 obtains the first font information for reading the font test resource using module 13 to be tested.
Comparison module 23 obtains first for first font information to be compared with the raw font information
Comparison result.
The calling module 22 is also used to be inserted into pre-set text into the font test resource using module 13 to be tested
To edit to the font test resource, and described preset is read in the font test resource being inserted into after pre-set text
Second font information of text.
The comparison module 23 is also used to for second font information being compared with first font information, obtains
Second comparison result.
The comparison module 23 is also used to be obtained according to first comparison result and the second comparison result to described to be measured
The result that die trial block 13 is tested.
In conclusion test method provided by the embodiments of the present application and device, according to font coding and font type to sample
The text of this document carries out taxonomic revision, can iteration increase include different fonts document, realize the conversion to sample files
And the expansion to test font range, enrich font test resource.Test module is treated to the reading function of font test resource
Energy and editting function are tested respectively, obtain accurate integrative test as a result, saving frequent progress manual iteration test
Time, improve test job efficiency, so that test result be enable preferably to feed back in Development of Module and maintenance, guarantee tested
The quality of die trial block.
In embodiment provided herein, it should be understood that, disclosed device and method can also be by other
Mode realize.Device and method embodiment described above is only schematical, for example, flow chart and frame in attached drawing
Figure shows the system frame in the cards of the device of multiple embodiments according to the application, method and computer program product
Structure, function and operation.In this regard, each box in flowchart or block diagram can represent a module, section or code
A part, a part of the module, section or code includes one or more for implementing the specified logical function
Executable instruction.It should also be noted that function marked in the box can also be with not in some implementations as replacement
It is same as the sequence marked in attached drawing generation.For example, two continuous boxes can actually be basically executed in parallel, they have
When can also execute in the opposite order, this depends on the function involved.It is also noted that in block diagram and or flow chart
Each box and the box in block diagram and or flow chart combination, can function or movement as defined in executing it is dedicated
Hardware based system realize, or can realize using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
If the function of above method step realized in the form of software function module and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the technical solution sheet of the application
The part of the part that contributes to existing technology or the technical solution can body in the form of software products in other words in matter
Reveal and, which is stored in a storage medium, including some instructions are to so that a computer
Equipment (can be personal computer, electronic equipment or network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or equipment for including a series of elements not only includes those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or equipment institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including institute
State in the process, method, article or equipment of element that there is also other identical elements.In addition, term " first ", " second " etc.
It is only used for distinguishing description, is not understood to indicate or imply the relative importance of referred to content.
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this field
For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair
Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.
Claims (10)
1. a kind of test method, which is characterized in that the described method includes:
Taxonomic revision is carried out to the text of sample files according to font coding and font type, obtains font test resource, wherein
It include raw font information in the font test resource;
The font test resource is read using module to be tested, obtains the first font information;
First font information is compared with the raw font information, obtains the first comparison result;
Pre-set text is inserted into the font test resource using module to be tested to compile to the font test resource
It collects, and reads the second font information of the pre-set text in the font test resource being inserted into after pre-set text;
Second font information is compared with first font information, obtains the second comparison result;
The result to the module testing to be tested is obtained according to first comparison result and the second comparison result.
2. test method as described in claim 1, which is characterized in that according to font coding and font type to sample files
Text carries out taxonomic revision, obtains font test resource, comprising:
A subseries is carried out according to text of the font coding to the sample files, the text of corresponding font coding is stored in
In corresponding primary documents;
Subseries again is carried out to the text in the primary documents according to the font type, the text of corresponding font type is deposited
Enter in corresponding secondary documents.
3. test method as claimed in claim 2, which is characterized in that the primary documents include primary documents mark, described
Secondary documents include secondary documents mark,
First font information is compared with the raw font information, comprising:
Primary documents mark in first font information is identified with primary documents corresponding in the raw font information
It is compared;
Secondary documents mark in first font information is identified with secondary documents corresponding in the raw font information
It is compared.
4. test method as claimed in claim 3, which is characterized in that using module to be tested into the font test resource
Pre-set text is inserted into edit to the font test resource, comprising:
Pre-set text is inserted into the secondary documents of the font test resource using the module to be tested.
5. test method as claimed in claim 4, which is characterized in that believe second font information and first font
Breath is compared, comprising:
Primary documents mark in second font information is identified with primary documents corresponding in first font information
Into comparison;
Secondary documents mark in second font information is identified with secondary documents corresponding in first font information
It is compared.
6. a kind of test device, which is characterized in that described device includes:
Categorization module obtains font for carrying out taxonomic revision to the text of sample files according to font coding and font type
Test resource, wherein include raw font information in the font test resource;
Calling module obtains the first font information for reading the font test resource using module to be tested;
Comparison module obtains the first comparison knot for first font information to be compared with the raw font information
Fruit;
The calling module is also used to be inserted into pre-set text into the font test resource to described using module to be tested
Font test resource is edited, and the of the pre-set text is read in the font test resource being inserted into after pre-set text
Two font informations;
The comparison module is also used to for second font information being compared with first font information, obtains the second ratio
To result;
The comparison module is also used to be obtained according to first comparison result and the second comparison result to the module to be tested
The result of test.
7. test device as claimed in claim 6, which is characterized in that be used for according to font coding and font type to sample
The text of document carries out taxonomic revision, and when obtaining font test resource, the categorization module is specifically used for:
A subseries is carried out according to text of the font coding to the sample files, the text of corresponding font coding is stored in
In corresponding primary documents;
Subseries again is carried out to the text in the primary documents according to the font type, the text of corresponding font type is deposited
Enter in corresponding secondary documents.
8. test device as claimed in claim 7, which is characterized in that the primary documents include primary documents mark, described
Secondary documents include secondary documents mark,
For when first font information is compared with the raw font information, the comparison module specifically to be used
In:
Primary documents mark in first font information is identified with primary documents corresponding in the raw font information
It is compared;
Secondary documents mark in first font information is identified with secondary documents corresponding in the raw font information
It is compared.
9. test device as claimed in claim 8, which is characterized in that for being tested using module to be tested to the font
When being inserted into pre-set text in resource to edit to the font test resource, the calling module is specifically used for:
Pre-set text is inserted into the secondary documents of the font test resource using the module to be tested.
10. test device as claimed in claim 9, which is characterized in that for will second font information and described the
When one font information is compared, the comparison module is specifically used for:
Primary documents mark in second font information is identified with primary documents corresponding in first font information
Into comparison;
Secondary documents mark in second font information is identified with secondary documents corresponding in first font information
It is compared.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811512381.6A CN109656821B (en) | 2018-12-11 | 2018-12-11 | Test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811512381.6A CN109656821B (en) | 2018-12-11 | 2018-12-11 | Test method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109656821A true CN109656821A (en) | 2019-04-19 |
CN109656821B CN109656821B (en) | 2022-06-07 |
Family
ID=66114097
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811512381.6A Active CN109656821B (en) | 2018-12-11 | 2018-12-11 | Test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109656821B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113361239A (en) * | 2021-06-01 | 2021-09-07 | 北京百度网讯科技有限公司 | Document testing method and device, electronic device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102289407A (en) * | 2011-09-06 | 2011-12-21 | 北京信息科技大学 | Method for automatically testing document format conversion and device thereof |
CN103136166A (en) * | 2011-12-01 | 2013-06-05 | 北大方正集团有限公司 | Method and device for font determination |
CN103365894A (en) * | 2012-03-29 | 2013-10-23 | 天津书生软件技术有限公司 | Font format conversion method and device |
US9148494B1 (en) * | 2014-07-15 | 2015-09-29 | Workiva Inc. | Font loading system and method in a client-server architecture |
CN105512096A (en) * | 2015-11-30 | 2016-04-20 | 北京大学 | Optimization method and device based on file embedded font |
-
2018
- 2018-12-11 CN CN201811512381.6A patent/CN109656821B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102289407A (en) * | 2011-09-06 | 2011-12-21 | 北京信息科技大学 | Method for automatically testing document format conversion and device thereof |
CN103136166A (en) * | 2011-12-01 | 2013-06-05 | 北大方正集团有限公司 | Method and device for font determination |
CN103365894A (en) * | 2012-03-29 | 2013-10-23 | 天津书生软件技术有限公司 | Font format conversion method and device |
US9148494B1 (en) * | 2014-07-15 | 2015-09-29 | Workiva Inc. | Font loading system and method in a client-server architecture |
CN105512096A (en) * | 2015-11-30 | 2016-04-20 | 北京大学 | Optimization method and device based on file embedded font |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113361239A (en) * | 2021-06-01 | 2021-09-07 | 北京百度网讯科技有限公司 | Document testing method and device, electronic device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109656821B (en) | 2022-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11475209B2 (en) | Device, system, and method for extracting named entities from sectioned documents | |
US10460162B2 (en) | Method, device, and system, for identifying data elements in data structures | |
CN110738037B (en) | Method, apparatus, device and storage medium for automatically generating electronic form | |
CN105653517A (en) | Recognition rate determining method and apparatus | |
CN109408113A (en) | A kind of code text processing method, system and terminal device | |
CN110968996A (en) | Document making method, device, equipment and storage medium | |
CN109683881B (en) | Code format adjusting method and device | |
CN112632943A (en) | Intelligent bid evaluation method and system, storage medium and electronic device | |
CN107329765A (en) | Program file processing method and processing device | |
CN108804472A (en) | A kind of webpage content extraction method, device and server | |
CN110688315A (en) | Interface code detection report generation method, electronic device, and storage medium | |
CN115562656A (en) | Page generation method and device, storage medium and computer equipment | |
VAYADANDE | Simulating Derivations of Context-Free Grammar | |
CN109656821A (en) | Test method and device | |
CN113190680A (en) | Unstructured data marking method, device, equipment and storage medium | |
CN116301795B (en) | Development platform for page visual configuration and code writing | |
CN116360794A (en) | Database language analysis method, device, computer equipment and storage medium | |
CN103019924A (en) | Input method intelligence evaluation system and input method intelligence evaluation method | |
CN115482075A (en) | Financial data anomaly analysis method and device, electronic equipment and storage medium | |
CN115454423A (en) | Static webpage generation method and device, electronic equipment and storage medium | |
CN107943872A (en) | Graphical document generating method and system | |
CN109033467B (en) | Compression method, device, medium and electronic equipment for multi-option form | |
CN113449509A (en) | Text analysis method and device and computer equipment | |
CN111368387B (en) | Electric power system simulation data textualization method | |
Kaur | Comparative analysis of line of code metric tools |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |