Method and device for application program, equipment and storage medium
By obtaining device configuration information and controlling multiple target devices to execute benchmark and test tasks, the problem of multi-model coverage and parallel automated testing in mobile application testing is solved, and the test efficiency and reliability are improved.
Patent Information
- Application Number
- CN202410310048.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-18
- Publication Date
- 2025-09-30
AI Technical Summary
Existing technologies cannot achieve multi-model coverage and parallel automated testing in automated testing of mobile applications, resulting in low reliability of test results.
By obtaining device configuration information, multiple target devices are identified, and these devices are controlled to perform benchmark tasks and test tasks, benchmark indicators and test indicators are obtained, and finally the test results are determined based on the indicators.
It improves test efficiency and reliability, and ensures multi-model coverage and parallel automated testing.
Smart Images

Figure CN120723619A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and more particularly, to a method, apparatus, device, and storage medium for an application program. Background Art
[0002] When performing automated testing on mobile apps, multiple rounds of testing are typically performed on a single test device. This approach fails to achieve multi-device coverage and parallel automated testing. Because testing is performed on a single device, the reliability of the test results is low. Summary of the Invention
[0003] The embodiments of the present disclosure provide a method, apparatus, device, and storage medium for an application program, which can test the application on multiple devices, thereby improving not only the test efficiency but also the test reliability.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for an application, including:
[0005] Obtaining device configuration information; wherein the device configuration information includes device quantity interval and device attributes;
[0006] determining a plurality of target devices according to the device configuration information;
[0007] Controlling the plurality of target devices to execute benchmark tasks and test tasks of the target application, and obtaining benchmark indicators and test indicators of the plurality of target devices;
[0008] A test result of the target application is determined based on the test indicator and the benchmark indicator.
[0009] In a second aspect, an embodiment of the present disclosure further provides a device for an application, including:
[0010] A device configuration information acquisition module is used to acquire device configuration information; wherein the device configuration information includes device quantity interval and device attributes;
[0011] a target device determining module, configured to determine a plurality of target devices according to the device configuration information;
[0012] A task execution control module, configured to control the plurality of target devices to execute benchmark tasks and test tasks of the target application, and obtain benchmark indicators and test indicators of the plurality of target devices;
[0013] A test result determination module is used to determine the test result of the target application according to the test indicator and the benchmark indicator.
[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] a storage device for storing one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for application program as described in the embodiment of the present disclosure.
[0018] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the method for an application as described in an embodiment of the present disclosure.
[0019] The disclosed embodiments disclose a method, apparatus, device, and storage medium for an application program, which obtains device configuration information, including a device quantity interval and device attributes; determines multiple target devices based on the device configuration information; controls the multiple target devices to execute benchmark tasks and test tasks for the target application, obtaining benchmark indicators and test indicators for the multiple target devices; and determines test results for the target application based on the test indicators and benchmark indicators. The disclosed embodiments provide a method for an application program, which determines multiple target devices based on the device configuration information and controls the multiple target devices to execute benchmark tasks and test tasks, thereby improving both test efficiency and test reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0021] Figure 1 is a flowchart of a method for an application program provided by an embodiment of the present disclosure;
[0022] Figure 2 is an example diagram of controlling the plurality of target devices to execute benchmark tasks and test tasks of a target application, provided by an embodiment of the present disclosure;
[0023] Figure 3 is a schematic structural diagram of a device for an application program provided by an embodiment of the present disclosure;
[0024] Figure 4 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0026] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0027] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0028] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0029] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0031] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0032] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0033] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0034] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0035] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0036] Figure 1 This is a flow chart of a method for an application provided in an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where an application is tested. The method can be executed by a device for an application, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC, or a server, etc.
[0037] like Figure 1 As shown, the method includes:
[0038] S110: Obtain device configuration information.
[0039] Among them, the device configuration information includes the device quantity interval and device attributes. The device quantity interval includes the maximum quantity and the minimum quantity. The device attributes include: at least one of: device label, device model, task execution status, device idle time, device remaining power and device waiting time. The device label can be a mark pre-marked on the device by the technician to identify the test scenario of the device. The device model can be the model configured for the device by the device manufacturer according to different hardware parameters when producing the device. The task execution status can include idle state and occupied state (which can be understood as executing a task). The device idle time can be understood as the length of time the device has been in an idle state since the last task was completed. The device waiting time can be understood as the length of time required for the device to complete the assigned task from the current moment.
[0040] In this embodiment, the device configuration information may be obtained by: receiving task information, wherein the task information includes a test scenario, etc.; and obtaining the device configuration information based on the task information. In this embodiment, a correspondence between the task information and the device configuration information may be pre-established.
[0041] S120: Determine multiple target devices according to the device configuration information.
[0042] The target device may be understood as a device participating in the current test scenario. The process of determining multiple target devices according to the device configuration information may be: extracting multiple devices matching the device configuration information from the initial device and determining them as target devices.
[0043] Specifically, the method of determining multiple target devices based on device configuration information can be: filtering out devices that match the device label and device model from the initial devices to obtain candidate devices; dividing the candidate devices into idle devices and occupied devices according to the task execution status; prioritizing the idle devices according to the device idle time and / or the remaining power of the device; prioritizing the occupied devices according to the device waiting time; and extracting multiple target devices from the priority-ranked idle devices and the priority-ranked occupied devices according to the device quantity range.
[0044] Each initial device carries a label and model information. The process of selecting devices that match the device label and device model from the initial devices may include: for each initial device, first comparing the label of the initial device with the device label in the device configuration information; if there is a mismatch, discarding the initial device; and if there is a match, then comparing the model of the initial device with the device model in the device configuration information; if there is a mismatch, discarding the device; and if there is a match, identifying the initial device as a candidate device.
[0045] The number of idle devices and occupied devices may be integers greater than or equal to 0. The process of classifying the candidate devices into idle devices and occupied devices according to the task execution status may be: if the task execution status of the candidate device is idle, classifying the candidate device as an idle device; if the task execution status of the candidate device is occupied, classifying the candidate device as an occupied device.
[0046] Among them, the device idle time is negatively correlated with the priority, that is, the longer the device idle time, the lower the device priority; the device remaining power is positively correlated with the priority, that is, the greater the device remaining power, the higher the device priority. Specifically, the method of prioritizing idle devices according to the device idle time and / or the device remaining power can be: first determine the weighting coefficients corresponding to the device idle time and the device remaining power respectively, then normalize the device idle time and the device remaining power, and then perform weighted summation of the normalized device idle time and the device remaining power based on the weighting coefficient to obtain a priority parameter, and prioritize the idle devices according to the priority parameter.
[0047] The larger the priority parameter, the higher the priority. Since the device idle time is negatively correlated with the priority, the weighting coefficient of the device idle time can be a negative number; since the device remaining power is positively correlated with the priority, the weighting coefficient of the device remaining power can be a positive number.
[0048] Among them, the device waiting time is negatively correlated with the priority, that is, the longer the device waiting time, the lower the priority.
[0049] Specifically, the method of prioritizing occupied devices according to the device waiting time can be: obtaining the length of the queue of tasks to be executed in the occupied devices and the execution time of each task to be executed; determining the device waiting time of the occupied devices according to the length of the queue of tasks to be executed and the execution time of each task to be executed; and prioritizing the occupied devices according to the device waiting time.
[0050] The length of the pending task queue can be understood as the length of tasks assigned to the device and waiting in the queue, that is, the number of pending tasks cached in the queue. The execution duration of a pending task can be understood as the duration required for the device to execute the task. The method for determining the device waiting time of the occupied device based on the length of the pending task queue and the execution duration of each pending task can be: the execution duration of each pending task in the queue is accumulated to obtain the device waiting time of the occupied device.
[0051] Among them, the method of extracting multiple target devices from the priority-sorted idle devices and the priority-sorted occupied devices according to the device quantity interval can be: extracting devices whose number falls within the device quantity interval from the priority-sorted idle devices and the priority-sorted occupied devices to obtain multiple target devices.
[0052] Specifically, the method of extracting multiple target devices from the priority-sorted idle devices and the priority-sorted occupied devices according to the device quantity interval can be: if the number of idle devices is greater than or equal to the maximum number, the idle devices with the largest number of priorities are extracted from the idle devices as target devices; if the number of idle devices is greater than or equal to the minimum number and less than the maximum number, all idle devices are used as target devices; if the number of idle devices is less than the minimum number, the target number is determined based on the minimum number and the number of idle devices, and the occupied devices with the target number of priorities are extracted from the occupied devices, and the extracted occupied devices and all idle devices are used as target devices.
[0053] Specifically, assume that the number of idle devices is M1, the number of occupied devices is M2, and the device number interval is (Min, Max). If M1 ≥ Max, then the Max idle devices with the highest priority are extracted from the idle devices as the target devices. If Min ≤ M1 ≤ Max, then M1 idle devices are determined as the target devices. If M1 < Min, then M1 idle devices + (Min - M1) occupied devices with the highest priority are determined as the target devices. In this embodiment, giving priority to idle devices can improve the efficiency of the test.
[0054] S130 , controlling the plurality of target devices to execute the benchmark tasks and the test tasks of the target application, and obtaining the benchmark indicators and the test indicators of the plurality of target devices.
[0055] Benchmark tasks correspond to test tasks one-to-one, and can test the same functionality across different versions of a target application. A benchmark task can test functionality in older versions of a target application, while a test task can be understood as testing functionality in the current, unreleased version of the target application. Benchmark tasks serve as a reference standard for test tasks.
[0056] Specifically, the method of controlling multiple target devices to execute the benchmark task and the test task of the target application may be: first, dispatching the benchmark task to the multiple target devices for execution, obtaining the benchmark indicators corresponding to the multiple target devices, and then dispatching the test task to the multiple target devices for execution, obtaining the benchmark indicators corresponding to the multiple target devices. For example, Figure 2 FIG. 1 is an example diagram of controlling the plurality of target devices to execute the benchmark tasks and test tasks of the target application in this embodiment, such as Figure 2 As shown, there are three target devices, namely target device a, target device b, and target device c. The benchmark tasks and test tasks of function 1, function 2, and function 3 are scheduled to target devices a, target device b, and target device c for execution. Target device a outputs benchmark indicators 1, benchmark indicators 2, and benchmark indicators 3, as well as test indicators 1, test indicators 2, and test indicators 3; target device b outputs benchmark indicators 1, benchmark indicators 2, and benchmark indicators 3, as well as test indicators 1, test indicators 2, and test indicators 3; target device c outputs benchmark indicators 1, benchmark indicators 2, and benchmark indicators 3, as well as test indicators 1, test indicators 2, and test indicators 3.
[0057] S140: Determine a test result of the target application according to the test indicator and the benchmark indicator.
[0058] The test result of the target application may include a normal test result of a certain function or an abnormal test result of a certain function.
[0059] Specifically, the method of determining the test results of the target application based on the test indicators and benchmark indicators can be: for each target device, determine the difference between the test indicators and the benchmark indicators; determine the test results of the target device based on the difference; determine the test results of the target application based on the test results of each target device.
[0060] The test results include abnormal function and normal function. The difference between the test index and the benchmark index may be determined by subtracting the test index from the benchmark index to obtain the difference between the two.
[0061] Optionally, the test result of the target device may be determined based on the difference: if the difference exceeds a set threshold, the test result of the target device is a functional abnormality; if the difference does not exceed the set threshold, the test result of the target device is a functional normal.
[0062] The threshold value may be pre-set, and the threshold values corresponding to different functions may be the same or different, and are determined according to the test requirements, which are not limited here.
[0063] Optionally, the test result of the target application may be determined based on the test results of each target device in such a manner that if more than a set proportion of the test results of the target devices are functionally abnormal, the test result of the target application is abnormal.
[0064] The set ratio can be any value between 50% and 90%, for example, 60%. For example, if a function performs a benchmark task and a test task on 10 target devices, and the difference between the test index and the benchmark index of 7 of the 10 target devices exceeds the set threshold, the test result of the function is abnormal, which can also be understood as a degradation indicator of the function.
[0065] The technical solution of the disclosed embodiments involves obtaining device configuration information, including a device quantity interval and device attributes; determining multiple target devices based on the device configuration information; controlling the multiple target devices to execute benchmark tasks and test tasks for a target application, obtaining benchmark indicators and test indicators for the multiple target devices; and determining test results for the target application based on the test indicators and benchmark indicators. The disclosed embodiments provide a method for an application program that determines multiple target devices based on device configuration information and controls the multiple target devices to execute benchmark tasks and test tasks, thereby improving both test efficiency and test reliability.
[0066] Figure 3 A schematic diagram of a device structure for an application provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the device includes:
[0067] Device configuration information acquisition module 310, used to acquire device configuration information; wherein the device configuration information includes device quantity interval and device attributes;
[0068] A target device determination module 320 is configured to determine a plurality of target devices according to the device configuration information;
[0069] The task execution control module 330 is used to control multiple target devices to execute the benchmark tasks and test tasks of the target application, and obtain the benchmark indicators and test indicators of the multiple target devices;
[0070] The test result determination module 340 is used to determine the test result of the target application according to the test index and the benchmark index.
[0071] Optionally, the device quantity range includes a maximum quantity and a minimum quantity; the device attributes include: at least one of: device label, device model, task execution status, device idle time, device remaining power and device waiting time.
[0072] Optionally, the target device determination module 320 is further configured to:
[0073] Filter out devices that match device labels and device models from the initial devices to obtain candidate devices;
[0074] Classify candidate devices into idle devices and occupied devices according to task execution status;
[0075] Prioritize idle devices based on their idle time and / or remaining battery power; prioritize occupied devices based on their waiting time;
[0076] A plurality of target devices are extracted from the prioritized idle devices and the prioritized occupied devices according to a device quantity interval.
[0077] Optionally, the target device determination module 320 is further configured to:
[0078] Obtain the queue length of pending tasks in the occupied device and the execution time of each pending task;
[0079] Determine the device waiting time of the occupied device based on the length of the task queue to be executed and the execution time of each task to be executed;
[0080] Prioritize occupied devices based on their waiting time.
[0081] Optionally, the target device determination module 320 is further configured to:
[0082] If the number of idle devices is greater than or equal to the maximum number, the idle devices with the largest number of priorities are extracted from the idle devices as the target devices;
[0083] If the number of idle devices is greater than or equal to the minimum number and less than the maximum number, all idle devices are used as target devices;
[0084] If the number of idle devices is less than the minimum number, the target number is determined based on the minimum number and the number of idle devices, and the target number of occupied devices with higher priorities are extracted from the occupied devices, and the extracted occupied devices and all idle devices are used as target devices.
[0085] Optionally, the test result determination module 340 is further configured to:
[0086] For each target device, determine the difference between the test indicator and the baseline indicator;
[0087] Determine a test result of the target device based on the difference; wherein the test result includes abnormal function and normal function;
[0088] The test results of the target application are determined based on the test results of each target device.
[0089] Optionally, the test result determination module 340 is further configured to:
[0090] If the difference exceeds the set threshold, the test result of the target device is a functional abnormality;
[0091] If the difference does not exceed the set threshold, the test result of the target device is normal.
[0092] Optionally, the test result determination module 340 is further configured to:
[0093] If more than a set percentage of test results in the target device indicate functional abnormalities, the test result of the target application is abnormal.
[0094] The device for application provided by the embodiments of the present disclosure can execute the method for application provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0095] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0096] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 4 , which shows an electronic device (eg Figure 4The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0097] like Figure 4 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0098] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0100] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0101] The electronic device provided by the embodiment of the present disclosure and the method for application provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0102] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the method for applying an application provided by the above embodiment is implemented.
[0103] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0104] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0105] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0106] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0107] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is enabled to: obtain device configuration information; wherein the device configuration information includes the device quantity interval and device attributes; determine multiple target devices based on the device configuration information; control the multiple target devices to execute benchmark tasks and test tasks of the target application, and obtain benchmark indicators and test indicators of the multiple target devices; determine the test results of the target application based on the test indicators and the benchmark indicators.
[0108] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0109] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0110] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0111] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0112] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0113] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0114] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0115] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for an application, characterized in that, include: Obtaining device configuration information; wherein the device configuration information includes device quantity interval and device attributes; determining a plurality of target devices according to the device configuration information; Controlling the plurality of target devices to execute benchmark tasks and test tasks of the target application, and obtaining benchmark indicators and test indicators of the plurality of target devices; A test result of the target application is determined based on the test indicator and the benchmark indicator.
2. The method according to claim 1, characterized in that The device quantity interval includes a maximum quantity and a minimum quantity; the device attributes include: at least one of: device label, device model, task execution status, device idle time, device remaining power and device waiting time.
3. The method according to claim 2, characterized in that Determining multiple target devices according to the device configuration information includes: Filtering devices that match the device label and the device model from the initial devices to obtain candidate devices; Classifying the candidate devices into idle devices and occupied devices according to the task execution status; Prioritize the idle devices according to the idle time of the devices and / or the remaining power of the devices; prioritize the occupied devices according to the waiting time of the devices; A plurality of target devices are extracted from the priority-sorted idle devices and the priority-sorted occupied devices according to the device quantity interval.
4. The method according to claim 3, characterized in that Prioritizing the occupied devices according to the waiting time of the devices, including: Obtaining the length of the queue of pending tasks and the execution time of each pending task in the occupied device; Determine the device waiting time of the occupied device according to the length of the to-be-executed task queue and the execution time of each to-be-executed task; The occupied devices are prioritized according to the waiting time of the devices.
5. The method according to claim 3, characterized in that Extracting multiple target devices from the priority-sorted idle devices and the priority-sorted occupied devices according to the device quantity interval includes: If the number of the idle devices is greater than or equal to the maximum number, extracting the idle devices with the maximum number of priorities from the idle devices as target devices; If the number of idle devices is greater than or equal to the minimum number and less than the maximum number, all idle devices are used as target devices; If the number of idle devices is less than the minimum number, a target number is determined based on the minimum number and the number of idle devices, and the target number of occupied devices with higher priorities are extracted from the occupied devices, and the extracted occupied devices and all idle devices are used as target devices.
6. The method according to claim 1, characterized in that Determining a test result of the target application according to the test indicator and the benchmark indicator includes: For each target device, determining a difference between the test indicator and the benchmark indicator; Determine a test result of the target device according to the difference; wherein the test result includes abnormal function and normal function; The test result of the target application is determined according to the test result of each target device.
7. The method according to claim 6, characterized in that Determining a test result of the target device according to the difference includes: If the difference exceeds a set threshold, the test result of the target device is a functional abnormality; If the difference does not exceed the set threshold, the test result of the target device is that the function is normal.
8. The method according to claim 6, characterized in that Determining the test result of the target application according to the test result of each target device includes: If more than a set proportion of the test results in the target device are functional abnormalities, the test result of the target application is abnormal.
9. A device for an application, characterized in that include: A device configuration information acquisition module is used to acquire device configuration information; wherein the device configuration information includes device quantity interval and device attributes; a target device determining module, configured to determine a plurality of target devices according to the device configuration information; A task execution control module, configured to control the plurality of target devices to execute benchmark tasks and test tasks of the target application, and obtain benchmark indicators and test indicators of the plurality of target devices; A test result determination module is used to determine the test result of the target application according to the test indicator and the benchmark indicator.
10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for application according to any one of claims 1 to 8.
11. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the method for an application program according to any one of claims 1 to 8 when the computer executable instructions are executed by a computer processor.
