CN109388532B - Test method, test device, electronic equipment and computer readable storage medium - Google Patents
Test method, test device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN109388532B CN109388532B CN201811125927.2A CN201811125927A CN109388532B CN 109388532 B CN109388532 B CN 109388532B CN 201811125927 A CN201811125927 A CN 201811125927A CN 109388532 B CN109388532 B CN 109388532B
- Authority
- CN
- China
- Prior art keywords
- terminal
- tested
- test
- user
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2268—Logging of test results
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a testing method, a testing device, electronic equipment and a computer readable storage medium, and relates to the technical field of mobile terminals. The method comprises the following steps: the electronic equipment acquires a test request sent by a user terminal, wherein the test request is a request which is input by a user through the user terminal and is used for testing target software of a terminal to be tested; judging whether a terminal to be tested is connected or not; if the terminal to be tested is not connected, executing the test operation of the target software in a pre-established virtual machine to obtain a test result, wherein the virtual machine corresponds to an operating system of the terminal to be tested; and sending the test result to the user terminal. Therefore, the testing personnel can remotely operate the electronic equipment through the user terminal to realize the testing of the terminal to be tested, and the virtual machine can be used for testing the terminal to be tested when the terminal to be tested is not connected with the electronic equipment, so that the remote testing is facilitated.
Description
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to a testing method, an apparatus, an electronic device, and a computer-readable storage medium.
Background
At present, when an electronic device, such as a mobile terminal (including an Android mobile terminal, e.g., a mobile phone), is tested, it is often necessary to detect at a designated test location (e.g., a location of a mobile terminal developer), and if a tester is too far away from the test location, the tester needs to rush to the test location, which consumes a lot of manpower and material resources, which is inconvenient and increases the cost.
Disclosure of Invention
The application provides a testing method, a testing device, an electronic device and a computer readable storage medium, so as to overcome the defects.
In a first aspect, an embodiment of the present application provides a testing method, which is applied to a testing system, where the testing system includes an electronic device and a user terminal connected to the electronic device. The method comprises the following steps: the electronic equipment acquires a test request sent by the user terminal, wherein the test request is a request which is input by a user through the user terminal and is used for testing target software of a terminal to be tested; judging whether the terminal to be tested is connected or not; if the terminal to be tested is not connected, executing the test operation of the target software in a pre-established virtual machine to obtain a test result, wherein the virtual machine corresponds to an operating system of the terminal to be tested; and sending the test result to the user terminal.
In a second aspect, an embodiment of the present application further provides a testing apparatus, which is applied to an electronic device of a testing system, where the testing system further includes a user terminal connected to the electronic device. The test device includes: the device comprises an acquisition unit, a judgment unit, a building unit and a sending unit. And the obtaining unit is used for obtaining a test request sent by the user terminal, wherein the test request is a request which is input by the user through the user terminal and is used for testing the target software of the terminal to be tested. And the judging unit is used for judging whether the terminal to be tested is connected. And the establishing unit is used for executing the test operation of the target software in a pre-established virtual machine to obtain a test result if the terminal to be tested is not connected, wherein the virtual machine corresponds to the operating system of the terminal to be tested. And the sending unit is used for sending the test result to the user terminal.
In a third aspect, an embodiment of the present application further provides an electronic device, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the above-described methods.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be called by a processor to execute the method.
Compared with the prior art, according to the scheme provided by the application, when the terminal to be tested is tested, the test request can be remotely input to the electronic equipment through the user terminal, the electronic equipment detects whether the terminal to be tested is connected or not currently, if the terminal to be tested is not connected, the test operation of the target software is executed in the pre-established virtual machine to obtain the test result, and then the test result is sent to the user terminal. Therefore, the testing personnel can remotely operate the electronic equipment through the user terminal to realize the testing of the terminal to be tested, and the virtual machine can test the terminal to be tested when the terminal to be tested is not connected with the electronic equipment, so that the remote testing is facilitated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a test system provided in an embodiment of the present application;
FIG. 2 illustrates a schematic diagram of a test system provided in another embodiment of the present application;
FIG. 3 illustrates a method flow diagram of a testing method provided by an embodiment of the present application;
FIG. 4 illustrates a method flow diagram of a testing method provided by another embodiment of the present application;
FIG. 5 illustrates a method flow diagram of a testing method provided by yet another embodiment of the present application;
FIG. 6 shows a block diagram of a testing apparatus provided in an embodiment of the present application;
FIG. 7 shows a block diagram of an electronic device provided by an embodiment of the present application;
fig. 8 illustrates a storage unit provided in an embodiment of the present application and configured to store or carry program code for implementing a test method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Fig. 1 shows a schematic diagram of a test system provided in an embodiment of the present application, where the test system includes a user terminal 201, an electronic device 100, and a terminal 202 to be tested. The user terminal 201 and the electronic device 100 are located in a wireless network or a wired network, and the user terminal 201 and the electronic device 100 perform data interaction, so that a user can operate the user terminal 201 to remotely operate the electronic device 100, in addition, the electronic device 100 is connected with the terminal 202 to be tested, and the electronic device 100 can operate the terminal 202 to be tested in a short distance. It should be noted that the terminal 202 to be tested needs to be located in a specific testing environment and testing place, and therefore, the electronic device 100 and the terminal 202 to be tested may be connected through a local area network or a data line, bluetooth, or the like.
In the embodiment of the present application, the user terminal 201 may be a mobile terminal device, and may include, for example, a smart phone, a tablet computer, an e-book reader, a laptop portable computer, a vehicle-mounted computer, a wearable mobile terminal, and the like.
In some embodiments, the client may be installed in the user terminal 201, for example, may be an application installed in the user terminal 201. The user logs in the user terminal 201 through an account at a client, and can input an instruction to the electronic device 100 through the client, or acquire data from the electronic device 100.
In one embodiment, the electronic device 100 is connected to a terminal 202 to be tested, and is capable of inputting a test instruction to the terminal 202 to be tested, where the test instruction may be a test script, and the terminal 202 to be tested is capable of performing some operations based on the test script. Specifically, the electronic device 100 may include a test interface, through which software on the terminal 202 to be tested can be visually operated, for example, the software is turned on or turned off, or some operations of the software are performed, where the software is an application installed on the terminal to be tested, and may be a system-class application or a non-system-class application, for example.
The user can operate the real mobile phone like dragging, clicking, double clicking and physical key clicking of the APP through the real-time picture of the terminal to be tested on the user terminal. When the APP to be tested is required to be installed on the terminal to be tested for testing, the APP testing software on the remote mobile phone can be punched at the client side, then the APP to be tested is selected and added into a testing list of the APP testing software, and the APP detection request for detecting the APP is sent to the terminal to be tested. It should be noted that the APP to be tested needs to be in the non-enabled state at this time.
After an APP detection request for detecting the APP is sent to the terminal to be tested, a user can operate the APP to be tested through the client, namely, an APP operation instruction is sent to the terminal to be tested so as to detect the sensitive behavior of the APP during use.
In some embodiments, the APP operation instruction includes: specific operation instructions such as a dragging instruction, a single-click instruction, a double-click instruction, a physical key instruction and the like.
The terminal to be tested can analyze the APP operation instruction to obtain the specific operation instruction, and according to the obtained specific operation instruction, an application program programming interface of the terminal operation system to be tested can be called to execute the APP operation, namely, the APP operation of the client side is responded, and the sensitive behavior of the APP during use is detected.
Specifically, the terminal to be tested obtains a user operation specific instruction by monitoring an interactive event of a display image (a real-time picture of the terminal to be tested), for example, clicking an image = clicking a mobile phone, and double-clicking = double-clicking a mobile phone (both double-clicking and single-clicking are mouse single-phone events, and if two continuous single-phone events are less than 500 milliseconds, the mouse single-phone events can be regarded as double-clicking events). Drag = screen image press and lift event, drag distance equals length of press and lift event. The physical keys are sent to the tested device through fixed instructions (a user clicks the displayed keys through a mouse or a touch screen at a client side, and the displayed keys are sent to the terminal to be tested through specific key instructions).
In other embodiments, before the terminal to be tested sends the real-time picture of the terminal to be tested, the terminal to be tested first needs to upload the resolution of the screen to the web server, when a user enters an operation page, the client obtains the resolution, the real-time picture of the terminal to be tested displayed by the client is displayed according to the resolution of the terminal to be tested, and the (x, y) coordinate operated by the user on the screen image through the client is the coordinate of the mobile phone.
After the terminal to be tested calls the application programming interface of the terminal operating system to be tested to execute the APP operation according to the APP operation instruction, the sensitive behavior of the APP during use can be tested according to the APP detection.
Under the test system shown in fig. 1, the electronic device 100 can be actually connected to a terminal 202 to be tested, and in other embodiments, the electronic device 100 is not actually connected to a terminal to be tested, but a virtual machine is established in the electronic device, specifically, as shown in fig. 2, the test system includes a user terminal 201 and the electronic device 100, and the virtual machine is disposed in the electronic device, and refers to a complete terminal system having complete hardware system functions and operating in a completely isolated environment, which is simulated by software.
Take the operating system of the mobile phone as an example, for example, the android operating system. The virtual machine has the functions completely the same as a real android operating system by generating a brand new virtual mirror image of the existing operating system, all operations are carried out in the brand new independent virtual system after entering the virtual system, running software can be independently installed, data are saved, an independent desktop is owned, any influence on the real system cannot be caused, and the virtual machine has an operating system which can be flexibly switched between the existing system and the virtual mirror image. Therefore, the operating system of the terminal to be tested and the whole hardware and software environment can be simulated by installing the virtual machine on the electronic equipment, and a terminal to be tested does not need to be really connected.
Therefore, in order to overcome the drawback that the existing tester must test the terminal to be tested at a fixed testing location, please refer to fig. 3, an embodiment of the present application provides a testing method applied to a testing system, where the testing system includes an electronic device and a user terminal connected to the electronic device, and specifically, the embodiment of the present application takes the electronic device as an execution main body, and the method includes: s301 to S304.
S301: and the electronic equipment acquires a test request sent by the user terminal, wherein the test request is a request which is input by the user through the user terminal and is used for testing the target software of the terminal to be tested.
Specifically, the test terminal sends a test request to the electronic device through the user terminal, where the test request includes an identifier of the target software, and after the electronic device analyzes the test request, the electronic device can obtain the target software in the terminal to be tested, which is required to be tested by the test request.
Specifically, the test request further includes a test requirement, that is, a function and a parameter of target software of a terminal to be tested, which is to be tested, as an implementation manner, a client is provided in the user terminal, the client has a test interface, a user can select the software to be tested by operating the test interface and input the test requirement corresponding to the software, so that the user terminal can generate a test request when submitting the test requirement, the test request includes an identifier of the target software and the test requirement corresponding to the target software, and the electronic device obtains the test request and then obtains the identifier of the target software and the test requirement in the test request by parsing, so as to generate a test script corresponding to the test request, and after the test script is input to the terminal to be tested, the terminal to be tested can parse the test script and execute an operation corresponding to the test script, that is to control the target software to execute the corresponding operation according to the test script to obtain a corresponding result.
As another embodiment, the client may be disposed in the electronic device, and may display the test interface, and the user may operate the user terminal to remotely log in the test interface of the electronic device, and generate the test request in the test interface of the electronic device directly by operating the test interface. The electronic equipment generates a test script according to each test request.
Specifically, the test request sent by the user terminal further includes a user name and a password, where the user name and the password are information input by a tester and used for verifying the identity of the user, and after the user name and the password are obtained by the electronic device, whether the user name belongs to a list in a preset list stored in advance is determined, if yes, whether the password corresponding to the user name is correct is verified, and if yes, S302 is executed.
S302: and judging whether the terminal to be tested is connected.
The electronic device can be connected with a terminal to be tested, for example, through a data line, a wifi connection or a bluetooth connection, and specifically, taking the electronic device as a mobile phone as an example, if the electronic device is connected through wifi or bluetooth, all wireless devices in the current environment are connected before the wireless device is connected, and if the terminal to be tested starts a wireless function such as wifi or bluetooth, the terminal to be tested can be scanned.
Among them, in the android operating system based electronic device, the device type currently connected through bluetooth can be determined by a return value obtained based on instantiation of a bluetooth class. If the returned value is AUDIO _ VIDEO _ CAMCORDER, the image acquisition equipment is characterized; if the returned value is AUDIO _ VIDEO _ CAR _ AUDIO, the vehicle-mounted equipment is characterized; if the returned value is AUDIO _ VIDEO _ HIFI _ AUDIO, the AUDIO or VIDEO playing device is characterized as an AUDIO playing device or a VIDEO playing device, such as a bluetooth headset; if the returned value is AUDIO _ VIDEO _ MICROPHONE, it is characterized as a MICROPHONE.
In addition, the electronic device may be further connected to the terminal to be tested through the data line, and the electronic device may detect whether the interface of the data line is in a connection state, specifically, when the interface of the data line is in the connection state, the state value is a first value, and when the interface of the data line is not in the connection state, the state value is a second value, and whether the interface of the data line is in the connection state at present may be determined according to the state value. If the electronic equipment is in the connection state, the connected equipment is determined to be the terminal to be tested, and because the electronic equipment is in the test environment, when the data line interface is determined to be connected with the equipment, the equipment is determined to be the terminal to be tested by default.
Therefore, in case that it is determined that the electronic device has the terminal to be tested connected thereto, S303 is performed.
S303: and executing the test operation of the target software in a pre-established virtual machine to obtain a test result, wherein the virtual machine corresponds to the operating system of the terminal to be tested.
Specifically, a virtual machine is arranged in the electronic device, and the virtual machine can simulate the hardware and software environment of the terminal to be tested, namely software which can be installed and run on the terminal to be tested can be installed in the virtual machine, and the software can also be run by simulating the hardware environment of the terminal to be tested, for example, a telephone APP of the terminal to be tested can be installed in the virtual machine, and the function of running the telephone APP on the terminal to be tested can be simulated.
In addition, the virtual machine corresponds to an operating system of the terminal to be tested, for example, if the operating system of the terminal to be tested is an android system, the electronic device is a computer, and if the operating system of the electronic device is Windows, a virtual machine can still be established, and the operating system of the virtual machine is the android operating system.
Specifically, the software of the terminal to be tested, which needs to be tested, is a system application program of the terminal to be tested, and the content of the test includes operations of controlling the software to restart, shut down, etc., and run, etc., and the result after the operation can be used to generate a test result.
In addition, the user can also control the electronic device to install the installed software to be tested in the virtual machine through the user terminal, specifically, after the electronic device obtains the test request, the target software corresponding to the test request is determined, whether the target software is installed in the virtual machine is determined, if yes, the software is directly tested, and if not, the software is tested after being downloaded and installed, so that a test result is generated.
S304: and sending the test result to the user terminal.
The electronic device sends the test result generated after the test to the user terminal, and specifically, the test result and the test abstract are sent to the user terminal together, where the test abstract includes a time point of the test, content of the test, and the like.
Therefore, when testing the terminal to be tested, the tester can test the terminal to be tested remotely instead of the test site. In addition, the electronic equipment is not connected with the terminal to be tested, and the target software in the terminal to be tested can be tested in the virtual machine in the electronic equipment.
As another embodiment, when an electronic device is connected to a terminal to be tested, the terminal to be tested may be directly operated for testing, and specifically, referring to fig. 4, an embodiment of the present application provides a testing method applied to a testing system, where the testing system includes the electronic device and a user terminal connected to the electronic device, and specifically, the embodiment of the present application takes the electronic device as an execution main body, then the method includes: s401 to S405.
S401: and the electronic equipment acquires a test request sent by the user terminal, wherein the test request is a request which is input by the user through the user terminal and is used for testing the target software of the terminal to be tested.
S402: and judging whether the terminal to be tested is connected.
S403: and executing the test operation of the target software in a pre-established virtual machine to obtain a test result, wherein the virtual machine corresponds to the operating system of the terminal to be tested.
S404: and instructing the terminal to be tested to execute the test operation of the target software.
Specifically, the terminal to be tested is instructed to execute the test operation of the target software and return a test result, that is, the terminal to be tested returns the test result to the electronic device.
If the terminal to be tested is connected, a test instruction is sent to the terminal to be tested through a communication link between the electronic device and the test terminal, the terminal to be tested is instructed to execute the test operation of the target software and return a test result, and specifically, the test instruction can specify the terminal to be tested to execute a specific operation, for example, the target software is closed or restarted, or the target software is run to execute some operations.
In addition, if the target software is not installed in the terminal to be tested, the terminal to be tested may be controlled to install the target software, specifically, if the terminal to be tested is connected, the terminal to be tested is instructed to execute the test operation of the target software and return the test result, which may be a specific implementation manner: if the terminal to be tested is connected, detecting whether the target software is installed in the terminal to be tested; if not, sending the installation package of the target software to the terminal to be tested, instructing the terminal to be tested to install the target software, executing the test operation of the target software and returning the test result.
Specifically, if it is detected that the electronic device is connected with a terminal to be tested, an inquiry instruction is sent to the terminal to be tested, and the terminal to be tested is instructed to feedback whether target software is installed or not, specifically, the inquiry instruction includes an identifier of the target software, the terminal to be tested can acquire the identifier of the target software after analyzing the inquiry instruction, and whether identifiers of the target software are included in identifiers of all installed application programs or not is searched, if the identifier of the target software is included, the installed information is returned to the electronic device, the electronic device can determine that the target software is installed in the terminal to be tested after acquiring the installed information, and similarly, whether identifiers of the target software are included in identifiers of all installed application programs or not is searched, if the identifier of the target software is not included, the electronic device returns the uninstalled information to the electronic device, and then the electronic device can determine that the target software is not installed in the terminal to be tested after acquiring the uninstalled information.
After the electronic equipment judges that the target software is not installed in the terminal to be tested, an installation instruction is sent to the terminal to be tested, the installation instruction comprises installation indication information, the installation indication information is used for indicating the terminal to be tested to download an installation package of the target software, specifically, considering that the terminal to be tested can not be connected with the internet, the installation package of the target software can be downloaded in a local area network if the installation package of the target software can not be downloaded through a server, and therefore the target software is installed in the terminal to be tested according to the installation package.
In addition, the electronic device may send the installation package of the target software to the terminal to be tested after determining that the target software is not installed in the terminal to be tested, specifically, the installation instruction may include the installation package of the target software, and the installation instruction is used to instruct the terminal to be tested to install the target software. Further, the test instruction may also include an installation instruction, after the terminal to be tested acquires the test instruction, the test instruction is analyzed to acquire the installation instruction, and then the installation instruction is analyzed to acquire the installation package of the target software, so that the terminal to be tested can be instructed to install the target software, execute the test operation of the target software, and return the test result.
S405: and sending the test result to the user terminal.
It should be noted that, for the parts not described in detail in the above steps, reference may be made to the foregoing embodiments, and details are not described herein again.
In addition, since the test on the terminal to be tested requires to keep the test data secret, the whole test process is a relatively secret process, and therefore, it is necessary to avoid the operation of others falsifying names, specifically, referring to fig. 5, an embodiment of the present application provides a test method applied to a test system, where the test system includes an electronic device and a user terminal connected to the electronic device, and specifically, the embodiment of the present application takes the electronic device as an execution main body, and then the method includes: s501 to S507.
S501: and the electronic equipment acquires a test request sent by the user terminal, wherein the test request is a request which is input by the user through the user terminal and is used for testing the target software of the terminal to be tested.
S502: and acquiring the position information of the user terminal.
Specifically, a positioning device is installed in the user terminal, and the position information of the user terminal can be acquired through the positioning device. In addition, an authentication process is needed in consideration of the use of the user terminal, so that the situation that other people falsely use the user terminal to acquire the test data of the terminal to be tested can be avoided.
The specific implementation manner of acquiring the location information of the user terminal may be: acquiring a user name of the user terminal currently logged in; judging whether the user name meets a preset condition or not; and if so, acquiring the position information of the user terminal.
And if the user name belongs to the preset user name, judging that the user name meets the preset condition. In addition, a login password corresponding to the user name may be acquired, and if the login password is correct, it may be determined that the user name meets a preset condition.
In addition, since there are many types of login passwords for a user name, for example, a digital password, fingerprint information, and the like, and the digital password is relatively easy to be stolen, it is possible to limit the password type for a test operation by setting different passwords to correspond to different operations.
Specifically, the user terminal sets a use right for each operation of each application in advance, the use right comprises an authorized use and an unauthorized use, as an implementation mode, each operation of each application is authorized to use under a default condition, the user terminal only needs to set a certain operation of the application needing shielding to be unauthorized to use, and the operation of other applications which are not modified and keep a default state is authorized to use. For example, if a user wants to shield a test function of test software installed in a user terminal, after obtaining an instruction of the user, the user terminal sets a test operation of the test software to be unauthorized for use, specifically, an unauthorized operation indicates that the user does not respond to any operation of the user when initiating the operation. Therefore, if the test operation of the test software is not authorized, the user clicks the test button of the test software and calls the test interface of the test software through other software, and the user terminal does not respond any more, so that the user cannot pass the test software for testing.
The usage authority is acquired in advance based on an authentication password input in correspondence with the user name. Specifically, permission levels corresponding to the verification passwords and the use permission of the application program corresponding to each permission level are preset in the mobile terminal, a user presets multiple levels of permission levels formed by combining multiple encryption modes in the mobile terminal, the mobile terminal is subjected to permission classification, and controllable applications and functions in the applications with different permission levels are listed.
Specifically, as shown in tables 1 and 2 below.
TABLE 1
Cipher mode | Permission level |
Graphic password | Level one |
Digital cipher | Level one |
Fingerprint identification | Class two |
Iris recognition | Level three |
Face recognition | Level three |
In table 1, the pattern password, the digital password, the fingerprint recognition, the iris recognition, and the face recognition are several password input manners, each password manner corresponds to one verification password, for example, the verification password corresponding to the face recognition is a face image, and the verification password corresponding to the fingerprint recognition is a fingerprint feature.
TABLE 2
In the above table 2, each level corresponds to the operation of the application program which is not authorized to be used, for example, operation 1 of APP1 is not authorized to be used in level one, and the levels of level one, level two to level three are sequentially raised, as shown in table 2, in level one, the operation which is not authorized to be used is operation 1 of APP1, operation 2 of APP1, operation 1 of APP2, and operation 2 of APP2, and in level two, the operation which is not authorized to be used is operation 2 of APP1, and the operation which is not authorized to be used in level two is less than level one, and in level one, operation 1 of APP1, operation 1 of APP2, and operation 2 of APP2 which is not authorized to be used have been authorized to be used in level two.
When a user uses the verification password to unlock the terminal to be tested, the verification password input by the user is obtained, and the password mode of the verification password is determined. After the password mode is determined, the authority level corresponding to the password mode is determined, and the authority level corresponds to the use authority of each operation of each application program. Specifically, according to the table 1, the permission level corresponding to the password manner is searched, for example, if the password manner is a digital password, and the corresponding permission level is level one, the usage permission of each application program corresponding to level one is determined according to table 2, that is, the operation 1 of APP1, the operation 2 of APP1, the operation 1 of APP2, and the operation 2 of APP2 that are not used for the right are determined, and other application programs and the corresponding operations are all used for the right, so that the usage permission of each operation of each application program corresponding to the verification password can be determined. And setting the use permission of each operation of each application program installed in the terminal to be tested according to the permission level, specifically, shielding a function module corresponding to an operation which is not used by the application program in each application program, that is, not responding to the function module.
Thus, it can be determined whether the user is qualified to use the test software after the verification password input by the user is correct, that is, whether the user is qualified to send a test request to the electronic device, and if so, the location information of the user terminal is acquired.
S503: and judging whether the position information is matched with preset position information.
The preset location information may be a location where the test terminal frequently moves, for example, location information where the user terminal is located in a preset time period is obtained, and several locations with higher occurrence frequency are found, for example, all the location information may be sorted from high to low according to the occurrence frequency, and the top N locations are selected as the preset location information. Since the position where the frequency of occurrence of the position information is high is a place where the test person frequently moves, such as an office or a residence, the judgment of the position information can prevent other people from stealing the user terminal and using the user terminal in other places.
S504: and judging whether the terminal to be tested is connected.
S505: and executing the test operation of the target software in a pre-established virtual machine to obtain a test result, wherein the virtual machine corresponds to the operating system of the terminal to be tested.
S506: and instructing the terminal to be tested to execute the test operation of the target software.
After the test result is obtained, the electronic device can obtain and send the result to be tested to the user terminal, and if an illegal user attempts to save the screenshot of the test result, the test needs to be prevented from occurring, because testers have special channels if the testers need to obtain the test result or backup the test result, for example, the test result is uploaded to a server with designated access right, and the identity needs to be verified, so that the screen cannot be shot. Specifically, whether a screen capture request is acquired or not is detected, and if the screen capture request is acquired, whether the test result is displayed on the screen or not is judged; and if so, not responding to the screen capture request.
Specifically, the electronic device may determine whether the screen capture request is acquired by monitoring a screen capture case, for example, an operation of a screen capture button displayed on a screen of the electronic device, or an operated state of some physical keys, and if it is determined that the screen capture button is touched, it is determined that the screen capture request is acquired.
And then, judging whether the test result is displayed on the screen, specifically, monitoring the current display activity, and if the displayed content is the test result, not responding to the screen capture request, namely, the current screen capture operation cannot be successful.
In addition, the electronic equipment comprises a shell, a camera and a screen, wherein the screen and the image acquisition device are arranged on the same side face of the shell. Detecting whether a screen capture request is acquired; if the test result is obtained, obtaining the image collected by the camera after the test result is judged to be displayed on the screen; extracting the face image in the image, determining whether the face image is the face image of a preset user, if so, responding to the screen capture request, and if not, not responding to the screen capture request. Then, for some users with higher access authority, the test result can be backed up by means of screen capture.
In addition, it is also possible that other illegal users steal the test result by taking a picture of the screen, and the electronic device includes a housing, a camera, and a screen, the screen and the image capturing device are disposed on the same side of the housing, and after the testing operation of the target software is executed in the pre-established virtual machine to obtain the test result, the method further includes: and acquiring the image collected by the camera. And judging whether the image acquired by the camera comprises a lens image or not, and if so, turning off the screen.
Processing the image collected by the camera, so as to extract all contour lines in the image, integrating all contour lines into the shapes of different objects, determining whether the shapes of the different objects comprise the shape of a lens, if so, determining that the objects comprise the lens image, immediately turning off the screen, namely, closing the screen, preventing a user from stealing a test result in a mode of collecting the screen image by the camera, and if the screen is lighted, obtaining the image collected by the camera again; and judging whether the image collected by the camera comprises a lens image or not until no lens image exists in the current image collected by the camera.
In addition, the two embodiments may be used in a mixed manner, and specifically, after the test operation of the target software is executed in a pre-established virtual machine to obtain a test result, whether a screen capture request is acquired or not may be detected; if yes, judging whether the test result is displayed on the screen; and if so, not responding to the screen capture request. Acquiring an image acquired by the camera; judging whether the image collected by the camera comprises a lens image or not; and if so, turning off the screen.
The method can also be used for acquiring the image acquired by the camera after the testing operation of the target software is executed in a pre-established virtual machine to obtain a testing result; judging whether the image collected by the camera comprises a lens image or not; and if so, turning off the screen. Detecting whether a screen capture request is acquired; if yes, judging whether the test result is displayed on the screen; and if so, not responding to the screen capture request.
S507: and sending the test result to the user terminal.
It should be noted that, for the parts not described in detail in the above steps, reference may be made to the foregoing embodiments, and details are not described herein again.
Referring to fig. 6, a block diagram of a testing apparatus 600 according to an embodiment of the present disclosure is shown, where the testing apparatus may include an obtaining unit 601, a determining unit 602, a creating unit 603, and a sending unit 604.
An obtaining unit 601, configured to obtain a test request sent by the user terminal, where the test request is a request input by the user through the user terminal and used for testing target software of a terminal to be tested.
A determining unit 602, configured to determine whether the terminal to be tested is connected.
The establishing unit 603 is configured to, if the terminal to be tested is not connected, execute a test operation of the target software in a pre-established virtual machine to obtain a test result, where the virtual machine corresponds to an operating system of the terminal to be tested.
A sending unit 604, configured to send the test result to the user terminal.
Further, the system also comprises an indicating unit, which is used for indicating the terminal to be tested to execute the test operation of the target software and return the test result. Specifically, if the terminal to be tested is connected, whether the target software is installed in the terminal to be tested is detected; if not, sending the installation package of the target software to the terminal to be tested, instructing the terminal to be tested to install the target software, executing the test operation of the target software and returning the test result.
The system also comprises a screen capture unit used for detecting whether a screen capture request is acquired; if so, judging whether the test result is displayed on the screen; and if so, not responding to the screen capture request.
The monitoring unit is used for acquiring the image acquired by the camera; judging whether the image collected by the camera comprises a lens image or not; and if so, turning off the screen.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 7, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 100 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores. The processor 110 interfaces with various components throughout the electronic device 100 using various interfaces and lines to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The data storage area may also store data created by the electronic device 100 during use (e.g., phone book, audio-video data, chat log data), and the like.
Referring to fig. 8, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 800 has stored therein program code that can be called by a processor to execute the methods described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application 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 depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.
Claims (8)
1. A testing method is applied to a testing system, the testing system comprises electronic equipment and a user terminal connected with the electronic equipment, the electronic equipment comprises a shell, a camera and a screen, the screen and the camera are arranged on the same side face of the shell, and the method comprises the following steps:
the electronic equipment acquires a test request sent by the user terminal, wherein the test request is a request which is input by a user through the user terminal and is used for testing target software of a terminal to be tested;
judging whether the terminal to be tested is connected or not;
if the terminal to be tested is not connected, executing the test operation of the target software in a pre-established virtual machine to obtain a test result, wherein the virtual machine corresponds to an operating system of the terminal to be tested;
sending the test result to the user terminal;
detecting whether a screen capture request is acquired;
if yes, judging whether the test result is displayed on the screen;
if the test result is displayed on the screen, acquiring an image acquired by the camera;
extracting a face image in the image, and determining whether the face image is a face image of a preset user;
if the face image is the face image of the preset user, responding to the screen capturing request;
if the image is not the face image of the preset user, the screen capturing request is not responded, and whether the image comprises a lens image or not is judged;
if the camera lens image is included, the screen is turned off;
and if the screen is detected to be lightened, executing the operation of acquiring the image acquired by the camera and the subsequent operation again until no lens image exists in the image acquired by the camera.
2. The method of claim 1, further comprising:
and if the terminal to be tested is connected, the terminal to be tested is instructed to execute the test operation of the target software and return a test result.
3. The method of claim 2, wherein if the terminal to be tested is connected, instructing the terminal to be tested to perform the test operation of the target software and returning a test result comprises:
if the terminal to be tested is connected, detecting whether the target software is installed in the terminal to be tested;
if not, sending the installation package of the target software to the terminal to be tested, instructing the terminal to be tested to install the target software, executing the test operation of the target software and returning the test result.
4. The method of claim 1, wherein the determining whether the terminal to be tested is connected comprises:
acquiring the position information of the user terminal;
judging whether the position information is matched with preset position information or not;
if the terminal to be tested is matched with the terminal to be tested, judging whether the terminal to be tested is connected with the terminal to be tested.
5. The method of claim 4, wherein the obtaining the location information of the ue comprises:
acquiring a user name of the current login user terminal;
judging whether the user name meets a preset condition or not;
and if so, acquiring the position information of the user terminal.
6. The utility model provides a testing arrangement, its characterized in that is applied to test system's electronic equipment, test system still include with the user terminal that electronic equipment connects, electronic equipment includes casing, camera and screen, the screen with the camera setting is in same side of casing, testing arrangement includes:
the device comprises an acquisition unit, a test unit and a test unit, wherein the acquisition unit is used for acquiring a test request sent by the user terminal, and the test request is a request which is input by a user through the user terminal and is used for testing target software of a terminal to be tested;
the judging unit is used for judging whether the terminal to be tested is connected or not;
the establishing unit is used for executing the test operation of the target software in a pre-established virtual machine to obtain a test result if the terminal to be tested is not connected, wherein the virtual machine corresponds to an operating system of the terminal to be tested;
a sending unit, configured to send the test result to the user terminal;
the screen capture unit is used for detecting whether a screen capture request is acquired; if yes, judging whether the test result is displayed on the screen; if the test result is displayed on the screen, acquiring an image acquired by the camera; extracting a face image in the image, and determining whether the face image is a face image of a preset user; if the face image is the face image of the preset user, responding to the screen capturing request; if the image is not the face image of the preset user, the screen capture request is not responded, and whether the image comprises a lens image or not is judged; if the camera lens image is included, the screen is turned off; and if the screen is detected to be lightened, executing the operation of acquiring the image collected by the camera and the subsequent operation again until no lens image exists in the image collected by the camera.
7. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-5.
8. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811125927.2A CN109388532B (en) | 2018-09-26 | 2018-09-26 | Test method, test device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811125927.2A CN109388532B (en) | 2018-09-26 | 2018-09-26 | Test method, test device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109388532A CN109388532A (en) | 2019-02-26 |
CN109388532B true CN109388532B (en) | 2022-10-28 |
Family
ID=65418143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811125927.2A Active CN109388532B (en) | 2018-09-26 | 2018-09-26 | Test method, test device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109388532B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347597B (en) * | 2019-07-04 | 2023-09-26 | Oppo广东移动通信有限公司 | Interface testing method and device of picture server, storage medium and mobile terminal |
CN110515834B (en) * | 2019-07-26 | 2023-11-10 | Oppo广东移动通信有限公司 | Interface testing method and device, mobile terminal and storage medium |
CN110838953B (en) * | 2019-11-01 | 2021-08-17 | 北京字节跳动网络技术有限公司 | Test method, test system, electronic equipment and storage medium |
CN111026644B (en) * | 2019-11-20 | 2023-09-26 | 东软集团股份有限公司 | Operation result labeling method and device, storage medium and electronic equipment |
CN113157500A (en) * | 2020-01-23 | 2021-07-23 | 阿里巴巴集团控股有限公司 | Equipment testing method, device, computer system and readable storage medium |
CN111352790A (en) * | 2020-02-20 | 2020-06-30 | Oppo(重庆)智能科技有限公司 | Test method and device for reporting input event, mobile terminal and storage medium |
CN111833044A (en) * | 2020-06-19 | 2020-10-27 | 深圳市中创电测技术有限公司 | Handheld terminal testing method, equipment, system and storage medium |
CN112035372A (en) * | 2020-09-07 | 2020-12-04 | 深圳市道通科技股份有限公司 | Software testing method and device and electronic equipment |
CN112256561A (en) * | 2020-09-22 | 2021-01-22 | 北京达佳互联信息技术有限公司 | Push information testing method, device, equipment and storage medium |
CN112130870A (en) * | 2020-09-22 | 2020-12-25 | 湖南快乐阳光互动娱乐传媒有限公司 | Method, device and system for installing test packets |
CN113014452A (en) * | 2021-03-01 | 2021-06-22 | 鹏城实验室 | Network flow testing method, device, testing end and storage medium |
CN113676884A (en) * | 2021-08-24 | 2021-11-19 | 西安闻泰信息技术有限公司 | Method, device, equipment and medium for connecting mobile terminal and test equipment |
CN113938943B (en) * | 2021-10-20 | 2024-04-12 | 展讯半导体(成都)有限公司 | Method, system, equipment and medium for testing coexistence performance of wireless communication |
CN114692093B (en) * | 2022-05-27 | 2022-10-25 | 荣耀终端有限公司 | Application program installation method and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1585441A (en) * | 2003-08-18 | 2005-02-23 | 张丹 | Long-range maintenance authority realizing method for electronic apparatus based on calling number set |
CN102448061A (en) * | 2011-11-18 | 2012-05-09 | 王黎明 | Method and system for preventing phishing attack on basis of mobile terminal |
CN103455737A (en) * | 2012-05-28 | 2013-12-18 | 百度在线网络技术(北京)有限公司 | User information protection method and device |
CN104519267A (en) * | 2013-09-30 | 2015-04-15 | 北京三星通信技术研究有限公司 | Shooting control method and terminal equipment |
CN105573902A (en) * | 2014-10-10 | 2016-05-11 | 阿里巴巴集团控股有限公司 | Application testing method and system |
CN205539525U (en) * | 2015-12-30 | 2016-08-31 | 桂林航天光比特科技股份公司 | Automatic seek system of camera |
CN106998422A (en) * | 2016-01-26 | 2017-08-01 | 陈征 | A kind of automatic identification is taken on the sly the apparatus and method of camera lens |
CN107992730A (en) * | 2017-11-28 | 2018-05-04 | 宇龙计算机通信科技(深圳)有限公司 | A kind of screen message guard method and device |
CN108509533A (en) * | 2018-03-15 | 2018-09-07 | 平安科技(深圳)有限公司 | Control method, device and equipment for screen shot file sharing and computer storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9015234B2 (en) * | 2012-07-25 | 2015-04-21 | Lg Cns Co., Ltd. | Automated distributed testing administration environment |
-
2018
- 2018-09-26 CN CN201811125927.2A patent/CN109388532B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1585441A (en) * | 2003-08-18 | 2005-02-23 | 张丹 | Long-range maintenance authority realizing method for electronic apparatus based on calling number set |
CN102448061A (en) * | 2011-11-18 | 2012-05-09 | 王黎明 | Method and system for preventing phishing attack on basis of mobile terminal |
CN103455737A (en) * | 2012-05-28 | 2013-12-18 | 百度在线网络技术(北京)有限公司 | User information protection method and device |
CN104519267A (en) * | 2013-09-30 | 2015-04-15 | 北京三星通信技术研究有限公司 | Shooting control method and terminal equipment |
CN105573902A (en) * | 2014-10-10 | 2016-05-11 | 阿里巴巴集团控股有限公司 | Application testing method and system |
CN205539525U (en) * | 2015-12-30 | 2016-08-31 | 桂林航天光比特科技股份公司 | Automatic seek system of camera |
CN106998422A (en) * | 2016-01-26 | 2017-08-01 | 陈征 | A kind of automatic identification is taken on the sly the apparatus and method of camera lens |
CN107992730A (en) * | 2017-11-28 | 2018-05-04 | 宇龙计算机通信科技(深圳)有限公司 | A kind of screen message guard method and device |
CN108509533A (en) * | 2018-03-15 | 2018-09-07 | 平安科技(深圳)有限公司 | Control method, device and equipment for screen shot file sharing and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109388532A (en) | 2019-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109388532B (en) | Test method, test device, electronic equipment and computer readable storage medium | |
CN109582579B (en) | Application program testing method and device, electronic equipment and storage medium | |
CN108632253B (en) | Client data security access method and device based on mobile terminal | |
CN104182688A (en) | Android malicious code detection device and method based on dynamic activation and behavior monitoring | |
CN108664364B (en) | Terminal testing method and device | |
CN105139470A (en) | Checking-in method, device and system based on face recognition | |
CN104866752B (en) | A kind of application guard method and user terminal | |
CN108737638B (en) | Application control method and device, mobile terminal and computer readable medium | |
CN111490996A (en) | Network attack processing method and device, computer equipment and storage medium | |
CN109254661B (en) | Image display method, image display device, storage medium and electronic equipment | |
CN110888781B (en) | Application blockage detection method and detection device | |
US11381561B2 (en) | Operation authentication relay apparatus, method, and program | |
CN109818972B (en) | Information security management method and device for industrial control system and electronic equipment | |
CN109271228A (en) | Interface function recognition methods, device and the electronic equipment of application | |
CN115329309A (en) | Verification method, verification device, electronic equipment and storage medium | |
CN105373715A (en) | Wearable device based data access method and apparatus | |
CN107766068B (en) | Application system patch installation method and device, computer equipment and storage medium | |
CN113138888A (en) | Function detection method and device, electronic equipment and storage medium | |
CN104937602B (en) | Privacy protection method and electronic equipment | |
CN110706221A (en) | Verification method, verification device, storage medium and device for customizing pictures | |
JP2017102758A (en) | Authentication device, authentication method, and program | |
CN113987506A (en) | Test method, device, test equipment and storage medium of authentication system | |
CN109714371B (en) | Industrial control network safety detection system | |
CN113660259A (en) | Webshell detection method, system, computer and readable storage medium | |
CN109819292B (en) | Control method of remote media machine and remote media machine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |