CN109726110B - Document testing method, device, apparatus and computer readable storage medium - Google Patents

Document testing method, device, apparatus and computer readable storage medium Download PDF

Info

Publication number
CN109726110B
CN109726110B CN201810939962.1A CN201810939962A CN109726110B CN 109726110 B CN109726110 B CN 109726110B CN 201810939962 A CN201810939962 A CN 201810939962A CN 109726110 B CN109726110 B CN 109726110B
Authority
CN
China
Prior art keywords
document
display information
test
information
test case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810939962.1A
Other languages
Chinese (zh)
Other versions
CN109726110A (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.)
Shenzhen Lian Intellectual Property Service Center
Original Assignee
Shenzhen Lian Intellectual Property Service Center
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 Shenzhen Lian Intellectual Property Service Center filed Critical Shenzhen Lian Intellectual Property Service Center
Priority to CN201810939962.1A priority Critical patent/CN109726110B/en
Publication of CN109726110A publication Critical patent/CN109726110A/en
Application granted granted Critical
Publication of CN109726110B publication Critical patent/CN109726110B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a document testing method, which comprises the following steps: acquiring a document test case; analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information; comparing the first display information with the second display information according to a first preset rule; and writing the comparison result of the first display information and the second display information into a test report. The invention also discloses a document testing device, a document testing device and a computer readable storage medium. The invention improves the reliability and the test efficiency of the document test.

Description

Document testing method, device, apparatus and computer readable storage medium
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a document testing method, device, apparatus, and computer readable storage medium.
Background
In the document system, in order to ensure that the document content displayed to the user and the document content set in the system are completely identical, it is necessary to test the document to verify the document content. At present, verification of document contents is realized through manual comparison. However, as the complexity of service types increases and the traffic increases, documents to be verified are more and more complex. Because of limited manual resources, the verification of the typical document can only be supported generally, and the accuracy of manual verification is low, so that the reliability of document test is reduced, and in addition, the test efficiency of manual verification is also low.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a document testing method which aims to solve the technical problems of low reliability and low testing efficiency through manual verification so as to improve the reliability and the testing efficiency of document testing.
In order to achieve the above purpose, the present invention provides a document testing method, comprising the steps of:
acquiring a document test case;
analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information;
comparing the first display information with the second display information according to a first preset rule;
and writing the comparison result of the first display information and the second display information into a test report.
Preferably, the first display information comprises a first parameter name list, a first URL and a document template stored in a sub-target position, and the second display information comprises a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page;
The step of comparing the first display information with the second display information according to a first preset rule comprises the following steps:
comparing the first parameter name list with the second parameter name list;
when the first parameter name list and the second parameter name list are not matched, judging that the first display information and the second display information are not matched;
when the first parameter name list and the second parameter name list are consistent, comparing the first URL with the second URL;
when the first URL and the second URL are not matched, judging that the first display information and the second display information are not matched;
when the first URL and the second URL are consistent, filling the document template according to the second parameter name list and a second parameter value corresponding to a second parameter name to obtain a document file;
comparing the document file with the document page;
when the document file and the document page are inconsistent, judging that the first display information and the second display information are inconsistent;
and when the document file and the document page are consistent, judging that the first display information and the second display information are consistent.
Preferably, the step of analyzing the document test case to obtain test case data of the document test case from a first target location and obtaining document scene data of the document test case from a second target location includes:
Acquiring a document version number and a document template number from a test case library according to the document test case;
according to the document version number, a first parameter name list and a first URL of the document test case are obtained;
acquiring the document template from a sub-target position according to the document template number;
and acquiring a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page from a product database according to the document test case.
Preferably, the document scene data further comprises first interaction information and document identification information;
after the step of comparing the first display information and the second display information according to the first preset rule, the document testing method further includes the steps of:
when the first display information and the second display information are consistent, acquiring the document image data of the document test case from a third target position according to the document identification information, wherein the document image data comprises second interaction information;
comparing the first interaction information with the second interaction information according to a second preset rule;
and writing the comparison result of the first interaction information and the second interaction information into the test report.
Preferably, the document image data further comprises document text;
after the step of obtaining the document image data of the document test case from the third target position according to the document identification information, the method further comprises the following steps:
comparing the document text with the first display information according to a third preset rule or comparing the document text with the second display information according to a fourth preset rule;
and writing the comparison result of the document text and the first display information or the comparison result of the document text and the second display information into the test report.
Preferably, the first interaction information includes first signature information, and the second interaction information includes second signature information; or alternatively, the first and second heat exchangers may be,
the first interaction information includes first biometric information and the second interaction information includes second biometric information.
Preferably, after the step of writing the comparison result of the first presentation information and the second presentation information into a test report, the document test method further includes the steps of:
acquiring a first test coverage rate of all the document test cases in the first target position and a second test coverage rate of all the document test cases in the second target position;
Comparing the first test coverage rate with a first preset coverage rate, and the second test coverage rate with a second preset coverage rate;
when the first test coverage rate is greater than or equal to the first preset coverage rate and the second test coverage rate is greater than or equal to the second preset coverage rate, writing the first test coverage rate and the second test coverage rate into the test report;
and generating a prompt signal when the first test coverage rate is smaller than the first preset coverage rate or the second test coverage rate is smaller than the second preset coverage rate.
In order to achieve the above object, the present invention also proposes a document testing apparatus including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, performing the steps of a document testing method comprising the steps of: acquiring a document test case; analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information; comparing the first display information with the second display information according to a first preset rule; and writing the comparison result of the first display information and the second display information into a test report.
In order to achieve the above purpose, the invention also provides a document testing device, which comprises an acquisition module, an analysis module, a comparison module and a reporting module, wherein the acquisition module is used for acquiring a document test case; the analysis module is used for analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information; the comparison module is used for comparing the first display information with the second display information according to a first preset rule; the report module is used for writing the comparison result of the first display information and the second display information into a test report.
In order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a document test program which, when executed by a processor, implements the steps of a document test method, the document test method comprising the steps of: acquiring a document test case; analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information; comparing the first display information with the second display information according to a first preset rule; and writing the comparison result of the first display information and the second display information into a test report.
In the technical scheme of the invention, the document testing method comprises the following steps: acquiring a document test case; analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information; comparing the first display information with the second display information according to a first preset rule; and writing the comparison result of the first display information and the second display information into a test report. The test case data obtained from the first target position and the document scene data obtained from the second target position correspond to the document content arranged in the system and the document content displayed by the system respectively, whether the document content arranged in the system and the document content displayed by the system are consistent or not is verified by comparing the first display information included in the test case data and the second display information included in the document scene data, and a test report is generated so that a tester can maintain the document according to the result of the test report. In the scheme, the automatic test of the documents is realized without verifying the content of the documents in a manual comparison mode, the great improvement of the test coverage rate can be easily realized, and the test accuracy is high, so that the reliability of the test is improved; and the automatic test has a quick test rate, so that the test efficiency of documents is improved.
Drawings
FIG. 1 is a flow chart of a first embodiment of a document testing method of the present invention;
FIG. 2 is a detailed flowchart of step S300 in a second embodiment of the document testing method of the present invention;
FIG. 3 is a detailed flowchart of step S200 in a third embodiment of the document testing method of the present invention;
FIG. 4 is a flowchart of a fourth embodiment of the document testing method of the present invention;
FIG. 5 is a flowchart of a document testing method according to a fifth embodiment of the present invention;
FIG. 6 is a flowchart of an eighth embodiment of a document testing method according to the present invention;
FIG. 7 is a schematic structural diagram of a document testing device of a hardware running environment according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The main solutions of the embodiments of the present invention are: and analyzing the document test case to obtain first display information corresponding to the document content arranged in the system and second display information corresponding to the document content displayed by the system, and comparing the first display information with the second display information to realize automatic test of the document.
Because the prior art mainly relies on manual verification of document content, the test reliability is poor, and the test efficiency is low.
The invention provides a solution, which obtains the first display information corresponding to the document content arranged in the system and the second display information corresponding to the document content displayed by the system by analyzing the document test case, and realizes the automatic test of the document by comparing the first display information and the second display information, thereby being beneficial to improving the coverage rate and the accuracy rate of the document test and improving the test reliability and the test efficiency.
The first embodiment of the present invention provides a document testing method, as shown in fig. 1, including the following steps:
step S100, acquiring a document test case;
documents refer to content that needs to be displayed to the user during system operation to inform the user of related matters or to wait for confirmation by the user, and specifically include privacy terms, product descriptions, responsibility notices, service agreements, and the like. In order to ensure that the document content displayed to the user is consistent with the document content built in the system, the document needs to be tested. The document test cases are used in document testing, and may be from a test case library or other corresponding locations. Documents may include presentation information and interaction information, among other things. The display information is only for the user to view, and does not relate to the modification operation of the user, the modified storage operation and the like. The presentation information may further include fixed information and parameter information, where the fixed information is information consistent in all the same kind of documents, such as specific privacy terms, etc., and the parameter information is information that varies according to factors such as users, such as user names, etc. The interactive information refers to information generated in the process of interaction between the user and the system, so as to receive feedback results of the user, and generally comprises user confirmation information and the like. The interaction information generally relates to a modification operation of the user, a modified save operation, and the like. According to the content included in the document, the document can be divided into a display document including only display information and no interactive information, and an image document including both display information and interactive information.
Step 200, analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information;
the document test case comprises the related information of the document, only the identification information or the pointing information of the document can be given in order to reduce the occupation of resources, then the identification information or the pointing information of the document is obtained by analyzing the document test case, and other information of the document is obtained at the corresponding target position according to the identification information or the pointing information. Specifically, test case data of the document test case is obtained from a first target position, and document scene data of the document test case is obtained from a second target position. The first target position can be a test case library, and the test case data comprises first display information corresponding to document content arranged in the system; the second target location may be a product database, and the document scene data includes second presentation information corresponding to document content displayed by the system. The test case data in the first target location may be manually entered by a tester or automatically entered by an entry program at a stage prior to automatic testing of the documents; while the document scene data in the second target location may be saved prior to automatic testing of the document.
Step S300, comparing the first display information with the second display information according to a first preset rule;
and checking the display information of the document by comparing the first display information with the second display information. In order to facilitate comparison, corresponding items in the first display information and the second display information can be split and compared one by one. Meanwhile, in the case of limited test resources, the items may be compared in a certain order, for example, in order of first-time and last-time. Thus, when the previous item does not match, the first display information and the second display information are determined to be not matching, and comparison of all items is not required, which will be described in detail later.
Step S400, writing the comparison result of the first display information and the second display information into a test report.
And writing the comparison result of the first display information and the second display information into a test report so that a tester can maintain the document according to the test report. Specifically, the comparison results of the entries can be written into the test report completely so as to reflect the test results comprehensively and facilitate the testers to find the root cause of the problem. Or when the first display information and the second display information completely coincide, writing the total result in the test report; when the first display information and the second display information are inconsistent, specific items and total results of the inconsistencies are written into the test report so as to balance the size of the test report and the convenience of the tester for finding problems. Of course, in order to further reduce the size of the test report, only the total result of the test may be written, and the problematic documents may be further tested and maintained by the tester. The system can output the test report according to the output instruction given by the tester, wherein the output instruction can comprise the specific content, the output format and the like of the test report required to be output, so that the display effect of the test report is optimized, and the checking efficiency of the tester is improved.
In this embodiment, the document testing method includes the steps of: acquiring a document test case; analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information; comparing the first display information with the second display information according to a first preset rule; and writing the comparison result of the first display information and the second display information into a test report. The test case data obtained from the first target position and the document scene data obtained from the second target position correspond to the document content arranged in the system and the document content displayed by the system respectively, whether the document content arranged in the system and the document content displayed by the system are consistent or not is verified by comparing the first display information included in the test case data and the second display information included in the document scene data, and a test report is generated so that a tester can maintain the document. In the scheme, the automatic test of the documents is realized without verifying the content of the documents in a manual comparison mode, the great improvement of the test coverage rate can be easily realized, and the test accuracy is high, so that the reliability of the test is improved; and the automatic test has a quick test rate, so that the test efficiency of documents is improved.
Based on the first embodiment, in a second embodiment of the present invention, the first presentation information includes a first parameter name list, a first URL (Uniform Resource Locator, URL), a document template stored in the sub-target location, and the second presentation information includes a second parameter name list, a second parameter value corresponding to the second parameter name, the second URL, and a document page;
as shown in fig. 2, step S300 includes:
step S310, comparing the first parameter name list with the second parameter name list;
step S321, when the first parameter name list and the second parameter name list are not matched, judging that the first display information and the second display information are not matched;
step S322, when the first parameter name list and the second parameter name list are consistent, comparing the first URL and the second URL;
step S331, when the first URL and the second URL are not matched, judging that the first display information and the second display information are not matched;
step S332, when the first URL and the second URL are consistent, filling the document template according to the second parameter name list and the second parameter value corresponding to the second parameter name to obtain a document file;
step S340, comparing the document file with the document page;
step S351, when the document file and the document page are inconsistent, judging that the first display information and the second display information are inconsistent;
And step S352, when the document file and the document page are consistent, judging that the first display information and the second display information are consistent.
The parameter list lists names of all the related parameters in the documents, such as a user number uniquely corresponding to the user identity, a document number corresponding to the document one by one, a document version number used for identifying document version information, a document parameter name and a document parameter value (including a document parameter name such as a name and a bank card number displayed on the document, and specific document parameter values such as Li San and 123456789), a number of a user signature image stored in the image platform, that is, a signature picture number of the image platform, a user signature picture displayed at the front end of the system, that is, a signature picture, seal positioning information used in a document synthesizing process, a bar code used for identifying the document, a document template number used for identifying document template information, a document number after synthesis used for identifying a document URL of document position information, a time stamp when the document is called, a creation time when creating document scene data, and the like. The first URL belongs to one of the pointing information of the document in order to call the document. Meanwhile, considering that a plurality of platforms can be further included in the system, the same document templates can be stored in each platform, therefore, in the process of testing documents, all the document templates in each platform need to be verified, when the document templates are filled to obtain document files, the document templates in each platform are filled to obtain a plurality of document files in fact, and when the content of the document files is verified, the document files and the document pages need to be compared to determine whether the content is consistent. In this embodiment, the first parameter name list and the second parameter name list are compared first, then the first URL and the second URL are compared, and finally the content of the document file and the content of the document page are compared, and the comparison of the first display information and the second display information is realized in an order from easy to difficult, so as to improve the test efficiency as much as possible. When the previous comparison result is not consistent, the first display information and the second display information can be determined to be inconsistent, and the subsequent comparison can be omitted; only when the previous comparison results are consistent, i.e. the previous comparison passes, the next comparison is performed.
Based on the above-mentioned second embodiment, as shown in fig. 3, in a third embodiment of the present invention, the step of parsing the document test case to obtain test case data of the document test case from a first target location and obtaining document scene data of the document test case from a second target location includes:
step S210, acquiring a document version number and a document template number from a test case library according to the document test case;
step S220, a first parameter name list and a first URL of the document test case are obtained according to the document version number;
step S230, acquiring a document template from the sub-target position according to the document template number;
step S240, according to the document test case, a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page are obtained from the product database.
In order to reduce the storage resources required in the test process, other information of the document test case can be obtained through the pointing information provided by the document version number, the document template number and the like. Specifically, a first parameter name list and a first URL of a document test case are obtained according to a document version number; and acquiring the document template from the sub-target position according to the document template number so as to acquire first display information built in the system. The second display information displayed by the system can be obtained from the product database according to the document test case, and specifically comprises a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page.
Based on the above embodiments, as shown in fig. 4, in a fourth embodiment of the present invention, the document scene data further includes first interaction information and document identification information;
after step S300, the document testing method further includes the steps of:
step S500, when the first display information and the second display information are consistent, acquiring document image data of the document test case from a third target position according to the document identification information, wherein the document image data comprises second interaction information;
step S600, comparing the first interaction information with the second interaction information according to a second preset rule;
and step S700, writing the comparison result of the first interaction information and the second interaction information into a test report.
In this embodiment, the document including the interaction information is an image document. When testing the image document, not only the display information but also the interactive information need to be compared. The interaction information specifically comprises first interaction information given by a user in real time, and the first interaction information is usually included in document scene data, and also comprises second interaction information pre-stored in the system, and the second interaction information is usually stored in document image data and is usually collected when the user registers a system account for the first time. When the first interaction information is consistent with the second interaction information, the system is indicated to have normal functions of collecting, verifying and the like of the interaction information; otherwise, when the first interaction information and the second interaction information are inconsistent, the system may have problems in collecting, verifying and the like the interaction information, and maintenance is required for the tester. The verification of the interactive information in the image document is generally performed after the verification of the display information is passed, and when the first display information and the second display information are consistent, document image data of the document test case is obtained from a third target position according to the document identification information. The document identification information may be a document number corresponding to the document one by one, a barcode of the document, or the like, and the third target location is typically an image database. And verifying the interaction information in the image document by comparing the first interaction information with the second interaction information, and writing the comparison result into a test report so as to facilitate maintenance of a tester.
Based on the fourth embodiment, as shown in fig. 5, in a fifth embodiment of the present invention, the document image data further includes document text;
after the step of obtaining the document image data of the document test case from the third target position according to the document identification information, the method further comprises the following steps:
step S810, comparing the document text with the first display information according to a third preset rule or comparing the document text with the second display information according to a fourth preset rule;
and step S820, writing the comparison result of the document text and the first display information or the comparison result of the document text and the second display information into a test report.
The document image data of the third target position may further include document text, where the content of the document text should be consistent with the content of the document file synthesized by the document template or the content of the document page under normal conditions. In this embodiment, the first display information or the second display information is verified according to the document text in the document image data, and the corresponding comparison result is written into the test report, so that the reliability of the document test is further improved. The third preset rule or the fourth preset rule may be consistent with the first preset rule, and of course, the third preset rule or the fourth preset rule adapted to design may also be designed according to characteristics of the document text, for example, the document text in the document image data is usually in a picture format instead of a text format.
Based on the first to fifth embodiments described above, in a sixth embodiment of the present invention, the first interaction information includes first signature information, and the second interaction information includes second signature information.
In this embodiment, the interaction information is specifically signature information, which may be an electronic signature of the user or an electronic seal. And when the first interaction information and the second interaction information are checked, performing picture identification comparison on the first signature information provided by the user and the second signature information pre-stored in the document image data, so as to obtain a checking result.
Based on the first to fifth embodiments described above, in a seventh embodiment of the present invention, the first interaction information includes first biometric information, and the second interaction information includes second biometric information.
In this embodiment, the interaction information is specifically biometric information, and the biometric information tends to have better specificity and security than the signature information in the previous embodiment. With the development of biometric identification technology, more and more systems use biometric information to complete user interaction with the system. The biometric information may specifically include fingerprint information, face information, iris information, voiceprint information, and the like.
Based on the above embodiments, as shown in fig. 6, in an eighth embodiment of the present invention, after step S400, the document testing method further includes the steps of:
step S910, obtaining a first test coverage rate of all the document test cases in a first target position and a second test coverage rate of all the document test cases in a second target position;
step S920, comparing the first test coverage with a first preset coverage, and comparing the second test coverage with a second preset coverage;
step S931, when the first test coverage is greater than or equal to the first preset coverage and the second test coverage is greater than or equal to the second preset coverage, writing the first test coverage and the second test coverage into a test report;
step S932, generating a prompt signal when the first test coverage is smaller than a first preset coverage or the second test coverage is smaller than a second preset coverage.
In the prior art, only very low test coverage rate is often supported by manual test documents, resulting in reduced test reliability. In this embodiment, the test coverage rate can be greatly improved by the automatic test. In order to facilitate the test coverage monitoring of a tester, the first test coverage is obtained by calculating the ratio of the number of the document test cases in the first target position and the total number of the document test cases in the first target position, which are involved in the test process, and the second test coverage is obtained by calculating the ratio of the number of the second document test cases which are involved in the second target position and the total number of the document test cases in the second target position. Further, comparing the first test coverage rate with a first preset coverage rate, and writing the first test coverage rate and the second test coverage rate into a test report, wherein the first preset coverage rate and the second preset coverage rate can be set by a tester, and the tester can conveniently check when the test report is output later only when the first test coverage rate reaches above the first preset coverage rate and the second test coverage rate reaches above the second preset coverage rate; otherwise, the coverage area of the test is insufficient, and a prompt signal is generated to remind the test personnel to carry out maintenance.
As shown in fig. 7, fig. 7 is a schematic structural diagram of a terminal, that is, a document testing device, of a hardware running environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a server, a PC, a mobile terminal device with a display function such as a smart phone, a tablet personal computer, an electronic book reader, an MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert compression standard audio layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression standard audio layer 3) player, a portable computer and the like.
As shown in fig. 7, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and so on. Among other sensors, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile terminal is stationary, and the mobile terminal can be used for recognizing the gesture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, which are not described herein.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 7 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 7, an operating system, a network communication module, a user interface module, and a document test program may be included in a memory 1005, which is a type of computer storage medium.
In the terminal shown in fig. 7, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call a document test program stored in the memory 1005 and perform the following operations:
acquiring a document test case;
analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information;
comparing the first display information with the second display information according to a first preset rule;
and writing the comparison result of the first display information and the second display information into a test report.
Further, the processor 1001 may be configured to invoke the document test program stored in the memory 1005, where the first presentation information includes a first parameter name list, a first URL, and a document template stored in the sub-target location, and the second presentation information includes a second parameter name list, a second parameter value corresponding to the second parameter name, the second URL, and a document page;
The operation of comparing the first display information and the second display information according to the first preset rule comprises the following steps:
comparing the first parameter name list with the second parameter name list;
when the first parameter name list and the second parameter name list are not consistent, judging that the first display information and the second display information are not consistent;
when the first parameter name list and the second parameter name list are consistent, comparing the first URL with the second URL;
when the first URL and the second URL are not matched, judging that the first display information and the second display information are not matched;
when the first URL and the second URL are consistent, filling the document template according to the second parameter name list and the second parameter value corresponding to the second parameter name to obtain a document file;
comparing the document file with the document page;
when the document file and the document page are inconsistent, judging that the first display information and the second display information are inconsistent;
and when the document file and the document page are consistent, judging that the first display information and the second display information are consistent.
Further, the processor 1001 may be configured to call a document test program stored in the memory 1005, parse the document test case to obtain test case data of the document test case from a first target location, and obtain document scene data of the document test case from a second target location, where the operations include:
Acquiring a document version number and a document template number from a test case library according to the document test case;
according to the document version number, a first parameter name list and a first URL of the document test case are obtained;
acquiring a document template from the sub-target position according to the document template number;
and according to the document test case, acquiring a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page from the product database.
Further, the processor 1001 may be configured to invoke the document test program stored in the memory 1005, where the document scene data further includes first interaction information and document identification information;
after the operation of comparing the first display information and the second display information according to the first preset rule, the following operations are further performed:
when the first display information and the second display information are consistent, acquiring document image data of the document test case from a third target position according to the document identification information, wherein the document image data comprises second interaction information;
comparing the first interaction information with the second interaction information according to a second preset rule;
and writing the comparison result of the first interaction information and the second interaction information into a test report.
Further, the processor 1001 may be configured to call a document test program stored in the memory 1005, where the document image data further includes document text;
after the operation of obtaining the document image data of the document test case from the third target position according to the document identification information, the following operations are also performed:
comparing the document text with the first display information according to a third preset rule or comparing the document text with the second display information according to a fourth preset rule;
and writing the comparison result of the document text and the first display information or the comparison result of the document text and the second display information into a test report.
Further, the processor 1001 may be configured to invoke the document test program stored in the memory 1005, where the first interaction information includes first signature information, and the second interaction information includes second signature information; or alternatively, the first and second heat exchangers may be,
the first interaction information includes first biometric information and the second interaction information includes second biometric information.
Further, the processor 1001 may be configured to invoke the document test program stored in the memory 1005, and after writing the comparison result of the first presentation information and the second presentation information into the test report, further perform the following operations:
Acquiring a first test coverage rate of all the document test cases in a first target position and a second test coverage rate of all the document test cases in a second target position;
comparing the first test coverage with a first preset coverage, and comparing the second test coverage with a second preset coverage;
when the first test coverage rate is greater than or equal to the first preset coverage rate and the second test coverage rate is greater than or equal to the second preset coverage rate, writing the first test coverage rate and the second test coverage rate into a test report;
and generating a prompt signal when the first test coverage rate is smaller than the first preset coverage rate or the second test coverage rate is smaller than the second preset coverage rate.
In addition, the embodiment of the invention also provides a document testing device, which comprises:
the acquisition module is used for acquiring the document test cases;
the analysis module is used for analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information;
The comparison module is used for comparing the first display information with the second display information according to a first preset rule;
and the reporting module is used for writing the comparison result of the first display information and the second display information into the test report.
Further, the first display information comprises a first parameter name list, a first URL and a document template stored in a sub-target position, and the second display information comprises a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page;
the comparison module comprises:
the parameter name comparison unit is used for comparing the first parameter name list with the second parameter name list;
a determination unit configured to determine that the first presentation information and the second presentation information do not coincide when the first parameter name list and the second parameter name list do not coincide;
the locator comparison unit is used for comparing the first URL with the second URL when the first parameter name list and the second parameter name list are consistent;
the judging unit is further used for judging that the first display information and the second display information are not consistent when the first URL and the second URL are not consistent;
the filling unit is used for filling the document template according to the second parameter name list and the second parameter value corresponding to the second parameter name when the first URL and the second URL are consistent to obtain a document file;
The content comparison unit is used for comparing the document file and the document page;
the judging unit is also used for judging that the first display information and the second display information are inconsistent when the document file and the document page are inconsistent;
the judging unit is also used for judging that the first display information is consistent with the second display information when the document file is consistent with the document page.
Further, the parsing module includes:
the test case library unit is used for acquiring a document version number and a document template number from the test case library according to the document test case;
the parameter name and locator acquisition unit is used for acquiring a first parameter name list and a first URL of the document test case according to the document version number;
the template acquisition unit is used for acquiring the document template from the sub-target position according to the document template number;
and the product database unit is used for acquiring a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page from the product database according to the document test case.
Further, the document scene data further comprises first interaction information and document identification information;
the document testing device further includes:
the image module is used for obtaining the document image data of the document test case from the third target position according to the document identification information when the first display information is consistent with the second display information, wherein the document image data comprises second interaction information;
The comparison module is also used for comparing the first interaction information with the second interaction information according to a second preset rule;
the report module is also used for writing the comparison result of the first interaction information and the second interaction information into the test report.
Further, the document image data also comprises document text;
the comparison module is also used for comparing the document text with the first display information according to a third preset rule or comparing the document text with the second display information according to a fourth preset rule;
the report module is also used for writing the comparison result of the document text and the first display information or the comparison result of the document text and the second display information into the test report.
Further, the first interaction information comprises first signature information, and the second interaction information comprises second signature information; or alternatively, the first and second heat exchangers may be,
the first interaction information includes first biometric information and the second interaction information includes second biometric information.
Further, the document testing device further includes:
the coverage rate module is used for acquiring a first test coverage rate of all the document test cases in the first target position and a second test coverage rate of all the document test cases in the second target position;
the comparison module is also used for comparing the first test coverage rate with a first preset coverage rate, and comparing the second test coverage rate with a second preset coverage rate;
The report module is further configured to write the first test coverage rate and the second test coverage rate into a test report when the first test coverage rate is greater than or equal to a first preset coverage rate and the second test coverage rate is greater than or equal to a second preset coverage rate;
the prompting module is used for generating a prompting signal when the first test coverage rate is smaller than the first preset coverage rate or the second test coverage rate is smaller than the second preset coverage rate.
In addition, the embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a document test program which realizes the following operations when being executed by a processor:
acquiring a document test case;
analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information and the document scene data comprises second display information;
comparing the first display information with the second display information according to a first preset rule;
and writing the comparison result of the first display information and the second display information into a test report.
Further, when the document test program is executed by the processor, the first display information comprises a first parameter name list, a first URL and a document template stored in a sub-target position, and the second display information comprises a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page;
The operation of comparing the first display information and the second display information according to the first preset rule comprises the following steps:
comparing the first parameter name list with the second parameter name list;
when the first parameter name list and the second parameter name list are not consistent, judging that the first display information and the second display information are not consistent;
when the first parameter name list and the second parameter name list are consistent, comparing the first URL with the second URL;
when the first URL and the second URL are not matched, judging that the first display information and the second display information are not matched;
when the first URL and the second URL are consistent, filling the document template according to the second parameter name list and the second parameter value corresponding to the second parameter name to obtain a document file;
comparing the document file with the document page;
when the document file and the document page are inconsistent, judging that the first display information and the second display information are inconsistent;
and when the document file and the document page are consistent, judging that the first display information and the second display information are consistent.
Further, when the document test program is executed by the processor, analyzing the document test case to obtain test case data of the document test case from the first target position, and obtaining document scene data of the document test case from the second target position includes:
Acquiring a document version number and a document template number from a test case library according to the document test case;
according to the document version number, a first parameter name list and a first URL of the document test case are obtained;
acquiring a document template from the sub-target position according to the document template number;
and according to the document test case, acquiring a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page from the product database.
Further, when the document testing program is executed by the processor, the document scene data further comprises first interaction information and document identification information;
after the operation of comparing the first display information and the second display information according to the first preset rule, the following operations are further performed:
when the first display information and the second display information are consistent, acquiring document image data of the document test case from a third target position according to the document identification information, wherein the document image data comprises second interaction information;
comparing the first interaction information with the second interaction information according to a second preset rule;
and writing the comparison result of the first interaction information and the second interaction information into a test report.
Further, the document image data also comprises document text;
After the operation of obtaining the document image data of the document test case from the third target position according to the document identification information, the following operations are also performed:
comparing the document text with the first display information according to a third preset rule or comparing the document text with the second display information according to a fourth preset rule;
and writing the comparison result of the document text and the first display information or the comparison result of the document text and the second display information into a test report.
Further, the first interaction information comprises first signature information, and the second interaction information comprises second signature information; or alternatively, the first and second heat exchangers may be,
the first interaction information includes first biometric information and the second interaction information includes second biometric information.
Further, when the document test program is executed by the processor, after the operation of writing the comparison result of the first presentation information and the second presentation information into the test report, the following operations are also executed:
acquiring a first test coverage rate of all the document test cases in a first target position and a second test coverage rate of all the document test cases in a second target position;
comparing the first test coverage with a first preset coverage, and comparing the second test coverage with a second preset coverage;
When the first test coverage rate is greater than or equal to the first preset coverage rate and the second test coverage rate is greater than or equal to the second preset coverage rate, writing the first test coverage rate and the second test coverage rate into a test report;
and generating a prompt signal when the first test coverage rate is smaller than the first preset coverage rate or the second test coverage rate is smaller than the second preset coverage rate.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. The document testing method is characterized by comprising the following steps of:
acquiring a document test case;
analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information, and the document scene data comprises second display information, first interaction information and document identification information;
comparing the first display information with the second display information according to a first preset rule;
writing the comparison result of the first display information and the second display information into a test report;
after the step of comparing the first display information with the second display information according to the first preset rule, the method further comprises the following steps:
When the first display information and the second display information are consistent, acquiring the document image data of the document test case from a third target position according to the document identification information, wherein the document image data comprises second interaction information;
comparing the first interaction information with the second interaction information according to a second preset rule;
and writing the comparison result of the first interaction information and the second interaction information into the test report.
2. The document testing method of claim 1, wherein the first presentation information includes a first parameter name list, a first URL, and a document template, and the second presentation information includes a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL, and a document page;
the step of comparing the first display information with the second display information according to a first preset rule comprises the following steps:
comparing the first parameter name list with the second parameter name list;
when the first parameter name list and the second parameter name list are not matched, judging that the first display information and the second display information are not matched;
when the first parameter name list and the second parameter name list are consistent, comparing the first URL with the second URL;
When the first URL and the second URL are not matched, judging that the first display information and the second display information are not matched;
when the first URL and the second URL are consistent, filling the document template according to the second parameter name list and a second parameter value corresponding to a second parameter name to obtain a document file;
comparing the document file with the document page;
when the document file and the document page are inconsistent, judging that the first display information and the second display information are inconsistent;
and when the document file and the document page are consistent, judging that the first display information and the second display information are consistent.
3. The document testing method of claim 2, wherein the step of parsing the document test case to obtain test case data of the document test case from a first target location and obtaining document scene data of the document test case from a second target location comprises:
acquiring a document version number and a document template number from a test case library according to the document test case;
according to the document version number, a first parameter name list and a first URL of the document test case are obtained;
Acquiring the document template from a sub-target position according to the document template number;
and acquiring a second parameter name list, a second parameter value corresponding to the second parameter name, a second URL and a document page from a product database according to the document test case.
4. The document testing method of claim 1, wherein the document image data further comprises document text;
after the step of obtaining the document image data of the document test case from the third target position according to the document identification information, the method further comprises the following steps:
comparing the document text with the first display information according to a third preset rule or comparing the document text with the second display information according to a fourth preset rule;
and writing the comparison result of the document text and the first display information or the comparison result of the document text and the second display information into the test report.
5. The document testing method of claim 1, wherein the first interaction information includes first signature information and the second interaction information includes second signature information; or alternatively, the first and second heat exchangers may be,
the first interaction information includes first biometric information and the second interaction information includes second biometric information.
6. The document testing method according to claim 1, wherein after the step of writing the comparison result of the first presentation information and the second presentation information into a test report, the document testing method further comprises the steps of:
acquiring a first test coverage rate of all the document test cases in the first target position and a second test coverage rate of all the document test cases in the second target position;
comparing the first test coverage rate with a first preset coverage rate, and the second test coverage rate with a second preset coverage rate;
when the first test coverage rate is greater than or equal to the first preset coverage rate and the second test coverage rate is greater than or equal to the second preset coverage rate, writing the first test coverage rate and the second test coverage rate into the test report;
and generating a prompt signal when the first test coverage rate is smaller than the first preset coverage rate or the second test coverage rate is smaller than the second preset coverage rate.
7. A document testing apparatus, characterized in that the document testing apparatus comprises: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the document testing method according to any one of claims 1 to 6.
8. A document testing device, characterized in that the document testing device comprises:
the acquisition module is used for acquiring the document test cases;
the analysis module is used for analyzing the document test case to obtain test case data of the document test case from a first target position and document scene data of the document test case from a second target position, wherein the test case data comprises first display information, and the document scene data comprises second display information, first interaction information and document identification information;
the comparison module is used for comparing the first display information with the second display information according to a first preset rule;
the report module is used for writing the comparison result of the first display information and the second display information into a test report;
the comparison module is further configured to obtain, according to the document identification information, document image data of the document test case from a third target location when the first display information matches the second display information, where the document image data includes second interaction information;
comparing the first interaction information with the second interaction information according to a second preset rule;
And writing the comparison result of the first interaction information and the second interaction information into the test report.
9. A computer readable storage medium, characterized in that it has stored thereon a document testing program, which when executed by a processor, implements the steps of the document testing method according to any of claims 1 to 6.
CN201810939962.1A 2018-08-17 2018-08-17 Document testing method, device, apparatus and computer readable storage medium Active CN109726110B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810939962.1A CN109726110B (en) 2018-08-17 2018-08-17 Document testing method, device, apparatus and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810939962.1A CN109726110B (en) 2018-08-17 2018-08-17 Document testing method, device, apparatus and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109726110A CN109726110A (en) 2019-05-07
CN109726110B true CN109726110B (en) 2024-03-19

Family

ID=66294631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810939962.1A Active CN109726110B (en) 2018-08-17 2018-08-17 Document testing method, device, apparatus and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109726110B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287105A (en) * 2019-05-22 2019-09-27 平安普惠企业管理有限公司 Document version test method, device, equipment and readable storage medium storing program for executing
CN110363646A (en) * 2019-06-19 2019-10-22 平安普惠企业管理有限公司 Document investigation method, apparatus, equipment and storage medium extremely
CN110515828A (en) * 2019-07-10 2019-11-29 平安普惠企业管理有限公司 Document test method, device, equipment and storage medium
CN110519293A (en) * 2019-09-10 2019-11-29 北京锐安科技有限公司 A kind of message test method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019933A (en) * 2012-11-27 2013-04-03 网宿科技股份有限公司 Automatic test case coverage identification method and device
CN105824249A (en) * 2016-05-13 2016-08-03 中国航空工业集团公司西安飞机设计研究所 Testing method and testing system for aircraft parameter display results
CN106326120A (en) * 2016-08-22 2017-01-11 北京金山安全软件有限公司 Regression testing method and device for application software and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10282283B2 (en) * 2016-01-28 2019-05-07 Accenture Global Solutions Limited Orchestrating and providing a regression test

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019933A (en) * 2012-11-27 2013-04-03 网宿科技股份有限公司 Automatic test case coverage identification method and device
CN105824249A (en) * 2016-05-13 2016-08-03 中国航空工业集团公司西安飞机设计研究所 Testing method and testing system for aircraft parameter display results
CN106326120A (en) * 2016-08-22 2017-01-11 北京金山安全软件有限公司 Regression testing method and device for application software and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于单证中心系统的性能容量评估及平台选型方法;陈景荣;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;I138-338 *
基于马尔可夫链的单证关系建模的研究与实现;姜喜梅;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;20120515(第05期);I138-265 *

Also Published As

Publication number Publication date
CN109726110A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN109726110B (en) Document testing method, device, apparatus and computer readable storage medium
CN109684047B (en) Event processing method, device, equipment and computer storage medium
US9934254B2 (en) Terminal apparatus, information processing system, and information processing method
CN110955416A (en) Interface document generation method, device, equipment and computer storage medium
US20220180621A1 (en) Article identification method and device, and computer readable storage medium
CN112100431B (en) Evaluation method, device and equipment of OCR system and readable storage medium
CN110633381A (en) Method and device for identifying false house source, storage medium and electronic equipment
CN110288755A (en) The invoice method of inspection, server and storage medium based on text identification
CN109508189B (en) Layout template processing method and device and computer readable storage medium
CN110472162B (en) Evaluation method, system, terminal and readable storage medium
CN112203150B (en) Time-consuming acquisition method, device, equipment and computer-readable storage medium
CN110750991B (en) Entity identification method, device, equipment and computer readable storage medium
US10482393B2 (en) Machine-based learning systems, methods, and apparatus for interactively mapping raw data objects to recognized data objects
CN112181835B (en) Automatic test method, device, computer equipment and storage medium
CN112035412A (en) Data file importing method, device, storage medium and device
CN110336791B (en) Method, device and equipment for transmitting breakpoint data and computer storage medium
CN113485882A (en) Chip verification method and device and computer readable storage medium
CN117873486A (en) Front-end and back-end code automatic generation method, device, equipment and storage medium
CN111143001A (en) Language detection method of terminal, user equipment, storage medium and device
CN109740074B (en) Method, device and equipment for processing parameter configuration information
CN111598707A (en) Page generation method and electronic equipment
CN110992930A (en) Voiceprint feature extraction method and device, terminal and readable storage medium
CN113190437B (en) Time sequence analysis method and device for wireless module, computer equipment and storage medium
CN110929725B (en) Certificate classification method, device and computer readable storage medium
CN110532186B (en) Method, device, electronic equipment and storage medium for testing by using verification code

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240207

Address after: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen LIAN intellectual property service center

Country or region after: China

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant