CN108733571B - Test method, device, equipment and computer readable storage medium - Google Patents

Test method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN108733571B
CN108733571B CN201810520918.7A CN201810520918A CN108733571B CN 108733571 B CN108733571 B CN 108733571B CN 201810520918 A CN201810520918 A CN 201810520918A CN 108733571 B CN108733571 B CN 108733571B
Authority
CN
China
Prior art keywords
built
test
resource file
resource
data
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
CN201810520918.7A
Other languages
Chinese (zh)
Other versions
CN108733571A (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.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information Technology Co Ltd
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 Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN201810520918.7A priority Critical patent/CN108733571B/en
Publication of CN108733571A publication Critical patent/CN108733571A/en
Application granted granted Critical
Publication of CN108733571B publication Critical patent/CN108733571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention provides a test method, which comprises the following steps: acquiring a built-in resource file presenting a set page under the condition that the application program cannot be connected with the Internet in an installation package of the application program; detecting test data in all the built-in resource files, and sequentially testing each built-in resource file through a preset test case to obtain data errors in the built-in resource files; and presenting test data and data errors in all the built-in resource files through test reports. The invention also discloses a testing device, equipment and a computer readable storage medium, by implementing the scheme, the automatic testing of the built-in resource files in the internet application program is realized, and the testing precision and the testing efficiency of the built-in resource files in the internet application program are effectively improved.

Description

Test method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a test method, apparatus, device, and computer readable storage medium.
Background
With the rapid development of internet technology, various internet Applications (APPs) in computer devices (e.g., mobile terminals) have also become rapidly popular. However, in the case that the existing internet application program cannot be connected to the internet, a setting page needs to be presented through a Resource file (including information such as an icon, a jump URL (Uniform Resource Locator), and a name) built in the internet application program. However, when a data error occurs in the built-in resource file or the built-in resource file carries test data, the internet application program can correctly present the set page under the condition that the internet application program cannot be connected to the internet.
The existing test of the built-in resource files in the internet application program needs to be manually tested by a test engineer, the test workload is large, and under the condition that the test engineer fails to test a certain built-in resource file in the internet application program, wrong built-in resource data is released in the internet application program, so that the user experience of a user using the internet application program is seriously influenced.
Disclosure of Invention
The invention provides a testing method, a testing device, testing equipment and a computer readable storage medium, which are used for solving the problem that the workload of testing built-in resource files in an internet application program through a testing engineer is overlarge in the prior art.
The technical scheme adopted by the invention is to provide a test method, which comprises the following steps:
acquiring a built-in resource file presenting a set page under the condition that the application program cannot be connected with the Internet in an installation package of the application program;
detecting test data in all the built-in resource files, and sequentially testing each built-in resource file through a preset test case to obtain data errors in the built-in resource files;
and presenting test data and data errors in all the built-in resource files through test reports.
Optionally, the built-in resource file includes a built-in resource file issued by a server through a set interface;
the acquiring, in an installation package of an application program, a built-in resource file that presents a setting page when the application program cannot connect to the internet, includes:
and acquiring the built-in resource file sent by the set interface and stored in a preset folder in the installation package of the application program.
Optionally, the built-in resource file further includes a built-in resource file configured in a set format;
the detecting test data in all the built-in resource files comprises:
filtering Uniform Resource Locators (URLs) carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test identifications or not;
if the URL contains a test identifier, judging that the built-in resource file carrying the URL carries test data;
otherwise, judging that the built-in resource file carrying the URL does not carry test data.
Optionally, the sequentially testing each built-in resource file through a preset test case includes:
and calling the test cases through a preset test frame to test each built-in resource file in sequence.
Optionally, the test case includes: test input data and test reference data;
the step of sequentially testing each built-in resource file through a preset test case comprises the following steps:
judging whether test result data obtained by each built-in resource file based on the test input data is matched with the test reference data;
if the test result data is matched with the test reference data, judging that each built-in resource file has data errors;
otherwise, judging that each built-in resource file has no data error.
The present invention also provides a test apparatus comprising:
the system comprises an acquisition module, a setting module and a display module, wherein the acquisition module is used for acquiring a built-in resource file presenting a set page under the condition that an application program cannot be connected with the Internet in an installation package of the application program;
the test module is used for detecting test data in all the built-in resource files and sequentially testing each built-in resource file through a preset test case to obtain data errors in the built-in resource files;
and the reporting module is used for presenting the test data and the data errors in all the built-in resource files through the test reports.
Optionally, the built-in resource file includes a built-in resource file issued by a server through a set interface; the obtaining module is specifically configured to:
and acquiring the built-in resource file sent by the set interface and stored in a preset folder in the installation package of the application program.
Optionally, the built-in resource file further includes a built-in resource file configured in a set format;
the detecting test data in all the built-in resource files comprises:
filtering Uniform Resource Locators (URLs) carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test identifications or not;
if the URL contains a test identifier, judging that the built-in resource file carrying the URL carries test data;
otherwise, judging that the built-in resource file carrying the URL does not carry test data.
Optionally, the sequentially testing each built-in resource file through a preset test case includes:
and calling the test cases through a preset test frame to test each built-in resource file in sequence.
Optionally, the test case includes: test input data and test reference data;
the step of sequentially testing each built-in resource file through a preset test case comprises the following steps:
judging whether test result data obtained by each built-in resource file based on the test input data is matched with the test reference data;
if the test result data is matched with the test reference data, judging that each built-in resource file has data errors;
otherwise, judging that each built-in resource file has no data error.
The invention also provides a test device, which comprises a processor and a memory;
the processor is used for executing the test program stored in the memory to realize the steps of the test method.
The present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the above-described testing method.
By adopting the technical scheme, the invention at least has the following advantages:
the testing method, the testing device, the testing equipment and the computer readable storage medium realize automatic testing of the built-in resource files in the internet application program, and effectively improve the testing precision and the testing efficiency of the built-in resource files in the internet application program.
Drawings
FIG. 1 is a flow chart of a testing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a testing method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a testing method according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a testing method according to a fourth embodiment of the present invention;
FIG. 5 is a flowchart of a testing method according to a fifth embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a testing apparatus according to a sixth embodiment of the present invention;
FIG. 7 is a schematic diagram of a testing apparatus according to an eleventh embodiment of the present invention.
Detailed Description
To further explain the technical means and effects of the present invention adopted to achieve the intended purpose, the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
The testing method provided by the embodiment of the invention is used for realizing automatic testing of the built-in resource files in the internet application program, effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program, and solves the problem that the workload for testing the built-in resource files in the internet application program through a testing engineer is overlarge in the prior art.
A first embodiment of the present invention, a testing method, as shown in fig. 1, includes the following specific steps:
step S101, acquiring a built-in resource file presenting a setting page under the condition that the application program can not be connected with the Internet in the installation package of the application program.
Optionally, step S101 includes:
converting the format of the installation package of the application program;
and acquiring a built-in resource file presenting a set page under the condition that the application program cannot be connected with the Internet in the installation package of the application program after format conversion.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
For example: step S101, including: converting the ipa format of the installation package of the application program into a zip format; and acquiring a built-in resource file presenting the set page under the condition that the application program cannot be connected with the Internet in the installation package of the application program in the zip format.
Step S102, detecting test data in all built-in resource files, and sequentially testing each built-in resource file through a preset test case to obtain data errors in the built-in resource files.
In this embodiment, the manner of detecting the test data in all built-in resource files includes one or more of the following manners:
the method comprises the steps of firstly, detecting whether a test mark exists in each built-in resource file; if the built-in resource file has the test identification, judging that the built-in resource file has test data; otherwise, judging that no test data exists in the built-in resource file;
detecting whether a test URL (Uniform Resource Locator) exists in each built-in Resource file or not; if the built-in resource file has the test URL, judging that the built-in resource file has test data; otherwise, judging that the built-in resource file does not have the test data.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal by setting test data in the built-in resource file, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be abnormally displayed after being installed in a user terminal, and user experience of a user using an internet application program may be seriously affected.
In this embodiment, a manner of sequentially testing each built-in resource file through a preset test case is not specifically limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
And step S103, presenting the test data and data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing method of the first embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
A second embodiment of the present invention, a testing method, as shown in fig. 2, includes the following specific steps:
step S201, acquiring a built-in resource file presenting a setting page in a case where the application cannot connect to the internet in the installation package of the application.
Optionally, step S201 includes:
under the condition that the built-in resource file comprises a built-in resource file issued by a server through a set interface, acquiring the built-in resource file issued by the set interface and stored in a preset folder in an installation package of an application program; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
For example: step S201, including: under the condition that the built-in Resource file comprises a built-in Resource file issued by a server RMS (Resource management System) through an RMS interface, acquiring the built-in Resource file issued by the RMS interface stored in a build data folder in an installation package of an application program; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
In the application program, the built-in resource file issued by the setting interface of the server is stored in the preset folder corresponding to the setting interface, so that the built-in resource file stored in the preset folder in the installation package of the application program is obtained, and the built-in resource file in the installation package of the application program can be accurately obtained.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
Step S202, detecting test data in all built-in resource files, and sequentially testing each built-in resource file through a preset test case to obtain data errors in the built-in resource files.
In this embodiment, the manner of detecting the test data in all built-in resource files includes one or more of the following manners:
the method comprises the steps of firstly, detecting whether a test mark exists in each built-in resource file; if the built-in resource file has the test identification, judging that the built-in resource file has test data; otherwise, judging that no test data exists in the built-in resource file;
detecting whether a test URL exists in each built-in resource file or not; if the built-in resource file has the test URL, judging that the built-in resource file has test data; otherwise, judging that the built-in resource file does not have the test data.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal by setting test data in the built-in resource file, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be abnormally displayed after being installed in a user terminal, and user experience of a user using an internet application program may be seriously affected.
In this embodiment, the manner of sequentially testing each built-in resource file through the preset test case is not particularly limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, respectively, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
Step S203, presenting the test data and data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing method of the second embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
A third embodiment of the present invention, a testing method, as shown in fig. 3, includes the following specific steps:
step S301, acquiring a built-in resource file presenting a setting page in the condition that the application program can not be connected with the Internet in the installation package of the application program.
Optionally, step S301 includes:
the built-in resource files comprise: the method comprises the steps that the server obtains built-in resource files issued by a preset interface in an installation package of the application program under the conditions of the built-in resource files issued by the preset interface and the built-in resource files configured in a set format, and obtains all built-in resource files configured in the set format in the installation package of the application program; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
For example: step S301, including: under the condition that the built-in resource files comprise built-in resource files issued by a server RMS through an RMS interface and built-in resource files configured in a JSON format, the built-in resource files issued by the RMS interface and stored in a builtingdata folder in an installation package of an application program are obtained, and all built-in resource files configured in the JSON format in the installation package of the application program are obtained; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
In the application program, the built-in resource files issued by the setting interface of the server are stored in the preset folder corresponding to the setting interface, and meanwhile, other built-in resource files in the installation package of the application program are configured in the JSON format, so that the built-in resource files stored in the preset folder in the installation package of the application program and all built-in resource files in the JSON format are obtained, and all built-in resource files in the installation package of the application program can be accurately obtained.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
Step S302, detecting the test data in all the built-in resource files, and sequentially testing each built-in resource file through a preset test case to obtain the data error in the built-in resource files.
Optionally, the manner of detecting the test data in all built-in resource files includes, but is not limited to:
filtering URLs carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test marks or not;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
For example, the way to detect the test data in all built-in resource files includes:
filtering the URL carried in each built-in resource file through a preset regular expression; regular expressions include, but are not limited to: https & & http regular expressions, wbmain protocol regular expressions, and https & & http & & wbmain regular expressions; judging whether the filtered URL contains a test identifier or not; wherein, the test identification includes but is not limited to: test marks such as aptest and/or pmaltest and the like;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal by setting test data in the built-in resource file, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be abnormally displayed after being installed in a user terminal, and user experience of a user using an internet application program may be seriously affected.
In this embodiment, a manner of sequentially testing each built-in resource file through a preset test case is not specifically limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
Step S303, the test data and data errors in all built-in resource files are presented through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing method of the third embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
A fourth embodiment of the present invention, a testing method, as shown in fig. 4, includes the following specific steps:
step S401, acquiring a built-in resource file presenting a setting page under the condition that the application program can not be connected with the Internet in the installation package of the application program.
Optionally, step S401 includes:
the built-in resource files comprise: the method comprises the steps that a server acquires built-in resource files issued by a preset interface stored in a preset folder in an installation package of an application program and acquires all built-in resource files configured in a set format under the conditions of the built-in resource files issued by the set interface and the built-in resource files configured in the set format; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
For example: step S401 includes: under the condition that the built-in resource files comprise built-in resource files issued by a server RMS through an RMS interface and built-in resource files configured in a JSON format, the built-in resource files issued by the RMS interface and stored in a builtingdata folder in an installation package of an application program are obtained, and all built-in resource files configured in the JSON format in the installation package of the application program are obtained; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
In the application program, the built-in resource files issued by the setting interface of the server are stored in the preset folder corresponding to the setting interface, and meanwhile, other built-in resource files in the installation package of the application program are configured in the JSON format, so that the built-in resource files stored in the preset folder in the installation package of the application program and all built-in resource files in the JSON format are obtained, and all built-in resource files in the installation package of the application program can be accurately obtained.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
Step S402, detecting the test data in all the built-in resource files, and sequentially testing each built-in resource file through a preset test case to obtain the data error in the built-in resource files.
Optionally, the manner of detecting the test data in all built-in resource files includes, but is not limited to:
filtering URLs carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test marks or not;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
For example, the way to detect the test data in all built-in resource files includes:
filtering the URL carried in each built-in resource file through a preset regular expression; regular expressions include, but are not limited to: https & & http regular expressions, wbmain protocol regular expressions, and https & & http & & wbmain regular expressions; judging whether the filtered URL contains a test identifier or not; wherein, the test identification includes but is not limited to: test identifications such as aptest and/or pmalltest;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
Optionally, the testing of each built-in resource file sequentially through a preset test case includes:
and calling the test cases through a preset test framework to test each built-in resource file in sequence.
For example, sequentially testing each built-in resource file through a preset test case includes: and calling the test cases through a preset TestNg test framework to test each built-in resource file in sequence.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal by setting test data in the built-in resource file, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be abnormally displayed after being installed in a user terminal, and user experience of a user using an internet application program may be seriously affected.
In this embodiment, a manner of sequentially testing each built-in resource file through a preset test case is not specifically limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
And step S403, presenting the test data and data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing method of the fourth embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
In a fifth embodiment of the present invention, a testing method, as shown in fig. 5, includes the following steps:
step S501, acquiring a built-in resource file presenting a setting page in the condition that the application program can not be connected with the Internet in the installation package of the application program.
Optionally, step S501 includes:
the built-in resource files comprise: the method comprises the steps that a server acquires built-in resource files issued by a preset interface stored in a preset folder in an installation package of an application program and acquires all built-in resource files configured in a set format under the conditions of the built-in resource files issued by the set interface and the built-in resource files configured in the set format; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
For example: step S501 includes: under the condition that the built-in resource files comprise built-in resource files issued by a server RMS through an RMS interface and built-in resource files configured in a JSON format, the built-in resource files issued by the RMS interface and stored in a builtingdata folder in an installation package of an application program are obtained, and all built-in resource files configured in the JSON format in the installation package of the application program are obtained; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
In the application program, the built-in resource files issued by the setting interface of the server are stored in the preset folder corresponding to the setting interface, and meanwhile, other built-in resource files in the installation package of the application program are configured in the JSON format, so that the built-in resource files stored in the preset folder in the installation package of the application program and all built-in resource files in the JSON format are obtained, and all built-in resource files in the installation package of the application program can be accurately obtained.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
Step S502, detecting the test data in all the built-in resource files, and testing each built-in resource file in sequence through a preset test case to obtain the data error in the built-in resource files.
Optionally, the manner of detecting the test data in all built-in resource files includes, but is not limited to:
filtering URLs carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test marks or not;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
For example, the way to detect the test data in all built-in resource files includes:
filtering the URL carried in each built-in resource file through a preset regular expression; regular expressions include, but are not limited to: https & & http regular expressions, wbmain protocol regular expressions, and https & & http & & wbmain regular expressions; judging whether the filtered URL contains a test identifier or not; wherein, the test identification includes but is not limited to: test marks such as aptest and/or pmaltest and the like;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
Optionally, the testing of each built-in resource file sequentially through a preset test case includes:
and calling the test cases through a preset test framework to test each built-in resource file in sequence.
For example, sequentially testing each built-in resource file through a preset test case includes: and calling the test cases through a preset TestNg test framework to test each built-in resource file in sequence.
Optionally, the testing of each built-in resource file sequentially through a preset test case includes:
the test case comprises: under the condition of testing the input data and the test reference data, judging whether test result data obtained by each built-in resource file based on the test input data is matched with the test reference data; if the test result data is matched with the test reference data, judging that each built-in resource file has data errors; otherwise, judging that each built-in resource file has no data error.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal in the built-in resource file by setting test data, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be displayed abnormally after being installed in a user terminal, and user experience of a user using an internet application program is seriously affected.
In this embodiment, a manner of sequentially testing each built-in resource file through a preset test case is not specifically limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
Step S503, presenting the test data and data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing method of the fifth embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
The testing device provided by the embodiment of the invention is used for automatically testing the built-in resource files in the internet application program, effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program, and solves the problem that the workload for testing the built-in resource files in the internet application program through a testing engineer is overlarge in the prior art.
In a sixth embodiment of the present invention, a test apparatus, as shown in fig. 6, includes the following components:
the obtaining module 100 is configured to obtain, in an installation package of an application program, a built-in resource file that presents a setting page when the application program cannot connect to the internet.
Optionally, the obtaining module 100 is specifically configured to:
converting the format of the installation package of the application program;
and acquiring a built-in resource file presenting a set page under the condition that the application program cannot be connected with the Internet in the installation package of the application program after format conversion.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
For example: the obtaining module 100 is specifically configured to convert an ipa format of an installation package of an application program into a zip format; and acquiring a built-in resource file presenting the set page under the condition that the application program cannot be connected with the Internet in the installation package of the application program in the zip format.
The test module 200 is configured to detect test data in all built-in resource files, and sequentially test each built-in resource file through a preset test case to obtain a data error in the built-in resource file.
In this embodiment, the manner of detecting the test data in all built-in resource files includes one or more of the following manners:
the method comprises the steps of firstly, detecting whether a test mark exists in each built-in resource file; if the built-in resource file has the test identification, judging that the built-in resource file has test data; otherwise, judging that no test data exists in the built-in resource file;
detecting whether a test URL (Uniform Resource Locator) exists in each built-in Resource file or not; if the built-in resource file has the test URL, judging that the built-in resource file has test data; otherwise, judging that the built-in resource file does not have the test data.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal in the built-in resource file by setting test data, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be displayed abnormally after being installed in a user terminal, and user experience of a user using an internet application program is seriously affected.
In this embodiment, a manner of sequentially testing each built-in resource file through a preset test case is not specifically limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
And a reporting module 300, configured to present the test data and the data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing device of the sixth embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
A seventh embodiment of the present invention, a test apparatus, as shown in fig. 6, includes the following components:
the obtaining module 100 is configured to obtain, in an installation package of an application program, a built-in resource file that presents a setting page when the application program cannot connect to the internet.
Optionally, the obtaining module 100 is specifically configured to:
under the condition that the built-in resource file comprises a built-in resource file issued by a server through a set interface, acquiring the built-in resource file issued by the set interface and stored in a preset folder in an installation package of an application program; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
For example: the obtaining module 100 is specifically configured to: under the condition that the built-in Resource file comprises a built-in Resource file issued by a server RMS (Resource management System) through an RMS interface, acquiring the built-in Resource file issued by the RMS interface stored in a build data folder in an installation package of an application program; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
In the application program, the built-in resource file issued by the setting interface of the server is stored in the preset folder corresponding to the setting interface, so that the built-in resource file stored in the preset folder in the installation package of the application program is obtained, and the built-in resource file in the installation package of the application program can be accurately obtained.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
The test module 200 is configured to detect test data in all built-in resource files, and sequentially test each built-in resource file through a preset test case to obtain a data error in the built-in resource file.
In this embodiment, the manner of detecting the test data in all built-in resource files includes one or more of the following manners:
the method comprises the steps of firstly, detecting whether a test mark exists in each built-in resource file; if the built-in resource file has the test identification, judging that the built-in resource file has test data; otherwise, judging that no test data exists in the built-in resource file;
detecting whether a test URL exists in each built-in resource file or not; if the built-in resource file has the test URL, judging that the built-in resource file has test data; otherwise, judging that the built-in resource file does not have the test data.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal by setting test data in the built-in resource file, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be abnormally displayed after being installed in a user terminal, and user experience of a user using an internet application program may be seriously affected.
In this embodiment, a manner of sequentially testing each built-in resource file through a preset test case is not specifically limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
And a reporting module 300, configured to present the test data and the data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing device of the seventh embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
In an eighth embodiment of the present invention, a test apparatus, as shown in fig. 6, includes the following components:
the obtaining module 100 is configured to obtain, in an installation package of an application program, a built-in resource file that presents a setting page when the application program cannot connect to the internet.
Optionally, the obtaining module 100 is specifically configured to:
the built-in resource files comprise: the method comprises the steps that a server acquires built-in resource files issued by a preset interface stored in a preset folder in an installation package of an application program and acquires all built-in resource files configured in a set format under the conditions of the built-in resource files issued by the set interface and the built-in resource files configured in the set format; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
For example: the obtaining module 100 is specifically configured to obtain the built-in resource files issued by the RMS interface stored in the build data folder in the installation package of the application program and obtain all the built-in resource files configured in the JSON format in the installation package of the application program under the condition that the built-in resource files include the built-in resource files issued by the RMS interface through the RMS interface and the built-in resource files configured in the JSON format; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
In the application program, the built-in resource files issued by the setting interface of the server are stored in the preset folder corresponding to the setting interface, and meanwhile, other built-in resource files in the installation package of the application program are configured in the JSON format, so that the built-in resource files stored in the preset folder in the installation package of the application program and all built-in resource files in the JSON format are obtained, and all built-in resource files in the installation package of the application program can be accurately obtained.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
The test module 200 is configured to detect test data in all built-in resource files, and sequentially test each built-in resource file through a preset test case to obtain a data error in the built-in resource file.
Optionally, the manner of detecting the test data in all built-in resource files includes, but is not limited to:
filtering URLs carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test marks or not;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
For example, the way to detect the test data in all built-in resource files includes:
filtering the URL carried in each built-in resource file through a preset regular expression; regular expressions include, but are not limited to: https & & http regular expressions, wbmain protocol regular expressions, and https & & http & & wbmain regular expressions; judging whether the filtered URL contains a test identifier or not; wherein, the test identification includes but is not limited to: test marks such as aptest and/or pmaltest and the like;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal by setting test data in the built-in resource file, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be abnormally displayed after being installed in a user terminal, and user experience of a user using an internet application program may be seriously affected.
In this embodiment, a manner of sequentially testing each built-in resource file through a preset test case is not specifically limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
And a reporting module 300, configured to present the test data and the data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing device of the eighth embodiment of the invention realizes automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
A ninth embodiment of the present invention, a test apparatus, as shown in fig. 6, includes the following components:
the obtaining module 100 is configured to obtain, in an installation package of an application program, a built-in resource file that presents a setting page when the application program cannot connect to the internet.
Optionally, the obtaining module 100 is specifically configured to:
the built-in resource file comprises: the method comprises the steps that a server acquires built-in resource files issued by a preset interface stored in a preset folder in an installation package of an application program and acquires all built-in resource files configured in a set format under the conditions of the built-in resource files issued by the set interface and the built-in resource files configured in the set format; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
For example: the obtaining module 100 is specifically configured to: under the condition that the built-in resource files comprise built-in resource files issued by a server RMS through an RMS interface and built-in resource files configured in a JSON format, the built-in resource files issued by the RMS interface and stored in a builtingdata folder in an installation package of an application program are obtained, and all built-in resource files configured in the JSON format in the installation package of the application program are obtained; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
In the application program, the built-in resource files issued by the setting interface of the server are stored in the preset folder corresponding to the setting interface, and meanwhile, other built-in resource files in the installation package of the application program are configured in the JSON format, so that the built-in resource files stored in the preset folder in the installation package of the application program and all built-in resource files in the JSON format are obtained, and all built-in resource files in the installation package of the application program can be accurately obtained.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
The test module 200 is configured to detect test data in all built-in resource files, and sequentially test each built-in resource file through a preset test case to obtain a data error in the built-in resource file.
Optionally, the manner of detecting the test data in all built-in resource files includes, but is not limited to:
filtering URLs carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test marks or not;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
For example, the way to detect the test data in all built-in resource files includes:
filtering the URL carried in each built-in resource file through a preset regular expression; regular expressions include, but are not limited to: https & & http regular expressions, wbmain protocol regular expressions, and https & & http & & wbmain regular expressions; judging whether the filtered URL contains a test identifier or not; wherein, the test identification includes but is not limited to: test marks such as aptest and/or pmaltest and the like;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
Optionally, the testing of each built-in resource file sequentially through a preset test case includes:
and calling the test cases through a preset test framework to test each built-in resource file in sequence.
For example, sequentially testing each built-in resource file through a preset test case includes: and calling the test cases through a preset TestNg test framework to test each built-in resource file in sequence.
Testing each built-in resource file through the independently set test case to obtain data errors in the built-in resource files, thereby effectively avoiding redundancy of the built-in resource files caused by setting the test cases in the built-in resource files; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal by setting test data in the built-in resource file, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be abnormally displayed after being installed in a user terminal, and user experience of a user using an internet application program may be seriously affected.
In this embodiment, a manner of sequentially testing each built-in resource file through a preset test case is not specifically limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
And a reporting module 300, configured to present the test data and the data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing device of the ninth embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
A tenth embodiment of the present invention, a test apparatus, as shown in fig. 6, includes the following components:
the obtaining module 100 is configured to obtain, in an installation package of an application program, a built-in resource file that presents a setting page when the application program cannot connect to the internet.
Optionally, the obtaining module 100 is specifically configured to:
the built-in resource files comprise: the method comprises the steps that a server acquires built-in resource files issued by a preset interface stored in a preset folder in an installation package of an application program and acquires all built-in resource files configured in a set format under the conditions of the built-in resource files issued by the set interface and the built-in resource files configured in the set format; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
For example: the obtaining module 100 is specifically configured to: under the condition that the built-in resource files comprise built-in resource files issued by a server RMS through an RMS interface and built-in resource files configured in a JSON format, the built-in resource files issued by the RMS interface and stored in a builtingdata folder in an installation package of an application program are obtained, and all built-in resource files configured in the JSON format in the installation package of the application program are obtained; the built-in resource file is a resource file which presents a set page under the condition that the application program cannot be connected with the Internet.
In the application program, the built-in resource files issued by the setting interface of the server are stored in the preset folder corresponding to the setting interface, and meanwhile, other built-in resource files in the installation package of the application program are configured in the JSON format, so that the built-in resource files stored in the preset folder in the installation package of the application program and all built-in resource files in the JSON format are obtained, and all built-in resource files in the installation package of the application program can be accurately obtained.
In this embodiment, the built-in resource file includes, but is not limited to: icon, jump URL, name, picture, audio and video and other resource data information.
In this embodiment, the number of the built-in resource files is one or more.
The test module 200 is configured to detect test data in all built-in resource files, and sequentially test each built-in resource file through a preset test case to obtain a data error in the built-in resource file.
Optionally, the manner of detecting the test data in all built-in resource files includes, but is not limited to:
filtering URLs carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test marks or not;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
For example, the way to detect the test data in all built-in resource files includes:
filtering the URL carried in each built-in resource file through a preset regular expression; regular expressions include, but are not limited to: https & & http regular expressions, wbmain protocol regular expressions, and https & & http & & wbmain regular expressions; judging whether the filtered URL contains a test identifier or not; wherein, the test identification includes but is not limited to: test marks such as aptest and/or pmaltest and the like;
if the URL contains the test identification, judging that the built-in resource file carrying the URL carries test data; otherwise, judging that the built-in resource file carrying the URL does not carry the test data.
Optionally, the testing of each built-in resource file sequentially through a preset test case includes:
and calling the test cases through a preset test framework to test each built-in resource file in sequence.
For example, sequentially testing each built-in resource file through a preset test case includes: and calling the test cases through a preset TestNg test framework to test each built-in resource file in sequence.
Optionally, the testing of each built-in resource file sequentially through a preset test case includes:
the test case comprises: under the condition of testing the input data and the test reference data, judging whether test result data obtained by each built-in resource file based on the test input data is matched with the test reference data; if the test result data is matched with the test reference data, judging that each built-in resource file has data errors; otherwise, judging that each built-in resource file has no data error.
Each built-in resource file is tested through the independently set test case to obtain data errors in the built-in resource files, and redundancy of the built-in resource files caused by setting the test cases in the built-in resource files is effectively avoided; meanwhile, the testing efficiency of the application program is improved, the repeated work that a test case is set in each built-in resource file in the application program is avoided, and the testing efficiency is effectively improved.
Generally, in the development process of a built-in resource file in an application program, a research and development engineer may verify whether the function of the built-in resource file is normal by setting test data in the built-in resource file, but in an installation package issued by the application program, if the test data in the built-in resource file is not set as formal issue data, the application program may be abnormally displayed after being installed in a user terminal, and user experience of a user using an internet application program may be seriously affected.
In this embodiment, the manner of sequentially testing each built-in resource file through the preset test case is not particularly limited, and may be that a plurality of test cases are set according to engineering experience of a test engineer, and each built-in resource file is sequentially tested through each test case, respectively, so as to obtain a data error in the built-in resource file.
In this embodiment, the number of test cases is one or more.
And a reporting module 300, configured to present the test data and the data errors in all built-in resource files through the test report.
The test data and data errors in all built-in resource files are presented through the test report, so that a development engineer can be effectively helped to position and correct the test data and data errors in the built-in resource files, and the development efficiency of the application program is improved.
The testing device of the tenth embodiment of the invention realizes the automatic testing of the built-in resource files in the internet application program, and effectively improves the testing precision and the testing efficiency of the built-in resource files in the internet application program.
An eleventh embodiment of the present invention, a test apparatus, as shown in fig. 7, includes the following components:
a processor 501 and a memory 502. In some embodiments of the invention, the processor 501 and the memory 502 may be connected by a bus or other means.
Processor 501 may be a general-purpose Processor such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention. Wherein, the memory 502 is used for storing the executable instructions of the processor 501;
a memory 502 for storing program code and transferring the program code to the processor 501. Memory 502 may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); the Memory 502 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 502 may also comprise a combination of memories of the kind described above.
The processor 501 is configured to call the program code management code stored in the memory 502, and perform some or all of the steps in any of the first embodiment to the fifth embodiment of the present invention.
The test equipment of the eleventh embodiment of the invention realizes automatic test of the built-in resource files in the internet application program, and effectively improves the test precision and test efficiency of the built-in resource files in the internet application program.
A twelfth embodiment of the present invention is a computer-readable storage medium.
The computer storage media may be RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.
The computer readable storage medium stores one or more programs which are executable by one or more processors to implement some or all of the steps in any of the first through fifth embodiments of the present invention.
The computer-readable storage medium according to the twelfth embodiment of the present invention stores one or more programs, and the one or more programs can be executed by one or more processors, so as to implement automatic testing of a built-in resource file in an internet application program, and effectively improve testing accuracy and testing efficiency of the built-in resource file in the internet application program.
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 apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the particular illustrative embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but is intended to cover various modifications, equivalent arrangements, and equivalents thereof, which may be made by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method of testing, comprising:
acquiring a built-in resource file presenting a set page under the condition that the application program cannot be connected with the Internet in an installation package of the application program;
detecting test data in all the built-in resource files, and sequentially testing each built-in resource file through a preset test case to obtain data errors in the built-in resource files;
presenting test data and data errors in all the built-in resource files through test reports;
the built-in resource files also comprise built-in resource files configured in a set format;
the detecting test data in all the built-in resource files comprises:
filtering Uniform Resource Locators (URLs) carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test identifications or not;
if the URL contains a test identifier, judging that the built-in resource file carrying the URL carries test data;
otherwise, judging that the built-in resource file carrying the URL does not carry test data.
2. The method according to claim 1, wherein the built-in resource file comprises a built-in resource file issued by a server through a set interface;
the acquiring, in an installation package of an application program, a built-in resource file that presents a setting page when the application program cannot connect to the internet, includes:
and acquiring a built-in resource file issued by the setting interface and stored in a preset folder in the installation package of the application program.
3. The method according to claim 1, wherein the sequentially testing each built-in resource file through a preset test case comprises:
and calling the test cases through a preset test frame to test each built-in resource file in sequence.
4. The method of any of claims 1 to 3, wherein the test case comprises: test input data and test reference data;
the step of sequentially testing each built-in resource file through a preset test case comprises the following steps:
judging whether test result data obtained by each built-in resource file based on the test input data is matched with the test reference data;
if the test result data is matched with the test reference data, judging that each built-in resource file has data errors;
otherwise, judging that each built-in resource file has no data error.
5. A test apparatus, comprising:
the system comprises an acquisition module, a setting module and a display module, wherein the acquisition module is used for acquiring a built-in resource file presenting a set page under the condition that an application program cannot be connected with the Internet in an installation package of the application program;
the test module is used for detecting test data in all the built-in resource files and sequentially testing each built-in resource file through a preset test case to obtain data errors in the built-in resource files;
the report module is used for presenting the test data and the data errors in all the built-in resource files through test reports;
the built-in resource files also comprise built-in resource files configured in a set format;
the detecting test data in all the built-in resource files comprises:
filtering Uniform Resource Locators (URLs) carried in each built-in resource file through a preset regular expression, and judging whether the filtered URLs contain test identifications or not;
if the URL contains a test identifier, judging that the built-in resource file carrying the URL carries test data;
otherwise, judging that the built-in resource file carrying the URL does not carry test data.
6. The apparatus of claim 5, wherein the built-in resource file comprises a built-in resource file issued by a server through a setting interface; the acquisition module is specifically configured to:
and acquiring the built-in resource file sent by the set interface and stored in a preset folder in the installation package of the application program.
7. The apparatus of claim 5, wherein the sequentially testing each built-in resource file through a preset test case comprises:
and calling the test cases through a preset test frame to test each built-in resource file in sequence.
8. The apparatus of any of claims 5 to 7, wherein the test case comprises: test input data and test reference data;
the step of sequentially testing each built-in resource file through a preset test case comprises the following steps:
judging whether test result data obtained by each built-in resource file based on the test input data is matched with the test reference data;
if the test result data is matched with the test reference data, judging that each built-in resource file has data errors;
otherwise, judging that each built-in resource file has no data error.
9. A test device, wherein the test device comprises a processor and a memory;
the processor is configured to execute a test program stored in the memory to implement the steps of the test method according to any one of claims 1 to 4.
10. A computer readable storage medium, storing one or more programs which are executable by one or more processors to perform the steps of a test method according to any one of claims 1 to 4.
CN201810520918.7A 2018-05-28 2018-05-28 Test method, device, equipment and computer readable storage medium Active CN108733571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810520918.7A CN108733571B (en) 2018-05-28 2018-05-28 Test method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810520918.7A CN108733571B (en) 2018-05-28 2018-05-28 Test method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108733571A CN108733571A (en) 2018-11-02
CN108733571B true CN108733571B (en) 2022-05-31

Family

ID=63935547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810520918.7A Active CN108733571B (en) 2018-05-28 2018-05-28 Test method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108733571B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739752B (en) * 2018-12-21 2022-10-25 北京城市网邻信息技术有限公司 Built-in resource testing method and device, electronic equipment and readable storage medium
CN113448839B (en) * 2020-12-24 2024-01-26 北京新氧科技有限公司 Application program testing method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937346A (en) * 2009-07-01 2011-01-05 英业达股份有限公司 Method for executing application program through snapshot function and electronic device thereof
CN102165445A (en) * 2008-09-26 2011-08-24 微软公司 Data-tier application component
CN106127458A (en) * 2016-07-18 2016-11-16 青岛海信电器股份有限公司 The sending method of a kind of Email and device
CN106354649A (en) * 2016-09-18 2017-01-25 郑州云海信息技术有限公司 Layered script design method for automated testing of webpages
CN106547689A (en) * 2016-10-20 2017-03-29 金航数码科技有限责任公司 A kind of automatic test cases development system and method based on web
CN107943372A (en) * 2017-11-29 2018-04-20 努比亚技术有限公司 A kind of interface display method, device and computer-readable recording medium
CN107992291A (en) * 2017-11-16 2018-05-04 上海南潮信息科技有限公司 Ruff OS Internet of Things operating systems applied to built-in application program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020032706A1 (en) * 1999-12-23 2002-03-14 Jesse Perla Method and system for building internet-based applications
US7143310B2 (en) * 2003-01-22 2006-11-28 Sun Microsystems Inc. Generating standalone MIDlets from a testing harness
US9681304B2 (en) * 2013-02-22 2017-06-13 Websense, Inc. Network and data security testing with mobile devices
CN103685228B (en) * 2013-10-12 2017-05-17 北京奇安信科技有限公司 Website vulnerability rapid scanning method and device
US9928059B1 (en) * 2014-12-19 2018-03-27 Amazon Technologies, Inc. Automated deployment of a multi-version application in a network-based computing environment
CN107436843A (en) * 2016-05-27 2017-12-05 北京京东尚科信息技术有限公司 Webpage performance test methods and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102165445A (en) * 2008-09-26 2011-08-24 微软公司 Data-tier application component
CN101937346A (en) * 2009-07-01 2011-01-05 英业达股份有限公司 Method for executing application program through snapshot function and electronic device thereof
CN106127458A (en) * 2016-07-18 2016-11-16 青岛海信电器股份有限公司 The sending method of a kind of Email and device
CN106354649A (en) * 2016-09-18 2017-01-25 郑州云海信息技术有限公司 Layered script design method for automated testing of webpages
CN106547689A (en) * 2016-10-20 2017-03-29 金航数码科技有限责任公司 A kind of automatic test cases development system and method based on web
CN107992291A (en) * 2017-11-16 2018-05-04 上海南潮信息科技有限公司 Ruff OS Internet of Things operating systems applied to built-in application program
CN107943372A (en) * 2017-11-29 2018-04-20 努比亚技术有限公司 A kind of interface display method, device and computer-readable recording medium

Also Published As

Publication number Publication date
CN108733571A (en) 2018-11-02

Similar Documents

Publication Publication Date Title
US20210248062A1 (en) System and Method for Data Collection and Analysis of Information Relating to Mobile Applications
CN108733571B (en) Test method, device, equipment and computer readable storage medium
CN110798380B (en) Data acquisition method, system, device, test equipment and test server
CN109634841B (en) Electronic device, interface automatic test method and storage medium
CN105302722B (en) CTS automatic testing method and device
CN109784738B (en) Approval method and approval device
CN109753367B (en) Communication method, communication device, computer equipment and computer readable storage medium
CN105072197A (en) Information-recommending method and device
CN110727581A (en) Collapse positioning method and electronic equipment
CN106161656B (en) Interface jumping method and device
CN108959929B (en) Program file processing method and device
CN105653383A (en) Error tolerance processing method and apparatus for data
CN109388571B (en) Method and device for acquiring identification information, computer equipment and storage medium
CN112073462B (en) Positioning method and device
CN105376646B (en) A kind of set top box upgrading program configuration method and device
CN109359384B (en) Method and device for calling silk-screen mark into printed circuit board
CN109039813B (en) Method, system and equipment for detecting internet access
CN109165127B (en) Problem interface positioning method and device and electronic equipment
CN108566331B (en) Message transmission checking method, device, server, terminal and storage medium
CN113452533A (en) Charging self-inspection and self-healing method and device, computer equipment and storage medium
US20160316052A1 (en) Apparatus and method for correcting an input number
CN108762951B (en) Method and device for transmitting notification, computer equipment and storage medium
CN108881585B (en) Built-in application program test processing method and device, electronic equipment and storage medium
CN110489341B (en) Test method and device, storage medium and electronic equipment
CN110659214B (en) Information processing system, method, computing device, and storage medium

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