CN116841855A - Test method, device and equipment - Google Patents

Test method, device and equipment Download PDF

Info

Publication number
CN116841855A
CN116841855A CN202210297496.8A CN202210297496A CN116841855A CN 116841855 A CN116841855 A CN 116841855A CN 202210297496 A CN202210297496 A CN 202210297496A CN 116841855 A CN116841855 A CN 116841855A
Authority
CN
China
Prior art keywords
tested
program
test
application program
target page
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
CN202210297496.8A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202210297496.8A priority Critical patent/CN116841855A/en
Publication of CN116841855A publication Critical patent/CN116841855A/en
Pending legal-status Critical Current

Links

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/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The embodiment of the disclosure provides a testing method, a testing device and testing equipment, wherein the testing method is applied to tested equipment, a first system and a driving program are installed in the tested equipment, and the testing method comprises the following steps: the method comprises the steps that a test instruction sent by control equipment through a communication interface is received through a driver, the control equipment is provided with a second system, a program calling interface is not opened to the second system by the first system, and the program calling interface is used for calling an application program in tested equipment; calling an application program to be tested in the tested equipment through the driver program and the program calling interface, and controlling the application program to be tested to execute a test instruction so as to display a target page of the application program to be tested; and sending control information of the target page to the control equipment through the driver, wherein the control information is used for determining a test result of the tested application program by the control equipment. The flexibility of the test is improved.

Description

Test method, device and equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computer and network communication, in particular to a testing method, a testing device and testing equipment.
Background
An application program can be installed in a terminal device (such as a mobile phone, a computer and the like), and in order to ensure that the application program can normally run in the terminal device, the application program needs to be tested before the application program is online.
When an application program is tested, the application program is usually installed in a terminal device, the control device controls the application program to automatically run in the terminal device, and a test result is determined according to the running condition of the application program in the terminal device. However, when the system of the terminal device does not provide the program calling interface for the system of the control device, the control device cannot call the application program in the terminal device through the program calling interface, and further cannot test the terminal device through the control device, so that the flexibility of the test is poor.
Disclosure of Invention
The embodiment of the disclosure provides a testing method, a testing device and testing equipment, wherein control equipment can communicate with tested equipment through a communication interface and a driving program, so that the tested application program in the tested equipment is tested, and the testing flexibility is improved.
In a first aspect, an embodiment of the present disclosure provides a testing method applied to a device under test, in which a first system and a driver are installed, the method including:
receiving a test instruction sent by control equipment through a communication interface through the driver, wherein the control equipment is provided with a second system, the first system does not open a program calling interface to the second system, and the program calling interface is used for calling an application program in the tested equipment;
Calling an application program to be tested in the tested equipment through the driving program and the program calling interface, and controlling the application program to be tested to execute the test instruction so as to display a target page of the application program to be tested;
and sending control information of the target page to the control equipment through the driver, wherein the control information is used for determining a test result of the tested application program by the control equipment.
In a second aspect, embodiments of the present disclosure provide a test apparatus applied to a device under test, in which a first system and a driver are installed, the apparatus including a receiving unit, a processing unit, and a transmitting unit, wherein,
the receiving unit is used for receiving a test instruction sent by the control equipment through the communication interface through the driving program, the control equipment is provided with a second system, the first system does not open a program calling interface to the second system, and the program calling interface is used for calling an application program in the tested equipment;
the processing unit is used for calling an application program to be tested in the equipment to be tested through the driving program and the program calling interface, and controlling the application program to be tested to execute the test instruction so as to display a target page of the application program to be tested;
The sending unit is used for sending control information of the target page to the control equipment through the driver, and the control information is used for determining a test result of the tested application program by the control equipment.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory such that the at least one processor performs the test method as described above in the first aspect and the various possible designs of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the test method as described above in the first aspect and the various possible designs of the first aspect.
In a fifth aspect, embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed by a processor, implements the test method as described above in the first aspect and the various possible designs of the first aspect.
According to the testing method, the testing device and the testing equipment provided by the embodiment, when the first system of the tested equipment does not open the program calling interface to the second system in the control equipment, the communication interface can be installed in the control equipment, and the driver is installed in the tested equipment, so that the control equipment can call the program calling interface in the tested equipment through the communication interface and the driver. Correspondingly, in the test process, the tested equipment can receive a test instruction sent by the control equipment through the communication interface through the driving program, the tested application program is called through the driving program and the program calling interface so as to control the tested application program to execute the test instruction, a target page of the tested application program is displayed, and control information of the target page is sent to the control equipment through the driving program so that the control equipment can determine a test result of the tested application program according to the control information. In the process, the control equipment can call the program call interface in the tested equipment through the communication interface and the driving program so as to call the tested application program in the tested equipment, further test the tested application program in the tested equipment, and the flexibility of testing is improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the description of the prior art, it being obvious that the drawings in the following description are some embodiments of the present disclosure, and that other drawings may be obtained from these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a testing method according to an embodiment of the disclosure;
FIG. 3 is a flow chart of another testing method according to an embodiment of the disclosure;
FIG. 4A is a schematic diagram of an apparatus according to an embodiment of the present disclosure;
FIG. 4B is a schematic diagram of another apparatus provided by an embodiment of the present disclosure;
FIG. 5 is a block diagram of a test apparatus provided in an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
In order to facilitate understanding, an application scenario of the embodiments of the present disclosure is described below with reference to fig. 1.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present disclosure. Referring to fig. 1, the device under test includes a control device and a device under test. The device under test has a first system and the control device has a second system to which the first system does not open a program call interface. In order to make it possible for the control device to call a program call interface in the device under test, a communication interface may be installed in the control device, and a driver may be installed in the device under test. The tested application program is installed in the tested equipment, and the control equipment can communicate with the tested equipment through the communication interface and the driving program, so that the tested application program in the tested equipment is tested.
In the related art, if the first system does not open the program call interface to the second system, the control device cannot test the tested device, resulting in poor testing flexibility.
In the embodiment of the disclosure, when the first system does not open the program calling interface to the second system, the communication interface can be installed in the control device, and the driver can be installed in the tested device, so that the control device can call the tested application program in the tested device through the communication interface and the driver calling interface, further, the tested application program is tested, and the testing flexibility is improved.
The test method shown in the embodiments of the present disclosure will be described in detail by way of specific examples. It should be noted that the following embodiments may exist independently or may be combined with each other, and for the same or similar content, the description will not be repeated in different embodiments.
Fig. 2 is a flow chart of a test method according to an embodiment of the disclosure. Referring to fig. 2, the method may include:
s201, receiving a test instruction sent by the control equipment through a communication interface through a driver.
The execution body of the embodiment of the present disclosure is a device under test (may also be referred to as a terminal device), and may also be a test apparatus provided in the device under test. The test device may be implemented by software, or may be implemented by a combination of software and hardware.
The tested equipment can be mobile phones, computers and other equipment. The control device may be a computer, a server, etc. The device under test has an application under test installed therein. The control device is used for controlling the tested application program in the tested device.
The first system is installed in the tested equipment, the second system is installed in the control equipment, and the first system does not open a program call interface to the second system. For example, an IOS system may be installed in the device under test, and a Linux system may be installed in the control device, where the IOS system does not open a program call interface to the Linux system.
The control device is also provided with a communication interface, and the tested device is provided with a driving program. The control device and the device under test can communicate through the communication interface and the driver, i.e. the control device can call the program call interface in the device under test through the communication interface and the driver. The communication interface may be written in a language supported by the control device, for example, in C language assuming that a Linux system is installed in the control device.
The test instructions are used to control the application under test to run in the device under test. For example, the test instruction is used to control starting of an application program under test in a device under test, inputting of a click operation, a slide operation, and the like in a page of the application program under test.
The control device can be provided with a test script, the control device can generate a test instruction according to the test script and send the test instruction to the tested device through the communication interface, and the tested device receives the test instruction through the driver because the tested device is communicated with the control device through the driver.
S202, calling the tested application program in the tested equipment through the driving program and the program calling interface, and controlling the tested application program to execute the test instruction so as to display a target page of the tested application program.
After the tested device receives the test instruction through the driver, the tested device can call the tested application program to execute the test instruction through the driver because the test instruction from the control device cannot directly control the tested application program. After the tested application program executes the test instruction, the tested device may display a target page of the tested application program.
When the current displayed page of the tested equipment is different and the test instruction is different, the target page is also different.
For example, when the device under test currently displays a desktop (main page), the test instruction is a start instruction, the target page may be the top page of the application under test. When the tested equipment currently displays a first page of the tested application program, and the test instruction is the click operation of a first control in the first page, the target page is a jump page corresponding to the first control.
S203, control information of the target page is sent to the control equipment through the driver.
The control information is used for describing the target page, namely, the target control can be determined according to the control information. For example, the control information may include: the identification of the plurality of controls in the target page and the positional relationship between the plurality of controls in the target page. For example, the control information may be represented in a tree structure.
The tested device can acquire the control information of the target page first, and then the control information of the target page is sent to the control device through the driver.
After the control information is received by the control device, the control device can determine a test result according to the control information corresponding to the target page and the control information corresponding to the test instruction. For example, the control device may determine whether the control information corresponding to the target page and the control information corresponding to the test instruction are the same, if so, determine that the test result is that the test passes, and if not, determine that the test result is that the test fails.
Optionally, before executing the embodiment of fig. 2, the device under test may receive, through the driver, a program installation instruction sent by the control device through the communication interface, and install the application under test in the device under test according to the program installation instruction. In other testing processes, the tested equipment can also receive a program uninstall instruction sent by the control equipment through the communication interface through the driver, and install the tested application program in the tested equipment according to the program uninstall instruction.
According to the testing method provided by the embodiment of the disclosure, when the first system in the tested device does not open the program call interface to the second system in the control device, the communication interface can be installed in the control device, and the driver is installed in the tested device, so that the control device can call and communicate with the program call interface in the tested device through the communication interface and the driver. Correspondingly, in the test process, the tested equipment can receive a test instruction sent by the control equipment through the communication interface through the driving program, and call the tested application program through the driving program and the program call interface so as to control the tested application program in the tested equipment to execute the test instruction, so that a target page of the tested application program is displayed, and control information of the target page is sent to the control equipment through the driving program, so that the control equipment determines a test result of the tested application program according to the control information. In the process, the control equipment can call the program call interface in the tested equipment through the communication interface and the driving program so as to call the tested application program in the tested equipment, further test the tested application program in the tested equipment, and the flexibility of testing is improved.
On the basis of any one of the above embodiments, the test method will be described in further detail with reference to fig. 3.
Fig. 3 is a flow chart of another test method according to an embodiment of the disclosure. Referring to fig. 3, the method may include:
s301, the control device sends a test instruction to the tested device through the communication interface.
The control device is provided with a test script, and the test script comprises a plurality of test commands. The control device may sequentially execute the test commands in the test script to generate corresponding test instructions. The embodiment of the application is exemplified by a process for processing any one test instruction.
The device under test and the control device can communicate via a wireless network or a wired network. After the control device sends a test instruction through the communication interface, the tested device receives the test instruction through the driver.
S302, the tested equipment determines the tested application program.
The device under test may have a plurality of applications installed therein, and after the device under test receives the test instruction, the application under test needs to be determined among the plurality of applications.
The device under test may determine the application under test by: if the test instruction comprises the identification of the tested application program, the identification of the tested application program is obtained in the starting instruction, and the tested application program is determined according to the identification of the tested application program. And if the test instruction does not comprise the identification of the tested application program, determining the application program in the foreground running state in the tested equipment as the tested application program.
Optionally, the part of the test instructions include the identifier of the application program under test, and the part of the test instructions do not include the identifier of the application program under test. For example, the start instruction, the install instruction, and the uninstall instruction may include an identification of the application under test; the click command and the sliding command may not include the identification of the tested application program.
S303, analyzing the test instruction by the tested equipment to obtain test operation and operation positions.
The test instructions have a one-to-one correspondence with the test operations. For example, if the test instruction is a start instruction, the test operation instruction is a start operation; if the test instruction is a sliding instruction, the test operation is a sliding operation.
Optionally, if the test instruction is a start instruction, an installation instruction, an uninstall instruction, or the like, after the analysis processing is performed on the test instruction, a test operation may be obtained.
If the test instruction is a sliding instruction, a clicking instruction or the like, after analysis processing is performed on the test instruction, the test operation and the operation position can be obtained. The operation position refers to a position at which a test operation is performed in the device under test, and for example, the operation position may be coordinates in a screen of the device under test.
S304, the tested equipment calls the tested application program through the driver program and the program calling interface so as to execute the test operation at the operation position.
For example, the test operation is a click operation, the operation position is position 1, and the click operation is performed on position 1.
If the test instruction is analyzed, only the test operation is obtained and the operation position is not obtained, the test operation is directly executed. For example, if the test operation is a start operation, the application under test may be directly started.
S305, the tested equipment responds to the test operation to determine the identification of the target page.
For example, if the test operation is a start operation, the target page is determined to be the top page of the tested application program. If the test operation is a clicking operation, determining a jump link corresponding to the operation position, and determining the target page as a page corresponding to the jump link.
S306, the tested equipment acquires the target page information of the tested application program according to the identification of the target page.
Optionally, if it is determined that the target page information is stored in the tested device according to the identifier of the target page, acquiring the target page information in the tested device; and if the fact that the target page information is not stored in the tested equipment is determined according to the identification of the target page, requesting an application server corresponding to the tested application to acquire the target page information.
In the actual application process, after the tested application program is started in the tested device, the tested device may cache page information of part of pages in the tested application program. Correspondingly, when the target page information is stored in the tested equipment, the target page information can be acquired in the tested equipment, and further the efficiency of acquiring the target page information is improved.
S307, the tested equipment displays the target page according to the page information.
The tested equipment can conduct page drawing according to the page information to obtain a target page, and the target page is displayed.
S308, the tested device acquires the identification of at least one control and the position of at least one control included in the target page.
Optionally, the tested device may obtain the identifier of the at least one control and the position of the at least one control in the target page information.
S309, the tested equipment generates control information according to the identification of the at least one control and the position of the at least one control.
S310, the tested device sends control information to the control device through the driver.
S311, the control equipment determines a test result according to the control information.
It should be noted that, the execution process of S310-S311 may refer to the execution process of S203, and will not be described herein.
In the embodiment shown in fig. 3, when there is no open communication interface between the first system in the device under test and the second system in the control device, the communication interface may be installed in the control device, and the driver may be installed in the device under test, so that the control device may communicate with the device under test through the communication interface and the driver. And further, the tested application program in the tested equipment is tested, and the flexibility of the test is improved.
The method illustrated in the embodiment of fig. 3 will be described in detail below by way of specific examples in connection with fig. 4A-4B.
Fig. 4A is a schematic diagram of an apparatus according to an embodiment of the disclosure. Referring to fig. 4A, a Linux device and an IOS device are included. The system of the Linux equipment is a Linux system, and the system of the IOS equipment is an IOS system. The IOS equipment is tested equipment, and the tested application program APP1 is installed in the IOS equipment. The Linux device is a control device and is used for controlling the test of APP1 in the IOS device.
Before configuration, because the IOS system does not open a program call interface to the Linux system, the Linux device cannot call the program call interface in the IOS device, and thus cannot test APP1 in the IOS device.
Linux devices and IOS devices may be configured. After configuration, a communication interface is installed in the Linux equipment, and a driver is installed in the IOS equipment. The Linux device and the IOS device can communicate through the communication interface and the driver, so that the Linux device can call the program call interface in the IOS device through the communication interface and the driver, and further the test of APP1 in the IOS device can be controlled.
After the configuration of the Linux device and the IOS device is completed, the Linux device may control the test of APP1 in the IOS device, and the test procedure is described below with reference to fig. 4B.
Fig. 4B is a schematic diagram of another apparatus provided in an embodiment of the disclosure. Referring to fig. 4A, a schematic diagram of a Linux device and an IOS device including a time t1, a time t2, and a time t3 is shown. The Linux device stores therein a test script (not shown in fig. 4B). The IOS device includes a display screen therein.
At time t1, the IOS device displays page 1 in APP1. The Linux device generates an instruction 1 (test instruction) according to the test script, sends the instruction 1 to a driver in the IOS device through the communication interface, and after the IOS device receives the instruction 1 through the driver, the IOS device calls the APP1 through the driver to execute the instruction 1, and after executing the instruction 1, please refer to a time t2, the IOS device displays an interface 2 on a display screen.
At time t2, the IOS device determines the control information of the page 2, and sends the control information of the page 2 to the Linux device through the driver, so that the Linux device receives the control information of the page 2 through the communication interface.
At time t3, the Linux device determines a test result according to the control information of the page 2 and the control information corresponding to the instruction 1. For example, if the control information of the page 2 is the same as the control information corresponding to the instruction 1, the test result is determined to be successful, otherwise, the test result is determined to be failed. Optionally, at time t3, the Linux device may further generate an instruction 2 according to the test script, and send the instruction 2 to a driver in the IOS device through the communication interface, after the IOS device receives the instruction 2 through the driver, the IOS device calls APP1 through the driver to execute the instruction 2, and circularly execute the above process, which is not described herein.
Corresponding to the test method of the above embodiments, the present disclosure provides a test apparatus. Fig. 5 is a block diagram of a test apparatus according to an embodiment of the present disclosure, where the test apparatus may be disposed in a device under test, and a first system and a driver are installed in the device under test. For ease of illustration, only portions relevant to embodiments of the present disclosure are shown. Referring to fig. 5, the test apparatus 50 includes: a receiving unit 501, a processing unit 502 and a transmitting unit 503, wherein,
The receiving unit 501 is configured to receive, by using the driver, a test instruction sent by a control device through a communication interface, where the control device is installed with a second system, and the first system does not open a program calling interface to the second system, where the program calling interface is used to call an application program in the device under test;
the processing unit 502 is configured to call an application program under test in the device under test through the driver and the program call interface, and control the application program under test to execute the test instruction, so as to display a target page of the application program under test;
the sending unit 503 is configured to send, by using the driver, control information of the target page to the control device, where the control information is used by the control device to determine a test result of the tested application program.
In one embodiment of the present disclosure, the processing unit 502 is specifically configured to:
determining the tested application program;
analyzing the test instruction to obtain test operation and operation position;
and calling the tested application program through the driving program and the program calling interface according to the test operation and the operation position so as to acquire target page information of the tested application program, and displaying the target page according to the page information.
In one embodiment of the present disclosure, the processing unit 502 is specifically configured to:
invoking the application program under test through the driver and the program invocation interface to perform the test operation at the operational location;
and responding to the test operation, determining the identification of the target page, and acquiring the target page information of the tested application program according to the identification of the target page.
In one embodiment of the present disclosure, the processing unit 502 is specifically configured to:
if the target page information is stored in the tested equipment according to the identification of the target page, acquiring the target page information in the tested equipment;
and if the target page information is not stored in the tested equipment according to the identification of the target page, requesting an application program server corresponding to the tested application program to acquire the target page information.
In one embodiment of the present disclosure, the processing unit 502 is specifically configured to:
if the test instruction comprises the identification of the tested application program, acquiring the identification of the tested application program from the starting instruction, and determining the tested application program according to the identification of the tested application program;
And if the test instruction does not include the identification of the application program to be tested, determining the application program in the foreground running state in the tested equipment as the application program to be tested.
In one embodiment of the present disclosure, the processing unit 502 is specifically configured to:
acquiring an identification of at least one control and a position of the at least one control included in the target page;
generating control information according to the identification of the at least one control and the position of the at least one control;
and sending the control information to the control equipment through the driver.
In one embodiment of the present disclosure, the receiving unit 501 is further configured to receive, by the driver, a program installation instruction sent by the control device through the communication interface, and the processing unit 502 is further configured to install the application under test in the device under test according to the program installation instruction; or alternatively, the process may be performed,
the receiving unit 501 is further configured to receive, by using the driver, a program uninstall instruction sent by the control device through the communication interface, and the processing unit 502 is further configured to install the application program under test in the device under test according to the program uninstall instruction.
The test device provided in the embodiment of the present disclosure may be used to execute the technical solution of the embodiment of the method, and its implementation principle and technical effects are similar, and this embodiment is not repeated here.
In order to achieve the above embodiments, the embodiments of the present disclosure further provide an electronic device.
Referring to fig. 6, a schematic diagram of a structure of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown, the electronic device 600 may be a terminal device or a server. The terminal device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (Personal Digital Assistant, PDA for short), a tablet (Portable Android Device, PAD for short), a portable multimedia player (Portable Media Player, PMP for short), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic apparatus 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage device 608 into a random access Memory (Random Access Memory, RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a liquid crystal display (Liquid Crystal Display, LCD for short), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above-described embodiments.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (Local Area Network, LAN for short) or a wide area network (Wide Area Network, WAN for short), or it may be connected to an external computer (e.g., connected via the internet using an internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to a first aspect, according to one or more embodiments of the present disclosure, there is provided a test method applied to a device under test, in which a first system and a driver are installed, the method including:
receiving a test instruction sent by control equipment through a communication interface through the driver, wherein the control equipment is provided with a second system, the first system does not open a program calling interface to the second system, and the program calling interface is used for calling an application program in the tested equipment;
calling an application program to be tested in the tested equipment through the driving program and the program calling interface, and controlling the application program to be tested to execute the test instruction so as to display a target page of the application program to be tested;
and sending control information of the target page to the control equipment through the driver, wherein the control information is used for determining a test result of the tested application program by the control equipment.
According to one or more embodiments of the present disclosure, invoking an application program under test in the device under test through the driver and the program call interface, controlling the application program under test to execute the test instruction to display a target page of the application program under test, including: determining the tested application program;
Analyzing the test instruction to obtain test operation and operation position;
and calling the tested application program through the driving program and the program calling interface according to the test operation and the operation position so as to acquire target page information of the tested application program, and displaying the target page according to the page information.
According to one or more embodiments of the present disclosure, according to the test operation and the operation position, invoking the application program under test through the driver and the program invoking interface to obtain target page information of the application program under test, including:
invoking the application program under test through the driver and the program invocation interface to perform the test operation at the operational location;
and responding to the test operation, determining the identification of the target page, and acquiring the target page information of the tested application program according to the identification of the target page.
According to one or more embodiments of the present disclosure, obtaining target page information of the tested application program according to the identification of the target page includes:
if the target page information is stored in the tested equipment according to the identification of the target page, acquiring the target page information in the tested equipment;
And if the target page information is not stored in the tested equipment according to the identification of the target page, requesting an application program server corresponding to the tested application program to acquire the target page information.
In accordance with one or more embodiments of the present disclosure, determining the application under test includes:
if the test instruction comprises the identification of the application program to be tested, acquiring the identification of the application program to be tested from the test instruction, and determining the application program to be tested according to the identification of the application program to be tested;
and if the test instruction does not include the identification of the application program to be tested, determining the application program in the foreground running state in the tested equipment as the application program to be tested.
According to one or more embodiments of the present disclosure, sending, by the driver, control information of the target page to the control device includes:
acquiring an identification of at least one control and a position of the at least one control included in the target page;
generating control information according to the identification of the at least one control and the position of the at least one control;
And sending the control information to the control equipment through the driver.
According to one or more embodiments of the present disclosure, the method further comprises:
receiving a program installation instruction sent by the control equipment through the communication interface through the driver program, and installing the tested application program in the tested equipment according to the program installation instruction; or alternatively, the process may be performed,
and receiving a program uninstall instruction sent by the control equipment through the communication interface through the driver program, and installing the tested application program in the tested equipment according to the program uninstall instruction.
In a second aspect, the present disclosure provides a testing apparatus for use with a device under test, the device under test having a first system and a driver installed therein, the apparatus comprising a receiving unit, a processing unit, and a transmitting unit, wherein,
the receiving unit is used for receiving a test instruction sent by the control equipment through the communication interface through the driving program, the control equipment is provided with a second system, the first system does not open a program calling interface to the second system, and the program calling interface is used for calling an application program in the tested equipment;
The processing unit is used for calling an application program to be tested in the equipment to be tested through the driving program and the program calling interface, and controlling the application program to be tested to execute the test instruction so as to display a target page of the application program to be tested;
the sending unit is used for sending control information of the target page to the control equipment through the driver, and the control information is used for determining a test result of the tested application program by the control equipment.
According to one or more embodiments of the present disclosure, the processing unit is specifically configured to:
determining the tested application program;
analyzing the test instruction to obtain test operation and operation position;
and calling the tested application program through the driving program and the program calling interface according to the test operation and the operation position so as to acquire target page information of the tested application program, and displaying the target page according to the page information.
According to one or more embodiments of the present disclosure, the processing unit is specifically configured to:
invoking the application program under test through the driver and the program invocation interface to perform the test operation at the operational location;
And responding to the test operation, determining the identification of the target page, and acquiring the target page information of the tested application program according to the identification of the target page.
According to one or more embodiments of the present disclosure, the processing unit is specifically configured to:
if the target page information is stored in the tested equipment according to the identification of the target page, acquiring the target page information in the tested equipment;
and if the target page information is not stored in the tested equipment according to the identification of the target page, requesting an application program server corresponding to the tested application program to acquire the target page information.
According to one or more embodiments of the present disclosure, the processing unit is specifically configured to:
if the test instruction comprises the identification of the application program to be tested, acquiring the identification of the application program to be tested from the test instruction, and determining the application program to be tested according to the identification of the application program to be tested;
and if the test instruction does not include the identification of the application program to be tested, determining the application program in the foreground running state in the tested equipment as the application program to be tested.
According to one or more embodiments of the present disclosure, the processing unit is specifically configured to:
acquiring an identification of at least one control and a position of the at least one control included in the target page;
generating control information according to the identification of the at least one control and the position of the at least one control;
and sending the control information to the control equipment through the driver.
According to one or more embodiments of the present disclosure, the receiving unit is further configured to receive, by the driver, a program installation instruction sent by the control device through the communication interface, and the processing unit is further configured to install the application under test in the device under test according to the program installation instruction; or alternatively, the process may be performed,
the receiving unit is further used for receiving a program uninstall instruction sent by the control device through the communication interface through the driver, and the processing unit is further used for installing the tested application program in the tested device according to the program uninstall instruction.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device comprising: at least one processor and memory;
The memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory, causing the at least one processor to perform the test method as described above in the first aspect and the various possible designs of the first aspect.
In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the test method as described above in the first aspect and the various possible designs of the first aspect.
In a fifth aspect, according to one or more embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the test method of the first aspect and the various possible designs of the first aspect as described above
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (11)

1. A test method applied to a device under test in which a first system and a driver are installed, the method comprising:
Receiving a test instruction sent by control equipment through a communication interface through the driver, wherein the control equipment is provided with a second system, the first system does not open a program calling interface to the second system, and the program calling interface is used for calling an application program in the tested equipment;
calling an application program to be tested in the tested equipment through the driving program and the program calling interface, and controlling the application program to be tested to execute the test instruction so as to display a target page of the application program to be tested;
and sending control information of the target page to the control equipment through the driver, wherein the control information is used for determining a test result of the tested application program by the control equipment.
2. The method of claim 1, wherein invoking the application under test in the device under test via the driver and the program call interface controls the application under test to execute the test instructions to display a target page of the application under test, comprising:
determining the tested application program;
analyzing the test instruction to obtain test operation and operation position;
And calling the tested application program through the driving program and the program calling interface according to the test operation and the operation position so as to acquire target page information of the tested application program, and displaying the target page according to the page information.
3. The method of claim 2, wherein invoking the application under test via the driver and the program invocation interface to obtain target page information for the application under test based on the test operation and the operation location comprises:
invoking the application program under test through the driver and the program invocation interface to perform the test operation at the operational location;
and responding to the test operation, determining the identification of the target page, and acquiring the target page information of the tested application program according to the identification of the target page.
4. A method according to claim 3, wherein obtaining target page information of the application under test according to the identification of the target page comprises:
if the target page information is stored in the tested equipment according to the identification of the target page, acquiring the target page information in the tested equipment;
And if the target page information is not stored in the tested equipment according to the identification of the target page, requesting an application program server corresponding to the tested application program to acquire the target page information.
5. A method according to claim 2 or 3, wherein determining the application under test comprises:
if the test instruction comprises the identification of the application program to be tested, acquiring the identification of the application program to be tested from the test instruction, and determining the application program to be tested according to the identification of the application program to be tested;
and if the test instruction does not include the identification of the application program to be tested, determining the application program in the foreground running state in the tested equipment as the application program to be tested.
6. The method according to any one of claims 1-5, wherein sending, by the driver, control information of the target page to the control device, comprises:
acquiring an identification of at least one control included in the target page and a position of the at least one control in the target page;
generating control information according to the identification of the at least one control and the position of the at least one control;
And sending the control information to the control equipment through the driver.
7. The method according to any one of claims 1-6, further comprising:
receiving a program installation instruction sent by the control equipment through the communication interface through the driver program, and installing the tested application program in the tested equipment according to the program installation instruction; or alternatively, the process may be performed,
and receiving a program uninstall instruction sent by the control equipment through the communication interface through the driver program, and installing the tested application program in the tested equipment according to the program uninstall instruction.
8. A test device is characterized by being applied to a device under test, wherein a first system and a driver are installed in the device under test, the device comprises a receiving unit, a processing unit and a sending unit,
the receiving unit is used for receiving a test instruction sent by the control equipment through the communication interface through the driving program, the control equipment is provided with a second system, the first system does not open a program calling interface to the second system, and the program calling interface is used for calling an application program in the tested equipment;
The processing unit is used for calling an application program to be tested in the equipment to be tested through the driving program and the program calling interface, and controlling the application program to be tested to execute the test instruction so as to display a target page of the application program to be tested;
the sending unit is used for sending control information of the target page to the control equipment through the driver, and the control information is used for determining a test result of the tested application program by the control equipment.
9. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory, causing the processor to perform the test method of any one of claims 1 to 7.
10. A computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement the test method of any of claims 1 to 7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the test method according to any one of claims 1 to 7.
CN202210297496.8A 2022-03-24 2022-03-24 Test method, device and equipment Pending CN116841855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210297496.8A CN116841855A (en) 2022-03-24 2022-03-24 Test method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210297496.8A CN116841855A (en) 2022-03-24 2022-03-24 Test method, device and equipment

Publications (1)

Publication Number Publication Date
CN116841855A true CN116841855A (en) 2023-10-03

Family

ID=88163987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210297496.8A Pending CN116841855A (en) 2022-03-24 2022-03-24 Test method, device and equipment

Country Status (1)

Country Link
CN (1) CN116841855A (en)

Similar Documents

Publication Publication Date Title
CN113377366B (en) Control editing method, device, equipment, readable storage medium and product
US11711441B2 (en) Method and apparatus for publishing video synchronously, electronic device, and readable storage medium
CN110069308B (en) Page starting method and device, electronic equipment and storage medium
CN109753332B (en) Method and device for displaying information
CN111367516B (en) Application interface generation method and device and electronic equipment
CN113553257B (en) Test method, device, storage medium and electronic equipment
CN111324376B (en) Function configuration method, device, electronic equipment and computer readable medium
CN113806212A (en) Application program exception positioning method and device and electronic equipment
CN111273985A (en) Page rendering method and device, electronic equipment and computer readable storage medium
CN109947659B (en) System, method and apparatus for testing applications
WO2023072070A1 (en) Display control method and apparatus, and electronic device
CN113377365B (en) Code display method, apparatus, device, computer readable storage medium and product
CN111273967A (en) Remote hook setting method and device suitable for Android system and electronic equipment
CN113608997B (en) Remote debugging method and device for embedded webpage of application program and electronic equipment
CN111290812B (en) Display method, device, terminal and storage medium of application control
CN116841855A (en) Test method, device and equipment
CN113849416A (en) Test method, test device, storage medium and electronic equipment
CN111309323A (en) Parameter initialization method and device and electronic equipment
CN110908711A (en) Control development method and device of application program and electronic equipment
CN112486826B (en) Test method, test device, electronic equipment and computer readable medium
CN117707916A (en) Code testing method, device, equipment, computer readable storage medium and product
CN116932063A (en) Window display method and device and electronic equipment
CN117435103A (en) Control method, device, equipment, storage medium and program for application program
CN116776396A (en) Data processing method, device, equipment, vehicle and storage medium
CN114461416A (en) Automatic test optimization method and device, electronic equipment and readable storage medium

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