CN112685299A - Automatic test method, device, electronic equipment and readable storage medium - Google Patents

Automatic test method, device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112685299A
CN112685299A CN202011573323.1A CN202011573323A CN112685299A CN 112685299 A CN112685299 A CN 112685299A CN 202011573323 A CN202011573323 A CN 202011573323A CN 112685299 A CN112685299 A CN 112685299A
Authority
CN
China
Prior art keywords
sliding
operated
type
coordinate
test
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.)
Granted
Application number
CN202011573323.1A
Other languages
Chinese (zh)
Other versions
CN112685299B (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Transtek Medical Electronics Co Ltd
Original Assignee
Guangdong Transtek Medical Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Transtek Medical Electronics Co Ltd filed Critical Guangdong Transtek Medical Electronics Co Ltd
Priority to CN202011573323.1A priority Critical patent/CN112685299B/en
Publication of CN112685299A publication Critical patent/CN112685299A/en
Application granted granted Critical
Publication of CN112685299B publication Critical patent/CN112685299B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides an automatic test method, an automatic test device, electronic equipment and a readable storage medium, wherein the method comprises the following steps: determining the current simulation test operation according to a preset test rule; acquiring human hand simulation operation information corresponding to the current simulation test operation and aiming at the equipment to be tested; and sending the hand simulation operation information to the equipment to be tested so that the equipment to be tested simulates hand operation according to the hand simulation operation information and triggers a function corresponding to the hand operation according to the hand operation. Like this, can realize the automatic test to various equipment, reduce to artifical reliance, improve efficiency of software testing, reduce the risk that appears missing to survey, the wrong detection, be convenient for carry out the statistics of gathering of test data, and the scheme of this application can the wide application in all kinds of equipment that have characteristics that operating system is simple, data throughput is low.

Description

Automatic test method, device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of testing technologies, and in particular, to an automatic testing method and apparatus, an electronic device, and a readable storage medium.
Background
After the firmware is developed, the wearable device usually needs a software testing engineer to perform software testing to determine whether the wearable device firmware meets the design requirements.
Due to the characteristics of small size, simple operating system (usually single-chip microcomputer-level system), low data throughput and the like of the wearable device, the traditional automatic test method applied to medium-sized and large-sized terminal devices such as mobile phones and servers cannot be applied to the test scene of the wearable device due to the fact that a large number of test programs and instructions need to be configured on the terminal device.
At present, the test scheme of the wearable device is still manually operated by a software test engineer. The software testing engineer manually performs operations such as screen sliding, long-time pressing, clicking, power key pressing or other function key pressing, and the like, and detects whether the interface state and/or the service information meet the requirements in a mode of eye checking and the like in the operation process.
However, this method has low testing efficiency, depends on manual judgment, is easy to have the situations of missing test and error detection, and is inconvenient to summarize and count the test data. Furthermore, manual operation does not enable testing for some extreme or critical situations.
Disclosure of Invention
An object of the embodiments of the present application is to provide an automatic testing method, an automatic testing apparatus, an electronic device, and a readable storage medium, so as to solve the above problems.
The embodiment of the application provides an automatic test method, which comprises the following steps: determining the current simulation test operation according to a preset test rule; acquiring human hand simulation operation information corresponding to the current simulation test operation and aiming at the equipment to be tested; and sending the hand simulation operation information to the equipment to be tested so that the equipment to be tested simulates hand operation according to the hand simulation operation information and triggers a function corresponding to the hand operation according to the hand operation.
In the implementation process, the testing rule is preset in the upper computer, so that the current simulation testing operation is determined according to the preset testing rule, the hand simulation operation information corresponding to the current simulation testing operation and aiming at the equipment to be tested is obtained, and the hand simulation operation information is sent to the equipment to be tested, so that the equipment to be tested simulates the corresponding hand operation, triggers the corresponding function and implements the test. By the mode, automatic testing of various devices can be realized, dependence on manpower is reduced, testing efficiency is improved, risks of missing testing and error detection are reduced, and summary statistics of test data is facilitated. In addition, because the hand simulation operation information is sent to the device to be tested, the device to be tested simulates the corresponding hand operation, and therefore, for the device to be tested, a large amount of new programs and instructions are not required to be configured, so that the device to be tested can be applied to devices such as wearable devices and the like which have the characteristics of simple operation systems (generally single-chip microcomputer-level systems), low data processing capacity and the like, and has universality.
Further, the test procedure is a fixed test operation flow determined according to the function, the display page and the operation method of the to-be-tested software built in the to-be-tested equipment.
In the implementation process, the fixed test operation flow is determined according to the function, the display page and the operation method of the to-be-tested software built in the to-be-tested equipment to obtain the test rule, so that the upper computer can accurately and reliably determine the current simulation test operation during testing, acquire the corresponding human hand simulation operation information and ensure the normal operation of the test.
Further, the method further comprises: acquiring a current interface of a device to be tested; the acquiring of the human hand simulation operation information corresponding to the current simulation test operation and aiming at the device to be tested comprises: determining a type to be operated corresponding to the current simulation test operation; and when the type to be operated is clicking, determining the coordinates of the target control in the current interface according to the preset test procedure, and generating human hand simulation operation information containing the coordinates, the pressing state and the releasing state of the target control.
In the implementation process, for the click operation, the coordinates of the target control in the current interface are determined through the test procedure, and the human hand simulation operation information containing the coordinates, the pressing state and the releasing state of the target control is generated, so that the click coordinates are accurately acquired, and the normal operation of the test is ensured.
Further, the method further comprises: acquiring a current interface of a device to be tested; the acquiring of the human hand simulation operation information corresponding to the current simulation test operation and aiming at the device to be tested comprises: determining a type to be operated corresponding to the current simulation test operation; and when the type to be operated is long press time, determining the coordinates of the target control in the current interface according to the preset test procedure, and generating human hand simulation operation information containing the coordinates, the pressing state, the releasing state and the duration time of the target control.
In the implementation process, for the long press operation, the coordinates of the target control in the current interface are determined through the test procedure, and the human hand simulation operation information containing the coordinates, the press state and the release state of the target control is generated, so that the accurate acquisition of the long press coordinates is realized, and the normal operation of the test is ensured.
Further, the acquiring human hand simulation operation information for the device to be tested corresponding to the current simulation test operation includes: determining a type to be operated corresponding to the current simulation test operation; and when the type to be operated is linear sliding, generating human hand simulation operation information comprising a sliding starting coordinate, a sliding ending coordinate and sliding duration in the sliding direction according to the sliding direction required in the test procedure.
In the implementation process, for the linear sliding operation, the hand simulation operation information including the sliding start coordinate, the sliding end coordinate and the sliding duration in the sliding direction is generated through the sliding direction required in the test procedure, so that the accurate acquisition of the relevant coordinate of the linear sliding operation meeting the test requirement is effectively realized, and the normal operation of the test is ensured.
Further, the acquiring human hand simulation operation information for the device to be tested corresponding to the current simulation test operation includes: determining a type to be operated corresponding to the current simulation test operation; and when the type to be operated is curve sliding, generating a sliding starting coordinate, a sliding ending coordinate, a plurality of sliding middle coordinates between the sliding starting coordinate and the sliding ending coordinate and human hand simulation operation information of sliding duration according to the sliding curve requirement required in the test procedure.
In the implementation process, for the curve sliding operation, the hand simulation operation information including the sliding start coordinate, the sliding end coordinate, the sliding middle coordinates between the sliding start coordinate and the sliding end coordinate and the sliding time length is generated according to the sliding curve requirement required in the test procedure, so that the accurate acquisition of the relevant coordinates of the curve sliding operation meeting the test requirement is effectively realized, and the normal operation of the test is ensured.
Further, the method further comprises: receiving interface information and/or service information which is generated after a function corresponding to the manual operation is triggered and returned by the device to be tested; and determining a test result according to the interface information and/or the service information.
In the embodiment of the application, the upper computer receives the interface information and/or the service information which is returned by the device to be tested and is generated after the function corresponding to the manual operation is triggered, so that the analysis and the judgment of the test result of the device to be tested can be carried out according to the returned interface information and/or the service information, and further, the code and the instruction are prevented from being added to the device to be tested.
Further, determining a test result according to the interface information and/or the service information includes: code identifying the interface information and/or the service information; and determining the test result according to the code.
In the implementation process, the upper computer determines the test result by analyzing the interface information and/or the service information code. Compared with the traditional test method, the traditional test method is characterized in that the interface after the operation of the simulated human hand is shot through the third-party shooting equipment, and then the test result is determined in a manual or image recognition mode.
Further, the testing operation flow of the testing procedure is consistent with the manual operation flow of the software currently tested by the device to be tested.
In the implementation process, the test process of the device to be tested is completely consistent with that in normal manual operation, so that intermediate data (such as program information of an intermediate interface or service information generated in the operation process) generated in the normal manual operation process can be acquired, and the automatic test effect is better.
The embodiment of the application further provides an automatic testing method, which is applied to a device to be tested and comprises the following steps: receiving human hand simulation operation information transmitted by the automatic testing method of the upper computer; determining a type to be operated corresponding to the human hand simulation operation information; and simulating the hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the hand simulation operation information, and triggering a function corresponding to the hand operation in the software to be tested.
In the implementation process, the device to be tested only needs to adopt the corresponding action instruction template, and human hand operation corresponding to the type to be operated is simulated by utilizing human hand simulation operation information, and for the device to be tested, only a small amount of code modification is needed, so that the device to be tested can be adopted on devices such as wearable devices and the like which have the characteristics of simple operation system (generally a single-chip microcomputer-level system), low data throughput and the like, and has good universality. In addition, the to-be-tested equipment can simulate manual operation according to manual simulation operation information issued by the upper computer, so that the requirement for manpower in the testing process is reduced, the testing efficiency is improved, the risks of missing testing and error detection are reduced, and the summarizing and counting of the testing data are facilitated.
Further, when the current type to be operated is clicking, the preset action instruction template corresponding to the type to be operated is: press down at coordinates (x, y) and release at coordinates (x, y); simulating the human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, wherein the simulation operation comprises the following steps: replacing the coordinates (x, y) in the preset action instruction template with the coordinates in the human hand simulation operation information; and executing the replaced preset action instruction template.
Further, when the current type to be operated is long time, the preset action instruction template corresponding to the type to be operated is as follows: press down at coordinate (x, y), release and press down duration at coordinate (x, y); simulating the human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, wherein the simulation operation comprises the following steps: replacing the coordinates (x, y) and the pressing duration in the preset action instruction template with the coordinates and the duration in the human hand simulation operation information; and executing the replaced preset action instruction template.
Further, when the current type to be operated is linear sliding or curvilinear sliding, the preset action instruction template corresponding to the type to be operated is as follows: press at coordinate (x1, y1), slide along an intermediate coordinate between coordinate (x1, y1) and coordinate (x2, y2), release at coordinate (x2, y2), and slide duration; when the current type to be operated is linear sliding, simulating the human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, wherein the method comprises the following steps: automatically generating an intermediate coordinate between a coordinate (x1, y1) and a coordinate (x2, y2) in the preset action instruction template according to a sliding start coordinate, a sliding end coordinate and sliding duration in the human hand simulation operation information, and writing the intermediate coordinate into the preset action instruction template; replacing the coordinates (x1, y1), the coordinates (x2, y2) and the sliding duration in the preset action command template with the sliding start coordinate, the sliding end coordinate and the sliding duration in the human hand simulation operation information; executing the replaced preset action instruction template;
when the current type to be operated is curved sliding, simulating the human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, wherein the method comprises the following steps: replacing the coordinates (x1, y1), the coordinates (x2, y2), the intermediate coordinates between the coordinates (x1, y1) and the coordinates (x2, y2), and the sliding time length in the preset motion command template with the sliding start coordinate, the sliding end coordinate, the intermediate coordinates between the coordinates (x1, y1) and the coordinates (x2, y2), and the sliding time length in the human hand simulation operation information; and executing the replaced preset action instruction template.
In the implementation process, the device to be tested can quickly realize the simulation of the corresponding hand operation only by configuring the corresponding action instruction template in advance and filling the content in the hand simulation operation information into the corresponding action instruction template, the implementation mode is simple, the code amount is small, the efficiency is high, and the device to be tested can be widely applied to devices with smaller systems and insufficient data processing capacity, such as wearable devices, and the like, so that efficient automatic testing is realized.
Further, the method further comprises: receiving indication information of the type to be operated, which is transmitted by an upper computer; correspondingly, determining the type to be operated corresponding to the human hand simulation operation information comprises the following steps: and determining the type to be operated corresponding to the hand simulation operation information according to the type indication information to be operated.
In the implementation process, the upper computer sends the indication information of the type to be operated, so that the device to be tested can conveniently and quickly determine the type to be operated corresponding to the hand simulation operation information, and the testing efficiency is improved. In addition, only the indication information of the type to be operated needs to be identified, the required code amount is small, and system burden is not caused, so that the method and the device can be widely applied to devices such as wearable devices and the like with small systems and insufficient data processing capacity.
The embodiment of the application further provides an automatic testing device, which is applied to an upper computer and comprises: the device comprises a determining module, an obtaining module and a sending module; the determining module is used for determining the current simulation test operation according to a preset test rule; the acquisition module is used for acquiring human hand simulation operation information corresponding to the current simulation test operation and aiming at the equipment to be tested; the sending module is used for sending the hand simulation operation information to the equipment to be tested so that the equipment to be tested can simulate hand operation according to the hand simulation operation information and trigger functions corresponding to the hand operation according to the hand operation.
The embodiment of the present application further provides an automatic testing apparatus, which is applied to a device to be tested, and includes: the device comprises a receiving module, a type determining module and a simulating module; the receiving module is used for receiving human hand simulation operation information transmitted by the upper computer according to the automatic testing method; the type determining module is used for determining the type to be operated corresponding to the human hand simulation operation information; the simulation module is used for simulating the hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the hand simulation operation information, and triggering the function corresponding to the hand operation in the software to be tested.
The embodiment of the application also provides electronic equipment, which comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute one or more programs stored in the memory to implement any of the automatic test methods described above.
Also provided in embodiments of the present application is a readable storage medium storing one or more programs executable by one or more processors to implement any of the above-described automated testing methods.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an automatic test system according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of an automatic testing method according to an embodiment of the present disclosure;
fig. 3 is a schematic view of interaction between an upper computer and a device to be tested according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an automatic testing device applied to an upper computer according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of an automatic test apparatus applied to a device under test according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The first embodiment is as follows:
in order to realize automatic testing of devices such as wearable devices and the like with the characteristics of simple operating system and low data processing capacity and improve the testing efficiency of the devices, the embodiment of the application provides an automatic testing system and a corresponding automatic testing method. As shown in fig. 1, the automatic test system in the embodiment of the present application includes an upper computer and a device to be tested, and the upper computer is in communication connection with the device to be tested.
It should be noted that, in the embodiment of the present application, the device to be tested refers to a device that needs to perform a test related to human hand operation, and may change with a change in the test requirement of the user. For example, when the user tests the device 1, the device 1 is the device to be tested. After the device 1 finishes testing, the user needs to test the device 2, and at this time, the device 2 is in communication connection with the upper computer, and at this time, the device 2 is the device to be tested.
It should be further noted that, in the embodiment of the present application, a test procedure of various tests to be performed may be set on the upper computer in advance.
For example, assuming that the software a needs to be tested, a corresponding test procedure a can be written in advance according to the test requirements of the software a and stored on the upper computer, so that the automatic test system can have the test capability for the software a.
In the embodiment of the application, a fixed test operation flow can be determined according to the function, the display page and the operation method of the software to be tested which is built in the device to be tested, and the test procedure of the software to be tested is constructed according to the fixed test operation flow, so that the test can be conveniently carried out.
It should be noted that, in the embodiment of the present application, the testing operation flow of the testing procedure may be configured to be consistent with the manual operation flow of the software currently tested by the device to be tested.
That is, what kind of operation flow to test when the manual work is tested, then according to this test rule, the host computer also can test according to the operation flow the same as manual work to make automatic test more be close to user's normal use condition.
For example, for testing the heart rate monitoring function of the heart rate monitoring software, the test procedure in the embodiment of the present application will specify a test operation flow which is the same as the manual operation flow from entering the main interface of the heart rate monitoring software to triggering the heart rate monitoring function, rather than enabling the device to be tested to directly trigger the heart rate monitoring function, so as to enable the software to perform heart rate monitoring.
In this embodiment of the application, the upper computer may be implemented by an electronic device such as a server and a computer, but is not limited thereto.
It should be understood that, although fig. 1 only shows a case where the upper computer is connected to one device to be tested, in fact, the solution of the embodiment of the present application may allow the upper computer to simultaneously connect to a plurality of devices to be tested and simultaneously perform parallel testing on the plurality of devices to be tested.
In the embodiment of the present application, the upper computer and the device to be tested may be tested according to the automatic testing method shown in fig. 2, where the related functions of the upper computer and the device to be tested may be described with reference to the related steps in fig. 2.
Referring to fig. 2, fig. 2 illustrates an automatic testing method provided in an embodiment of the present application, including:
s201: and the upper computer determines the current simulation test operation according to a preset test rule.
It should be understood that a plurality of test protocols can be preset in the upper computer, and an engineer can write or select a corresponding test protocol in the upper computer according to a current object to be tested or a certain function to be tested of the object to be tested, so that the upper computer can automatically test the device to be tested according to the test protocol.
It should be understood that when a test is performed, it is often necessary to perform a plurality of test operations (referred to as simulation test operations in the embodiments of the present application) on the device under test. In the embodiment of the application, the simulation test operation required by the test and the sequence among the simulation test operations are specified in the test procedure, so that the test is convenient.
The specified simulation test operations and the sequence among the simulation test operations constitute a test operation flow of the test procedure, and the test is performed according to the test operation flow during the test.
In the embodiment of the present application, each simulation test operation may be defined with a corresponding trigger condition, and the setting of the order between the simulation test operations and the determination of the current simulation test operation are achieved through the trigger conditions.
For example, the triggering condition of the first simulation test operation may be defined as test start, and then after the engineer controls the upper computer to start testing, the first simulation test operation of the test operation flow may be determined as the current simulation test operation according to the test procedure.
Similarly, for the rest of the simulation test operations in the test, the determination may also be made according to the trigger condition of each simulation test operation in the test procedure.
For example, it is assumed that the first simulation test operation defined in the test procedure is to control the device to be tested to enter the interface a, and the simulation test operation 1 is defined to be triggered after the device to be tested enters the interface a. Then, after the information that the representation returned by the device to be tested enters the interface a is obtained, the current simulation test operation can be determined to be the simulation test operation 1 according to the test procedure.
For another example, the simulation test operation 2 is defined to be triggered after the human hand simulation operation information corresponding to the simulation test operation 1 is issued, so that after the human hand simulation operation information corresponding to the simulation test operation 1 is issued, the simulation test operation 2 can be determined to be the current simulation test operation according to a preset test procedure.
S202: and acquiring human hand simulation operation information corresponding to the current simulation test operation and aiming at the equipment to be tested.
It should be understood that, in practical applications, users often perform different human hand operation actions, and therefore in the embodiment of the present application, types of different human hand operation actions to be simulated (referred to as to-be-operated types in the embodiment of the present application) may be predefined, for example, the following to-be-operated types may be predefined: clicking, long pressing, linear sliding, curvilinear sliding and the like respectively correspond to human hand clicking action, human hand long pressing action, human hand linear sliding action and human hand curvilinear sliding action in practical application.
In the embodiment of the application, each simulation test operation in the procedure can be associated with the corresponding type to be operated in advance, and the human hand simulation operation information corresponding to each type to be operated can be defined.
For example, in the embodiment of the present application, the human hand simulation operation information corresponding to the click type may be defined to include coordinates of the click point, a pressing state, and a releasing state; the human hand simulation operation information corresponding to the long press type comprises coordinates and duration of the long press position, a press state and a release state; the hand simulation operation information corresponding to the linear sliding type comprises a sliding starting coordinate, a sliding ending coordinate and a sliding duration; the human hand simulation operation information corresponding to the curve sliding type comprises a sliding starting coordinate, a sliding ending coordinate, a plurality of sliding middle coordinates located between the sliding starting coordinate and the sliding ending coordinate, and sliding duration.
It should be understood that the contents of the human hand simulation operation information corresponding to the click, the long press, the straight line slide, and the curved line slide defined above are only the information contents exemplified in the embodiment of the present application, and in practical applications, more or less contents than these contents may be included as long as the device to be tested can simulate the corresponding human hand operation based on the human hand simulation operation information.
It should also be understood that the above only illustrates several types of to-be-operated types, namely, clicking, long pressing, linear sliding, and curvilinear sliding, but in fact, the to-be-operated types may be set by an engineer according to actual needs, and are not limited to the 4 types, namely, clicking, long pressing, linear sliding, and curvilinear sliding, and may also be a key type (corresponding to an action of simulating a human hand pressing a function key), for example.
In a feasible implementation manner in the embodiment of the application, specific values of the human hand simulation operation information corresponding to each simulation test operation may be defined in the upper computer in advance, so that after the current simulation test operation is determined, the corresponding specific human hand simulation operation information may be obtained.
It should be understood that, for the foregoing possible embodiment, the type to be operated corresponding to each simulated test operation may not be associated, but only the specific value of the human hand simulated operation information corresponding to each simulated test operation may be associated. Of course, it is also feasible that each simulation test operation is associated with a corresponding type to be operated.
In addition, in another possible implementation manner of the embodiment of the application, a human hand simulation operation information acquisition manner corresponding to each simulation test operation may be defined in the test procedure, so that the required human hand simulation operation information is extracted by acquiring the required information from the device to be tested.
For example, after determining the current simulation test operation, the upper computer may further determine a type to be operated corresponding to the current simulation test operation. And then acquiring the hand simulation operation information according to different preset modes according to different types to be operated.
For example, when the type to be operated is clicking, the coordinates of the target control in the current interface of the device to be tested can be determined according to the test procedure, and human hand simulation operation information including the coordinates, the pressing state and the releasing state of the target control is generated.
It should be noted that, in the embodiment of the present application, the upper computer may be configured to obtain the current interface of the device to be tested. The current interface acquisition mode can be actively reported by the equipment to be tested, for example, after triggering a function corresponding to the simulated human hand operation according to the simulated human hand operation, the latest interface information is actively reported; in addition, the interface can also be obtained by the host computer automatically requesting, for example, the host computer can automatically send an obtaining instruction of the current interface to the device to be tested, so that the device to be tested returns to the current interface.
The test procedure may pre-define which control the target control is (for example, the target control may be defined as an a link in the current interface), so that the target control is found by detecting each control in the current interface, and further the coordinates of the target control are obtained.
For another example, when the type of the operation to be performed is long press, the coordinates of the target control in the current interface of the device to be tested can be determined according to a preset test procedure, and human hand simulation operation information including the coordinates, the pressing state, the releasing state and the duration of the target control is generated.
It should be noted that, for obtaining the current interface of the device to be tested and obtaining the coordinates of the target control, refer to the above description, and are not described herein again.
It should be noted that the duration may be predefined, but may also be randomly generated to fit the possible pressing duration of human hand operation.
For another example, when the type to be operated is linear sliding, human hand simulation operation information including a sliding start coordinate, a sliding end coordinate, and a sliding time length in the sliding direction may be generated according to the sliding direction required in the test protocol.
It should be understood that, in the above-mentioned possible embodiment, the sliding direction of the linear sliding can be determined according to the operation requirement of the actual test in the test procedure, so as to facilitate the test.
For another example, when the type to be operated is curve sliding, according to the sliding curve requirement required in the test protocol, human hand simulation operation information of a sliding start coordinate, a sliding end coordinate, a plurality of sliding intermediate coordinates between the sliding start coordinate and the sliding end coordinate, and a sliding time length is generated.
It should be noted that, in the above possible embodiment, the sliding curve requirement (such as which direction to bend, whether to round, how much to bend, etc.) of the curve sliding can be determined according to the operation requirement of the actual test in the test procedure, so as to facilitate the test.
It should be noted that, for the sliding time length in the foregoing example, the sliding time length may be predefined, but may also be a sliding time length randomly generated to meet the possibility of human hand operation.
For another example, when the type to be operated is a key, a key function to be simulated can be determined according to the test procedure, and the trigger information of the corresponding key function is sent to the device to be tested.
S203: and sending the human hand simulation operation information to the equipment to be tested.
In practical applications, some devices under test may only support certain protocol communications due to the limitations of their own system. Therefore, in the embodiment of the application, the interaction between the upper computer and the device to be tested can be realized by adopting a communication mode meeting the protocol requirement of the device to be tested.
Illustratively, the communication connection and the data interaction between the upper computer and the device to be tested can be realized through modes such as Bluetooth, serial ports, Jlink interfaces and the like.
S204: and the to-be-tested equipment determines the to-be-operated type corresponding to the hand simulation operation information.
In a feasible implementation manner of the embodiment of the application, the upper computer can generate the indication information of the type to be operated according to the type to be operated corresponding to the current simulation test operation when the sender manually simulates the operation information, so that the indication information of the type to be operated is sent to the equipment to be tested together.
The device to be tested can determine the type to be operated corresponding to the hand simulation operation information by identifying the indication information of the type to be operated.
In addition, the content of the human hand simulation operation information corresponding to different types to be operated is often different. For example, in the foregoing example, the long press type is relative to the click type, the human hand simulation operation information corresponding to the long press type includes the press duration, and the human hand simulation operation information corresponding to the click type does not have the content of the press duration.
Based on this, in another possible implementation manner of the embodiment of the application, the device to be tested may also determine the type to be operated corresponding to the human hand simulation operation information according to the content included in the human hand simulation operation information.
For example, the content included in the human hand simulation operation information may be identified and matched with the content corresponding to each preset type to be operated, so as to determine the type to be operated matched with the content of the human hand simulation operation information.
It should be understood that, for the foregoing embodiment in which each simulation test operation is not associated with a corresponding type to be operated, the determination of the type to be operated corresponding to the human hand simulation operation information by the device to be tested can be ensured through the another possible embodiment described above.
S205: and simulating the hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the hand simulation operation information, and triggering the function corresponding to the hand operation in the software to be tested.
In the embodiment of the application, the action instruction template can be realized through a related operation function, and the simulation of the related human hand operation can be realized by changing related parameters in the action instruction template.
For example, when the current type to be operated is a click, the preset action instruction template corresponding to the type to be operated may be: pressed at coordinates (x, y) and released at coordinates (x, y). Then, the coordinates (x, y) in the preset action instruction template may be replaced with the coordinates in the human hand simulation operation information, and then the replaced preset action instruction template is executed, so that the click operation of pressing and releasing at the coordinates in the human hand simulation operation information may be simulated.
For another example, when the current type to be operated is long press, the preset action instruction template corresponding to the type to be operated may be: press down at coordinate (x, y), release at coordinate (x, y) and press down duration. Then the coordinates (x, y) and the pressing duration in the preset action instruction template can be replaced by the coordinates and the duration in the human hand simulation operation information, and then the replaced preset action instruction template is executed, so that the long pressing operation released after the pressing duration is pressed at the coordinates in the human hand simulation operation information can be simulated.
For another example, when the current type to be operated is linear sliding or curvilinear sliding, the preset action instruction template corresponding to the type to be operated may be: press at coordinate (x1, y1), slide along an intermediate coordinate between coordinate (x1, y1) and coordinate (x2, y2), release at coordinate (x2, y2), and slide duration.
When the current type to be operated is linear sliding, automatically generating intermediate coordinates between coordinates (x1, y1) and coordinates (x2, y2) in the preset action instruction template according to a sliding start coordinate, a sliding end coordinate and sliding time length in human hand simulation operation information, writing the intermediate coordinates into the preset action instruction template, replacing the coordinates (x1, y1), the coordinates (x2, y2) and the sliding time length in the preset action instruction template with the sliding start coordinate, the sliding end coordinate and the sliding time length in the human hand simulation operation information, and executing the replaced preset action instruction template, thereby simulating linear sliding operation.
When the current type to be operated is a curve sliding type, the coordinates (x1, y1), the coordinates (x2, y2), the intermediate coordinates between the coordinates (x1, y1) and the coordinates (x2, y2), and the sliding time length in the preset motion command template may be replaced with the sliding start coordinate, the sliding end coordinate, the intermediate coordinates between the coordinates (x1, y1) and the coordinates (x2, y2), and then the replaced preset motion command template is executed, so as to simulate the curve sliding operation.
For another example, when the current type to be operated is a key, the action instruction template may be a UI (User Interface) processing function of the device to be tested, so that the UI processing function directly processes key function triggering information sent from the upper computer, thereby triggering a function of the corresponding key.
In the embodiment of the application, after the device to be tested simulates the hand operation corresponding to the type to be operated and triggers the function corresponding to the hand operation in the software to be tested, the interface information and/or the service information generated after the function corresponding to the hand operation is triggered can be returned to the upper computer, so that the upper computer can determine the test result according to the reported interface information and/or service information.
It should be understood that the service information described in the embodiments of the present application refers to information related to the service function of the software to be tested. For example, the software to be tested is heart rate monitoring software, and the service information may be heart rate monitored after the monitoring function is triggered. In addition, the service information may also include information such as the time from triggering to completion of each function. The content of the service information to be reported can be set by an engineer according to the actual test requirement.
It should be further understood that, interface information, service information, or both interface information and service information that need to be reported may be set by an engineer according to actual test requirements.
In addition, in order to ensure the reliability in the data interaction process, a communication link dedicated to transmitting data from the upper computer to the device to be tested and a communication link dedicated to transmitting data from the device to be tested to the upper computer may be established between the upper computer and the device to be tested, for example, as shown in fig. 3.
In the embodiment of the application, the interface information can be sent to the upper computer by calling the UI processing function. In the embodiment of the application, the interface information may include information such as interface content, a position of a control in the interface, and a type of the control, so that the upper computer can process the information conveniently.
It should be noted that, in the embodiment of the present application, the device to be tested may convert the interface information and/or the service information into a code, so that the interface information and/or the service information is reported to the upper computer in a code manner.
In the embodiment of the application, the upper computer identifies the code of the interface information and/or the service information, so that the test result is determined according to the code.
For example, the upper computer may read out feature information (such as a control position, a heartbeat test, a coordinate position, and the like) carried in the code and related to the determination of the test result, so as to compare the feature information with a preset qualified standard, and if the feature information meets the qualified standard, it is determined that the test is passed, otherwise, it is determined that the test is failed.
For example, the device to be tested may report the following interface information codes:
form: sport; (Source: sports (software))
Buttton 1: (100, 200), Buttton 2: (200 ), Buttton 3: (300 ), (control 1(100, 200), control 2(200 ), control 3(300 )).
After the upper computer receives the code, the upper computer can search for a preset qualified standard about Sport (assuming that the position of the control 1 is (100, 200), the position of the control 2 is (200 ), and the position of the control 3 is (300 )), and then the upper computer can perform the following steps according to the characteristic information button 1 in the code: (100, 200), Buttton 2: (200 ), Buttton 3: (300 ) determining that the eligibility criterion for Sport is met, thereby determining that the test passed.
It should be understood that the qualified standard can be set by an engineer according to actual needs, and the embodiment of the present application is not limited. In addition, the setting form of the qualified standard is not limited, for example, in the above example, the set standard position of each control may be used. The relative positions of the respective controls may be set.
It should be understood that the automatic testing method provided by the embodiment of the application can realize automatic testing of various devices, reduce dependence on manpower, improve testing efficiency, reduce risks of missing testing and error detection, facilitate summary statistics of test data, and realize testing for some limit conditions or critical conditions. In addition, because the hand simulation operation information is sent to the device to be tested, the device to be tested simulates the corresponding hand operation, and therefore, for the device to be tested, a large amount of new programs and instructions are not required to be configured, so that the device to be tested can be applied to devices such as wearable devices and the like which have the characteristics of simple operation systems (generally single-chip microcomputer-level systems), low data processing capacity and the like, and has universality.
In addition, by adopting the scheme of the embodiment of the application, due to the fact that the test is automatically carried out, the test can be realized for some limit conditions or critical conditions. For example, high-frequency access and operation to software to be tested can be performed for a short time, thereby testing reliability of the software to be tested, and the like.
Example two:
based on the same inventive concept, the embodiment of the present application further provides an automatic testing device 100 applied to an upper computer and an automatic testing device 200 applied to a device to be tested. Referring to fig. 4 and 5, fig. 4 shows an automatic test apparatus for operations performed by an upper computer in the method of fig. 2, and fig. 5 shows an automatic test apparatus for operations performed by a device under test in the method of fig. 2. It should be understood that the specific functions of the apparatus 100 and the apparatus 200 can be referred to the above description, and the detailed description is omitted here as appropriate to avoid redundancy. The devices 100 and 200 include at least one software functional module that can be stored in memory in the form of software or firmware or solidified in the operating system of the devices 100 and 200. Specifically, the method comprises the following steps:
referring to fig. 4, the apparatus 100 is applied to an upper computer, and includes: a determining module 101, an obtaining module 102 and a sending module 103. Wherein:
the determining module 101 is configured to determine a current simulation test operation according to a preset test procedure;
the obtaining module 102 is configured to obtain human hand simulation operation information for the device to be tested, which corresponds to the current simulation test operation;
the sending module 103 is configured to send the human hand simulation operation information to the device to be tested, so that the device to be tested simulates human hand operation according to the human hand simulation operation information, and triggers a function corresponding to the human hand operation according to the human hand operation.
In the embodiment of the application, the test procedure is a fixed test operation flow determined according to the function, the display page and the operation method of the to-be-tested software built in the to-be-tested device.
In a possible implementation manner of the embodiment of the present application, the obtaining module 102 is further configured to obtain a current interface of a device to be tested.
The obtaining module 102 is specifically configured to determine a type to be operated corresponding to a current simulation test operation; and when the type to be operated is clicking, determining the coordinates of the target control in the current interface according to the preset test procedure, and generating human hand simulation operation information containing the coordinates, the pressing state and the releasing state of the target control.
In a possible implementation manner of the embodiment of the present application, the obtaining module 102 is further configured to obtain a current interface of a device to be tested.
The obtaining module 102 is specifically configured to determine a type to be operated corresponding to a current simulation test operation; and when the type to be operated is long press time, determining the coordinates of the target control in the current interface according to the preset test procedure, and generating human hand simulation operation information containing the coordinates, the pressing state, the releasing state and the duration time of the target control.
In a feasible implementation manner of the embodiment of the present application, the obtaining module 102 is specifically configured to determine a type to be operated corresponding to a current simulation test operation; and when the type to be operated is linear sliding, generating human hand simulation operation information comprising a sliding starting coordinate, a sliding ending coordinate and sliding duration in the sliding direction according to the sliding direction required in the test procedure.
In a feasible implementation manner of the embodiment of the present application, the obtaining module 102 is specifically configured to determine a type to be operated corresponding to a current simulation test operation; and when the type to be operated is curve sliding, generating a sliding starting coordinate, a sliding ending coordinate, a plurality of sliding middle coordinates between the sliding starting coordinate and the sliding ending coordinate and human hand simulation operation information of sliding duration according to the sliding curve requirement required in the test procedure.
In this embodiment of the application, the obtaining module 102 is further configured to receive interface information and/or service information that is generated after the function corresponding to the manual operation is triggered and returned by the device to be tested; the determining module 101 is further configured to determine a test result according to the interface information and/or the service information.
Referring to fig. 5, the apparatus 200 is applied to a device to be tested, and includes: a receiving module 201, a type determining module 202 and a simulating module 203. Wherein:
the receiving module 201 is used for receiving human hand simulation operation information transmitted by an upper computer;
the type determining module 202 is configured to determine a type to be operated corresponding to the human hand simulation operation information;
the simulation module 203 is configured to simulate a human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, and trigger a function corresponding to the human hand operation in the software to be tested.
In a feasible implementation manner of the embodiment of the present application, when the current type to be operated is a click, the preset action instruction template corresponding to the type to be operated is: press down at coordinates (x, y) and release at coordinates (x, y); the simulation module 203 is specifically configured to replace the coordinates (x, y) in the preset action instruction template with the coordinates in the human hand simulation operation information; and executing the replaced preset action instruction template.
In a feasible implementation manner of the embodiment of the present application, when the current type to be operated is long press time, the preset action instruction template corresponding to the type to be operated is: press down at coordinate (x, y), release and press down duration at coordinate (x, y); the simulation module 203 is specifically configured to replace the coordinates (x, y) and the pressing duration in the preset action instruction template with the coordinates and the duration in the human hand simulation operation information; and executing the replaced preset action instruction template.
In a feasible implementation manner of the embodiment of the present application, when the current type to be operated is linear sliding or curvilinear sliding, the preset action instruction template corresponding to the type to be operated is: press at coordinate (x1, y1), slide along an intermediate coordinate between coordinate (x1, y1) and coordinate (x2, y2), release at coordinate (x2, y2), and slide duration; the simulation module 203 is specifically configured to:
when the current type to be operated is linear sliding, automatically generating an intermediate coordinate between a coordinate (x1, y1) and a coordinate (x2, y2) in the preset action instruction template according to a sliding start coordinate, a sliding end coordinate and sliding duration in the human hand simulation operation information, and writing the intermediate coordinate into the preset action instruction template; replacing the coordinates (x1, y1), the coordinates (x2, y2) and the sliding duration in the preset action command template with the sliding start coordinate, the sliding end coordinate and the sliding duration in the human hand simulation operation information; executing the replaced preset action instruction template;
when the current type to be operated is curve sliding, replacing the coordinates (x1, y1), the coordinates (x2, y2), the intermediate coordinates between the coordinates (x1, y1) and the coordinates (x2, y2) and the sliding time length in the preset action instruction template with the sliding start coordinates, the sliding end coordinates, the intermediate coordinates between the coordinates (x1, y1) and the coordinates (x2, y2) and the sliding time length in the human hand simulation operation information; and executing the replaced preset action instruction template.
In this embodiment of the application, the receiving module 201 is further configured to receive information indicating a type to be operated, which is transmitted from the upper computer. The type determining module 202 is specifically configured to determine a type to be operated corresponding to the human hand simulation operation information according to the type indicating information to be operated.
It should be understood that, for the sake of brevity, the contents described in some embodiments are not repeated in this embodiment.
Example three:
the present embodiment provides an electronic device, which is shown in fig. 6 and includes a processor 601, a memory 602, and a communication bus 603. Wherein:
the communication bus 603 is used for connection communication between the processor 601 and the memory 602.
The processor 601 is configured to execute one or more programs stored in the memory 602 to implement the steps executed by the upper computer or the device to be tested in the automatic testing method in the first embodiment and/or the second embodiment.
It will be appreciated that the configuration shown in fig. 6 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 6 or have a different configuration than shown in fig. 6.
For example, when the electronic device is an upper computer, the electronic device may be a computer, a server, or other devices with a large data processing capability. When the electronic device is a device to be tested, the electronic device may be a wearable device, such as an intelligent bracelet, an intelligent glasses, or a computer, a mobile phone, or the like, and is not limited herein.
The present embodiment further provides a readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash Memory, a usb (Secure Digital Card), an MMC (Multimedia Card), etc., in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the steps executed by the upper computer or the device to be tested in the automatic test method according to the first embodiment and/or the second embodiment. And will not be described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
In this context, a plurality means two or more.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (15)

1. An automatic test method is characterized by being applied to an upper computer and comprising the following steps:
determining the current simulation test operation according to a preset test rule;
acquiring human hand simulation operation information corresponding to the current simulation test operation and aiming at the equipment to be tested;
and sending the hand simulation operation information to the equipment to be tested so that the equipment to be tested simulates hand operation according to the hand simulation operation information and triggers a function corresponding to the hand operation according to the hand operation.
2. The automatic test method of claim 1, wherein the test procedure is a fixed test operation flow determined according to the function, display page and operation method of the software to be tested built in the device to be tested.
3. The automated testing method of claim 1, wherein the method further comprises: acquiring a current interface of a device to be tested;
the acquiring of the human hand simulation operation information corresponding to the current simulation test operation and aiming at the device to be tested comprises:
determining a type to be operated corresponding to the current simulation test operation;
and generating human hand simulation operation information containing operation coordinate parameters according to the preset test rule and the type to be operated.
4. The automatic test method of claim 3, wherein the type to be operated comprises at least one of click, long press, straight slide, curved slide;
generating human hand simulation operation information containing operation coordinate parameters according to the preset test rule and the type to be operated, wherein the generation comprises the following steps:
when the type to be operated is clicking, determining the coordinates of a target control in the current interface of the equipment to be tested according to the preset test procedure, and generating human hand simulation operation information containing the coordinates, the pressing state and the releasing state of the target control; the coordinates of the target control are the operating coordinate parameters;
or when the type to be operated is long press time, determining the coordinates of a target control in the current interface of the equipment to be tested according to the preset test procedure, and generating human hand simulation operation information containing the coordinates, the pressing state, the releasing state and the duration of the target control; the coordinates of the target control are the operating coordinate parameters;
or when the type to be operated is linear sliding, generating human hand simulation operation information comprising a sliding start coordinate, a sliding end coordinate and sliding duration in the sliding direction according to the sliding direction required in the test procedure; wherein the sliding start coordinate and the sliding end coordinate are the operation coordinate parameters;
or when the type to be operated is curve sliding, generating a sliding starting coordinate, a sliding ending coordinate, a plurality of sliding middle coordinates between the sliding starting coordinate and the sliding ending coordinate and human hand simulation operation information of sliding duration according to the sliding curve requirement required in the test procedure; and the sliding start coordinate, the sliding end coordinate and a sliding middle coordinate between the sliding start coordinate and the sliding end coordinate are the operation coordinate parameters.
5. The automated testing method of any of claims 1 to 4, wherein the method further comprises:
receiving interface information and/or service information which is generated after a function corresponding to the manual operation is triggered and returned by the device to be tested;
and determining a test result according to the interface information and/or the service information.
6. The automatic testing method of claim 5, wherein determining a test result based on the interface information and/or the service information comprises:
code identifying the interface information and/or the service information;
and determining the test result according to the code.
7. The automatic test method of any one of claims 1 to 4, wherein the test procedure has a test operation flow consistent with a manual operation flow of software currently tested by the device under test.
8. An automatic test method is applied to a device to be tested, and comprises the following steps:
receiving human hand simulation operation information transmitted by an upper computer according to the automatic testing method of any one of claims 1 to 7;
determining a type to be operated corresponding to the human hand simulation operation information;
and simulating the hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the hand simulation operation information, and triggering a function corresponding to the hand operation in the software to be tested.
9. The automatic test method of claim 8, wherein when the current type to be operated is a click, the preset action instruction template corresponding to the type to be operated is: press down at coordinates (x, y) and release at coordinates (x, y);
simulating the human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, wherein the simulation operation comprises the following steps:
replacing the coordinates (x, y) in the preset action instruction template with the coordinates in the human hand simulation operation information;
and executing the replaced preset action instruction template.
10. The automatic test method according to claim 8, wherein when the current type to be operated is long press, the preset action instruction template corresponding to the type to be operated is: press down at coordinate (x, y), release and press down duration at coordinate (x, y);
simulating the human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, wherein the simulation operation comprises the following steps:
replacing the coordinates (x, y) and the pressing duration in the preset action instruction template with the coordinates and the duration in the human hand simulation operation information;
and executing the replaced preset action instruction template.
11. The automatic test method according to claim 8, wherein when the current type to be operated is linear sliding or curvilinear sliding, the preset action instruction template corresponding to the type to be operated is: press at coordinate (x1, y1), slide along an intermediate coordinate between coordinate (x1, y1) and coordinate (x2, y2), release at coordinate (x2, y2), and slide duration;
when the current type to be operated is linear sliding, simulating the human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, wherein the method comprises the following steps:
automatically generating an intermediate coordinate between a coordinate (x1, y1) and a coordinate (x2, y2) in the preset action instruction template according to a sliding start coordinate, a sliding end coordinate and sliding duration in the human hand simulation operation information, and writing the intermediate coordinate into the preset action instruction template;
replacing the coordinates (x1, y1), the coordinates (x2, y2) and the sliding duration in the preset action command template with the sliding start coordinate, the sliding end coordinate and the sliding duration in the human hand simulation operation information;
executing the replaced preset action instruction template;
when the current type to be operated is curved sliding, simulating the human hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the human hand simulation operation information, wherein the method comprises the following steps:
replacing the coordinates (x1, y1), the coordinates (x2, y2), the intermediate coordinates between the coordinates (x1, y1) and the coordinates (x2, y2), and the sliding time length in the preset motion command template with the sliding start coordinate, the sliding end coordinate, the intermediate coordinates between the coordinates (x1, y1) and the coordinates (x2, y2), and the sliding time length in the human hand simulation operation information;
and executing the replaced preset action instruction template.
12. The utility model provides an automatic testing arrangement which characterized in that, is applied to the host computer, includes: the device comprises a determining module, an obtaining module and a sending module;
the determining module is used for determining the current simulation test operation according to a preset test rule;
the acquisition module is used for acquiring human hand simulation operation information corresponding to the current simulation test operation and aiming at the equipment to be tested;
the sending module is used for sending the hand simulation operation information to the equipment to be tested so that the equipment to be tested can simulate hand operation according to the hand simulation operation information and trigger functions corresponding to the hand operation according to the hand operation.
13. An automatic test device, which is applied to a device to be tested, comprises: the device comprises a receiving module, a type determining module and a simulating module;
the receiving module is used for receiving human hand simulation operation information transmitted by an upper computer according to the automatic testing method of any one of claims 1 to 7;
the type determining module is used for determining the type to be operated corresponding to the human hand simulation operation information;
the simulation module is used for simulating the hand operation corresponding to the type to be operated according to the action instruction template corresponding to the type to be operated and the hand simulation operation information, and triggering the function corresponding to the hand operation in the software to be tested.
14. An electronic device, comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the automatic test method of any one of claims 1 to 11.
15. A readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the automatic test method of any one of claims 1 to 11.
CN202011573323.1A 2020-12-25 2020-12-25 Automatic test method, device, electronic equipment and readable storage medium Active CN112685299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011573323.1A CN112685299B (en) 2020-12-25 2020-12-25 Automatic test method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011573323.1A CN112685299B (en) 2020-12-25 2020-12-25 Automatic test method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112685299A true CN112685299A (en) 2021-04-20
CN112685299B CN112685299B (en) 2024-05-17

Family

ID=75452053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011573323.1A Active CN112685299B (en) 2020-12-25 2020-12-25 Automatic test method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112685299B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448317A (en) * 2021-06-29 2021-09-28 上海移远通信技术股份有限公司 Module testing system and module testing method
CN114113711A (en) * 2021-11-30 2022-03-01 武汉天喻信息产业股份有限公司 Method and system for multi-interface parallel test

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597720A (en) * 2019-09-04 2019-12-20 香港乐蜜有限公司 Application program testing method and device, electronic equipment and storage medium
CN110908848A (en) * 2019-11-25 2020-03-24 展讯通信(上海)有限公司 Automatic testing method and device and storage medium
CN111061601A (en) * 2019-12-18 2020-04-24 南京富士通南大软件技术有限公司 HMI (human machine interface) test simulation system for product
US20200356465A1 (en) * 2018-01-23 2020-11-12 Netease (Hangzhou) Network Co.,Ltd. Automatic testing method and apparatus, storage medium and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200356465A1 (en) * 2018-01-23 2020-11-12 Netease (Hangzhou) Network Co.,Ltd. Automatic testing method and apparatus, storage medium and electronic device
CN110597720A (en) * 2019-09-04 2019-12-20 香港乐蜜有限公司 Application program testing method and device, electronic equipment and storage medium
CN110908848A (en) * 2019-11-25 2020-03-24 展讯通信(上海)有限公司 Automatic testing method and device and storage medium
CN111061601A (en) * 2019-12-18 2020-04-24 南京富士通南大软件技术有限公司 HMI (human machine interface) test simulation system for product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448317A (en) * 2021-06-29 2021-09-28 上海移远通信技术股份有限公司 Module testing system and module testing method
CN114113711A (en) * 2021-11-30 2022-03-01 武汉天喻信息产业股份有限公司 Method and system for multi-interface parallel test

Also Published As

Publication number Publication date
CN112685299B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN107025165B (en) Game automation test method and related device
CN104778121A (en) Game program test method, device and system
CN109408105A (en) Acquisition method, device, computing device and the storage medium of user behavior data
CN112685299B (en) Automatic test method, device, electronic equipment and readable storage medium
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
CN110784374A (en) Method, device, equipment and system for monitoring operation state of service system
CN111198797B (en) Operation monitoring method and device and operation analysis method and device
CN102323873A (en) Method and system for triggering icon reply in instant communication
CN106557308A (en) A kind of software continuous integrated approach and device
CN107102950A (en) A kind of applied program testing method and device
CN109783284A (en) Information acquisition method, system and server, computer readable storage medium
CN109408309A (en) The test method and device of multiple terminals
CN115129573A (en) Program operation monitoring method and device, electronic equipment and storage medium
CN104899140A (en) Test method for mobile terminal assembly
CN109783335B (en) User operation recording and restoring method, device and equipment and readable storage medium
CN110209605A (en) The register reading/writing method and calculating equipment of PCIE Cardbus NIC Cardbus
CN109634838A (en) Position method, apparatus, storage medium and the electronic equipment of application failure
CN105808460B (en) External equipment recognition methods, device and electronic equipment
CN108984238B (en) Gesture processing method and device of application program and electronic equipment
CN116302989A (en) Pressure testing method and system, storage medium and computer equipment
CN109324973A (en) A kind of method for testing software, device, equipment and computer readable storage medium
CN110297754A (en) A kind of test information feedback method and system
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium
CN112199270B (en) Program testing method, device, equipment and medium
CN110505475A (en) Function test method, system, equipment and the storage medium of intelligent object

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