CN110928766A - Application software testing method, device, equipment and computer readable storage medium - Google Patents

Application software testing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN110928766A
CN110928766A CN201910970981.5A CN201910970981A CN110928766A CN 110928766 A CN110928766 A CN 110928766A CN 201910970981 A CN201910970981 A CN 201910970981A CN 110928766 A CN110928766 A CN 110928766A
Authority
CN
China
Prior art keywords
tested
test
application software
interface
picture
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
CN201910970981.5A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN201910970981.5A priority Critical patent/CN110928766A/en
Publication of CN110928766A publication Critical patent/CN110928766A/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/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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention discloses a method, a device and equipment for testing application software and a computer readable storage medium, wherein the method comprises the following steps: establishing communication connection with each device to be tested, and acquiring an interface picture displayed by each device to be tested, wherein the interface picture is generated after the interface picture runs on each device to be tested based on application software; displaying each interface picture, and dividing each device to be tested into a main control device and a group control device according to a main control selection instruction when the main control selection instruction sent based on each interface picture is received; and when receiving an operation instruction sent by an interface picture based on the main control equipment, issuing the operation instruction to each equipment to be tested so as to test the application software in each equipment to be tested. According to the scheme, the operation instruction is triggered based on the interface picture of the main control device and is issued to each device to be tested, so that each device to be tested is tested, the test period is shortened, and the test efficiency is improved.

Description

Application software testing method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for testing application software.
Background
With the development of science and technology, the types of application software supported and installed on the intelligent terminal are more and more; before the application software is popularized to market for use or after the application software is updated, the application software needs to be tested so as to ensure the correctness of each function of the application software.
At present, the test mainly relates to manual test and automatic test, wherein the manual test inevitably has a great deal of repeated labor and has poor timeliness; for application software with frequent iteration and short update period, a large amount of manpower is consumed; for this purpose, automatic testing is introduced.
The automatic test records the script or writes the script first, and the single machine is debugged without error and then is selected and executed on the test platform. When the application software is updated, the page elements are changed, and the script recorded in the last version is not suitable, resource maintenance is required, but the maintenance cost is higher than that of re-recording, and re-recording is generally selected. Therefore, the automatic test needs to maintain the script or redevelop the script aiming at each update, the test period is long, and the test efficiency is low.
Disclosure of Invention
The invention mainly aims to provide a method, a device and equipment for testing application software and a computer readable storage medium, and aims to solve the problems of long test period and low efficiency of the application software in the prior art.
In order to achieve the above object, the present invention provides a method for testing application software, which comprises the following steps:
establishing communication connection with each device to be tested, and acquiring interface pictures displayed by each device to be tested, wherein each interface picture is generated based on the operation of application software in each device to be tested;
displaying each interface picture, and dividing each device to be tested into a main control device and a group control device according to a main control selection instruction when the main control selection instruction sent based on each interface picture is received;
and when an operation instruction sent based on the interface picture of the main control equipment is received, the operation instruction is issued to each device to be tested so as to test the application software in each device to be tested.
Preferably, the step of displaying each interface picture includes:
calling a preset resolution ratio, and respectively obtaining the equipment resolution ratio of each equipment to be tested;
comparing preset resolution with the resolution of each device one by one to generate an adjustment coefficient corresponding to each interface picture;
and adjusting the display resolution of each interface picture according to the adjustment coefficient corresponding to each interface picture, and displaying the adjusted interface pictures side by side.
Preferably, the step of issuing the operation instruction to each of the devices to be tested to test the application software in each of the devices to be tested includes:
detecting the picture position of the operation instruction in the interface picture of the main control equipment, and determining the function to be tested corresponding to the picture position in each device to be tested according to each adjustment coefficient;
generating a trigger instruction corresponding to each function to be tested, and issuing the trigger instruction to each device to be tested so as to test the function to be tested corresponding to the picture position in each device to be tested;
receiving test results fed back by each device to be tested, judging whether abnormal results exist in each test result, and recording the device to be tested corresponding to the abnormal results if the abnormal results exist;
and distinguishing and displaying abnormal results and normal results in each test result.
Preferably, the step of issuing the operation instruction to each of the devices to be tested to test the application software in each of the devices to be tested includes:
calling a preset test flow packet, and determining the test position of the operation instruction in the preset test flow packet;
determining a test flow according to the test position, and reading the test instructions one by one according to the arrangement sequence of the test instructions in the test flow;
and determining the read test instruction as the operation instruction, and executing the step of issuing the operation instruction to each device to be tested so as to test the application software in each device to be tested.
Preferably, the method for testing application software further comprises the steps of:
when a master control switching instruction is received, determining to-be-switched group control equipment in each group control equipment according to a switching identifier in the master control switching instruction;
and switching between the group control equipment to be switched and the main control equipment.
Preferably, the step of establishing a communication connection with each device under test includes:
calling a preset equipment list, and reading equipment information of each equipment to be tested;
adding the information of each device into the preset device list for displaying, and monitoring the online state of each device to be tested;
the step of dividing each device to be tested into a master control device and a group control device according to the master control selection instruction comprises the following steps:
and reading the control attribute of each device to be tested, and updating the preset device list based on each control attribute.
Preferably, the step of acquiring the interface picture displayed by each device under test includes:
sending an interface calling instruction to each device to be tested so that each device to be tested calls an interface to record a screen based on the interface calling instruction to obtain a code stream video corresponding to each device to be tested, and decoding each code stream video to generate a code stream picture;
and determining the code stream picture corresponding to each device to be tested as the interface picture displayed by each device to be tested, and acquiring the interface picture displayed by each device to be tested.
In addition, in order to achieve the above object, the present invention further provides a testing apparatus for application software, including:
the acquisition module is used for establishing communication connection with each device to be tested and acquiring interface pictures displayed by each device to be tested, wherein each interface picture is generated based on the operation of application software in each device to be tested;
the dividing module is used for displaying each interface picture and dividing each device to be tested into a main control device and a group control device according to a main control selection instruction when the main control selection instruction sent based on each interface picture is received;
and the issuing module is used for issuing the operation instruction to each device to be tested when receiving the operation instruction sent by the interface picture based on the main control device so as to test the application software in each device to be tested.
In addition, in order to achieve the above object, the present invention further provides a testing apparatus for application software, including: a memory, a processor, a communication bus, and a test program of application software stored on the memory;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the test program of the application software to realize the following steps:
establishing communication connection with each device to be tested, and acquiring interface pictures displayed by each device to be tested, wherein each interface picture is generated based on the operation of application software in each device to be tested;
displaying each interface picture, and dividing each device to be tested into a main control device and a group control device according to a main control selection instruction when the main control selection instruction sent based on each interface picture is received;
and when an operation instruction sent based on the interface picture of the main control equipment is received, the operation instruction is issued to each device to be tested so as to test the application software in each device to be tested.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors for:
establishing communication connection with each device to be tested, and acquiring interface pictures displayed by each device to be tested, wherein each interface picture is generated based on the operation of application software in each device to be tested;
displaying each interface picture, and dividing each device to be tested into a main control device and a group control device according to a main control selection instruction when the main control selection instruction sent based on each interface picture is received;
and when an operation instruction sent based on the interface picture of the main control equipment is received, the operation instruction is issued to each device to be tested so as to test the application software in each device to be tested.
In the method for testing the application software, after the communication connection with each device to be tested is established, the interface picture generated by the application software running in each device to be tested is acquired and displayed, the main control selection instruction is sent according to each displayed interface picture, each device to be tested is divided into the main control device and the group control device, and the main control device is used for realizing the unified test of other group control devices; during testing, the operation instruction is triggered based on the interface picture of the main control device and is issued to each device to be tested, so that each device to be tested is tested, different operation instructions can be triggered to test different functions, development and maintenance of a test script are avoided, the test period is shortened, and the test efficiency is improved.
Drawings
FIG. 1 is a schematic flow chart of a first embodiment of a testing method of application software according to the present invention;
FIG. 2 is a functional block diagram of a first embodiment of the testing device for application software according to the present invention;
fig. 3 is a schematic device structure diagram of a hardware operating environment related to the method according to the embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a test method of application software.
Referring to fig. 1, fig. 1 is a flowchart illustrating a testing method of application software according to a first embodiment of the present invention. In this embodiment, the method for testing application software includes:
step S10, establishing communication connection with each device to be tested, and acquiring interface pictures displayed by each device to be tested, wherein each interface picture is generated based on the operation of application software in each device to be tested;
the testing method of the application software is applied to the control center of the testing platform and is suitable for testing equipment provided with certain application software to be tested at the same time through the control center; the device can be a mobile terminal such as a mobile phone and a tablet personal computer, and can also be a fixed terminal such as a desktop computer and an intelligent television, as long as the device can support the installation and the use of application software; the test platform is preferably a platform built on a PC (Personal Computer) side.
During testing, each device with application software to be tested is taken as a device to be tested, and each device to be tested is in communication connection with the PC end through a USB (Universal Serial Bus) interface. After the tester completes the connection between each device to be tested and the USB interface between the PC end, the control center initiates a connection detection instruction to each device to be tested so as to detect whether the communication connection between each device to be tested and the PC end is normal or not; and replying the detection instruction by each device to be tested, judging that the communication connection between each device to be tested and the PC terminal is normal after the reply of each device to be tested is received, and successfully establishing the communication connection with each device to be tested by the test platform. If any one piece of equipment to be tested does not reply to the detection instruction or the reply content is different from the preset reply content, judging that the communication connection between the equipment to be tested and the test platform is abnormal, and outputting prompt information aiming at the equipment to be tested to prompt a tester to check the connection of the USB interface between the equipment to be tested and the test platform until the communication connection between each piece of equipment to be tested and the PC terminal is normal.
In addition, the connection between the test platform and each device under test may also be set as a wireless network connection, which is not limited to this.
Further, after the communication connection with each device to be tested is successfully established, the test platform acquires the interface picture generated by the application software in each device to be tested. In order to test the same function of the application software on different terminals at the same time, a tester adjusts the display content of the application software in each device to be tested to be the same, so that the content displayed by the interface pictures acquired from each device to be tested is consistent. Specifically, the step of obtaining the interface picture displayed by each device to be tested includes:
step S11, sending an interface calling instruction to each device to be tested so that each device to be tested calls an interface to record a screen based on the interface calling instruction, obtaining a code stream video corresponding to each device to be tested, and decoding each code stream video to generate a code stream picture;
the test platform sends an Interface calling instruction to each device to be tested, and each device to be tested starts an Application Programming Interface (API) for screen recording after receiving the Interface calling instruction so as to record the content displayed in the display screen of the device to be tested, wherein the content of the screen recording has real-time performance, that is, the screen recording generates an Interface picture. Specifically, for the Android system, the mediaproject, the virtual surface and the ImageReader are called to record the screen, and the screen recording content is decoded. Firstly, recording screen operation is carried out on each device to be tested by mediaproject to obtain h264 hard coded code stream video, then soft decoding is carried out on the code stream video by ImageReader to obtain h64 code stream picture, and the soft decoded code stream picture is transmitted to a PC end through VirtualSurface. The code stream picture generated by encoding and decoding the real-time screen recording content has smaller data volume, is convenient for reducing time delay in the transmission process and prevents frame loss.
Step S12, determining the code stream picture corresponding to each device to be tested as the interface picture displayed by each device to be tested, and acquiring the interface picture displayed by each device to be tested.
Furthermore, the test platform receives the code stream picture uploaded by each device to be tested, and uses the code stream picture as an interface picture of each device to be tested, so that the test platform acquires the interface picture displayed in each device to be tested.
Step S20, displaying each interface picture, and dividing each device to be tested into a main control device and a group control device according to a main control selection instruction when the main control selection instruction sent based on each interface picture is received;
furthermore, the test platform arranges and displays the acquired interface pictures, and numbers the interface pictures according to different numbers in order to distinguish the interface pictures with the same content from the devices to be tested, wherein the devices to be tested corresponding to different numbers are different. Then, the tester selects an interface picture through a mouse or touch control and other modes, and sends the selection operation as a main control selection instruction to the control center; when receiving the selection instruction to be controlled, the control center determines the master control device in each device to be controlled according to the carried number, and uses the other devices except the master control device as group control devices, so as to realize the overall test of the group control devices through the master control devices.
Understandably, different devices to be tested have different resolutions, and the PC end also has the own resolution; in the process of displaying interface pictures from different devices to be tested, in order to avoid that each interface picture occupies a large space of a display interface of a PC (personal computer) end due to the resolution display of the device to be tested from which each interface picture is derived, each interface picture needs to be converted and displayed. Specifically, the step of displaying each interface picture includes:
step S21, calling a preset resolution, and respectively obtaining the equipment resolution of each equipment to be tested;
the test platform sends a resolution ratio obtaining request to each device to be tested, after each device to be tested receives the resolution ratio obtaining request, each API used for reading the resolution ratio is started, each resolution ratio is read, and the read resolution ratio is sent to the test platform. And the test platform receives the resolution sent by each device to be tested as the device resolution, and calls the API of the test platform to read the resolution of the test platform as the preset resolution.
Step S22, comparing preset resolution with the resolution of each device one by one to generate an adjusting coefficient corresponding to each interface picture;
further, after the resolution of each device and the preset resolution are obtained, the display resolution of the interface picture displayed on the test platform is adjusted according to the difference between the resolution of each device and the preset resolution, wherein the display resolution is substantially the device resolution of the device to be tested from which the interface picture comes. And comparing the preset resolution with the resolution of each device one by one to generate an adjusting coefficient for adjusting the display resolution of each interface picture. The comparison process is a process of respectively making a ratio by using a preset resolution and the resolution of each device, and the numerical value obtained by the ratio is the adjustment coefficient corresponding to each interface picture.
Step S23, adjusting the display resolution of each interface picture according to the adjustment coefficient corresponding to each interface picture, and displaying the adjusted interface pictures side by side.
Furthermore, the display resolution of each interface picture displayed on the test platform is adjusted through each adjusting coefficient, and the adjusting coefficient of each interface picture and the display resolution of each interface picture are multiplied. If the preset resolution of the PC end is k1, the device resolutions of the devices to be tested W1 and W2 are W1 and W2 respectively, that is, the display resolutions of the interface pictures P1 and P2 respectively corresponding to W1 and W2 are W1 and W2; the adjustment coefficients of P1 and P2 generated according to k1, w1 and w2 are (k1/w1) and (k1/w2), respectively, w1 of P1 is adjusted through (k1/w1), and w2 of P2 is adjusted through (k1/w2), so that the display of the interface picture on the test platform meets the requirement of resolution k1 required by the test platform. And displaying the adjusted interface pictures in a test platform in a side-by-side mode so as to test the application software according to the displayed interface pictures and check the test result.
It should be noted that the master control device and the group control device of this embodiment may perform a switching operation, that is, after a certain device to be tested is selected as the master control device and other devices are selected as the group control device, the master control device may be switched by performing a reselection operation on the interface picture. Specifically, when a reselection operation serving as a master switching instruction is received, a number carried in the master switching instruction is read as if switching is performed, and a device to be tested having the switching identifier in the group control device is used as the group control device to be switched. And then, switching the group control equipment to be switched and the original main control equipment, switching the group control equipment to be switched into new main control equipment, and switching the originally selected main control equipment into the group control equipment. Therefore, the content which temporarily appears in each device to be tested can be conveniently operated, for example, an advertisement popup window appears in a certain device to be tested of the group control device in the testing process, and the device to be tested is switched into the main control device to close the advertisement popup window therein, so that the influence on the testing is avoided.
Step S30, when receiving an operation instruction sent based on the interface picture of the main control device, sending the operation instruction to each device to be tested, so as to test the application software in each device to be tested.
Furthermore, the tester operates the interface picture corresponding to the master control device and displayed in the test platform to test each device to be tested. The method comprises the steps that a tester initiates an operation instruction based on an interface picture of the main control device, the control center issues the operation instruction to each device to be tested when receiving the operation instruction, and the function corresponding to the operation instruction in the application software of each device to be tested is tested through the operation instruction. Considering that all the interface pictures are displayed in the same preset resolution in the test platform, the displayed contents at all the positions in the section pictures are different after all the interface pictures are converted by different adjustment coefficients; the function targeted by the operation instruction sent through the interface picture of the main control device may not be the same as the function targeted by the operation instruction in the group control device. If the login function in the interface picture of the main control equipment displayed in the test platform is operated, the login function actually displayed by the main control equipment is operated, but the function corresponding to the operation of a certain device to be tested in the group control equipment is a password input function, so that the same function cannot be tested. In order to avoid the problem that functions of an operation behavior are different among different devices to be tested, when an operation instruction is issued to each device to be tested for testing, the corresponding function to be tested of the operation instruction in each device to be tested needs to be determined; specifically, the step of issuing the operation instruction to each device to be tested to test the application software in each device to be tested includes:
step S31, detecting the picture position of the operation instruction in the interface picture of the main control device, and determining the function to be tested corresponding to the picture position in each device to be tested according to each adjustment coefficient;
furthermore, the lower left corner or the upper left corner of each interface picture is used as the origin of coordinates of the plane coordinate system, and each pixel point in the interface picture falls into the plane coordinate system as a coordinate point. Detecting a coordinate point of an operation instruction in an interface picture of the main control equipment as a picture position of the operation instruction; and then, converting the coordinate point where the picture position is located according to the adjustment coefficient corresponding to each interface picture, and determining the function to be tested corresponding to the picture position in each device to be tested. If the adjustment coefficient corresponding to the interface picture of the device to be tested is 0.8, and the detected picture position is the coordinate point where (x, y) is located, determining the function corresponding to the position of (1.25x, 1.25y) in the picture actually displayed by the device to be tested as the function to be tested of the device to be tested.
Step S32, generating a trigger instruction corresponding to each function to be tested, and sending the trigger instruction to each device to be tested to test the function to be tested corresponding to the picture position in each device to be tested;
furthermore, a trigger instruction is generated for the function to be tested of each device to be tested, and the trigger instruction is issued to each device to be tested, so as to test the function to be tested of each device to be tested. Each device to be tested is connected to the PC end through respective socket long connection, a trigger instruction is initiated based on Andriod sdk jar driving, and the trigger instruction is transmitted to the main control device and the group control device through socket long connection so as to trigger the function to be tested of each device to be tested.
Step S33, receiving the test results fed back by each device to be tested, judging whether each test result has an abnormal result, and if yes, recording the device to be tested corresponding to the abnormal result;
and the to-be-tested function of each to-be-tested device responds to the trigger instruction, generates a corresponding test result and returns the test result to the test platform. The test platform is preset with a preset result representing that the test result is normal, after the test result returned by each device to be tested is received, the control center compares each received test result with the preset result respectively, and judges whether each test result is consistent with the preset result. If all the test results are consistent with the preset results, judging that the functions to be tested of all the devices to be tested are all normal; if some test results are inconsistent with the preset results in each test result, judging that the test results inconsistent with the preset results are abnormal results in each test result; and recording the equipment to be tested generating the abnormal result and the abnormal result so as to conveniently inquire the reason of the abnormality of the equipment to be tested subsequently.
Step S34, the abnormal result and the normal result in each of the test results are displayed separately.
Furthermore, the test platform displays various test results, and displays the normal result and the abnormal result in a distinguishing manner, so that the equipment to be tested with abnormal test and normal test can be conveniently checked. Meanwhile, screenshot storage is supported for each test result, so that the test results can be conveniently checked subsequently.
In the method for testing the application software, after the communication connection with each device to be tested is established, the interface picture generated by the application software running in each device to be tested is acquired and displayed, the main control selection instruction is sent according to each displayed interface picture, each device to be tested is divided into the main control device and the group control device, and the main control device is used for realizing the unified test of other group control devices; during testing, the operation instruction is triggered based on the interface picture of the main control device and is issued to each device to be tested, so that each device to be tested is tested, different operation instructions can be triggered to test different functions, development and maintenance of a test script are avoided, the test period is shortened, and the test efficiency is improved.
Further, based on the first embodiment of the testing method for application software of the present invention, a second real-time embodiment of the testing method for application software of the present invention is provided, and in the second embodiment, the step of issuing the operation instruction to each device under test to test the application software in each device under test includes:
step S40, calling a preset test flow packet, and determining the test position of the operation instruction in the preset test flow packet;
in order to improve the efficiency of testing multiple functions of application software, the present embodiment forms test instructions of the functions into a preset test flow packet in advance, where test flows are set for the functions in the test flow packet; e.g., test procedures for functions m1, m2, m3, m4 are m2-m3-m1-m 4. After receiving an operation instruction sent by an interface picture based on the main control device, calling a preset test flow packet, comparing the received operation instruction with a test instruction in the preset flow packet, determining a test instruction consistent with the operation instruction in the preset test flow packet, and determining a test position of the operation instruction in the preset flow packet according to the position of the consistent test instruction in the test flow. If the function corresponding to the received operation instruction is m3, the test position in the preset flow packet is determined as the second position in the test flow.
Step S50, determining a test flow according to the test position, and reading each test instruction one by one according to the arrangement sequence of each test instruction in the test flow;
further, after determining the test position of the operation command in the preset test flow packet, taking the test position as a starting point, determining a flow formed by other test commands located behind the operation command in the preset test flow packet as a test flow of each device under test, for example, for the operation command of the function m3, the test flow determined by the operation command is m3-m1-m 4. And reading the test instructions one by one according to the determined arrangement sequence of the test instructions in the test flow so as to execute the test instructions in sequence and test the application software functions corresponding to the test instructions one by one.
Step S60, determining the read test instruction as the operation instruction, and executing a step of issuing the operation instruction to each device under test to test the application software in each device under test.
Furthermore, the test instructions read in sequence are used as operation instructions sent based on the interface picture of the main control device and are sequentially issued to the devices to be tested, so that various functions of the application software in the devices to be tested are tested.
It should be noted that the test flow of each device under test may be formed in a configuration form, and a tester selects a test instruction for triggering other test functions in the preset test flow packet as a starting point from a test position of the operation instruction in the preset test flow packet, and configures the test instruction and the operation instruction together as a required test flow, thereby implementing a test on a part of functions.
In this embodiment, the preset test flow packet is set to automatically read and execute each test instruction with the operation instruction as a starting point, so that the triggering of each instruction by a tester is avoided, and each device to be tested automatically executes instruction test and responds at the same time, thereby improving the test efficiency.
Further, a third real-time example of the testing method of the application software of the present invention is provided based on the first embodiment of the testing method of the application software of the present invention, and in the third embodiment, the step of establishing a communication connection with each device under test includes:
step S70, calling a preset equipment list, and reading the equipment information of each equipment to be tested;
in this embodiment, the test platform supports displaying the device information and the status of each device under test. Specifically, an equipment list for displaying equipment information of each equipment to be tested is preset in the test platform; after establishing communication connection with each device to be tested, the control center sends a request for reading device information to each device to be tested, each device to be tested reads the device information of itself through the API interface of the device to be tested according to the request, and the read device information is returned to the test platform. The read device information is basic information of the device, including brand, signal, system version, resolution, and the like.
Step S80, adding the information of each device into the preset device list for display, and monitoring the online state of each device to be tested;
and further, after the equipment information of each equipment to be tested is read, adding each item of equipment information to a preset equipment list according to the column position of the information field in the preset equipment list for display. Meanwhile, a state column for displaying the online state of each device to be tested is also arranged in the preset device list, and the control center monitors the online state between each device to be tested and the test platform. When all the equipment to be tested and the PC terminal are in a connection state, displaying an online state in a state column of a preset equipment list; and when monitoring that a certain device to be tested is disconnected due to loose connection of the USB interface, switching the online state of the device to be tested in the preset device list into the disconnected state, and outputting prompt information so that a tester can detect in time and ensure normal connection of the devices to be tested.
In addition, the control attributes of the main control equipment and the group control equipment among the equipment to be tested can be displayed in the preset equipment list; specifically, the step of dividing each device to be tested into a master control device and a group control device according to the master control selection instruction includes:
step S90, reading the control attribute of each device under test, and updating the preset device list based on each control attribute.
After the devices to be tested are divided into the master control device and the group control device through the master control selection instruction, master control attribute identification is distributed for the master control device, and group control attribute identification is distributed for the group control device, so that the master control device and the group control device can be distinguished. And then, in order to display the control attribute of each device to be tested in the preset device list, reading the master control attribute identifier and the group control attribute identifier of each device to be tested as the control attribute, adding the read control attribute of each device to be tested into the preset device list, updating the device information which is displayed in advance in the preset device list, and representing the master control device and the group control device in each device to be tested.
In addition, aiming at the situation that the master control equipment is switched through the master control switching instruction, the control attribute of each equipment to be tested in the preset equipment list is updated according to the master control switching instruction; the control attribute of the group control equipment to be switched is changed from group control to main control, the control attribute of the original main control equipment is changed from main control to group control, and the main group condition of each equipment to be tested is reflected in time.
In this embodiment, the preset device list is set, the device information of each device to be tested is displayed, and the online state and the control attribute of each device to be tested are monitored in real time, so that on one hand, the information of each device to be tested is conveniently known on the whole, on the other hand, the test state of each device to be tested is favorably mastered, faults in the test process are timely known and eliminated, and the smooth and effective performance of the test is ensured.
In addition, referring to fig. 2, the present invention provides a testing apparatus for application software, in a first embodiment of the testing apparatus for application software of the present invention, the testing apparatus for application software includes:
the acquiring module 10 is configured to establish communication connection with each device to be tested, and acquire an interface picture displayed by each device to be tested, where each interface picture is generated based on operation of application software in each device to be tested;
the dividing module 20 is configured to display each interface picture, and when a master control selection instruction sent based on each interface picture is received, divide each device to be tested into a master control device and a group control device according to the master control selection instruction;
the issuing module 30 is configured to issue the operation instruction to each device to be tested when receiving the operation instruction sent based on the interface picture of the main control device, so as to test the application software in each device to be tested.
In the testing apparatus of application software of this embodiment, after establishing communication connection with each device to be tested, the obtaining module 10 obtains and displays an interface picture generated by the application software running in each device to be tested, so that the dividing module 20 sends a main control selection instruction according to each displayed interface picture, divides each device to be tested into a main control device and a group control device, and realizes unified testing of other group control devices through the main control device; during testing, the issuing module 30 triggers an operation instruction based on the interface picture of the main control device and issues the operation instruction to each device to be tested, so that each device to be tested is tested, different operation instructions are triggered for different functions to test, development and maintenance of a test script are avoided, the test period is shortened, and the test efficiency is improved.
Further, in another embodiment of the testing apparatus for application software of the present invention, the dividing module further includes:
the calling unit is used for calling a preset resolution ratio and respectively acquiring the equipment resolution ratio of each equipment to be tested;
the comparison unit is used for comparing preset resolution with the resolution of each device one by one to generate an adjustment coefficient corresponding to each interface picture;
and the adjusting unit is used for adjusting the display resolution of each interface picture according to the adjusting coefficient corresponding to each interface picture and displaying the adjusted interface pictures side by side.
Further, in another embodiment of the testing apparatus for application software of the present invention, the issuing module further includes:
the detection unit is used for detecting the picture position of the operation instruction in the interface picture of the main control equipment and determining the function to be detected corresponding to the picture position in each device to be detected according to each adjustment coefficient;
the generating unit is used for generating a trigger instruction corresponding to each function to be tested and sending the trigger instruction to each device to be tested so as to test the function to be tested corresponding to the picture position in each device to be tested;
the receiving unit is used for receiving the test results fed back by the devices to be tested, judging whether abnormal results exist in the test results, and recording the devices to be tested corresponding to the abnormal results if the abnormal results exist;
and the display unit is used for displaying the abnormal result and the normal result in each test result in a distinguishing manner.
Further, in another embodiment of the testing apparatus for application software of the present invention, the testing apparatus for application software further includes:
the determining module is used for calling a preset test flow packet and determining the test position of the operation instruction in the preset test flow packet;
the reading module is used for determining a test flow according to the test position and reading the test instructions one by one according to the arrangement sequence of the test instructions in the test flow;
and the execution module is used for determining the read test instruction as the operation instruction and executing the step of issuing the operation instruction to each device to be tested so as to test the application software in each device to be tested.
Further, in another embodiment of the testing apparatus for application software of the present invention, the testing apparatus for application software further includes:
the receiving module is used for determining to-be-switched group control equipment in each group control equipment according to a switching identifier in a master control switching instruction when the master control switching instruction is received;
and the switching module is used for switching between the group control equipment to be switched and the main control equipment.
Further, in another embodiment of the testing apparatus for application software of the present invention, the testing apparatus for application software further includes:
the calling module is used for calling a preset equipment list and reading the equipment information of each equipment to be tested;
the adding module is used for adding the information of each device into the preset device list for displaying and monitoring the online state of each device to be tested;
and the updating module is used for reading the control attributes of the devices to be tested and updating the preset device list based on the control attributes.
Further, in another embodiment of the testing apparatus for application software of the present invention, the obtaining module is further configured to:
sending an interface calling instruction to each device to be tested so that each device to be tested calls an interface to record a screen based on the interface calling instruction to obtain a code stream video corresponding to each device to be tested, and decoding each code stream video to generate a code stream picture;
and determining the code stream picture corresponding to each device to be tested as the interface picture displayed by each device to be tested, and acquiring the interface picture displayed by each device to be tested.
Each virtual function module of the testing apparatus for application software is stored in the memory 1005 of the testing device for application software shown in fig. 3, and when the processor 1001 executes the test program for application software, the functions of each module in the embodiment shown in fig. 2 are realized.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment related to the method according to the embodiment of the present invention.
The test device of the application software in the embodiment of the present invention may be a Personal Computer (PC), or may be a terminal device such as a smart phone, a tablet computer, an electronic book reader, or a portable computer.
As shown in fig. 3, the test apparatus of the application software may include: a processor 1001, such as a CPU (central processing Unit), a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a Random Access Memory (RAM) or a non-volatile memory (disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the testing device of the application software may further include a user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi (Wireless broadband) module, and the like. The user interface may comprise a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the test device configuration of the application software illustrated in fig. 3 does not constitute a limitation of the test device of the application software, and may include more or fewer components than illustrated, or some components in combination, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a kind of computer-readable storage medium, may include therein a test program of an operating system, a network communication module, and application software. An operating system is a program that manages and controls the test equipment hardware and software resources of application software, supports the running of test programs of application software, and other software and/or programs. The network communication module is used for realizing communication among components in the memory 1005 and communication with other hardware and software in the test equipment of the application software.
In the testing apparatus for application software shown in fig. 3, the processor 1001 is configured to execute the testing program for application software stored in the memory 1005, and implement the steps in each embodiment of the testing method for application software.
The invention provides a computer readable storage medium storing one or more programs, which are also executable by one or more processors for implementing the steps in the embodiments of the testing method of the application software.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. The method for testing the application software is characterized by comprising the following steps of:
establishing communication connection with each device to be tested, and acquiring interface pictures displayed by each device to be tested, wherein each interface picture is generated based on the operation of application software in each device to be tested;
displaying each interface picture, and dividing each device to be tested into a main control device and a group control device according to a main control selection instruction when the main control selection instruction sent based on each interface picture is received;
and when an operation instruction sent based on the interface picture of the main control equipment is received, the operation instruction is issued to each device to be tested so as to test the application software in each device to be tested.
2. The method for testing application software according to claim 1, wherein the step of displaying each interface picture comprises:
calling a preset resolution ratio, and respectively obtaining the equipment resolution ratio of each equipment to be tested;
comparing preset resolution with the resolution of each device one by one to generate an adjustment coefficient corresponding to each interface picture;
and adjusting the display resolution of each interface picture according to the adjustment coefficient corresponding to each interface picture, and displaying the adjusted interface pictures side by side.
3. The method for testing application software according to claim 2, wherein the step of issuing the operation instruction to each device under test to test the application software in each device under test comprises:
detecting the picture position of the operation instruction in the interface picture of the main control equipment, and determining the function to be tested corresponding to the picture position in each device to be tested according to each adjustment coefficient;
generating a trigger instruction corresponding to each function to be tested, and issuing the trigger instruction to each device to be tested so as to test the function to be tested corresponding to the picture position in each device to be tested;
receiving test results fed back by each device to be tested, judging whether abnormal results exist in each test result, and recording the device to be tested corresponding to the abnormal results if the abnormal results exist;
and distinguishing and displaying abnormal results and normal results in each test result.
4. The method for testing application software according to claim 1, wherein the step of issuing the operation instruction to each of the devices under test to test the application software in each of the devices under test comprises:
calling a preset test flow packet, and determining the test position of the operation instruction in the preset test flow packet;
determining a test flow according to the test position, and reading the test instructions one by one according to the arrangement sequence of the test instructions in the test flow;
and determining the read test instruction as the operation instruction, and executing the step of issuing the operation instruction to each device to be tested so as to test the application software in each device to be tested.
5. The method for testing application software according to any one of claims 1 to 4, wherein the method for testing application software further comprises the steps of:
when a master control switching instruction is received, determining to-be-switched group control equipment in each group control equipment according to a switching identifier in the master control switching instruction;
and switching between the group control equipment to be switched and the main control equipment.
6. The method for testing application software according to claim 5, wherein the step of establishing a communication connection with each device under test is followed by the steps of:
calling a preset equipment list, and reading equipment information of each equipment to be tested;
adding the information of each device into the preset device list for displaying, and monitoring the online state of each device to be tested;
the step of dividing each device to be tested into a master control device and a group control device according to the master control selection instruction comprises the following steps:
and reading the control attribute of each device to be tested, and updating the preset device list based on each control attribute.
7. The method for testing application software according to any one of claims 1 to 4, wherein the step of acquiring the interface picture displayed by each device under test includes:
sending an interface calling instruction to each device to be tested so that each device to be tested calls an interface to record a screen based on the interface calling instruction to obtain a code stream video corresponding to each device to be tested, and decoding each code stream video to generate a code stream picture;
and determining the code stream picture corresponding to each device to be tested as the interface picture displayed by each device to be tested, and acquiring the interface picture displayed by each device to be tested.
8. An apparatus for testing application software, the apparatus comprising:
the acquisition module is used for establishing communication connection with each device to be tested and acquiring interface pictures displayed by each device to be tested, wherein each interface picture is generated based on the operation of application software in each device to be tested;
the dividing module is used for displaying each interface picture and dividing each device to be tested into a main control device and a group control device according to a main control selection instruction when the main control selection instruction sent based on each interface picture is received;
and the issuing module is used for issuing the operation instruction to each device to be tested when receiving the operation instruction sent by the interface picture based on the main control device so as to test the application software in each device to be tested.
9. A test apparatus for application software, characterized in that the test apparatus for application software comprises: a memory, a processor, a communication bus, and a test program of application software stored on the memory;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the test program of the application software to realize the steps of the test method of the application software according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a test program of application software, which when executed by a processor implements the steps of the method of testing application software according to any one of claims 1-7.
CN201910970981.5A 2019-10-12 2019-10-12 Application software testing method, device, equipment and computer readable storage medium Pending CN110928766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910970981.5A CN110928766A (en) 2019-10-12 2019-10-12 Application software testing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910970981.5A CN110928766A (en) 2019-10-12 2019-10-12 Application software testing method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110928766A true CN110928766A (en) 2020-03-27

Family

ID=69848894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910970981.5A Pending CN110928766A (en) 2019-10-12 2019-10-12 Application software testing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110928766A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732559A (en) * 2020-12-30 2021-04-30 广东粤云工业互联网创新科技有限公司 Picture comparison method, automatic dial testing method and system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484273A (en) * 2014-12-19 2015-04-01 广州博冠信息科技有限公司 Test method for application program, device and system
CN106572139A (en) * 2015-10-13 2017-04-19 阿里巴巴集团控股有限公司 Multi-terminal control method and system, terminal, and server
CN109062779A (en) * 2018-06-07 2018-12-21 优视科技有限公司 Test control method, main control device, controlled device and test macro
CN109815120A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Test method, device, computer equipment and the storage medium of application
CN109960642A (en) * 2017-12-22 2019-07-02 百度在线网络技术(北京)有限公司 Automatic test approach and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484273A (en) * 2014-12-19 2015-04-01 广州博冠信息科技有限公司 Test method for application program, device and system
CN106572139A (en) * 2015-10-13 2017-04-19 阿里巴巴集团控股有限公司 Multi-terminal control method and system, terminal, and server
CN109960642A (en) * 2017-12-22 2019-07-02 百度在线网络技术(北京)有限公司 Automatic test approach and device
CN109062779A (en) * 2018-06-07 2018-12-21 优视科技有限公司 Test control method, main control device, controlled device and test macro
CN109815120A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Test method, device, computer equipment and the storage medium of application

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732559A (en) * 2020-12-30 2021-04-30 广东粤云工业互联网创新科技有限公司 Picture comparison method, automatic dial testing method and system and storage medium

Similar Documents

Publication Publication Date Title
CN111045952B (en) Software testing method, flow playback device, terminal equipment and readable storage medium
CN108717393B (en) Application program testing method and mobile terminal
KR101731293B1 (en) Mobile terminal test system and mobile terminal test method using the system
CN103596000B (en) Intelligent television multiple solutions handoff testing method and system
CN104424089A (en) Terminal testing method and device
CN107678948B (en) Test case generation method, terminal and storage medium
CN112637842B (en) Screen projection equipment connection method, system, equipment and storage medium
CN111782492A (en) Page first screen loading duration testing method and device, computer equipment and medium
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN103455403B (en) Method of testing and device
CN106126424A (en) A kind of visual automated testing method of script, device and mobile terminal
CN109558331B (en) Application program defect detection method, device, equipment and storage medium
CN110209557B (en) User operation recording and restoring method, device and equipment and readable storage medium
CN110674023B (en) Interface testing method and device
US20070118779A1 (en) Intelligent Test System and Related Method for Testing an Electronic Product
CN108717357B (en) Page display code conversion method, device, equipment and computer storage medium
CN110928766A (en) Application software testing method, device, equipment and computer readable storage medium
WO2024066479A1 (en) Device deployment method and apparatus, storage medium, and electronic device
CN109656826B (en) Application testing method, system, device and computer readable storage medium
CN113038050A (en) Split screen display control method and device, terminal equipment and storage medium
CN106302011B (en) Multi-terminal-based test method and terminal
CN103297516A (en) Multi-type providing method, multi-type providing system and multi-type providing device of applications
CN105681915A (en) Method and system of rapidly intercepting intelligent television playing contents
CN115190057A (en) Automatic testing method and device and electronic equipment
CN111651308B (en) Method and device for acquiring debugging data of DP-HDMI chip and intelligent 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