CN113656286A - Software testing method and device, electronic equipment and readable storage medium - Google Patents

Software testing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113656286A
CN113656286A CN202110852935.2A CN202110852935A CN113656286A CN 113656286 A CN113656286 A CN 113656286A CN 202110852935 A CN202110852935 A CN 202110852935A CN 113656286 A CN113656286 A CN 113656286A
Authority
CN
China
Prior art keywords
target
coordinate information
target element
software
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110852935.2A
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.)
Xiamen Yaji Software Co Ltd
Original Assignee
Xiamen Yaji Software 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 Xiamen Yaji Software Co Ltd filed Critical Xiamen Yaji Software Co Ltd
Priority to CN202110852935.2A priority Critical patent/CN113656286A/en
Publication of CN113656286A publication Critical patent/CN113656286A/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
    • 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/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of software testing, and discloses a software testing method, a device, electronic equipment and a readable storage medium, wherein the software testing method comprises the following steps: sending a test request aiming at a target element of the software to be tested to the software to be tested; receiving target coordinate information of a target element returned by software to be tested; the target coordinate information comprises a real-time coordinate position of a target element on the current equipment, which is monitored by the software to be tested; and receiving a test operation aiming at the target element based on the target coordinate information, and determining a test result aiming at the target element. The software testing method provided by the application can improve the accuracy of the testing result and reduce the maintenance cost of the software testing.

Description

Software testing method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of software testing technologies, and in particular, to a software testing method and apparatus, an electronic device, and a readable storage medium.
Background
In the software development process, software is usually required to be tested, for example, game products are required to be tested before being online. The software includes multiple elements, that is, different functional elements constituting the software, for example, login elements, and in the process of testing each element of the software, the element needs to be located first and then tested.
At present, when elements of software are tested, fixed coordinate axes are adopted to position the elements, once a terminal device for testing the software is changed, the size of a screen for displaying the software is possibly changed, after the software is adaptive to the size of the screen and displayed, the coordinates of the elements are possibly changed, the elements are difficult to be accurately positioned, and therefore the test result is inaccurate, and the test maintenance cost is high.
Disclosure of Invention
The purpose of this application aims at treating the data of treating to detect to the developer finds the root cause of problem according to treating the data of detecting fast, specially proposes following technical scheme:
in a first aspect, a software testing method is provided, which is applied to a testing terminal, and includes:
sending a test request aiming at a target element of the software to be tested to the software to be tested;
receiving target coordinate information of a target element returned by software to be tested;
the target coordinate information comprises a real-time coordinate position of a target element on the current equipment, which is monitored by the software to be tested;
and receiving a test operation aiming at the target element based on the target coordinate information, and determining a test result aiming at the target element.
In an optional embodiment of the first aspect, before receiving the test operation for the target element based on the target coordinate information, the method further comprises:
acquiring a real-time element name of the target element based on the target coordinate information;
receiving a test operation for the target element based on the target coordinate information, including:
if the real-time element name matches the standard element name of the target element, a test operation for the target element is received based on the target coordinate information.
In an optional embodiment of the first aspect, receiving a test operation for the target element based on the target coordinate information, and determining a test result for the target element comprises:
receiving a test operation aiming at the target element based on the target coordinate information to obtain a test image of the target element;
the test result is determined based on the test image and the standard image of the target element.
In an alternative embodiment of the first aspect, determining the test result based on the test image and the standard image of the target element comprises:
determining the similarity between the test image and the standard image;
if the similarity is greater than or equal to the preset threshold, the test result of the target element is normal;
and if the similarity is smaller than the preset threshold, the test result is abnormal.
In a second aspect, a software testing method is provided, which is applied to software to be tested, and includes:
receiving a test request for a target element;
determining target coordinate information of the target element in response to the test request;
the target coordinate information comprises real-time coordinate positions of the monitored target elements on the current equipment;
and returning the target coordinate information to the test terminal so that the test terminal determines a test result aiming at the target element based on the target coordinate information.
In an optional embodiment of the second aspect, before determining the target coordinate information of the target element, the method further comprises:
monitoring coordinate information of at least one element on software to be tested; the coordinate information includes a real-time coordinate position of the element on the current device;
determining target coordinate information for a target element, comprising:
and determining target coordinate information from the coordinate information.
In a third aspect, a software testing apparatus is provided, including:
the sending module is used for sending a test request aiming at a target element of the software to be tested to the software to be tested;
the first receiving module is used for receiving target coordinate information of a target element returned by the software to be tested;
the target coordinate information comprises a real-time coordinate position of a target element on the current equipment, which is monitored by the software to be tested;
and the first determination module is used for receiving the test operation aiming at the target element based on the target coordinate information and determining the test result aiming at the target element.
In an optional embodiment of the third aspect, the apparatus further comprises an obtaining module, configured to:
acquiring a real-time element name of the target element based on the target coordinate information;
the first determining module, when receiving a test operation for a target element based on the target coordinate information, is specifically configured to:
if the real-time element name matches the standard element name of the target element, a test operation for the target element is received based on the target coordinate information.
In an optional embodiment of the third aspect, when receiving, based on the target coordinate information, a test operation for the target element and determining a test result for the target element, the first determining module is specifically configured to:
receiving a test operation aiming at the target element based on the target coordinate information to obtain a test image of the target element;
the test result is determined based on the test image and the standard image of the target element.
In an optional embodiment of the third aspect, the first determining module, when determining the test result based on the test image and the standard image of the target element, is specifically configured to:
determining the similarity between the test image and the standard image;
if the similarity is greater than or equal to the preset threshold, the test result of the target element is normal;
and if the similarity is smaller than the preset threshold, the test result is abnormal.
In a fourth aspect, a software testing apparatus is provided, including:
the second receiving module is used for receiving a test request aiming at the target element;
the second determining module is used for responding to the test request and determining the target coordinate information of the target element;
the target coordinate information comprises real-time coordinate positions of the monitored target elements on the current equipment;
and the third determining module is used for returning the target coordinate information to the test terminal so that the test terminal determines the test result aiming at the target element based on the target coordinate information.
In an optional embodiment of the fourth aspect, the apparatus further comprises a listening module configured to:
monitoring coordinate information of at least one element on software to be tested; the coordinate information includes a real-time coordinate position of the element on the current device;
the second determining module, when determining the target coordinate information of the target element, is specifically configured to:
and determining target coordinate information from the coordinate information.
In a fifth aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the software testing method shown in the first aspect of the present application is implemented.
In a sixth aspect, an electronic device is provided, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the software testing method of the second aspect of the present application.
In a seventh aspect, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the software testing method shown in the first aspect of the present application.
In an eighth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the software testing method shown in the second aspect of the present application.
The beneficial effect that technical scheme that this application provided brought is:
the software to be tested monitors real-time coordinate information of the target element on the current equipment, and the test terminal receives test operation aiming at the target element, so that the test result aiming at the target element is determined, and even if the terminal equipment displaying the software to be tested is replaced, the test terminal can also accurately position the target element, so that the accuracy of the test result is improved, and the maintenance cost of software test is reduced.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is an application scenario diagram of a software testing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a software testing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a software testing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a scheme for determining test results provided by an embodiment of the present application;
fig. 5 is a schematic flowchart of a software testing method according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of a software testing method according to an exemplary embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a software testing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a software testing apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device for software testing according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The existing software, for example, game software, includes a plurality of modules, which need to be tested and then brought online, and there are two ways in the process of testing the elements of each module:
the first method comprises the following steps: the elements are positioned through the element names and then tested, and if the elements cannot be positioned, the elements cannot be tested normally;
and the second method comprises the following steps: the fixed coordinate axes are adopted to position the elements, however, once the terminal equipment for testing the software is changed, the size of a terminal screen displaying the software may change, and after the software adapts to the size of the screen and is displayed, the coordinates of the elements may change, so that the elements are difficult to be accurately positioned, and therefore, the test result is inaccurate, and the test maintenance cost is high.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The software testing method provided by the embodiment of the application can be applied to the scene shown in fig. 1. Specifically, the test terminal 101 sends a test request for a target element of the software to be tested 102 to the software to be tested 102; the test terminal 101 receives target coordinate information of a target element returned by the software to be tested; the target coordinate information includes a real-time coordinate position of a target element on the current device 20, which is monitored by the software to be tested; the test terminal 101 receives a test operation for the target element based on the target coordinate information, and determines a test result for the target element.
The application scenario described above is only an example, and is not limited to the application scenario of the software testing method of the present application.
The software testing method provided by the embodiment of the application can be applied to a testing terminal, and software to be tested can also be arranged in the testing terminal, namely the current equipment and the testing terminal can be the same equipment; the software to be tested may also be disposed in other terminals, which are not limited herein.
As will be understood by those skilled in the art, the "terminal" used herein may be a Mobile phone, a tablet computer, a PDA (Personal Digital Assistant), an MID (Mobile Internet Device), a vehicle-mounted Device, a wearable Device, etc.
A possible implementation manner is provided in the embodiment of the present application, and as shown in fig. 2, a software testing method is provided, which may include the following steps:
step S201, sending a test request for a target element of the software to be tested to the software to be tested.
Wherein the software to be tested may comprise a plurality of elements, which may correspond to different functions of the software to be tested.
In particular, the form of the element may not be limited, and may be a key form, a control form, a graphic form, a number form, and the like.
Specifically, one element may correspond to one function of the software to be tested, one element may also correspond to a plurality of functions of the software to be tested, and one function of the software to be tested may also correspond to a plurality of elements.
For example, if the software to be tested is chat software, the element may be a login function of the chat software, such as a form of a login control, or an interface setting function, such as an interface setting button, and the like.
In the specific implementation process, if the test terminal needs to test the target element, the test terminal sends a test request of the target element to the software to be tested.
Step S202, receiving target coordinate information of the target element returned by the software to be tested.
The target coordinate information comprises a real-time coordinate position of a target element on the current equipment, which is monitored by the software to be tested.
The target element can be displayed on a user display interface of the software to be tested and corresponds to one or more functions of the software to be tested, so that a user can conveniently use the functions corresponding to the software to be tested by operating the target element. When the target element is displayed on the user display interface of the software to be tested, the software to be tested can obtain the real-time coordinate position of the target element on the display screen of the current device based on the determined position of the target element in the user display interface.
Further, the target coordinate information may be changed as the current device running the software to be tested is changed.
When the current equipment running the software to be tested is changed, displaying that the screen size of the software to be tested is possibly changed, and when the software to be tested is adaptive to the screen size of the new terminal and displays a user interface, if the real-time coordinate position of the target element is changed, changing the target coordinate information.
For example, if the software to be tested is changed from device a to device B for display, the real-time coordinate position of the target element may change with the change of the device.
In some embodiments, the software to be tested may monitor all elements of the software to be tested before receiving the test request, to obtain the coordinate information of each element, and if a test request of a certain target element is received, return the target coordinate information of the target element.
In other embodiments, when the software to be tested detects that the displayed device is changed, all elements of the software to be tested are monitored to obtain the coordinate information of each element, and if a test request of a certain target element is received, the target coordinate information of the target element is returned.
In still other embodiments, the target coordinate information of the target element may be monitored when the software to be tested receives the test request of the target element.
Step S203, inputting a test operation for the target element based on the target coordinate information, and determining a test result for the target element.
The test operation may include clicking, adding, deleting, inputting, and the like.
In a specific implementation process, the test terminal can determine the current position of the target element according to the target coordinate information, and then input a test operation at the current position by a user, so as to determine the test result of the target element.
In the embodiment, the software to be tested monitors the real-time coordinate information of the target element on the current device, and the test terminal receives the test operation of the user for the target element, so that the test result for the target element is determined, and even if the terminal device displaying the software to be tested is replaced, the test terminal can accurately position the target element, so that the accuracy of the test result is improved, and the maintenance cost of the software test is reduced.
In some embodiments, the element name of the target element may be checked before testing the target element based on the received test operation.
A possible implementation manner is provided in the embodiment of the present application, before receiving the test operation for the target element based on the target coordinate information in step S203, the method may further include:
and acquiring the real-time element name of the target element based on the target coordinate information.
Step S203 receives a test operation for the target element based on the target coordinate information, which may include:
if the real-time element name matches the standard element name of the target element, a test operation for the target element is received based on the target coordinate information.
Specifically, the real-time element name located at the position corresponding to the target coordinate information is obtained, then the real-time element name is matched with the standard element name of the target element, whether the target element located at the position corresponding to the target coordinate information is the target element to be tested or not is judged, if the real-time element name is matched with the standard element name of the target element, the target element located at the position corresponding to the target coordinate information is judged to be the target element to be tested, and then the test operation aiming at the target element is received.
In the specific implementation process, if the test is performed on the plurality of target elements, the real-time element names and the standard element names of the plurality of target elements may be respectively matched one by one, and if the real-time element names and the standard element names are matched, the test result of each target element is further determined.
The process of determining the test result of the target element according to the test operation will be described in further detail below.
As shown in fig. 3, step S203 receives a test operation for a target element based on target coordinate information, and determines a test result for the target element, where the possible implementation manner includes:
step S2031, receiving a test operation for the target element based on the target coordinate information, and obtaining a test image of the target element.
Wherein, the test operation may include at least one of clicking, adding, deleting, inputting, and the like; the test image may be an interface image to which the test operation is jumped after being received.
For example, the target element is a login button, and if a click operation is input for the login button, the user jumps to a login interface, and the login interface is the test image of the target element.
Step S2032, determining a test result based on the test image and the standard image of the target element.
The standard image is an image which is preset by a target element and is supposed to be presented under the condition of normal test.
In a specific implementation process, the step S2032 of determining a test result based on the test image and the standard image of the target element may include:
(1) determining the similarity between the test image and the standard image;
(2) if the similarity is greater than or equal to the preset threshold, the test result of the target element is normal;
(3) and if the similarity is smaller than the preset threshold, the test result is abnormal.
As shown in fig. 4, a click operation is input for the target element 400 to obtain a test image 401 of the target element 400, and the test image 401 is matched with a standard image 402 preset for the target element, so as to determine a test result of the target element 400.
Specifically, the test terminal may extract a first image feature of the test image, extract a second image feature of the standard image, determine a similarity between the test image and the standard image based on the first image feature and the second image feature, determine that the test image and the standard image are matched if the similarity is greater than or equal to a preset threshold, and determine that the test result is normal if the interface image obtained in real time meets the standard image that should be presented.
The above embodiments illustrate the software testing method of the present application from the perspective of a testing terminal, and the following description illustrates the software testing method of the present application from the perspective of software to be tested.
A possible implementation manner is provided in the embodiment of the present application, and as shown in fig. 5, a software testing method is provided, which is applied to software to be tested, and may include:
in step S501, a test request for a target element is received.
Wherein the software to be tested may comprise a plurality of elements, which may correspond to different functions of the software to be tested.
In particular, the form of the element may not be limited, and may be a key form, a control form, a graphic form, a number form, and the like.
Specifically, one element may correspond to one function of the software to be tested, one element may also correspond to a plurality of functions of the software to be tested, and one function of the software to be tested may also correspond to a plurality of elements.
For example, if the software to be tested is chat software, the element may be a login function of the chat software, such as a form of a login control, or an interface setting function, such as an interface setting button, and the like.
In the specific implementation process, if the test terminal needs to test the target element, the software to be tested receives a test request sent by the test terminal.
Step S502, in response to the test request, determines target coordinate information of the target element.
Wherein the target coordinate information comprises real-time coordinate positions of the monitored target elements on the current device.
Specifically, the target coordinate information is changed along with the current device where the software to be tested is located.
In some embodiments, the software to be tested may monitor all elements of the software to be tested before receiving the test request, to obtain the coordinate information of each element, and if a test request of a certain target element is received, return the target coordinate information of the target element.
Specifically, before determining the target coordinate information of the target element in response to the test request in step S502, the method may further include:
monitoring coordinate information of at least one element on software to be tested; the coordinate information includes a real-time coordinate position of the element on the current device.
Step S502 determines target coordinate information of the target element, which may include:
and determining target coordinate information from the coordinate information.
In other embodiments, when the software to be tested detects that the displayed device is changed, all elements of the software to be tested are monitored to obtain the coordinate information of each element, and if a test request of a certain target element is received, the target coordinate information of the target element is returned.
In still other embodiments, the target coordinate information of the target element may be monitored when the software to be tested receives the test request of the target element.
Step S503, returning the target coordinate information to the test terminal, so that the test terminal determines the test result for the target element based on the target coordinate information.
Specifically, the test terminal may receive a test operation for the target element according to the target coordinate information, thereby determining a test result for the target element.
In a specific implementation process, the test terminal can determine the current position of the target element according to the target coordinate information, and then apply the received test operation to the target element through the current position to test the target element, so as to determine the test result of the target element.
The process of determining the test result based on the target coordinate information by the specific test terminal has been described in detail above, and is not repeated herein.
In order to clearly understand the software testing method of the present application, the software testing method of the present application will be further described with reference to examples.
In one example, as shown in fig. 6, the software testing method of the present application may include the following steps:
1) monitoring coordinate information of at least one element by software to be tested;
2) the testing terminal sends a testing request aiming at a target element of the software to be tested to the software to be tested;
3) the software to be tested determines target coordinate information from the coordinate information;
4) target coordinate information of the target element returned by the software to be tested is sent to the test terminal;
5) the test terminal obtains the real-time element name of the target element based on the target coordinate information;
6) the test terminal judges whether the real-time element name is matched with the standard element name of the target element;
7) if so, receiving test operation aiming at the target element based on the target coordinate information to obtain a test image of the target element;
8) and the test terminal determines a test result based on the test image and the standard image of the target element.
According to the software testing method, the software to be tested monitors the real-time coordinate information of the target element on the current equipment, and the testing terminal receives the testing operation aiming at the target element, so that the testing result aiming at the target element is determined, and even if the terminal equipment displaying the software to be tested is replaced, the testing terminal can accurately position the target element, so that the accuracy of the testing result is improved, and the maintenance cost of the software testing is reduced.
A possible implementation manner is provided in the embodiment of the present application, and as shown in fig. 7, a software testing apparatus 70 is provided, where the software testing apparatus 70 may include: a sending module 701, a first receiving module 702 and a first determining module 703, wherein,
a sending module 701, configured to send a test request for a target element of software to be tested to the software to be tested;
a first receiving module 702, configured to receive target coordinate information of a target element returned by software to be tested;
the target coordinate information comprises a real-time coordinate position of a target element on the current equipment, which is monitored by the software to be tested;
a first determining module 703, configured to receive a test operation for the target element based on the target coordinate information, and determine a test result for the target element.
The embodiment of the present application provides a possible implementation manner, further including an obtaining module, configured to:
acquiring a real-time element name of the target element based on the target coordinate information;
when receiving the test operation for the target element based on the target coordinate information, the first determining module 703 is specifically configured to:
if the real-time element name matches the standard element name of the target element, a test operation for the target element is received based on the target coordinate information.
In this embodiment, a possible implementation manner is provided, and when receiving a test operation for a target element based on target coordinate information and determining a test result for the target element, the first determining module 703 is specifically configured to:
receiving a test operation aiming at the target element based on the target coordinate information to obtain a test image of the target element;
the test result is determined based on the test image and the standard image of the target element.
In the embodiment of the present application, a possible implementation manner is provided, and when determining the test result based on the test image and the standard image of the target element, the first determining module 703 is specifically configured to:
determining the similarity between the test image and the standard image;
if the similarity is greater than or equal to the preset threshold, the test result of the target element is normal;
and if the similarity is smaller than the preset threshold, the test result is abnormal.
One possible implementation manner is provided in the embodiment of the present application, as shown in fig. 8, a software testing apparatus is provided, which includes a second receiving module 801, a second determining module 802, and a third determining module 803, wherein,
a second receiving module 801, configured to receive a test request for a target element;
a second determining module 802, configured to determine, in response to the test request, target coordinate information of the target element;
the target coordinate information comprises real-time coordinate positions of the monitored target elements on the current equipment;
a third determining module 803, configured to return the target coordinate information to the test terminal, so that the test terminal determines a test result for the target element based on the target coordinate information.
The embodiment of the present application provides a possible implementation manner, further including a monitoring module, configured to:
monitoring coordinate information of at least one element on software to be tested; the coordinate information includes a real-time coordinate position of the element on the current device;
when determining the target coordinate information of the target element, the second determining module 802 is specifically configured to:
and determining target coordinate information from the coordinate information.
According to the software testing device, the software to be tested monitors the real-time coordinate information of the target element on the current equipment, and the testing terminal receives the testing operation aiming at the target element, so that the testing result aiming at the target element is determined, and even if the terminal equipment displaying the software to be tested is replaced, the testing terminal can also accurately position the target element, so that the accuracy of the testing result is improved, and the maintenance cost of the software testing is reduced.
The software testing apparatus for pictures according to the embodiments of the present application can execute the software testing method for pictures provided in the embodiments of the present application, and the implementation principle is similar, the actions executed by each module in the software testing apparatus for pictures according to the embodiments of the present application correspond to the steps in the software testing method for pictures according to the embodiments of the present application, and for the detailed functional description of each module in the software testing apparatus for pictures, reference may be specifically made to the description in the software testing method for corresponding pictures shown in the foregoing, and details are not repeated here.
Based on the same principle as the method shown in the embodiments of the present application, there is also provided in the embodiments of the present application an electronic device, which may include but is not limited to: a processor and a memory; a memory for storing computer operating instructions; and the processor is used for executing the software testing method shown in the embodiment by calling the computer operation instruction. Compared with the prior art, the software testing method can improve the accuracy of the testing result and reduce the maintenance cost of the software testing.
In an alternative embodiment, an electronic device is provided, as shown in fig. 9, the electronic device 4000 shown in fig. 9 comprising: a processor 4001 and a memory 4003. Processor 4001 is coupled to memory 4003, such as via bus 4002. Optionally, the electronic device 4000 may further comprise a transceiver 4004. In addition, the transceiver 4004 is not limited to one in practical applications, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The Processor 4001 may be a CPU (Central Processing Unit), a general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 4001 may also be a combination that performs a computational function, including, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 4002 may include a path that carries information between the aforementioned components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 4002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
The Memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
The memory 4003 is used for storing application codes for executing the scheme of the present application, and the execution is controlled by the processor 4001. Processor 4001 is configured to execute application code stored in memory 4003 to implement what is shown in the foregoing method embodiments.
Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
The embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by the processor 4001, the computer program may perform the corresponding content in the foregoing method embodiments. Compared with the prior art, the software testing method improves the accuracy of the testing result and reduces the maintenance cost of the software testing.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It should be noted that the computer readable medium disclosed in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present application, 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 this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled 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 embodiments.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device realizes the following when executed:
sending a test request aiming at a target element of the software to be tested to the software to be tested;
receiving target coordinate information of the target element returned by the software to be tested;
the target coordinate information comprises a real-time coordinate position of the target element on the current equipment, which is monitored by the software to be tested;
and receiving a test operation aiming at the target element based on the target coordinate information, and determining a test result aiming at the target element.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device realizes the following when executed:
receiving a test request for a target element;
determining target coordinate information of the target element in response to the test request;
wherein the target coordinate information comprises the real-time coordinate position of the monitored target element on the current device;
and returning the target coordinate information to a test terminal so that the test terminal determines a test result aiming at the target element based on the target coordinate information.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 application. 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 modules described in the embodiments of the present application may be implemented by software or hardware. Where the name of a module does not in some cases constitute a limitation of the module itself, for example, a sending module may also be described as a "module sending a test request".
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the disclosure. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A software testing method is characterized by being applied to a testing terminal and comprising the following steps:
sending a test request aiming at a target element of the software to be tested to the software to be tested;
receiving target coordinate information of the target element returned by the software to be tested;
the target coordinate information comprises a real-time coordinate position of the target element on the current equipment, which is monitored by the software to be tested;
and receiving a test operation aiming at the target element based on the target coordinate information, and determining a test result aiming at the target element.
2. The software testing method of claim 1, wherein before receiving the test operation for the target element based on the target coordinate information, further comprising:
acquiring a real-time element name of the target element based on the target coordinate information;
the receiving, based on the target coordinate information, a test operation for the target element includes:
and if the real-time element name is matched with the standard element name of the target element, receiving a test operation aiming at the target element based on the target coordinate information.
3. The software testing method of claim 1, wherein the receiving a test operation for the target element based on the target coordinate information and determining a test result for the target element comprises:
receiving a test operation aiming at the target element based on the target coordinate information to obtain a test image of the target element;
determining the test result based on the test image and the standard image of the target element.
4. The software testing method of claim 3, wherein said determining the test result based on the test image and the standard image of the target element comprises:
determining a similarity between the test image and the standard image;
if the similarity is larger than or equal to a preset threshold value, the test result of the target element is normal;
and if the similarity is smaller than the preset threshold, the test result is abnormal.
5. A software testing method is applied to software to be tested and comprises the following steps:
receiving a test request for a target element;
determining target coordinate information of the target element in response to the test request;
wherein the target coordinate information comprises the real-time coordinate position of the monitored target element on the current device;
and returning the target coordinate information to a test terminal so that the test terminal determines a test result aiming at the target element based on the target coordinate information.
6. The software testing method of claim 5, wherein prior to determining the target coordinate information of the target element, further comprising:
monitoring coordinate information of at least one element on the software to be tested; the coordinate information comprises a real-time coordinate position of the element on the current device;
the determining target coordinate information of the target element includes:
and determining the target coordinate information from the coordinate information.
7. A software testing apparatus, comprising:
the sending module is used for sending a test request aiming at a target element of the software to be tested to the software to be tested;
the first receiving module is used for receiving the target coordinate information of the target element returned by the software to be tested;
the target coordinate information comprises a real-time coordinate position of the target element on the current equipment, which is monitored by the software to be tested;
the first determination module is used for receiving the test operation aiming at the target element based on the target coordinate information and determining the test result aiming at the target element.
8. A software testing apparatus, comprising:
the second receiving module is used for receiving a test request aiming at the target element;
a second determining module, configured to determine, in response to the test request, target coordinate information of the target element;
wherein the target coordinate information comprises the real-time coordinate position of the monitored target element on the current device;
and the third determining module is used for returning the target coordinate information to the test terminal so that the test terminal determines a test result aiming at the target element based on the target coordinate information.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the software testing method of any one of claims 1 to 4 or 5 to 6 when executing the program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which program, when being executed by a processor, carries out the software testing method of any one of claims 1 to 4 or 5 to 6.
CN202110852935.2A 2021-07-27 2021-07-27 Software testing method and device, electronic equipment and readable storage medium Pending CN113656286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110852935.2A CN113656286A (en) 2021-07-27 2021-07-27 Software testing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110852935.2A CN113656286A (en) 2021-07-27 2021-07-27 Software testing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113656286A true CN113656286A (en) 2021-11-16

Family

ID=78478834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110852935.2A Pending CN113656286A (en) 2021-07-27 2021-07-27 Software testing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113656286A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721968A (en) * 2022-06-02 2022-07-08 龙旗电子(惠州)有限公司 Test method, test device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117358A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 test method and test device for electronic equipment
CN109901996A (en) * 2019-01-25 2019-06-18 北京三快在线科技有限公司 Method, apparatus, electronic equipment and the readable storage medium storing program for executing of subtest
CN110413529A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 Applied to the test method of electronic equipment, device, calculate equipment and medium
CN111274152A (en) * 2020-02-14 2020-06-12 厦门美图之家科技有限公司 Application program testing method, device, equipment and storage medium
WO2021135809A1 (en) * 2019-12-30 2021-07-08 北京金山云网络技术有限公司 Testing method, device, terminal apparatus, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117358A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 test method and test device for electronic equipment
CN109901996A (en) * 2019-01-25 2019-06-18 北京三快在线科技有限公司 Method, apparatus, electronic equipment and the readable storage medium storing program for executing of subtest
CN110413529A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 Applied to the test method of electronic equipment, device, calculate equipment and medium
WO2021135809A1 (en) * 2019-12-30 2021-07-08 北京金山云网络技术有限公司 Testing method, device, terminal apparatus, and storage medium
CN111274152A (en) * 2020-02-14 2020-06-12 厦门美图之家科技有限公司 Application program testing method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721968A (en) * 2022-06-02 2022-07-08 龙旗电子(惠州)有限公司 Test method, test device and storage medium

Similar Documents

Publication Publication Date Title
CN110321958B (en) Training method of neural network model and video similarity determination method
CN112650790B (en) Target point cloud plane determining method and device, electronic equipment and storage medium
CN111198859B (en) Data processing method, device, electronic equipment and computer readable storage medium
JP7467644B2 (en) Message processing method, device and electronic device
CN111459364B (en) Icon updating method and device and electronic equipment
CN109547335B (en) Session message processing method and device
CN110673986A (en) Memory operation abnormity capturing method, device, terminal and storage medium
CN110188782B (en) Image similarity determining method and device, electronic equipment and readable storage medium
CN113641873B (en) Data processing method and device, electronic equipment and readable storage medium
CN112291121B (en) Data processing method and related equipment
CN113656286A (en) Software testing method and device, electronic equipment and readable storage medium
CN111552620B (en) Data acquisition method, device, terminal and storage medium
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN110674050B (en) Memory out-of-range detection method and device, electronic equipment and computer storage medium
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN110020264B (en) Method and device for determining invalid hyperlinks
CN112379967B (en) Simulator detection method, device, equipment and medium
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN111680754B (en) Image classification method, device, electronic equipment and computer readable storage medium
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN114359673B (en) Small sample smoke detection method, device and equipment based on metric learning
CN117824974B (en) Switch drop test method, device, electronic equipment and computer readable medium
CN112084440B (en) Data verification method, device, electronic equipment and computer readable medium
CN116303050A (en) Test method and device
CN118331718A (en) Data analysis method, device, readable medium and electronic equipment

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