WO2019237239A1 - 数据测试方法、装置、设备/终端/服务器及计算机可读存储介质 - Google Patents

数据测试方法、装置、设备/终端/服务器及计算机可读存储介质 Download PDF

Info

Publication number
WO2019237239A1
WO2019237239A1 PCT/CN2018/090757 CN2018090757W WO2019237239A1 WO 2019237239 A1 WO2019237239 A1 WO 2019237239A1 CN 2018090757 W CN2018090757 W CN 2018090757W WO 2019237239 A1 WO2019237239 A1 WO 2019237239A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
test
business
target object
incremental
Prior art date
Application number
PCT/CN2018/090757
Other languages
English (en)
French (fr)
Inventor
颜志强
Original Assignee
优视科技新加坡有限公司
优视科技有限公司
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 优视科技新加坡有限公司, 优视科技有限公司 filed Critical 优视科技新加坡有限公司
Priority to PCT/CN2018/090757 priority Critical patent/WO2019237239A1/zh
Priority to CN201880001139.4A priority patent/CN109496417A/zh
Publication of WO2019237239A1 publication Critical patent/WO2019237239A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the embodiments of the present application relate to the field of Internet technologies, and in particular, to a data testing method, device, device / terminal / server, and computer-readable storage medium.
  • the release cycle is long, and it is necessary to wait for users to actively download and install updates.
  • the release verification is relatively passive and the verification efficiency is low, which affects the overall version update speed of the application.
  • the user needs to download the complete installation package, which results in occupying more network resources and local resources of the user.
  • one of the technical problems solved by the embodiments of the present application is to provide a data testing method, device, device / terminal / server, and computer-readable storage medium to overcome the existing verification efficiency of application service functions. Low, the problem of occupying more resources.
  • An embodiment of the present application provides a data testing method, including: obtaining a business test file of a target object to be tested according to a test instruction, wherein the business test file includes at least one of the following: and a business logic in the target object to be tested The first type incremental test file corresponding to the class file, the second type incremental test file corresponding to the resource class file in the target object to be tested, and the third type corresponding to the dynamic link library class file in the target object to be tested Class incremental test file; according to the category of the incremental test file included in the business test file, file processing for the business test is performed on the incremental test file and the file in the corresponding target object to be tested Performing a business test on the target object to be tested according to a result of the file processing.
  • An embodiment of the present application further provides a data testing device, including: an obtaining module configured to obtain a business test file of a target object to be tested according to a test instruction, wherein the business test file includes at least one of the following: The first type of incremental test file corresponding to the business logic class file in the test target object, the second type of incremental test file corresponding to the resource class file in the target object to be tested, and the dynamic link library in the target object to be tested A third type of incremental test file corresponding to the class file; a processing module configured to perform, on the incremental test file and its corresponding target object to be tested, the type of the incremental test file according to the type of the incremental test file included in the business test file
  • the files in the file are processed for business testing; a test module is configured to perform a business test on the target object to be tested according to a result of the file processing.
  • An embodiment of the present application further provides a device / terminal / server, including: one or more processors; a storage device configured to store one or more programs; when the one or more programs are stored by the one or more programs The two processors execute such that the one or more processors implement the data testing method described above.
  • An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the data testing method described above is implemented.
  • the business test file of the target object to be tested is automatically obtained according to the test instruction, without relying on the download operation of the user, and only the incremental test file for business test is required, instead of being complete
  • the entire installation package of the application is installed.
  • the file is processed for business testing, and the business test of the target object to be tested is performed through the file processing result.
  • automatically obtaining a business test file for business testing can greatly improve the application version update speed and the verification efficiency of new business functions.
  • the business test file is an incremental test file, which can save network resources And user local resources. In addition, through targeted file processing of incremental test files, the efficiency of corresponding business function tests is further improved.
  • FIG. 1 is a flowchart of steps in a data testing method according to Embodiment 1 of the present application; FIG.
  • FIG. 3 is a flowchart of steps in a data testing method according to Embodiment 3 of the present application.
  • FIG. 4 is a structural block diagram of a data testing device according to a fourth embodiment of the present application.
  • FIG. 5 is a structural block diagram of a data testing apparatus according to Embodiment 5 of the present application.
  • FIG. 6 is a schematic structural diagram of a device / terminal / server according to Embodiment 6 of the present application.
  • FIG. 1 a flowchart of steps of a data testing method according to Embodiment 1 of the present application is shown.
  • Step S102 Obtain a business test file of the target object to be tested according to the test instruction.
  • the test instruction is an instruction set by a person skilled in the art to perform a business test on a target object to be tested periodically or irregularly.
  • the test instruction can be set in the target object to be tested, and the new business test file is detected at intervals, or the new business test file is triggered according to the set trigger operation.
  • the test instruction can also be a business test.
  • the file issuing end such as the server, sends an instruction to the target object to be tested to instruct it to perform a business test. After receiving the test instruction, the target object to be tested obtains a business test file from the business test file issuing end.
  • the business test file includes at least one of the following: the first type of incremental test file corresponding to the business logic class file in the target object to be tested, the second type of incremental test file corresponding to the resource class file in the target object to be tested, and the The third type of incremental test file corresponding to the dynamic link library class file in the test target object.
  • the business logic class file is used to implement various business functions of the target object to be tested;
  • the resource class file is related to the interface interaction and is used to provide various elements required to generate the interactive interface;
  • the dynamic link library class file can be directly loaded and executed , Used to call the underlying method of the system or to perform core logic encryption.
  • the generated business test file may include one or more (two or more) of the first, second, and third types of incremental test files
  • the first type of incremental test file corresponds to the business logic class file and provides a new business logic implementation. It only needs to include the content to implement the new business logic. It does not need to include the content of the business logic class file already in the target object to be tested.
  • the second type of incremental test file corresponds to the resource class file. It provides new interactive interface resources. It only needs to include the content of the new resource, and does not need to include the content of the resource class file already in the target object to be tested.
  • the third type of incremental file corresponds to the resource class file.
  • the test file corresponds to the dynamic link library class file, and provides the contents of the new method of calling the underlying system or the new core logical encryption method. It only needs to include the new content, and does not need to include the existing dynamic link library class in the target object to be tested. The contents of the file.
  • Step S104 According to the category of the incremental test file included in the business test file, file processing for the business test is performed on the incremental test file and the file in the corresponding target object to be tested.
  • the type of the incremental test file can indicate which one or more of the first type of incremental test file, the second type of incremental test file, and the third type of incremental test file are contained in the business test file.
  • Different types of incremental test files perform different file processing for business testing. For example, the first type of incremental test file is merged with the business logic class file in the target object to be tested, the second type of incremental test file is merged with the resource class file in the target object to be tested, and so on.
  • Step S106 Perform a business test on the target object to be tested according to the result of the file processing.
  • the target object to be tested can use these new merged or unmerged files to perform corresponding business tests, that is, test the use of new business functions to determine new business functions. Operation and usage.
  • the business test file of the target object to be tested is automatically acquired according to the test instruction, without relying on the download operation of the user, and only the incremental test file for business test is obtained, instead of the complete application installation package, Furthermore, after the corresponding incremental test file is obtained, it is subjected to file processing for business testing, and the business test of the target object to be tested is performed based on the file processing result. It can be seen that, through this embodiment, automatically obtaining a service test file for service testing can greatly improve the application version update speed and verification efficiency of new service functions.
  • the service test file is an incremental test file, which can save network resources and local resources of users. In addition, through targeted file processing of incremental test files, the efficiency of corresponding business function tests is further improved.
  • the data testing method of this embodiment may be executed by any appropriate device having data processing capabilities, including but not limited to: various terminal devices or servers, such as a PC, a tablet computer, a mobile terminal, and the like.
  • FIG. 2 a flowchart of steps of a data testing method according to Embodiment 2 of the present application is shown.
  • Step S202 Obtain a business test file of the target object to be tested according to the test instruction.
  • the business test file includes at least one of the following: a first type of incremental test file corresponding to a business logic class file in the target object to be tested, a second type of incremental test file corresponding to a resource class file in the target object to be tested, A third type of incremental test file corresponding to the dynamic link library class file in the target object to be tested.
  • This step may be implemented by referring to the description of step S102 in the first embodiment, and details are not described herein again.
  • the service test file can be a compressed compressed file or an uncompressed original file.
  • the business test file publishing end such as the server, can follow certain rules Send the corresponding business test file to the device where the target object to be tested is currently located.
  • Corresponding information can also be configured in the business test file, such as the effective time information of the business test file, processing information and / or reporting information if the business test fails and the target object to be tested crashes, and so on.
  • Step S204 According to the category of the incremental test file included in the business test file, file processing for the business test is performed on the incremental test file and the file in the corresponding target object to be tested.
  • targeted file processing for the business test can effectively improve the efficiency of the business test.
  • the first type of incremental test file can be merged with the business logic type file in the target object to be tested to obtain the first file processing Results; and / or, if the business test file includes a second type of incremental test file, the second type of incremental test file may be merged with the resource type file in the target object to be tested to obtain a second file processing result.
  • the third type of incremental test file is not merged.
  • the business logic class file in the target object to be tested can also be replaced with the first file processing result, and / or the resource class file in the target object to be tested is replaced with the second file processing result, and / or,
  • the third incremental test file replaces the dynamic link library class file in the target object to be tested. If the above replacement operation is performed, the local storage resources and system power consumption of the target object to be tested can be saved; the target object to be tested does not need to distinguish between the original file and the synthesized or replaced file, simplifying the complexity of business test execution And, if the business test is successful, the new file can be used directly without subsequent processing, improving the efficiency of publishing new business functions. If the replacement operation is not performed, when the service test fails, you can quickly roll back to the original file without affecting the user's use and improving the user's experience.
  • merge files by merging binary files such as using the Binary diff / patch differential patch tool.
  • the tool compares the newly added apk package with the original apk package through Binary diff to differentiate the incremental test file; on the other hand, after the application under test obtains the function compressed package of the incremental test file , The files in the compressed package and the corresponding files of the original application installation package are respectively combined using the Binary patch function to obtain corresponding files containing new functions.
  • Binary file merging is adopted, and the merging is direct and fast, which can greatly improve the efficiency of merging and testing.
  • the service test file is a compressed package file, the above operations need to be performed after decompressing it.
  • Step S206 Perform a business test on the target object to be tested according to the result of the file processing.
  • the result of the file processing may be directly used to perform a business test on the target object to be tested.
  • the service test file meets the service test conditions, and if it is satisfied, load the first file processing result and / or load the second file processing result and / or load the third type of incremental test file; According to the loaded first file processing result and / or the second file processing result and / or the third type of incremental test file, a business test is performed on the test target object.
  • the service test conditions include at least one of the following: whether the service test file is within the effective time, whether the service test file corresponds to crash data, and whether the service test file is remotely marked as invalid.
  • the validity of the business test file can be determined; by judging whether the business test file corresponds to the crash data, the correctness and robustness of the business test file can be determined; by judging whether the business test file is Being remotely marked as invalid, it can be determined whether the test end of the business test file has been canceled using the business test file for testing.
  • the business test file is not limited to this. In actual use, those skilled in the art can also set appropriate service test conditions according to actual needs.
  • the business test can be performed by any appropriate method, such as restarting the target object to be tested, testing new business functions through a set trigger operation, and performing business testing.
  • the file release end controls the test object to be tested and so on.
  • Step S208 feedback the service test result.
  • the result of the business test is fed back to the corresponding control end, such as the business test file release end, or the server end corresponding to the target object to be tested.
  • the business test file is uninstalled; and / or, if a business test uninstall instruction is received from the server, the uninstallation is performed.
  • the setting threshold may be appropriately set by those skilled in the art according to requirements, and this embodiment of the present application does not limit this.
  • the target object to be tested crashes and the number of times exceeds the set threshold, it indicates that the business function implemented by the business test file is not complete and needs to be uninstalled to allow the target object to be tested to run normally using the original business function; if the business test of the server is received The uninstall instruction indicates that the server side abandons this business function test and needs to return the target object to be tested to the original business function.
  • the business test file of the target object to be tested is automatically acquired according to the test instruction, without relying on the download operation of the user, and only the incremental test file for business test is obtained, instead of the complete application installation package, Furthermore, after the corresponding incremental test file is obtained, it is subjected to file processing for business testing, and the business test of the target object to be tested is performed based on the file processing result. It can be seen that, through this embodiment, automatically obtaining a service test file for service testing can greatly improve the application version update speed and verification efficiency of new service functions.
  • the service test file is an incremental test file, which can save network resources and local resources of users. In addition, through targeted file processing of incremental test files, the efficiency of corresponding business function tests is further improved.
  • the data testing method in this embodiment may be executed by any appropriate device having data processing capabilities, including, but not limited to, various terminal devices or servers, such as a PC, a tablet computer, a mobile terminal, and the like.
  • various terminal devices or servers such as a PC, a tablet computer, a mobile terminal, and the like.
  • FIG. 3 a flowchart of steps of a data testing method according to Embodiment 3 of the present application is shown.
  • This embodiment takes the gray-scale test of an application based on the Android system as an example, and describes the data testing method provided in the embodiment of the present application from the perspective of the interaction between the server and the client where the target object to be tested is located.
  • Gray-scale testing is a test form that selects a specific group of people to test before a product or application is officially released, and gradually expands the number of trials in order to find and correct problems in a timely manner.
  • Step S302 The server compiles the business function to be tested into a function compression package (that is, a compression package corresponding to the service test file).
  • a user can directly use the service function by allowing an installed application to actively load a compressed package of a service function to be verified that is dynamically issued.
  • an Android-based function compression package may contain some or all of the following three parts, namely: (a) class files (business logic class files), the business logic of the application is written in the class, and the file is in the .class format Saved and aggregated at compile time, compiled into a .dex format file.
  • the application loads the .dex file and saves it in a dex array in memory so that it can be loaded into the class files related to the business logic; (2) the resource file (resource class file), which is used to store the application's interactive interface Multiple files related to all icons, text, interface layout, etc .; (3) so file (a type of dynamic link library class file), a binary file written and compiled in C or C ++, the application can load and call the so file to implement the call
  • a new or updated business function also depends on at least one of these elements, so one or more parts of the element may be added or changed to generate a compressed package of new business functions. As long as the compressed package of the business function to be verified contains these new or changed elements and is successfully loaded by the application, users can directly use the business function.
  • the so file is a file that the application can load directly; the resource file needs to be merged with the original resource file of the application, and the application can also load the merged resource file; and for the class file, the class file related to the business function to be verified is also It needs to be compiled into a .dex file, merged with the original .dex file, and then loaded and inserted into the dex array, so that the application to be tested can load the business logic that the new business function depends on from the dex array. class. Furthermore, the dynamic increase of business functions is realized.
  • the grayscale test is in the form of an AB test
  • the business functions to be tested need to be compiled into different multiple function compression packages.
  • AB test is to find some users and divide them into two groups evenly, let one group of users use A version for testing, and let the other group use B version for testing. From the large amount of data obtained through the AB test, it is analyzed which version is the most popular among users. It can ensure that the new version can be accepted by users and that some small problems can be improved before it is widely promoted. Further, in practical applications, the AB test may not be limited to the form of dividing users into two groups, and users may be divided into multiple groups (two groups or more) according to actual needs to meet business test needs.
  • the business function code to be verified and the dependent resource files and so files can be compiled.
  • the compiled function compression package contains .dex files, resource file packages, and so files.
  • Step S304 The server deploys the function compression package for the target application to be tested and sets the effective configuration.
  • the server configures and launches the target application based on the information of the target application, including the version, user attributes, region, and language of the target application.
  • the target application is randomly selected. Allocate matching product design plans, and control the total amount issued.
  • the effective time of the dynamic function compression package can be set.
  • the application requests the web server to obtain the updated configuration and download the dynamic function compression package when the target application is matched.
  • Step S306 The target application checks for updates, obtains the configuration of the function compression package, and downloads the corresponding dynamic function compression package (also referred to as a gray package during a gray test).
  • Step S308 After the target application finishes downloading the dynamic function compression package, decompress it.
  • the SO file is decompressed and stored in the local file storage of the device where the target application is located.
  • the resource file package is decompressed, it is merged with the original resource file package of the application.
  • the .dex file is merged with the original .dex file and stored in the target application.
  • the device's local file storage records the file path and version.
  • Step S310 The target application is restarted.
  • Step S312 The target application judges whether the service test condition is satisfied, and if it is, the service test is performed; otherwise, the current test is ended.
  • applications that have been published and installed can directly load business function files that are dynamically issued, without the need for users to manually install, and directly use new or updated business functions; the publishing process does not need to go through conventional publishing channels (including third-party publishing channels) (Such as various Android application markets), which improves the efficiency of application business function verification and the speed of version iteration; moreover, it is possible to perform a comparative verification of multiple product design schemes at the same time, which can optimize product functions more agilely.
  • the data testing method in this embodiment may be executed by any appropriate device having data processing capabilities, including, but not limited to, various terminal devices or servers, such as a PC, a tablet computer, a mobile terminal, and the like.
  • various terminal devices or servers such as a PC, a tablet computer, a mobile terminal, and the like.
  • FIG. 4 a structural block diagram of a data testing apparatus according to Embodiment 4 of the present application is shown.
  • the data testing apparatus of this embodiment includes: an obtaining module 402 configured to obtain a business test file of a target object to be tested according to a test instruction, wherein the business test file includes at least one of the following: a service with the target object to be tested The first type of incremental test file corresponding to the logical class file, the second type of incremental test file corresponding to the resource class file in the target object to be tested, and the first type of incremental test file corresponding to the dynamic link library class file in the target object to be tested Three types of incremental test files; a processing module 404 configured to perform, based on the type of the incremental test file included in the business test file, the incremental test file and its corresponding file in the target object to be tested File processing for business testing; a test module 406 is configured to perform a business test on the target object to be tested according to a result of the file processing.
  • an obtaining module 402 configured to obtain a business test file of a target object to be tested according to a test instruction, wherein the business test file includes at least one of the
  • the data testing apparatus of this embodiment is used to implement the corresponding data testing methods in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
  • FIG. 5 a structural block diagram of a data testing apparatus according to Embodiment 5 of the present application is shown.
  • the data testing apparatus of this embodiment includes: an obtaining module 502 configured to obtain a business test file of a target object to be tested according to a test instruction, wherein the business test file includes at least one of the following: a service with the target object to be tested The first type of incremental test file corresponding to the logical class file, the second type of incremental test file corresponding to the resource class file in the target object to be tested, and the first type of incremental test file corresponding to the dynamic link library class file in the target object to be tested Three types of incremental test files; a processing module 504 configured to perform, based on the category of the incremental test file included in the business test file, the incremental test file and its corresponding file in the target object to be tested File processing for business testing; a testing module 506 is configured to perform a business test on the target object to be tested according to a result of the file processing.
  • an obtaining module 502 configured to obtain a business test file of a target object to be tested according to a test instruction, wherein the business test file includes at least one of the
  • the processing module 504 includes: a first processing module 5042 configured to, if the service test file includes a first type of incremental test file, link the first type of incremental test file to the service Logical files are merged to obtain a first file processing result; and / or, a second processing module 5044 is configured to, if the business test file includes a second type of incremental test file, add the second type of incremental files The test file is merged with the resource class file to obtain a second file processing result.
  • the processing module 504 is configured to determine whether the service test file meets a service test condition, and if so, load the first file processing result and / or load the second file processing result and / or load The third type of incremental test file; and for the target object to be tested according to the loaded first file processing result and / or the second file processing result and / or the third type of incremental test file Conduct business tests.
  • the service test condition includes at least one of the following: whether the service test file is within a valid time, whether the service test file corresponds to crash data, and whether the service test file is remotely marked as invalid.
  • the data testing apparatus of this embodiment further includes an uninstallation module 508 configured to uninstall the server if the result of the business test indicates that the target object to be tested crashes, and the number of crashes is greater than a set threshold.
  • the data testing apparatus of this embodiment is used to implement the corresponding data testing methods in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
  • FIG. 6 a schematic structural diagram of a device / terminal / server according to Embodiment 6 of the present application is shown.
  • the specific embodiment of the present application does not limit the specific implementation of the device / terminal / server.
  • the device / terminal / server may include a processor 602 and a storage device 604.
  • the processor 602 is configured to execute a program 606, and may specifically perform relevant steps in the foregoing data testing method embodiment.
  • the program 606 may include program code, where the program code includes a computer operation instruction.
  • the processor 602 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
  • the device / terminal / server includes one or more processors, which can be processors of the same type, such as one or more CPUs; or different types of processors, such as one or more CPUs and one or more ASICs .
  • the storage device 604 is configured to store one or more programs 606.
  • the storage device 604 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the program 606 may be specifically configured to cause the processor 602 to perform the following operations: obtaining a business test file of the target object to be tested according to a test instruction, where the business test file includes at least one of the following: and the business logic in the target object to be tested The first type incremental test file corresponding to the class file, the second type incremental test file corresponding to the resource class file in the target object to be tested, and the third type corresponding to the dynamic link library class file in the target object to be tested Class incremental test file; according to the category of the incremental test file included in the business test file, file processing for the business test is performed on the incremental test file and the file in the corresponding target object to be tested Performing a business test on the target object to be tested according to a result of the file processing.
  • the program 606 is further configured to cause the processor 602 to perform, based on the category of the incremental test file included in the service test file, the incremental test file and the corresponding test file.
  • the file in the test target object is used for file processing for business testing, if the business test file includes a first type of incremental test file, the first type of incremental test file and the business logic type file Merging to obtain a first file processing result; and / or, if the business test file includes a second type of incremental test file, merging the second type of incremental test file with the resource type file, Obtain the second file processing result.
  • the program 606 is further configured to cause the processor 602 to determine whether the business test file meets the business test when performing a business test on the target object to be tested according to a result of the file processing. If the conditions are met, load the first file processing result and / or load the second file processing result and / or load the third type of incremental test file; according to the loaded first file processing result and And / or the second file processing result and / or the third type of incremental test file to perform a business test on the target object to be tested.
  • the service test conditions include at least one of the following: whether the service test file is within a valid time, whether the service test file corresponds to crash data, and whether the service test file is The remote is marked as invalid.
  • the program 606 is further configured to cause the processor 602 to uninstall the target object if the result of the service test indicates that the target object to be tested crashes, and the number of crashes is greater than a set threshold.
  • the business test file of the target object to be tested is automatically obtained according to the test instruction, without relying on the download operation of the user, and only the incremental test file for business test is required, rather than the complete The entire installation package of the application is installed. After obtaining the corresponding incremental test file, the file is processed for business testing, and the business test of the target object to be tested is performed through the file processing result. It can be seen that, by using the data testing solution in the embodiment of the present application, automatically obtaining a business test file for business testing can greatly improve the application version update speed and the verification efficiency of new business functions.
  • the business test file is an incremental test file, which can save network resources And user local resources. In addition, through targeted file processing of incremental test files, the efficiency of corresponding business function tests is further improved.
  • each component / step described in the embodiments of the present application may be split into more components / steps, or two or more components / steps or part of the operations of the components / steps may be combined into New components / steps to achieve the purpose of the embodiments of the present application.
  • an embodiment of the present application includes a computer program product including a computer program borne on a computer-readable medium, the computer program containing program code for executing the method shown in the multiple method embodiments above.
  • the computer program may be downloaded and installed from a network through a communication section, and / or installed from a removable medium.
  • CPU central processing unit
  • the foregoing functions defined in the method shown in the embodiment of the present application are executed.
  • the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access storage (RAM), read-only storage (ROM), erasable Type programmable read-only storage device (EPROM or flash memory), optical fiber, portable compact disk read-only storage device (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal that is included in baseband or propagated as part of a carrier wave, and which carries computer-readable program code. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for performing the operations of this application may be written in one or more programming languages, or a combination thereof, including programming languages such as Java, Smalltalk, C ++ also includes conventional procedural programming languages--such as "C" or similar programming languages.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer, partly on a remote computer, or entirely on a remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network-including local area network (LAN) or wide area network (WAN)-or it can be connected to an external computer (E.g. using an Internet service provider to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more functions to implement a specified logical function Executable instructions.
  • the functions labeled in the blocks may also occur in a different order than those labeled in the drawings. For example, two blocks represented one after the other may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented by a dedicated hardware-based system that performs the specified function or operation , Or it can be implemented with a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present application may be implemented by software or hardware.
  • the described unit may also be provided in a processor, for example, it may be described as: a processor includes an acquisition unit, a processing unit, and a test unit.
  • the name of these units does not constitute a limitation on the unit itself in some cases.
  • the obtaining unit may also be described as a “unit for obtaining a business test file of a target object to be tested according to a test instruction”.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any one of the foregoing embodiments is implemented.
  • the present application further provides a computer-readable medium, which may be included in the device described in the foregoing embodiments; or may exist alone without being assembled into the device.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device is caused to obtain a business test file of a target object to be tested according to a test instruction, where the business test file It includes at least one of the following: a first type of incremental test file corresponding to a business logic class file in the target object to be tested, a second type of incremental test file corresponding to a resource class file in the target object to be tested, and The third type of incremental test file corresponding to the dynamic link library class file in the target object to be tested; and based on the type of the incremental test file included in the business test file,
  • the file in the target object to be tested is processed for a business test; according to a result of the file processing, a business test is performed on the target object to be tested.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请实施例提供了一种数据测试方法、装置、电子设备及计算机存储介质,其中,数据测试方法包括:根据测试指令获取待测试目标对象的业务测试文件,其中,业务测试文件包括以下至少之一:与待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与待测试目标对象中资源类文件对应的第二类增量测试文件、与待测试目标对象中动态链接库类文件对应的第三类增量测试文件;根据业务测试文件中包括的增量测试文件的类别,对增量测试文件及其对应的待测试目标对象中的文件进行用于业务测试的文件处理;根据文件处理的结果,对待测试目标对象进行业务测试。通过本申请实施例,大大提升应用的版本更新速度和新业务功能的验证效率。

Description

数据测试方法、装置、设备/终端/服务器及计算机可读存储介质 技术领域
本申请实施例涉及互联网技术领域,尤其涉及一种数据测试方法、装置、设备/终端/服务器及计算机可读存储介质。
背景技术
随着计算机和互联网技术的发展,电子设备得到了广泛使用,安装在电子设备上的应用也越来越丰富。随之而来的是,应用的版本更新也越来越快。
当应用进行版本更新时,往往需要对新增或更新的业务功能进行快速发布验证,甚至针对同一个业务功能设计多套不同的产品方案以进行发布验证。目前的常规做法是,将更新或新增的业务功能编译到完整的应用软件安装包中,再通过发布渠道向用户发布。用户需主动下载完整的应用软件安装包,并进行安装后使用。
上述针对应用的业务功能的发布验证方式中,一方面发布周期较长,且需要等待用户主动下载并安装更新,发布验证比较被动,验证效率比较低,进而影响了应用的整体版本更新速度;另一方面,用户需要下载完整的安装包,导致占用较多的网络资源和用户本地的资源。
发明内容
有鉴于此,本申请实施例所解决的技术问题之一在于提供一种数据测试方法、装置、设备/终端/服务器及计算机可读存储介质,用以克服现有的应用业务功能的发布验证效率低,占用较多资源的问题。
本申请实施例提供了一种数据测试方法,包括:根据测试指令获取待测试目标对象的业务测试文件,其中,所述业务测试文件包括以下至少之一:与所述待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与所述待测试目标对象中资源类文件对应的第二类增量测试文件、与所述待测试目标对象中动态链接库类文件对应的第三类增量测试文件;根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理;根据所述文件处理的结果,对所述 待测试目标对象进行业务测试。
本申请实施例还提供了一种数据测试装置,包括:获取模块,配置为根据测试指令获取待测试目标对象的业务测试文件,其中,所述业务测试文件包括以下至少之一:与所述待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与所述待测试目标对象中资源类文件对应的第二类增量测试文件、与所述待测试目标对象中动态链接库类文件对应的第三类增量测试文件;处理模块,配置为根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理;测试模块,配置为根据所述文件处理的结果,对所述待测试目标对象进行业务测试。
本申请实施例还提供了一种设备/终端/服务器,包括:一个或多个处理器;存储装置,配置为存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上所述的数据测试方法。
本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上所述的数据测试方法。
通过本申请实施例提供的数据测试方案,根据测试指令自动获取待测试目标对象的业务测试文件,无需依赖用户的下载操作,且仅需获取用于进行业务测试的增量测试文件,而非完整的应用整体安装包,进而,在获取到相应的增量测试文件后,对其进行用于业务测试的文件处理,通过文件处理结果进行待测试目标对象的业务测试。可见,通过本申请实施例的数据测试方案,自动获取业务测试文件进行业务测试,可以大大提升应用的版本更新速度和新业务功能的验证效率,业务测试文件为增量测试文件,能够节约网络资源和用户本地资源。另外,通过对增量测试文件进行有针对性的文件处理,进一步提升了相应业务功能测试的效率。
附图说明
后文将参照附图以示例性而非限制性的方式详细描述本申请实施例的一些具体实施例。附图中相同的附图标记标示了相同或类似的部件或部分。本领域技术人员应该理解,这些附图未必是按比例绘制的。附图中:
图1是根据本申请实施例一的一种数据测试方法的步骤流程图;
图2是根据本申请实施例二的一种数据测试方法的步骤流程图;
图3是根据本申请实施例三的一种数据测试方法的步骤流程图;
图4是根据本申请实施例四的一种数据测试装置的结构框图;
图5是根据本申请实施例五的一种数据测试装置的结构框图;
图6是根据本申请实施例六的一种设备/终端/服务器的结构示意图。
具体实施方式
为了使本领域的人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请实施例一部分实施例,而不是全部的实施例。基于本申请实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本申请实施例保护的范围。
实施例一
参照图1,示出了根据本申请实施例一的一种数据测试方法的步骤流程图。
本实施例的数据测试方法包括以下步骤:
步骤S102:根据测试指令获取待测试目标对象的业务测试文件。
测试指令是本领域技术人员设置的用于定期或不定期对待测试目标对象进行业务测试的指令。测试指令可以设置在待测试目标对象中,每间隔一段时间检测是否有新的业务测试文件,或者是根据设定的触发操作触发检测是否有新的业务测试文件;测试指令也可以是由业务测试文件发布端如服务器端发送给待测试目标对象以指示其进行业务测试的指令,待测试目标对象接收到该测试指令后即从业务测试文件发布端获取业务测试文件。
业务测试文件包括以下至少之一:与待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与待测试目标对象中资源类文件对应的第二类增量测试文件、与待测试目标对象中动态链接库类文件对应的第三类增量测试文件。
其中,业务逻辑类文件用于实现待测试目标对象的各种业务功能;资源类文件与界面交互有关,用于提供生成交互界面所需的各种元素;动态链接库类文件可被直接加载执行,用于调用系统底层的方法或者进行核心逻辑加密等。
当有新的业务功能需要发布测试时,生成的业务测试文件中可以包括第一类、第二类和第三类增量测试文件中的一种或多种(两种及两种以上),第一类增量测试文件与业务逻辑类文件对应,提供新的业务逻辑实现,只需包含实现新的业务逻辑的内容,无需包含待测试目标对象中已有的业务逻辑类文件的内容;第二类增量测试文件与资源类文件对应,提供新的交互界面资源,也只 需包含新的资源的内容,无需包含待测试目标对象中已有的资源类文件的内容;第三类增量测试文件与动态链接库类文件对应,提供新的调用系统底层的方法或者新的核心逻辑加密方法的内容,也只需包含新的内容,无需包含待测试目标对象中已有的动态链接库类文件的内容。
步骤S104:根据业务测试文件中包括的增量测试文件的类别,对增量测试文件及其对应的待测试目标对象中的文件进行用于业务测试的文件处理。
增量测试文件的类别可以指示业务测试文件中包含的是第一类增量测试文件、第二类增量测试文件、第三类增量测试文件中的哪个或哪些,进而有针对性地对不同类别的增量测试文件进行不同的用于业务测试的文件处理。例如,将第一类增量测试文件与待测试目标对象中的业务逻辑类文件合并,将第二类增量测试文件与待测试目标对象中的资源类文件合并,等等。
步骤S106:根据文件处理的结果,对待测试目标对象进行业务测试。
在进行所述文件处理后,待测试目标对象可以使用这些新的合并或者未合并后的文件,进行相应的业务测试,也即,对新的业务功能的使用进行测试,以确定新的业务功能的运行和使用情况。
通过本实施例,根据测试指令自动获取待测试目标对象的业务测试文件,无需依赖用户的下载操作,且仅需获取用于进行业务测试的增量测试文件,而非完整的应用整体安装包,进而,在获取到相应的增量测试文件后,对其进行用于业务测试的文件处理,通过文件处理结果进行待测试目标对象的业务测试。可见,通过本实施例,自动获取业务测试文件进行业务测试,可以大大提升应用的版本更新速度和新业务功能的验证效率,业务测试文件为增量测试文件,能够节约网络资源和用户本地资源。另外,通过对增量测试文件进行有针对性的文件处理,进一步提升了相应业务功能测试的效率。
本实施例的数据测试方法可以由任意适当的具有数据处理能力的设备执行,包括但不限于:各种终端设备或者服务器,如,PC机、平板电脑、移动终端等。
实施例二
参照图2,示出了根据本申请实施例二的一种数据测试方法的步骤流程图。
本实施例的数据测试方法包括以下步骤:
步骤S202:根据测试指令获取待测试目标对象的业务测试文件。
其中,业务测试文件包括以下至少之一:与待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与待测试目标对象中资源类文件对应的第二 类增量测试文件、与待测试目标对象中动态链接库类文件对应的第三类增量测试文件。
本步骤可参照实施例一中步骤S102的描述实现,在此不再赘述。
需要说明的是,业务测试文件可以是经过压缩后的压缩包文件,也可以是未经压缩的原始文件。
此外,当针对同一功能具有多套产品设计方案,即,实现同一业务功能测试的业务测试文件具有不同版本和文件内容,以实现对比验证时,可以由业务测试文件发布端如服务器端按照一定规则对当前待测试目标对象所在的设备发送相应的业务测试文件。
业务测试文件中还可以配置有相应的信息,如,业务测试文件的生效时间信息、若业务测试失败导致待测试目标对象崩溃时的处理信息和/或上报信息,等等。
步骤S204:根据业务测试文件中包括的增量测试文件的类别,对增量测试文件及其对应的待测试目标对象中的文件进行用于业务测试的文件处理。
根据增量测试文件的类别,对其进行有针对性的用于业务测试的文件处理,可以有效提高业务测试的效率。
在一种可行方式中,若业务测试文件中包括第一类增量测试文件,则可以将第一类增量测试文件与待测试目标对象中的业务逻辑类文件进行合并,获得第一文件处理结果;和/或,若业务测试文件中包括第二类增量测试文件,则可以将第二类增量测试文件与待测试目标对象中的资源类文件进行合并,获得第二文件处理结果。对于第三类增量测试文件则不作合并处理。可选地,还可以使用第一文件处理结果替换待测试目标对象中的业务逻辑类文件,和/或,使用第二文件处理结果替换待测试目标对象中的资源类文件,和/或,使用第三增量测试文件替换待测试目标对象中的动态链接库类文件。若进行了上述替换操作,则可以节省待测试目标对象本地的存储资源和系统功耗;也可以使待测试目标对象无须区分原文件和合成或替换后的文件,简单化业务测试执行的复杂度;并且,若业务测试成功,则可以直接使用新的文件,无需进行后续处理,提高新业务功能的发布效率。若不进行上述替换操作,则在业务测试失败时,可以快速回退至原文件,而不会影响用户使用,提升了用户使用体验。
例如,采用合并二进制文件的方式进行文件合并,如采用Binary diff/patch差分补丁工具。一方面,该工具通过Binary diff,将新增功能的apk包与原始apk包进行对比,可以差分出增量测试文件;另一方面,在待测试应用获取到增 量测试文件的功能压缩包后,会将压缩包内的文件分别与原应用安装包的对应文件用Binary patch功能进行合并,得到包含新增功能的对应文件。采用二进制文件合并的方式,合并直接快捷,可以大大提高合并和测试效率。
需要说明的是,若业务测试文件为压缩包文件,需要对其进行解压后再进行上述操作。
步骤S206:根据所述文件处理的结果,对待测试目标对象进行业务测试。
在一种可行方式中,在获得了所述文件处理的结果后,可以直接使用所述文件处理的结果,对待测试目标对象进行业务测试。
在另一种可行方式中,可以判断业务测试文件是否满足业务测试条件,若满足,则加载第一文件处理结果和/或加载第二文件处理结果和/或加载第三类增量测试文件;根据加载的第一文件处理结果和/或第二文件处理结果和/或第三类增量测试文件,对待测试目标对象进行业务测试。其中,业务测试条件包括以下至少之一:业务测试文件是否在生效时间内、业务测试文件是否对应有崩溃数据、业务测试文件是否被远程标记为失效。通过判断业务测试文件是否在生效时间内,可以确定业务测试文件的有效性;通过判断业务测试文件是否对应有崩溃数据,可以确定业务测试文件的正确性和鲁棒性;通过判断业务测试文件是否被远程标记为失效,可以确定业务测试文件发布端是否已取消了使用该业务测试文件进行测试。但不限于此,在实际使用中,本领域技术人员也可以根据实际需求,设置适当的业务测试条件。
在根据上述处理确定可以对待测试目标对象进行业务测试后,可以通过任意适当的方式进行业务测试,如,重启待测试目标对象、通过设定的触发操作对新的业务功能进行测试、由业务测试文件发布端控制对待测试目标对象进行测试等。
步骤S208:反馈业务测试结果。
待测试目标对象进行业务测试后,将业务测试结果反馈给相应的控制端,如业务测试文件发布端,或待测试目标对象对应的服务器端等。
需要说明的是,若业务测试的结果指示待测试目标对象发生崩溃,且,崩溃的次数大于设定阈值,则卸载业务测试文件;和/或,若接收到服务器的业务测试卸载指令,则卸载业务测试文件。其中,设定阈值可以由本领域技术人员根据需求适当设置,本申请实施例对此不作限制。若待测试目标对象发生崩溃且次数大于设定阈值,表明通过业务测试文件实现的业务功能还不够完善,需要卸载以使待测试目标对象使用原有业务功能正常运行;若收到服务器的业务 测试卸载指令,表明服务器端放弃本次业务功能测试,需要将待测试目标对象回复至原业务功能。
通过本实施例,根据测试指令自动获取待测试目标对象的业务测试文件,无需依赖用户的下载操作,且仅需获取用于进行业务测试的增量测试文件,而非完整的应用整体安装包,进而,在获取到相应的增量测试文件后,对其进行用于业务测试的文件处理,通过文件处理结果进行待测试目标对象的业务测试。可见,通过本实施例,自动获取业务测试文件进行业务测试,可以大大提升应用的版本更新速度和新业务功能的验证效率,业务测试文件为增量测试文件,能够节约网络资源和用户本地资源。另外,通过对增量测试文件进行有针对性的文件处理,进一步提升了相应业务功能测试的效率。
本实施例的数据测试方法可以由任意适当的具有数据处理能力的设备执行,包括但不限于:各种终端设备或者服务器,如,PC机、平板电脑、移动终端等。
实施例三
参照图3,示出了根据本申请实施例三的一种数据测试方法的步骤流程图。
本实施例以基于Android系统的应用的灰度测试为例,从服务器与待测试目标对象所在的客户端之间的交互角度,对本申请实施例提供的数据测试方法进行说明。灰度测试是一种在某项产品或应用正式发布前,选择特定人群试用,逐步扩大其试用者数量,以便及时发现和纠正其中的问题的一种测试形式。
本实施例的数据测试方法包括以下步骤:
步骤S302:服务器将待测试的业务功能编译成功能压缩包(即业务测试文件对应的压缩包)。
在Android系统中,当应用的版本快速迭代时,往往需要对新增或更新的业务功能进行快速发布验证,甚至针对同一个功能有多套产品设计方案,需要用具体业务数据进行比较验证。本申请实施例中,通过让已被安装的应用主动去加载动态下发的待验证的业务功能的压缩包,使得用户能直接使用该业务功能。
其中,一个基于Android系统的功能压缩包可能包含以下三部分中的部分或全部,即:(一)类文件(业务逻辑类文件),应用的业务逻辑编写在类中,以.class格式的文件保存,并在编译时被打包聚合,编译成.dex格式的文件。在应用启动时,应用加载.dex文件,保存在内存的一个dex数组中,以便从其加载到业务逻辑相关的类文件;(二)资源文件(资源类文件),用于存储应用 的交互界面相关的所有图标、文本、界面布局等的多个文件;(三)so文件(一种动态链接库类文件),用C或C++编写并编译的二进制文件,应用可加载调用so文件,实现调用系统底层的方法或者进行核心逻辑加密等目的。
一个新增或更新的业务功能也依赖于这其中至少一个元素,因此可能新增或更改其中一个或多个部分的元素,以生成新业务功能的压缩包。待验证的业务功能的压缩包只要包含这些新增或更改的元素,并被应用成功加载,用户就能直接使用该业务功能。
其中,so文件是应用可以直接加载的文件;资源文件与应用原有的资源文件需要进行合并,应用也可以加载合并后的资源文件;而对于类文件,待验证的业务功能涉及的类文件也需要编译成.dex文件,并与原有的.dex文件进行合并,合并后加载插入到dex数组中,以使待测试的应用能够从该dex数组中加载新增的业务功能所依赖的业务逻辑类。进而,实现业务功能的动态增加。
若灰度测试采用AB测试的形式时,则需要将待测试的业务功能编译成不同的多个功能压缩包。AB测试是找出一部分用户并把他们平均分成两组,让其中一组的用户使用A版本进行测试,再让另外一组使用B版本进行测试。通过AB测试从得到的大量数据中分析出哪一个版本才是最受用户喜爱的,既能保证新版本可以被用户接受又能保证一些小的问题在大面积推广之前就被改善。进一步地,在实际应用中,可以不限于上述AB测试将用户分为两组的形式,可以根据实际需求将用户分为多组(两组及两组以上),以满足业务测试需要。
本步骤在具体实现时,可以编译待验证的业务功能代码及依赖的资源文件和so文件。编译成的功能压缩包包含.dex文件、资源文件包和so文件;需要进行不同产品设计方案对比验证时,即多组用户进行不同业务测试时,则需要编译多个功能压缩包。
步骤S304:服务器针对待测试的目标应用进行功能压缩包部署上线,并设定生效配置。
服务器根据目标应用的信息,包括目标应用的版本、用户属性、地区、语言等,进行配置上线,需要进行不同产品设计方案对比验证时,即多组用户进行不同业务测试时,对于目标应用进行随机分配匹配的产品设计方案,同时控制下发总量。配置上线时,可设定动态功能压缩包的生效时间。应用请求网络服务器,当目标应用被匹配时,获取更新的配置并下载动态功能压缩包。
步骤S306:目标应用检查更新,获取功能压缩包的配置,下载相应的动态功能压缩包(灰度测试时也可称为灰度包)。
步骤S308:目标应用完成动态功能压缩包下载后,进行解压。
其中,so文件解压后存储在目标应用所在设备的本地文件存储器中,资源文件包解压后与应用原有的资源文件包合并,.dex文件与原有的.dex文件合并,存储在目标应用所在设备的本地文件存储器中,并记录文件路径及版本。
步骤S310:目标应用重启。
步骤S312:目标应用判断是否满足业务测试条件,若满足,则进行业务测试;否则,结束当前测试。
包括:判断当前时间是否在配置的功能压缩包的生效期内,若否,则结束当前测试;若在生效期内,则判断使用该功能压缩包是否曾经发生过多次崩溃;若发生过,则结束当前测试;若未发生过,则判断功能压缩包是否被远程标记失效过,若被标记过,则结束当前测试;若未被标记过,则可以加载合并的资源文件包替换原有的资源文件包,加载so文件,加载合并后的.dex文件,然后插入到dex数组中。若测试成功,则目标应用的用户即可正常使用动态下发的新增或更新的业务功能了。
而如果加载合并的资源文件包、加载so文件、加载合并后的.dex文件后,用户在使用目标应用时发生崩溃,若超出某个崩溃数量阈值(如三次),则自动卸载相应文件及功能压缩包,之后启动时将不再加载。如果在生效期间内需要临时卸载,比如因为测试结果指示业务数据未达预期而卸载,可通过远程指令进行快速卸载。
通过本实施例,已发布安装的应用可以直接加载动态下发的业务功能文件,无需用户手动安装,直接使用新增或更新的业务功能;发布流程无需通过常规的发布渠道(包括第三方发布渠道,比如各个Android应用市场),提升了应用的业务功能验证的效率及版本迭代的速度;而且,可以同时进行一个功能多个产品设计方案的对比验证,可以更敏捷地优化产品功能。
本实施例的数据测试方法可以由任意适当的具有数据处理能力的设备执行,包括但不限于:各种终端设备或者服务器,如,PC机、平板电脑、移动终端等。
实施例四
参照图4,示出了根据本申请实施例四的一种数据测试装置的结构框图。
本实施例的数据测试装置包括:获取模块402,配置为根据测试指令获取待测试目标对象的业务测试文件,其中,所述业务测试文件包括以下至少之一:与所述待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与所述 待测试目标对象中资源类文件对应的第二类增量测试文件、与所述待测试目标对象中动态链接库类文件对应的第三类增量测试文件;处理模块404,配置为根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理;测试模块406,配置为根据所述文件处理的结果,对所述待测试目标对象进行业务测试。
本实施例的数据测试装置用于实现前述多个方法实施例中相应的数据测试方法,并具有相应的方法实施例的有益效果,在此不再赘述。
实施例五
参照图5,示出了根据本申请实施例五的一种数据测试装置的结构框图。
本实施例的数据测试装置包括:获取模块502,配置为根据测试指令获取待测试目标对象的业务测试文件,其中,所述业务测试文件包括以下至少之一:与所述待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与所述待测试目标对象中资源类文件对应的第二类增量测试文件、与所述待测试目标对象中动态链接库类文件对应的第三类增量测试文件;处理模块504,配置为根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理;测试模块506,配置为根据所述文件处理的结果,对所述待测试目标对象进行业务测试。
可选地,所述处理模块504包括:第一处理模块5042,配置为若所述业务测试文件中包括第一类增量测试文件,则将所述第一类增量测试文件与所述业务逻辑类文件进行合并,获得第一文件处理结果;和/或,第二处理模块5044,配置为若所述业务测试文件中包括第二类增量测试文件,则将所述第二类增量测试文件与所述资源类文件进行合并,获得第二文件处理结果。
可选地,所述处理模块504配置为判断所述业务测试文件是否满足业务测试条件,若满足,则加载所述第一文件处理结果和/或加载所述第二文件处理结果和/或加载所述第三类增量测试文件;根据加载的所述第一文件处理结果和/或所述第二文件处理结果和/或所述第三类增量测试文件,对所述待测试目标对象进行业务测试。
可选地,所述业务测试条件包括以下至少之一:所述业务测试文件是否在生效时间内、所述业务测试文件是否对应有崩溃数据、所述业务测试文件是否 被远程标记为失效。
可选地,本实施例的数据测试装置还包括:卸载模块508,配置为若所述业务测试的结果指示所述待测试目标对象发生崩溃,且,崩溃的次数大于设定阈值,则卸载所述业务测试文件;和/或,若接收到服务器的业务测试卸载指令,则卸载所述业务测试文件。
本实施例的数据测试装置用于实现前述多个方法实施例中相应的数据测试方法,并具有相应的方法实施例的有益效果,在此不再赘述。
实施例六
参照图6,示出了根据本申请实施例六的一种设备/终端/服务器的结构示意图,本申请具体实施例并不对设备/终端/服务器的具体实现做限定。
如图6所示,该设备/终端/服务器可以包括:处理器(processor)602、存储装置604。
其中:
处理器602,用于执行程序606,具体可以执行上述数据测试方法实施例中的相关步骤。
具体地,程序606可以包括程序代码,该程序代码包括计算机操作指令。
处理器602可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路。设备/终端/服务器包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。
存储装置604,配置为存放一个或多个程序606。存储装置604可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
程序606具体可以用于使得处理器602执行以下操作:根据测试指令获取待测试目标对象的业务测试文件,其中,所述业务测试文件包括以下至少之一:与所述待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与所述待测试目标对象中资源类文件对应的第二类增量测试文件、与所述待测试目标对象中动态链接库类文件对应的第三类增量测试文件;根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理;根据所述文件处理的结果,对 所述待测试目标对象进行业务测试。
在一种可选的实施方式中,程序606还用于使得处理器602在根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理时,若所述业务测试文件中包括第一类增量测试文件,则将所述第一类增量测试文件与所述业务逻辑类文件进行合并,获得第一文件处理结果;和/或,若所述业务测试文件中包括第二类增量测试文件,则将所述第二类增量测试文件与所述资源类文件进行合并,获得第二文件处理结果。
在一种可选的实施方式中,程序606还用于使得处理器602在根据所述文件处理的结果,对所述待测试目标对象进行业务测试时,判断所述业务测试文件是否满足业务测试条件,若满足,则加载所述第一文件处理结果和/或加载所述第二文件处理结果和/或加载所述第三类增量测试文件;根据加载的所述第一文件处理结果和/或所述第二文件处理结果和/或所述第三类增量测试文件,对所述待测试目标对象进行业务测试。
在一种可选的实施方式中,所述业务测试条件包括以下至少之一:所述业务测试文件是否在生效时间内、所述业务测试文件是否对应有崩溃数据、所述业务测试文件是否被远程标记为失效。
在一种可选的实施方式中,程序606还用于使得处理器602在若所述业务测试的结果指示所述待测试目标对象发生崩溃,且,崩溃的次数大于设定阈值,则卸载所述业务测试文件;和/或,若接收到服务器的业务测试卸载指令,则卸载所述业务测试文件。
程序606中各步骤的具体实现可以参见上述数据测试方法实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。
通过本实施例的设备/终端/服务器,根据测试指令自动获取待测试目标对象的业务测试文件,无需依赖用户的下载操作,且仅需获取用于进行业务测试的增量测试文件,而非完整的应用整体安装包,进而,在获取到相应的增量测试文件后,对其进行用于业务测试的文件处理,通过文件处理结果进行待测试目标对象的业务测试。可见,通过本申请实施例的数据测试方案,自动获取业务测试文件进行业务测试,可以大大提升应用的版本更新速度和新业务功能的验证效率,业务测试文件为增量测试文件,能够节约网络资源和用户本地资源。 另外,通过对增量测试文件进行有针对性的文件处理,进一步提升了相应业务功能测试的效率。
需要指出,根据实施的需要,可将本申请实施例中描述的各个部件/步骤拆分为更多部件/步骤,也可将两个或多个部件/步骤或者部件/步骤的部分操作组合成新的部件/步骤,以实现本申请实施例的目的。
特别地,根据本申请实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行上文多个方法实施例中所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分从网络上被下载和安装,和/或从可拆卸介质被安装。在该计算机程序被中央处理单元(CPU)执行时,执行本申请实施例示出的方法中限定的上述功能。需要说明的是,本申请所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是,但不限于,电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储装置(RAM)、只读存储装置(ROM)、可擦式可编程只读存储装置(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储装置(CD-ROM)、光存储装置件、磁存储装置件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言------诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言------诸如”C”语言 或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络------包括局域网(LAN)或广域网(WAN)------连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括获取单元、处理单元、和测试单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元还可以被描述为“根据测试指令获取待测试目标对象的业务测试文件的单元”。
作为另一方面,本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述任一实施例所描述的方法。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的装置中所包含的;也可以是单独存在,而未装配入该装置中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该装置执行时,使得该装置:根据测试指令获取待测试目标对象的业务测试文件,其中,所述业务测试文件包括以下至少之一:与所述待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与所述待测试目标对象中资源类文件对应的第二类增量测试文件、与所述待测试目标对象中动态链接库类文件对应的第三类增量测试文件;根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进 行用于业务测试的文件处理;根据所述文件处理的结果,对所述待测试目标对象进行业务测试。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (12)

  1. 一种数据测试方法,包括:
    根据测试指令获取待测试目标对象的业务测试文件,其中,所述业务测试文件包括以下至少之一:与所述待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与所述待测试目标对象中资源类文件对应的第二类增量测试文件、与所述待测试目标对象中动态链接库类文件对应的第三类增量测试文件;
    根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理;
    根据所述文件处理的结果,对所述待测试目标对象进行业务测试。
  2. 根据权利要求1所述的方法,其中,所述根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理,包括:
    若所述业务测试文件中包括第一类增量测试文件,则将所述第一类增量测试文件与所述业务逻辑类文件进行合并,获得第一文件处理结果;
    和/或,
    若所述业务测试文件中包括第二类增量测试文件,则将所述第二类增量测试文件与所述资源类文件进行合并,获得第二文件处理结果。
  3. 根据权利要求2所述的方法,其中,所述根据所述文件处理的结果,对所述待测试目标对象进行业务测试,包括:
    判断所述业务测试文件是否满足业务测试条件,若满足,则加载所述第一文件处理结果和/或加载所述第二文件处理结果和/或加载所述第三类增量测试文件;
    根据加载的所述第一文件处理结果和/或所述第二文件处理结果和/或所述第三类增量测试文件,对所述待测试目标对象进行业务测试。
  4. 根据权利要求3所述的方法,其中,所述业务测试条件包括以下至少之一:
    所述业务测试文件是否在生效时间内、所述业务测试文件是否对应有崩溃数据、所述业务测试文件是否被远程标记为失效。
  5. 根据权利要求1-4任一项所述的方法,其中,所述方法还包括:
    若所述业务测试的结果指示所述待测试目标对象发生崩溃,且,崩溃的次数大于设定阈值,则卸载所述业务测试文件;
    和/或,
    若接收到服务器的业务测试卸载指令,则卸载所述业务测试文件。
  6. 一种数据测试装置,包括:
    获取模块,配置为根据测试指令获取待测试目标对象的业务测试文件,其中,所述业务测试文件包括以下至少之一:与所述待测试目标对象中业务逻辑类文件对应的第一类增量测试文件、与所述待测试目标对象中资源类文件对应的第二类增量测试文件、与所述待测试目标对象中动态链接库类文件对应的第三类增量测试文件;
    处理模块,配置为根据所述业务测试文件中包括的增量测试文件的类别,对所述增量测试文件及其对应的所述待测试目标对象中的文件进行用于业务测试的文件处理;
    测试模块,配置为根据所述文件处理的结果,对所述待测试目标对象进行业务测试。
  7. 根据权利要求6所述的装置,其中,所述处理模块包括:
    第一处理模块,配置为若所述业务测试文件中包括第一类增量测试文件,则将所述第一类增量测试文件与所述业务逻辑类文件进行合并,获得第一文件处理结果;
    和/或,
    第二处理模块,配置为若所述业务测试文件中包括第二类增量测试文件,则将所述第二类增量测试文件与所述资源类文件进行合并,获得第二文件处理结果。
  8. 根据权利要求7所述的装置,其中,所述处理模块,配置为判断所述业务测试文件是否满足业务测试条件,若满足,则加载所述第一文件处理结果和/或加载所述第二文件处理结果和/或加载所述第三类增量测试文件;根据加载的所述第一文件处理结果和/或所述第二文件处理结果和/或所述第三类增量测试文件,对所述待测试目标对象进行业务测试。
  9. 根据权利要求8所述的装置,其中,所述业务测试条件包括以下至少之一:
    所述业务测试文件是否在生效时间内、所述业务测试文件是否对应有崩溃数据、所述业务测试文件是否被远程标记为失效。
  10. 根据权利要求6-9任一项所述的装置,其中,所述装置还包括:
    卸载模块,配置为若所述业务测试的结果指示所述待测试目标对象发生崩溃,且,崩溃的次数大于设定阈值,则卸载所述业务测试文件;和/或,若接收到服务器的业务测试卸载指令,则卸载所述业务测试文件。
  11. 一种设备/终端/服务器,包括:
    一个或多个处理器;
    存储装置,配置为存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-5中任一所述的方法。
  12. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-5中任一所述的方法。
PCT/CN2018/090757 2018-06-12 2018-06-12 数据测试方法、装置、设备/终端/服务器及计算机可读存储介质 WO2019237239A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/090757 WO2019237239A1 (zh) 2018-06-12 2018-06-12 数据测试方法、装置、设备/终端/服务器及计算机可读存储介质
CN201880001139.4A CN109496417A (zh) 2018-06-12 2018-06-12 数据测试方法、装置、设备/终端/服务器及计算机可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/090757 WO2019237239A1 (zh) 2018-06-12 2018-06-12 数据测试方法、装置、设备/终端/服务器及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019237239A1 true WO2019237239A1 (zh) 2019-12-19

Family

ID=65713832

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090757 WO2019237239A1 (zh) 2018-06-12 2018-06-12 数据测试方法、装置、设备/终端/服务器及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109496417A (zh)
WO (1) WO2019237239A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093473A (zh) * 2023-07-14 2023-11-21 领悦数字信息技术有限公司 用于大数据测试的方法和系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162928B (zh) * 2020-10-15 2024-03-15 网易(杭州)网络有限公司 游戏的测试方法、装置、电子设备及计算机可读介质
CN112948246B (zh) * 2021-02-26 2023-08-04 北京百度网讯科技有限公司 数据平台的ab测试控制方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030236844A1 (en) * 2002-06-25 2003-12-25 Kaler Christopher G. Testing distributed applications
CN102478623A (zh) * 2010-11-22 2012-05-30 英业达股份有限公司 待测单元的测试方法
CN106919378A (zh) * 2016-08-24 2017-07-04 阿里巴巴集团控股有限公司 基于增量的应用更新和测试方法及系统、服务器及客户端
CN107704393A (zh) * 2017-09-29 2018-02-16 武汉斗鱼网络科技有限公司 数据测试方法、装置及电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7376945B1 (en) * 2003-12-02 2008-05-20 Cisco Technology, Inc. Software change modeling for network devices
CN101699399B (zh) * 2009-11-03 2014-04-30 中兴通讯股份有限公司 一种软件更新的系统和方法
CN106095502A (zh) * 2016-06-13 2016-11-09 北京奇虎科技有限公司 一种安卓应用的热修复方法、装置、服务器和系统
CN107015831A (zh) * 2017-03-31 2017-08-04 武汉票据交易中心有限公司 一种基于服务器端升级的客户端升级管理方法及系统
CN107463495A (zh) * 2017-07-19 2017-12-12 重庆扬讯软件技术股份有限公司 一种代码增量发布的软件测试方法及代码增量发布装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030236844A1 (en) * 2002-06-25 2003-12-25 Kaler Christopher G. Testing distributed applications
CN102478623A (zh) * 2010-11-22 2012-05-30 英业达股份有限公司 待测单元的测试方法
CN106919378A (zh) * 2016-08-24 2017-07-04 阿里巴巴集团控股有限公司 基于增量的应用更新和测试方法及系统、服务器及客户端
CN107704393A (zh) * 2017-09-29 2018-02-16 武汉斗鱼网络科技有限公司 数据测试方法、装置及电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093473A (zh) * 2023-07-14 2023-11-21 领悦数字信息技术有限公司 用于大数据测试的方法和系统

Also Published As

Publication number Publication date
CN109496417A (zh) 2019-03-19

Similar Documents

Publication Publication Date Title
US10642599B1 (en) Preemptive deployment in software deployment pipelines
US10740078B2 (en) Dynamic plugin(s) for cloud application(s)
CN109117169B (zh) 用于修复内核漏洞的方法和装置
CN108459964B (zh) 测试用例选择方法、装置、设备以及计算机可读存储介质
WO2017166447A1 (zh) 内核模块加载方法和装置
US10069940B2 (en) Deployment meta-data based applicability targetting
US20130152074A1 (en) Method for automatic consecutive installing operating systems
JP2021512391A (ja) プリキャシュのためのクライアント・マシン間でのシェーダの配布
WO2019237239A1 (zh) 数据测试方法、装置、设备/终端/服务器及计算机可读存储介质
CN108255708B (zh) 测试环境中访问生产文件的方法、装置、存储介质及设备
KR20150133651A (ko) 분산 테스트 및 프로파일러 프레임워크
US20170033980A1 (en) Agent manager for distributed transaction monitoring system
CN106775876B (zh) 安卓系统快速启动应用的方法
CN108733370B (zh) 原生app的样式化显示方法、装置、终端及存储介质
CN104598267A (zh) 应用的调起方法及装置
CN108121650B (zh) 一种对于页面用户界面的测试方法及装置
US9971611B2 (en) Monitoring a mobile device application
CN106959867B (zh) 用于监听应用程序卸载的方法及系统
CN107247661B (zh) 支持对应用的安装包进行自动化验证的方法和系统
CN111338928A (zh) 基于chrome浏览器测试的方法及装置
CN115048082A (zh) 微前端系统构建方法、装置、服务器及可读存储介质
CN112882921B (zh) 故障模拟方法和装置
CN114489698A (zh) 应用程序安装方法和装置
CN114116509A (zh) 程序分析方法、装置、电子设备和存储介质
CN102298548A (zh) 一种恢复可执行程序依赖文件的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18922508

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18922508

Country of ref document: EP

Kind code of ref document: A1