Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 shows a flowchart of an implementation of the application program testing method according to an embodiment of the present invention, which is detailed as follows:
s101, acquiring the maximum online number H supported by the online communication mode of the application program function to be tested and the number M of the online mobile terminals supporting the online communication mode, wherein H and M are positive integers greater than 1.
The online communication mode refers to a communication mode that can be used for performing communication connection on the mobile terminal, and includes, but is not limited to, bluetooth, WIFI, NFC, infrared communication, and the like. Because the maximum online numbers supported by each online communication mode are not the same, for example, bluetooth is different according to versions, and may be one-to-one communication connection or one-to-many communication connection, the maximum online number H supported by bluetooth is different according to the different versions of bluetooth, and NFC is one-to-one communication connection, that is, the maximum online number H of NFC is 2, therefore, the specific value of H needs to be determined by the specific online communication mode required by the function to be tested and the version corresponding to the online communication mode, for example, when the function to be tested needs to use NFC to perform near field communication data transmission, the corresponding H is 2.
Because the types of the online communication modes are many, the mobile terminal often does not support all online communication modes but only supports one or more of the online communication modes due to the consideration of cost and the like, so that a terminal supporting a required online communication mode needs to be screened from connected online mobile terminals to ensure subsequent normal online and testing, for example, a mobile terminal supporting bluetooth communication is screened from online mobile terminals.
It should be noted that, because most of the communication technologies used by the mobile terminals to be online are near field communication technologies, such as common bluetooth and WiFi, in order to ensure normal online testing, distances between all online mobile terminals in the embodiment of the present invention should be less than or equal to a maximum communication distance of an online communication mode, that is, in the embodiment of the present invention, before starting testing, a technician needs to manually set a position of each online mobile terminal and a position distance between the online mobile terminals according to the online communication mode used, so as to ensure that the subsequent online testing can be performed normally.
S102, if M is larger than or equal to H, H mobile terminals to be tested are selected from the M online mobile terminals, and the H mobile terminals to be tested are online based on an online communication mode.
When M is larger than or equal to H, the number of the online mobile terminals which can be online is larger than or equal to the maximum online number supported by the online communication mode. At this time, in order to test how the supporting effect of the application program to be tested on the online communication and the functional stability under the online condition of multiple mobile devices as much as possible, so as to improve the effectiveness of the function test on the application program to be tested, and meanwhile, considering that the number of the mobile terminals which can be tested subsequently is increased as the number of the mobile terminals to be tested which are increased, in the embodiment of the present invention, the maximum online number H supported by the online communication mode is directly used as the number of the mobile devices to be tested.
After the number of the mobile devices to be tested is determined, H mobile terminals to be tested need to be selected from M online mobile devices, and the embodiments of the present invention do not limit specific selection methods, including but not limited to methods such as random selection, and the following embodiments of the present invention may be specifically described with reference to the following embodiments of the present description. After the final H mobile terminals to be tested are determined, the embodiments of the present invention connect the mobile terminals to ensure normal performance of subsequent tests, for example, H-1 mobile terminals to be tested are connected to one mobile terminal to be tested in a one-to-many manner through bluetooth, so as to complete bluetooth connection of the H mobile terminals to be tested.
S103, testing the function to be tested in the H online mobile terminals to be tested.
After the online is finished, according to the test cases input by the user or preset, performing function test on the H online mobile terminals to be tested so as to finish the function test on the application programs with the functions required to be used online.
The embodiment of the invention compares the maximum online number supported by the online communication mode with the number of the online mobile terminals supporting the online communication mode to determine the maximum online mobile terminal number capable of being online, thereby determining all the mobile terminals to be tested and online, and then performs online function test on the online mobile terminals to be tested based on the test case containing the online function test, thereby ensuring the effective test on the application programs of the functions required to be online used.
As a second embodiment of the present invention, as shown in fig. 2, after obtaining H and M, the method further includes:
and S104, if M is smaller than H, connecting the M online mobile terminals on line based on the online communication mode, and testing the function to be tested in the connected M online mobile terminals.
When M is smaller than H, it is described that at most, only M online mobile terminals can be tested online, and therefore, in the embodiment of the present invention, the M online mobile terminals are directly used as mobile terminals to be tested to perform the function test.
As a specific implementation manner of selecting H mobile terminals to be tested from M online mobile terminals, as shown in fig. 3, a third embodiment of the present invention includes: :
s301, obtaining the operating system type and the operating system version number of each online mobile terminal, and calculating the maximum online mobile terminal number N with the same operating system type and operating system version number and the maximum online mobile terminal number L with the same operating system type, wherein N and L are natural numbers.
For example, the operating system may be an android system, an IOS system, or a blackberry system, and even the IOS system, there are different versions of IOS10 and IOS11, and in actual situations, when a mobile terminal between different operating systems, even the same operating system but between different operating system versions, is in communication connection, there is a problem that compatibility may occur, so that a problem may occur easily in a test process. Therefore, in order to reduce the possibility of test problems caused by differences of operating systems in subsequent tests, the embodiment of the present invention analyzes and counts the number of online mobile terminals of different operating systems, such as the number of online mobile terminals of an android system, the number of online mobile terminals of an IOS system, and the number of online mobile terminals of a blackberry system, and determines the maximum number L of the online mobile terminals, and also counts the number of online mobile terminals of different operating system version numbers, such as the number of online mobile terminals of the IOS11 and the number of online mobile terminals of an android 7.0, and determines the maximum number N of online mobile terminals having the same operating system version number from the statistics, so that the subsequent mobile terminals having the same operating system can be subjected to online tests preferentially, and the reliability of the tests is improved.
S302, if H is less than or equal to N, H mobile terminals to be tested are selected from N online mobile terminals with the same operating system type and the same operating system version number.
When H is less than or equal to N, it indicates that there are enough online mobile terminals with the same os version for testing, so in order to improve the reliability of the test, in the embodiment of the present invention, H mobile terminals to be tested are directly selected from N online mobile terminals with the same os version number for online testing.
S303, if H is larger than N and is smaller than or equal to L, recording the N online mobile terminals as mobile terminals to be tested, and selecting the H-N online mobile terminals to be tested from the L online mobile terminals with the same operating system type except the L online mobile terminals to obtain the H mobile terminals to be tested.
When H is greater than N but less than or equal to L, it indicates that there are not enough online mobile terminals with the same operating system version for testing, so in order to improve the reliability of testing as much as possible, in the embodiment of the present invention, after N online mobile terminals with the same operating system version are used as mobile terminals to be tested, in a step-by-step manner, in L-N online mobile terminals of other versions of the operating system, the remaining H-N mobile terminals to be tested are selected out, so as to obtain H mobile terminals to be tested which are finally needed for online testing.
As another embodiment of the present invention, on the basis of the third embodiment, if H is greater than L, L online mobile terminals with the same operating system are recorded as the mobile terminals to be tested, and H-L mobile terminals to be tested are selected from the online mobile terminals of other operating systems, so as to obtain H finally required mobile terminals to be tested for online testing.
As a fourth embodiment of the present invention, as shown in fig. 4, when the online communication method is one-to-many communication, the online communication method based on H mobile terminals to be tested performs online, including:
s401, determining the largest R mobile terminals to be tested from the H mobile terminals to be tested, wherein the types and the version numbers of the operating systems of the R mobile terminals to be tested are the same, and the R is a positive integer.
S402, selecting one of the R mobile terminals to be tested as a master device in one-to-many communication, and connecting H-1 mobile terminals to be tested except the master device to the master device in a one-to-many communication mode.
As can be seen from the above description of the embodiments of the present invention, compatibility problems of communication connections may occur between different operating systems, and even between different operating system versions of the same operating system. Considering that all non-master devices in the one-to-many communication are in communication with the master device, that is, all the non-master devices need to be in communication connection with the master device, in order to ensure normal operation of communication connection and ensure normal online and testing between mobile terminals to be tested, the embodiments of the present invention may find the mobile terminals to be tested having the same system version number and the largest number, and for example, when only there are online mobile terminals of two operating system versions, i.e., IOS11 and android 7.0, it may be determined that the number of the mobile terminals to be tested corresponding to the two terminals determines the R mobile terminals to be tested of the operating system version having the largest number.
After R mobile terminals to be tested are determined, one of the mobile terminals to be tested is used as a master device, the remaining H-1 mobile terminals to be tested are used as slave devices, and each slave device is respectively in communication connection with the master device, so as to complete online operation of each mobile terminal to be tested.
As an embodiment of the present invention, when the online communication method is one-to-many communication, the method for online connecting H mobile terminals to be tested based on the online communication method includes:
and H times of non-return sampling is carried out on the H mobile terminals to be tested, after each sampling, the extracted mobile terminals to be tested are set as main equipment for testing the functions of the application programs, and the rest H-1 mobile terminals to be tested are connected to the main equipment in a one-to-many communication mode.
In an actual situation, when the online communication mode is one-to-many communication, it is described that functional tasks responsible for the master device and the slave devices in the test process are different certainly, for example, when WiFi is online, the master device is used as a WiFi transmitting terminal to transmit a WiFi signal, other slave devices can connect the WiFi signal of the master device to complete connection operation, at this time, the master device cannot test a WiFi signal receiving function, and the slave devices cannot test a WiFi signal transmitting function. Therefore, when the online communication mode is one-to-many communication, a single test cannot realize a complete and effective test for each online mobile terminal to be tested. In order to implement a complete and effective test on each online mobile terminal to be tested, in the embodiment of the present invention, after H mobile terminals to be tested are determined, each of the H mobile terminals to be tested is respectively used as a master device to perform a one-to-many online test on H different master devices, that is, each mobile terminal to be tested is used as a master device to perform a one-to-many online test.
In the first embodiment of the invention, the online mobile terminal capable of being online is determined as the mobile terminal to be tested as much as possible, and in the first embodiment of the invention, all the determined mobile terminals to be tested are respectively subjected to one-to-many communication online testing of the main device, so that the online function testing of each mobile terminal to be tested can be realized to the maximum extent after the mobile terminals to be tested are screened once, the screening work of the mobile terminals to be tested is not required to be carried out again each time, and the efficient and reliable testing of the application program needing online use is greatly improved to the minimum extent.
According to the embodiment of the invention, the maximum online number supported by the online communication mode and the number of the online mobile terminals supporting the online communication mode are compared in the online range to determine the maximum online mobile terminal number capable of being online, so that all the mobile terminals to be tested are determined. And meanwhile, one-to-many communication master equipment selection and online operation are performed based on the operating system and the operating system version number of the mobile terminal to be tested, so that the mobile terminal to be tested is screened and online by comprehensively considering the operating system, the physical position and the online communication mode characteristics of the mobile terminal, and the effectiveness of subsequent online testing is ensured. After the online is established, the online function test is carried out on the online mobile terminal to be tested based on the test case containing the online function test, so that the effective test of the application program of the function required to be used online is ensured.
Fig. 5 shows a block diagram of an application testing apparatus provided in an embodiment of the present invention, which corresponds to the method in the above embodiment, and only shows a part related to the embodiment of the present invention for convenience of description. The application testing apparatus illustrated in fig. 5 may be an execution subject of the application testing method provided in the first embodiment.
Referring to fig. 5, the application test apparatus includes:
the onlinenumber identification module 51 is configured to obtain a maximum online number H supported by an online communication method of the application function to be tested, and a number M of online mobile terminals supporting the online communication method, where H and M are positive integers greater than 1.
And theterminal selection module 52 is configured to select H mobile terminals to be tested from the M online mobile terminals if M is greater than or equal to H, and connect the H mobile terminals to be tested on line based on the online communication mode.
And thetesting module 53 is configured to test the functions to be tested in the H online mobile terminals to be tested.
Further, the application program testing device further includes:
and the terminal online module is used for online connecting the M online mobile terminals based on the online communication mode and testing the functions to be tested in the M online mobile terminals which are online.
Further, theterminal selecting module 52 includes:
obtaining the operating system type and the operating system version number of each online mobile terminal, and calculating the maximum online mobile terminal number N with the same operating system type and operating system version number and the maximum online mobile terminal number L with the same operating system type, wherein N and L are natural numbers.
And if H is less than or equal to N, selecting the H mobile terminals to be tested from the N online mobile terminals with the same operating system type and operating system version number.
And if H is larger than N and is smaller than or equal to L, recording the N online mobile terminals as the mobile terminals to be tested, and selecting H-N online mobile terminals to be tested from L online mobile terminals with the same operating system type except the N online mobile terminals to obtain the H mobile terminals to be tested.
Further, theterminal selecting module 52 further includes:
and determining the R maximum mobile terminals to be tested with the same operating system type and the same operating system version number from the H mobile terminals to be tested, wherein R is a positive integer.
And selecting one of the R mobile terminals to be tested as a main device in one-to-many communication, and connecting H-1 mobile terminals to be tested except the main device to the main device in a one-to-many communication mode.
Further, theterminal selecting module 52 further includes:
and H times of non-return sampling is carried out on the H mobile terminals to be tested, after each sampling, the extracted mobile terminals to be tested are set as main equipment for testing the functions of the application programs, and the rest H-1 mobile terminals to be tested are connected to the main equipment in a one-to-many communication mode.
The process of implementing each function by each module in the application program testing apparatus provided in the embodiment of the present invention may specifically refer to the description of the first embodiment shown in fig. 1, and is not described herein again.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
It will also be understood that, although the terms first, second, etc. may be used herein to describe various elements in some embodiments of the invention, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first contact may be termed a second contact, and, similarly, a second contact may be termed a first contact, without departing from the scope of the various described embodiments. The first contact and the second contact are both contacts, but they are not the same contact.
Fig. 6 is a schematic diagram of an application test terminal device according to an embodiment of the present invention. As shown in fig. 6, the applicationtest terminal device 6 of this embodiment includes: aprocessor 60, amemory 61, saidmemory 61 having stored therein acomputer program 62 executable on saidprocessor 60. Theprocessor 60, when executing thecomputer program 62, implements the steps in the various application testing method embodiments described above, such as the steps 101-103 shown in fig. 1. Alternatively, theprocessor 60, when executing thecomputer program 62, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of themodules 51 to 53 shown in fig. 5.
The applicationtest terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The application test terminal device may include, but is not limited to, aprocessor 60, amemory 61. It will be appreciated by those skilled in the art that fig. 6 is only an example of the applicationtest terminal device 6 and does not constitute a limitation of the applicationtest terminal device 6 and may comprise more or less components than shown or some components in combination or different components, e.g. the application test terminal device may further comprise an input transmission device, a network access device, a bus, etc.
TheProcessor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Thememory 61 may be an internal storage unit of the applicationtest terminal device 6, such as a hard disk or a memory of the applicationtest terminal device 6. Thememory 61 may also be an external storage device of the applicationtest terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the applicationtest terminal device 6. Further, thememory 61 may also include both an internal storage unit and an external storage device of the applicationtest terminal device 6. Thememory 61 is used for storing the computer program and other programs and data required by the application test terminal device. Thememory 61 may also be used to temporarily store data that has been transmitted or is to be transmitted.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.