CN112463618A - Automated testing method, device, medium and equipment - Google Patents

Automated testing method, device, medium and equipment Download PDF

Info

Publication number
CN112463618A
CN112463618A CN202011402909.1A CN202011402909A CN112463618A CN 112463618 A CN112463618 A CN 112463618A CN 202011402909 A CN202011402909 A CN 202011402909A CN 112463618 A CN112463618 A CN 112463618A
Authority
CN
China
Prior art keywords
target
module
command
test
operation request
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.)
Pending
Application number
CN202011402909.1A
Other languages
Chinese (zh)
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.)
Zebra Network Technology Co Ltd
Original Assignee
Zebra Network Technology 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 Zebra Network Technology Co Ltd filed Critical Zebra Network Technology Co Ltd
Priority to CN202011402909.1A priority Critical patent/CN112463618A/en
Publication of CN112463618A publication Critical patent/CN112463618A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application provides an automated testing method, an automated testing device, a medium and equipment. According to the automatic testing method, an original operation request sent by a target testing frame is monitored in a device to be tested, then instruction information in the original operation request is analyzed, the instruction information is packaged into an executable target command under a target operating system, a target control in the target operating system is triggered according to the target command and a preset interface testing interface, finally a testing result after the target control is triggered is returned to the target testing frame, and therefore the purpose of testing and supporting the target operating system by utilizing the existing target testing frame is achieved by converting the original operation request sent by the target testing frame into a command capable of being recognized under the target operating system.

Description

Automated testing method, device, medium and equipment
Technical Field
The present application relates to the field of testing technologies, and in particular, to an automated testing method, apparatus, medium, and device.
Background
The Appium framework is an open source, cross-platform test framework that can be used to test native and hybrid mobile-end applications. The Android, iOS, Windows, Tizen and other operating systems support automatic testing through the Apdium.
However, an automation framework interface in the AliOS system, namely the UiAutomator interface, is written by Javascript language. The automatic test is realized by calling an AliOS system interface, and the automatic test can only be executed in a device end running the AliOS system and cannot be executed on a non-AliOS system, so that the AliOS system cannot realize cross-platform test at present.
However, the Appium framework is an open-source cross-platform test framework with the widest application range at present, and how to realize the test support of the AliOS system by using the Appium framework is an urgent problem to be solved.
Disclosure of Invention
The application provides an automatic testing method, device, medium and equipment, so that the existing target testing framework can be utilized to carry out testing support on a target operating system.
In a first aspect, the present application further provides an automated testing method, including:
monitoring an original operation request sent by a target test framework in a device to be tested, wherein a target operating system is loaded in the device to be tested;
analyzing the instruction information in the original operation request, and packaging the instruction information into a target command, wherein the target command is an executable command under the target operating system;
triggering a target control in the target operating system according to the target command and a preset interface test interface;
and returning the test result after the target control is triggered to the target test frame.
In one possible design, an agent driving module is configured in the device to be tested, and the agent driving module comprises a guiding monitoring module; the method for monitoring the original operation request sent by the target test framework comprises the following steps:
the agent driving module receives driving analysis data and starts the guiding monitoring module according to the driving analysis data;
and monitoring the original operation request through the guide monitoring module.
In one possible design, the agent driver module further includes: the system comprises a socket service module, a system command module, a command execution module and a target command processing module, wherein the guide monitoring module is used for loading the socket service module, the system command module, the command execution module and the target command processing module; the analyzing the instruction information in the original operation request and packaging the instruction information into a target command comprises:
analyzing the instruction information in the original operation request through a socket service module;
packaging the instruction information through a system command module to generate a system command;
distributing the system command to a target command processing module through a command execution module;
executing the system command through the target command processing module so as to generate the target command.
In one possible design, the agent driver module further includes: the system element module is also used for loading the system element module; after the executing the system command by the target command processing module, the method further comprises:
and packaging an execution result of the target command processing module after the target command processing module executes the system command into a system interface element through the system element module, wherein the system interface element is used for determining the target command.
In one possible design, the agent driver module further includes: the element hash module is also used for loading the element hash module; after the encapsulating the execution result of the target command processing module after executing the system command into a system interface element, the method further includes:
and carrying out hash processing on the system interface element through the element hash module to generate element search information, wherein the element search information is used for determining the system interface element.
In one possible design, the automated testing method further includes:
responding to the original operation request of the target test frame, and sending an interactive test instruction to another device to be tested so that the other device to be tested responds to another operation request of the target test frame to test the interactive test instruction;
and returning an interactive test result of the interactive test instruction to the target test framework.
In one possible design, the original operation request is a bluetooth connection request, and the interaction test command is a bluetooth connection command.
In one possible design, the device under test and the other device under test are loaded with different operating systems.
In a second aspect, the present application further provides an automated testing apparatus, comprising:
the agent driving module is used for monitoring an original operation request sent by a target test framework in a device to be tested, wherein a target operating system is loaded in the device to be tested;
the agent driving module is further configured to analyze instruction information in the original operation request, and encapsulate the instruction information into a target command, where the target command is an executable command under the target operating system;
the agent driving module is also used for triggering a target control in the target operating system according to the target command and a preset interface test interface;
and the result feedback module is also used for returning the test result after the target control is triggered to the target test frame.
In one possible design, the agent driver module includes a boot listener module;
the agent driving module receives driving analysis data and starts the guiding monitoring module according to the driving analysis data;
and monitoring the original operation request through the guide monitoring module.
In one possible design, the agent driver module further includes: the system comprises a socket service module, a system command module, a command execution module and a target command processing module, wherein the guide monitoring module is used for loading the socket service module, the system command module, the command execution module and the target command processing module;
analyzing the instruction information in the original operation request through a socket service module;
packaging the instruction information through a system command module to generate a system command;
distributing the system command to a target command processing module through a command execution module;
executing the system command through the target command processing module so as to generate the target command.
In one possible design, the agent driver module further includes: the system element module is also used for loading the system element module;
and packaging an execution result of the target command processing module after the target command processing module executes the system command into a system interface element through the system element module, wherein the system interface element is used for determining the target command.
In one possible design, the agent driver module further includes: the element hash module is also used for loading the element hash module;
and carrying out hash processing on the system interface element through the element hash module to generate element search information, wherein the element search information is used for determining the system interface element.
In one possible design, the agent driver module is specifically configured to:
responding to the original operation request of the target test frame, and sending an interactive test instruction to another device to be tested so that the other device to be tested responds to another operation request of the target test frame to test the interactive test instruction;
and returning an interactive test result of the interactive test instruction to the target test framework.
In one possible design, the original operation request is a bluetooth connection request, and the interaction test command is a bluetooth connection command.
In one possible design, the device under test and the other device under test are loaded with different operating systems.
In a third aspect, the present application further provides an electronic device, including:
a processor; and the number of the first and second groups,
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform any one of the possible automated testing methods of the first aspect via execution of the executable instructions.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements any one of the possible automated testing methods of the first aspect.
In a fifth aspect, the present application further provides a computer program product comprising a computer program, which when executed by a processor, implements any one of the possible automated testing methods of the first aspect.
According to the automatic testing method, the device, the medium and the equipment, the original operation request sent by the target testing frame is monitored in the equipment to be tested, then the instruction information in the original operation request is analyzed, the instruction information is packaged into the executable target command under the target operating system, the target control in the target operating system is triggered according to the target command and the preset interface testing interface, finally the testing result after the target control is triggered is returned to the target testing frame, and therefore the purpose of testing and supporting the target operating system by utilizing the existing target testing frame is achieved by converting the original operation request sent by the target testing frame into the command which can be recognized under the target operating system.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a diagram of an application scenario of an automated testing method illustrated in the present application according to an exemplary embodiment;
FIG. 2 is a schematic flow diagram of an automated testing method shown in the present application according to an exemplary embodiment;
FIG. 3 is a schematic flow diagram of an automated testing method illustrated in accordance with another exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of the automated test equipment shown in the present application according to one exemplary embodiment;
FIG. 5 is a schematic diagram of the automated test equipment shown in the present application according to another exemplary embodiment;
fig. 6 is a schematic structural diagram of an electronic device shown in accordance with an example embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The Apium is an open-source cross-platform automatic testing tool for testing native and lightweight mobile applications, currently, only relevant tests of iOS, Android and FirefoxOS platforms are supported, but not for the AliOS platform, so that the AliOS system cannot be directly tested through the Apium. The application aims to provide an improved automatic testing method based on the application testing framework to adapt to testing of the AliOS operating system.
The method comprises the steps of monitoring an original operation request sent by a target test frame in a device to be tested, analyzing instruction information in the original operation request, packaging the instruction information into an executable target command under a target operation system, triggering a target control in the target operation system according to the target command and a preset interface test interface, and finally returning a test result after triggering the target control to the target test frame, so that the purpose of testing and supporting the target operation system by utilizing the existing target test frame is realized by converting the original operation request sent by the target test frame into a command which can be identified under the target operation system.
Fig. 1 is a diagram illustrating an application scenario of an automated testing method according to an exemplary embodiment of the present application. As shown in fig. 1, the automated testing method provided by the present application may be applied to an automated testing system, where the automated testing system may include: the testing system comprises a testing end 100, a service end 200 and a device to be tested 400, wherein the testing end 100 may be a Personal Computer (PC), a user may write a testing script in the testing end 100 and parse and execute the script in the testing end 100. The service end 200 may be a separate device loaded with an Appium test framework, or related services of the service end 200 may also be provided in the test end 100 as a part of the test end 100.
The script written on the test end 100 may communicate with the app test framework through a JSON Wire Protocol, where the JSON Wire Protocol is a web service Protocol that communicates with a remote service through WebDriver, and completes interaction with the remote service through an http request.
The Appium testing framework selects a suitable automated testing driver according to the information of the type and version of the operating system of the actual execution script, so as to drive the device to be tested 400 (such as a car machine, a mobile phone, etc.) to execute the instruction. Specifically, bootstrap may be started on the device to be tested 400, where bootstrap is a service application started by the app at the device to be tested, and monitors the test command sent by the app Server, and is a specific executor of the test operation command, thereby monitoring the instruction sent by the test end 100. And after receiving the operation instruction, analyzing the instruction and calling a corresponding equipment-side interface to execute the operation.
In one implementation, a corresponding driver module 300 may also be disposed between the server 200 and the device under test 400. The driver module 300 can call an AliOS native test interface at the device to be tested 400, so that the support of the AliOS by the Apium test framework is realized.
FIG. 2 is a flow diagram illustrating an automated testing method according to an exemplary embodiment of the present application. As shown in fig. 2, the automated testing method provided in this embodiment includes:
step 101, in a device to be tested, monitoring an original operation request sent by a target test framework.
In this step, the original operation request sent by the target testing framework is monitored in the device to be tested (e.g. car machine, mobile phone). The device to be tested is loaded with a target operating system, which may be an AliOS operating system, for example. The original operation request may be various operation instructions for the device to be tested, for example, an interface trigger instruction, specifically, trigger operations such as manual clicking, sliding, dragging, text input, voice input, and the like.
In addition, the original operation request can be realized by writing a test script at a test end, and then, the test script is communicated with an application test framework through a JSON Wire Protocol, wherein the JSON Wire Protocol is a web service Protocol for communicating with a remote service through a Webdriver, and the interaction with the remote service is completed through an http request.
And 102, analyzing the instruction information in the original operation request, and packaging the instruction information into a target command.
After monitoring an original operation request sent by a target test framework, the device to be tested can analyze the instruction information in the original operation request and package the instruction information into a target command. It should be noted that the instruction information in the original operation request may include information such as an action name, a control name, an instruction name, a trigger object name, and a trigger object type, and in this embodiment, a specific form of the instruction information is not limited, and the instruction information is only used to identify or distinguish different operation requests. For the target command, after parsing the instruction information in the original operation request, the instruction information may be encapsulated into an executable command under the target operating system, that is, the target command.
103, triggering a target control in the target operating system according to the target command and the preset interface test interface.
After the target command is determined, a target control in a target operating system can be triggered according to the target command and a preset interface test interface. For example, if the determined target command is a click trigger on the a control, the a control may be triggered according to the target command and a preset interface test interface in the target operating system, so as to click the a control.
And step 104, returning the test result after the target control is triggered to the target test frame.
After the target control is triggered in the device to be tested, the test result after the target control is triggered is returned to the target test frame so as to be fed back to the test end through the target test frame. Specifically, the test result may be returned to the test end in json format, the result may be determined by the test script of the test end, and the subsequent operation may be continuously performed.
In this embodiment, an original operation request sent by a target test frame is monitored in a device to be tested, then, instruction information in the original operation request is analyzed, and then, the instruction information is packaged into an executable target command under a target operating system, so that a target control in the target operating system is triggered according to the target command and a preset interface test interface, and finally, a test result after the target control is triggered is returned to the target test frame, so that the purpose of utilizing the existing target test frame to test and support the target operating system is achieved by converting the original operation request sent by the target test frame into a command recognizable under the target operating system.
Specifically, the purpose of supporting the test of the AliOS system by using the existing app test framework may be achieved by converting the original operation request sent by the app test framework into a recognizable command under the AliOS system.
Fig. 3 is a schematic flow diagram of an automated testing method according to another exemplary embodiment of the present application. As shown in fig. 3, the automated testing method provided in this embodiment includes:
step 201, the agent driving module receives the driving analysis data and starts the guiding monitoring module according to the driving analysis data.
Step 202, the original operation request is monitored through the guiding monitoring module.
An agent driving module is configured in the device to be tested, and the agent driving module comprises a guide monitoring module. Specifically, the boot listener module may be boottrap, which is used as an Appium boot listener module and is executed at the device side, and is used to load all the test function modules described below, which are specific executors of the test operation commands.
And step 203, analyzing the instruction information in the original operation request through the socket service module.
And step 204, encapsulating the instruction information through a system command module to generate a system command.
Step 205, the system command is distributed to the target command processing module by the command execution module.
Step 206, executing the system command through the target command processing module so as to generate a target command.
In addition, the above proxy driver module further includes: the system comprises a socket service module, a system command module, a command execution module and a target command processing module, wherein the guiding monitoring module is used for loading the socket service module, the system command module, the command execution module and the target command processing module. Specifically, the socket service module may parse instruction information in the original operation request, encapsulate the instruction information by the system command module, generate a system command, distribute the system command to the target command processing module by the command execution module, and execute the system command by the target command processing module, so as to generate the target command.
The socket service module may be a SocketServer, and is configured to receive, at the device end, a test instruction message sent by the test end Appium service, and return a response message.
And the system command module can be an AliOS command module used for encapsulating the message command received by the SocketServer.
In addition, the command execution module may be an AliOSCommand execution for parsing and distributing the packaged AliOS commands.
And the target command processing module can be an AliOS command processing module for executing and processing an AliOS command.
In addition, the above proxy driver module further includes: the system element module is used for loading the system element module; after the system command is executed by the target command processing module, the method further comprises the following steps: and packaging an execution result of the target command processing module after executing the system command into a system interface element through the system element module, wherein the system interface element is used for determining the target command.
For the system element module, it may be an AliOS element module for encapsulating and representing an AliOS interface element.
In yet another possible implementation, the agent driver module may further include: and the guiding monitoring module is also used for loading the element hashing module. After the execution result of the target command processing module after executing the system command is encapsulated as the system interface element, the method further comprises the following steps: and carrying out hash processing on the system interface element through an element hash module to generate element search information, wherein the element search information is used for determining the system interface element.
And for the element hash module, the element hash module can be an AliOS element hash module used for searching the AliOS element at high speed.
After receiving the corresponding request, the device to be tested translates the request into a command which can be executed by an UIAutomation (interface element object packaged in an UIAutomation interface in the AliOS) in the AliOS system through BootStrap, then completes the test by processing operation application of the UIAutomation, and returns the operation result to the test end through json format.
And step 207, triggering a target control in the target operating system according to the target command and the preset interface test interface.
After the target command is determined, a target control in a target operating system can be triggered according to the target command and a preset interface test interface. For example, if the determined target command is a click trigger on the a control, the a control may be triggered according to the target command and a preset interface test interface in the target operating system, so as to click the a control.
And step 208, returning the test result after the target control is triggered to the target test frame.
After the target control is triggered in the device to be tested, the test result after the target control is triggered is returned to the target test frame so as to be fed back to the test end through the target test frame. Specifically, the test result may be returned to the test end in json format, the result may be determined by the test script of the test end, and the subsequent operation may be continuously performed.
On the basis of the above embodiment, based on the above automatic test system, the automatic test system may be further expanded, where the automatic test system may include: the test terminal, the app test frame, and the at least two devices under test may be illustrated as including two devices under test for convenience of description. The system comprises a first device to be tested and a second device to be tested, wherein the first device to be tested is loaded with an AliOS system, the second device to be tested is loaded with an android system (or the second device to be tested is loaded with an IOS system), the first device to be tested can be a vehicle end, and the second device to be tested can be a mobile phone end. If the first device to be tested needs to be subjected to a wireless connection test on the second device to be tested, for example, a bluetooth connection test (a bluetooth pairing and connection between a car machine and a mobile phone, and then a bluetooth phone test, a music test, and the like), the first device to be tested and the second device to be tested can be connected with an Appium test framework, and then the first device to be tested and the second device to be tested are controlled to respectively execute related operations on two sides of a bluetooth connection through a script file in the same test end, for example, the first device to be tested can be controlled to trigger a bluetooth connection request, and the second device to be tested is controlled to receive the bluetooth connection request.
In the above-mentioned bluetooth connection test scenario, the corresponding original operation request is a bluetooth connection request, and in response to the original operation request of the target test framework (which may be a trigger bluetooth connection request), an interactive test instruction (which may be a receive bluetooth connection request) is sent to another device under test, so that the another device under test tests the interactive test instruction (performs bluetooth connection test) in response to another operation request of the target test framework, where the interactive test instruction is a bluetooth connection instruction. And then, returning the interactive test result of the interactive test instruction to the target test framework. And the device to be tested and another device to be tested are loaded with different operating systems.
In this embodiment, by responding to the original operation request of the target test frame, sending the interactive test instruction to another device to be tested, so that the other device to be tested responds to another operation request of the target test frame, tests the interactive test instruction, and returns the interactive test result of the executed interactive test instruction to the target test frame, thereby implementing the interactive test on the devices to be tested loaded with different operating systems by using the same set of target test frame. Specifically, the interactive test between the android system device and the AliOS system device can be realized through an Apium test framework, the interactive test between the IOS system device and the AliOS system device can also be realized through the Apium test framework, and the application range and the test scene of the Apium test framework are further expanded.
FIG. 4 is a schematic diagram of an automated testing apparatus according to an exemplary embodiment of the present application. As shown in fig. 4, the automated testing apparatus 300 of the present embodiment includes:
the agent driving module 301 is configured to monitor an original operation request sent by a target test framework in a device to be tested, where a target operating system is loaded in the device to be tested;
the agent driver module 301 is further configured to analyze instruction information in the original operation request, and encapsulate the instruction information into a target command, where the target command is an executable command under the target operating system;
the agent driving module 301 is further configured to trigger a target control in the target operating system according to the target command and a preset interface test interface;
the result feedback module 302 is further configured to return the test result after the target control is triggered to the target test frame.
On the basis of fig. 4, fig. 5 is a schematic structural diagram of an automated testing device according to another exemplary embodiment of the present application. As shown in fig. 6, the proxy driver module 301 includes a boot listener module 3011;
the agent driving module 301 receives driving analysis data, and starts the guidance monitoring module 3011 according to the driving analysis data;
and monitoring the original operation request through the guide monitoring module 3011.
In one possible design, the agent driver module 301 further includes: a socket service module 3012, a system command module 3013, a command execution module 3014, and a target command processing module 3015, where the boot monitoring module 3011 is configured to load the socket service module 3012, the system command module 3013, the command execution module 3014, and the target command processing module 3015;
analyzing the instruction information in the original operation request through a socket service module 3012;
packaging the instruction information through a system command module 3013 to generate a system command;
distributing the system command to a target command processing module through a command execution module 3014;
the system command is executed by the target command processing module 3015, so that the target command is generated.
In one possible design, the agent driver module 301 further includes: a system element module 3016, where the boot listening module 3011 is further configured to load the system element module 3016;
by the system element module 3016, an execution result after the target command processing module 3015 executes the system command is packaged as a system interface element, and the system interface element is used to determine the target command.
In one possible design, the agent driver module 301 further includes: an element hashing module 3017, where the boot listening module 3011 is further configured to load the element hashing module 3017;
hashing the system interface element by the element hashing module 3017 to generate element lookup information, where the element lookup information is used to determine the system interface element.
In a possible design, the agent driver module 301 is specifically configured to:
responding to the original operation request of the target test frame, and sending an interactive test instruction to another device to be tested so that the other device to be tested responds to another operation request of the target test frame to test the interactive test instruction;
and returning an interactive test result of the interactive test instruction to the target test framework.
In one possible design, the original operation request is a bluetooth connection request, and the interaction test command is a bluetooth connection command.
In one possible design, the device under test and the other device under test are loaded with different operating systems.
It should be noted that the automatic testing apparatus in the embodiments shown in fig. 4 to 5 may be used to execute the method in the embodiments shown in fig. 2 to 3, and the specific implementation manner and the technical effect are similar and will not be described again here.
Fig. 6 is a schematic structural diagram of an electronic device shown in accordance with an example embodiment. As shown in fig. 6, the electronic device 400 provided in this embodiment includes:
a processor 401;
a memory 402 for storing a computer program for the processor;
wherein the processor 401 is configured to implement the automated testing method provided by any implementation manner of the foregoing method embodiments by executing the computer program.
The processor 401 is configured to execute the technical solution of any one of the foregoing method embodiments by executing the executable instructions, and the implementation principle and technical effect thereof are similar and will not be described herein again.
The present embodiment also provides a readable storage medium, in which a computer program is stored, and when at least one processor of the electronic device executes the computer program, the electronic device executes the methods provided by the above various embodiments.
The present embodiment also provides a program product comprising a computer program stored in a readable storage medium. The computer program can be read from a readable storage medium by at least one processor of the electronic device, and the execution of the computer program by the at least one processor causes the electronic device to implement the methods provided by the various embodiments described above.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. An automated testing method, comprising:
monitoring an original operation request sent by a target test framework in a device to be tested, wherein a target operating system is loaded in the device to be tested;
analyzing the instruction information in the original operation request, and packaging the instruction information into a target command, wherein the target command is an executable command under the target operating system;
triggering a target control in the target operating system according to the target command and a preset interface test interface;
and returning the test result after the target control is triggered to the target test frame.
2. The automated testing method of claim 1, wherein an agent driver module is configured in the device under test, and the agent driver module comprises a boot listener module; the method for monitoring the original operation request sent by the target test framework comprises the following steps:
the agent driving module receives driving analysis data and starts the guiding monitoring module according to the driving analysis data;
and monitoring the original operation request through the guide monitoring module.
3. The automated testing method of claim 2, wherein the agent driver module further comprises: the system comprises a socket service module, a system command module, a command execution module and a target command processing module, wherein the guide monitoring module is used for loading the socket service module, the system command module, the command execution module and the target command processing module; the analyzing the instruction information in the original operation request and packaging the instruction information into a target command comprises:
analyzing the instruction information in the original operation request through a socket service module;
packaging the instruction information through a system command module to generate a system command;
distributing the system command to a target command processing module through a command execution module;
executing the system command through the target command processing module so as to generate the target command.
4. The automated testing method of claim 3, wherein the agent driver module further comprises: the system element module is also used for loading the system element module; after the executing the system command by the target command processing module, the method further comprises:
and packaging an execution result of the target command processing module after the target command processing module executes the system command into a system interface element through the system element module, wherein the system interface element is used for determining the target command.
5. The automated testing method of claim 4, wherein the agent driver module further comprises: the element hash module is also used for loading the element hash module; after the encapsulating the execution result of the target command processing module after executing the system command into a system interface element, the method further includes:
and carrying out hash processing on the system interface element through the element hash module to generate element search information, wherein the element search information is used for determining the system interface element.
6. The automated testing method of any of claims 1-5, further comprising:
responding to the original operation request of the target test frame, and sending an interactive test instruction to another device to be tested so that the other device to be tested responds to another operation request of the target test frame to test the interactive test instruction;
and returning an interactive test result of the interactive test instruction to the target test framework.
7. The automated testing method of claim 6, wherein the original operation request is a Bluetooth connection request and the interactive testing command is a Bluetooth connection command.
8. The automated testing method of claim 7, wherein the device under test and the another device under test are loaded with different operating systems.
9. An automated testing apparatus, comprising:
the agent driving module is used for monitoring an original operation request sent by a target test framework in a device to be tested, wherein a target operating system is loaded in the device to be tested;
the agent driving module is further configured to analyze instruction information in the original operation request, and encapsulate the instruction information into a target command, where the target command is an executable command under the target operating system;
the agent driving module is also used for triggering a target control in the target operating system according to the target command and a preset interface test interface;
and the result feedback module is used for returning the test result after the target control is triggered to the target test frame.
10. An electronic device, comprising:
a processor; and the number of the first and second groups,
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the automated testing method of any of claims 1-8 via execution of the executable instructions.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the automated testing method according to any one of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, carries out the automated testing method according to any one of claims 1 to 8.
CN202011402909.1A 2020-12-04 2020-12-04 Automated testing method, device, medium and equipment Pending CN112463618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011402909.1A CN112463618A (en) 2020-12-04 2020-12-04 Automated testing method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011402909.1A CN112463618A (en) 2020-12-04 2020-12-04 Automated testing method, device, medium and equipment

Publications (1)

Publication Number Publication Date
CN112463618A true CN112463618A (en) 2021-03-09

Family

ID=74805635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011402909.1A Pending CN112463618A (en) 2020-12-04 2020-12-04 Automated testing method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN112463618A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923442A (en) * 2021-09-24 2022-01-11 湖北三赢兴光电科技股份有限公司 Universal software testing method and system for camera module
WO2022245611A1 (en) * 2021-05-17 2022-11-24 Snap Inc. Automated testing platform for testing multiple devices
WO2023230798A1 (en) * 2022-05-30 2023-12-07 北京小米移动软件有限公司 Cross-system key testing method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030208542A1 (en) * 2002-05-01 2003-11-06 Testquest, Inc. Software test agents
KR20160021419A (en) * 2014-08-14 2016-02-25 엔에이치엔엔터테인먼트 주식회사 Mobile terminal test system and mobile terminal test method using the system
CN110633209A (en) * 2019-08-22 2019-12-31 惠州市德赛西威汽车电子股份有限公司 Automatic testing method and system for vehicle-mounted android multimedia navigator
CN111767208A (en) * 2020-06-02 2020-10-13 北京金堤科技有限公司 Automatic test method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030208542A1 (en) * 2002-05-01 2003-11-06 Testquest, Inc. Software test agents
KR20160021419A (en) * 2014-08-14 2016-02-25 엔에이치엔엔터테인먼트 주식회사 Mobile terminal test system and mobile terminal test method using the system
CN110633209A (en) * 2019-08-22 2019-12-31 惠州市德赛西威汽车电子股份有限公司 Automatic testing method and system for vehicle-mounted android multimedia navigator
CN111767208A (en) * 2020-06-02 2020-10-13 北京金堤科技有限公司 Automatic test method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
剑指QA: "Appium工作原理", pages 1 - 14, Retrieved from the Internet <URL:https://blog.nowcoder.net/n/ff5f3906472742e4a7116523203b5fd1> *
剪烛: "Appium [已解决] 一台电脑开启两个 Appium 客户端,分别控制两台测试设备进行联动测试", pages 1 - 13, Retrieved from the Internet <URL:https://testerhome.com/topics/2880> *
雨墨轩痕: "Appium基础学习之 | Appium代码转换为UiAuto mator代码Find", pages 1 - 20, Retrieved from the Internet <URL:https://blog.csdn.net/ouyanggengcheng/article/details/85790012> *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022245611A1 (en) * 2021-05-17 2022-11-24 Snap Inc. Automated testing platform for testing multiple devices
US11748234B2 (en) 2021-05-17 2023-09-05 Snap Inc. Automated testing platform for testing multiple devices
CN113923442A (en) * 2021-09-24 2022-01-11 湖北三赢兴光电科技股份有限公司 Universal software testing method and system for camera module
WO2023230798A1 (en) * 2022-05-30 2023-12-07 北京小米移动软件有限公司 Cross-system key testing method and apparatus

Similar Documents

Publication Publication Date Title
CN112463618A (en) Automated testing method, device, medium and equipment
CN109783342B (en) Script debugging method and device and computer storage medium
CN106326104B (en) Terminal control testing method and device
US20110289484A1 (en) Method and System for Script Processing for Web-Based Applications
CN106598835B (en) Application testing method, device and system
CN105159833A (en) Automatic testing device and method
CN111176961B (en) Application program testing method and device and storage medium
CN109857404B (en) SDK interface packaging method and device, storage medium and electronic equipment
CN108121633B (en) Abnormity capturing method and device
CN105556483A (en) Real-time code instrumentation
CN112416775B (en) Software automatic test method and device based on artificial intelligence and electronic equipment
CN110795353B (en) Quick application debugging method, device, equipment and storage medium
CN114356434B (en) Page loading method, device, apparatus, storage medium and program product
CN108153667B (en) Automatic test method, device and system
CN106557411B (en) Method and system for testing Hybrid application in Android system
CN106294119B (en) Test scheduling system and method and terminal equipment
CN106648912B (en) Modularization method and device for data processing in data acquisition platform
CN114285774A (en) Flow recording method and device, electronic equipment and storage medium
CN110978051B (en) Robot simulation device, system, method, readable medium, and electronic apparatus
CN103064789A (en) Automated testing method by software control
CN113778843B (en) Application program testing method and device, electronic equipment and readable storage medium
CN109597952B (en) Webpage information processing method, system, electronic equipment and storage medium
CN112769627B (en) Network environment simulation method, system and computer program product
CN113238935A (en) Application testing method, system, device, medium, and computer program product
CN107454124B (en) Equipment automation method and device

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