[go: up one dir, main page]

CN114064510A - Function testing method and device, electronic equipment and storage medium - Google Patents

Function testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114064510A
CN114064510A CN202111437732.3A CN202111437732A CN114064510A CN 114064510 A CN114064510 A CN 114064510A CN 202111437732 A CN202111437732 A CN 202111437732A CN 114064510 A CN114064510 A CN 114064510A
Authority
CN
China
Prior art keywords
script
target function
function
determining
database
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
CN202111437732.3A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111437732.3A priority Critical patent/CN114064510A/en
Publication of CN114064510A publication Critical patent/CN114064510A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

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 data analysis, and discloses a function testing method, a function testing device, electronic equipment and a storage medium, which are used for realizing automatic testing of target functions. In the embodiment of the application, element information and scripts related to the target function are obtained from a database according to the target function selected by a user; then embedding the element information and the script into a product test code corresponding to the target function, and running the product test code; if the product test code runs successfully, determining that the target function is normal; and if the product test code fails to run, determining that the target function is abnormal. In the application, the script and the element information are adopted to embed the product test code for running, so that the function test is realized, the inconvenience caused by adopting an external device to test the function is avoided, and the automatic test of the function is realized.

Description

Function testing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data analysis technologies, and in particular, to a method and an apparatus for functional testing, an electronic device, and a storage medium.
Background
With the development of the technology, the application of the automatic testing technology in the industry is more and more extensive, and in the process of processing the business by the bank, the business needs to be logged in by using a fingerprint or signed according to the business requirements; therefore, it is required to ensure that the function corresponding to the service is in a normal state before the service processing, and in the related art, a fingerprint instrument or a signature pen is often connected to a tablet to simulate one-time user operation to determine whether the function is normal, but an automatic test cannot be realized if a plurality of peripherals are connected.
Disclosure of Invention
The application aims to provide a function testing method, a function testing device, electronic equipment and a storage medium, which are used for realizing automatic testing of target functions.
In a first aspect, an embodiment of the present application provides a function testing method, including:
in response to the selection operation, determining a target function to be tested;
acquiring element information associated with the target function from a database; the element information is information associated with the target function; and are
Obtaining a script associated with the target function from a database, wherein the script is code for executing the target function based on the element information;
embedding the element information and the script into a product test code corresponding to the target function, and running the product test code;
if the product test code runs successfully, determining that the target function is normal; and if the product test code fails to run, determining that the target function is abnormal.
In the application, the script and the element information are adopted to embed the product test code for running, so that the function test is realized, the inconvenience caused by adopting an external device to test the function is avoided, and the automatic test of the function is realized.
In some possible embodiments, the method further comprises:
a polling monitoring target function;
and if the target function is detected to be updated, receiving the script associated with the target function, and replacing the script currently associated with the target function in the database with the script.
In the application, the script is synchronously updated after the target function is updated, so that the target function test error caused by the script error is avoided.
In some possible embodiments, the method further comprises:
aiming at any script in a database, if user operation aiming at the script is detected, updating the script according to the user operation; wherein the user operation comprises: modify, delete, supplement some or all of the description.
In the application, the user can modify and delete the script in the database, and the like, so that the application has higher universality.
In some possible embodiments, the method further comprises:
determining element information corresponding to any script;
determining a function corresponding to the script according to the element information, and naming the script by using the identifier of the function;
the obtaining the script associated with the target function from the database comprises:
determining an identity of the target function;
and searching the script named by the function identifier from a database according to the function identifier.
In the application, the efficiency of searching the scripts associated with the functions in the database is improved by naming the scripts by the function identifiers.
In some possible embodiments, after determining that the target function is abnormal if the product test code fails to run, the method further includes:
and recording the abnormal target function, and outputting and displaying.
In the application, a method for recording and displaying abnormal functions is adopted, so that technicians can modify the abnormal functions in time.
Second aspect the present application also provides a functional testing apparatus, the apparatus comprising:
the determining module is used for responding to the selection operation and determining the target function to be tested;
the acquisition module is used for acquiring element information associated with the target function from a database; the element information is information associated with the target function; and obtaining a script associated with the target function from a database, wherein the script is a code for executing the target function based on the element information;
the test module is used for embedding the element information and the script into a product test code corresponding to the target function and running the product test code;
the test module is further used for determining that the target function is normal if the product test code runs successfully; and if the product test code fails to run, determining that the target function is abnormal.
In some possible embodiments, the determining module is further configured to:
a polling monitoring target function;
and if the target function is detected to be updated, receiving the script associated with the target function, and replacing the script currently associated with the target function in the database with the script.
In some possible embodiments, the obtaining module is further configured to:
aiming at any script in a database, if user operation aiming at the script is detected, updating the script according to the user operation; wherein the user operation comprises: modify, delete, supplement some or all of the description.
In some possible embodiments, the obtaining module is further configured to:
determining element information corresponding to any script;
determining a function corresponding to the script according to the element information, and naming the script by using the identifier of the function;
the obtaining module, when executing the script associated with the target function from the database, is configured to:
determining an identity of the target function;
and searching the script named by the function identifier from a database according to the function identifier.
In some possible embodiments, after determining that the target function is abnormal if the product test code fails to run, the test module is further configured to:
and recording the abnormal target function, and outputting and displaying.
In a third aspect, another embodiment of the present application further provides an electronic device, including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the methods provided by the embodiments of the first aspect of the present application.
In a fourth aspect, another embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is configured to cause a computer to execute any one of the methods provided in the first aspect of the present application.
In a fifth aspect, another embodiment of the present application further provides a computer program product, which when run on a computer, causes the computer to execute any one of the methods provided in the first aspect of the present application.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1A is an application scenario diagram of a function testing method according to an embodiment of the present application;
fig. 1B is an application scenario diagram of a function testing method according to an embodiment of the present application;
fig. 2 is an overall flowchart of a function testing method according to an embodiment of the present application;
fig. 3A is a schematic diagram illustrating a function selection of a function testing method according to an embodiment of the present application;
fig. 3B is a flowchart of a script recorded in a function testing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of an exception prompt of a function testing method according to an embodiment of the present application;
fig. 5 is a schematic diagram of a device for a function testing method according to an embodiment of the present application;
fig. 6 is a schematic view of an electronic device according to a function testing method provided in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
It is noted that the terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The inventor researches and discovers that with the development of the technology, the application of the automatic testing technology in the industry is more and more extensive, and in the process of processing the business by the bank, the business needs to be logged in by a fingerprint or signed according to the business requirement; therefore, it is required to ensure that the function corresponding to the service is in a normal state before the service processing, and in the related art, a fingerprint instrument or a signature pen is often connected to a tablet to simulate one-time user operation to determine whether the function is normal, but an automatic test cannot be realized if a plurality of peripherals are connected.
In the related art, an external device needs to be connected to a terminal device during testing functions, for example: when a technician wants to test the fingerprint login function, the technician needs to externally connect a fingerprint instrument in the terminal equipment and then input the fingerprint until the login is successful; however, as the number of functions increases, the number of corresponding external devices increases, and therefore, connecting the external devices during testing the functions brings unnecessary trouble to the test.
In view of the above, the present application provides a method, an apparatus, an electronic device and a storage medium for functional testing, which are used to solve the above problems. The inventive concept of the present application can be summarized as follows: acquiring element information and scripts related to the target function from a database according to the target function selected by a user; then embedding the element information and the script into a product test code corresponding to the target function, and running the product test code; if the product test code runs successfully, determining that the target function is normal; and if the product test code fails to run, determining that the target function is abnormal.
For the convenience of understanding, a function testing method provided by the embodiment of the application is described in detail below with reference to the accompanying drawings.
Fig. 1A is a diagram illustrating an application scenario of the functional testing method in the embodiment of the present application. The figure includes: server 10, database 20, terminal device 30; wherein:
the server 10 determines a target function to be tested in response to a selection operation triggered by a user on the terminal device 30; then, acquiring element information associated with the target function from the database 20; the element information is information associated with the target function; and acquires a script associated with the target function from the database 20, wherein the script is a code for executing the target function based on the element information; embedding the element information and the script into a product test code corresponding to the target function, and running the product test code; if the product test code runs successfully, determining that the target function is normal; and if the product test code fails to run, determining that the target function is abnormal.
In another embodiment, a method for testing functions provided by the present application may be executed by a terminal device, that is, as shown in fig. 1B, the method includes: terminal device 10, database 20; wherein:
the terminal device 10 determines a target function to be tested in response to the selection operation, and then acquires element information associated with the target function from the database 20; and obtaining scripts associated with the target function from the database 20; embedding the element information and the script into a product test code corresponding to the target function, and running the product test code; if the product test code runs successfully, determining that the target function is normal; and if the product test code fails to run, determining that the target function is abnormal.
That is, the execution subject of the function testing method is not limited in the present application, and the user can select the execution subject according to the requirement.
Only a single server or terminal device is detailed in the description of the present application, but it should be understood by those skilled in the art that the terminal device 30, the server 10 and the database 20 are shown to be intended to represent the operations of the terminal device, the server and the data volume involved in the technical aspects of the present application. The individual servers and databases are described in detail for convenience of illustration at least and are not meant to imply limitations on the number, type, or location of end devices and servers. It should be noted that the underlying concepts of the example embodiments of the present application may not be altered if additional modules are added or removed from the illustrated environments.
It should be noted that the database in the embodiment of the present application may be, for example, a cache system, or may also be a hard disk storage, a memory storage, and the like. In addition, the function testing method provided by the application is not only suitable for the application scenarios shown in fig. 1A and fig. 1B, but also suitable for any device with function testing requirements.
For convenience of understanding, the overall flow of the function testing method proposed in the embodiment of the present application is described in detail below, as shown in fig. 2, wherein:
in step 201: in response to the selection operation, determining a target function to be tested;
in step 202: acquiring element information associated with a target function from a database; the element information is information associated with the target function;
in step 203: acquiring a script associated with the target function from a database, wherein the script is code for executing the target function based on the element information;
in step 204: embedding the element information and the script into a product test code corresponding to the target function, and running the product test code;
in step 205: if the product test code runs successfully, determining that the target function is normal; and if the product test code fails to run, determining that the target function is abnormal.
It should be understood that, when the function testing method provided by the present application is implemented, the execution sequence of step 202 and step 203 is not limited in the present application, and a user may set the execution sequence according to needs, that is, step 202 may be executed first and then step 203 may be executed, step 203 may be executed first and then step 202 may be executed, or step 202 and step 202 may be executed simultaneously.
The steps in fig. 2 are explained below:
in some embodiments, as shown in fig. 3A, when a technician needs to test a function, the technician may select a function to be tested in the function selection interface, and the server determines a target function according to a selection operation of the user. In particular implementations, functions include, but are not limited to: fingerprint entry, signature, face entry, etc.
In the present application, the element information and the script corresponding to each function are different according to the difference of the function, for example: the element information corresponding to the fingerprint login function is a user fingerprint, the element information corresponding to the face login information is a face image of the user, and the element information corresponding to the signature confirmation function is a user signature. In the application, in order to facilitate subsequent functional tests, before the functional tests, the element information of various functions is collected and stored in the database. To further improve the efficiency of the functional test, the element information may be named an identification of the function, for example: the collected fingerprints are named fingerprint login, the face images are named face login and the like, technicians can set the fingerprints according to requirements, and the method is not limited in the application.
In some embodiments, the script needs to be pre-recorded before testing the function. Wherein, every function corresponds a script, and the process of recording the script promptly: the tester carries out one-time full-flow operation under the equipment and data requirements meeting the production requirements and stores the operation into the database. In the application, when a function test is performed, scripts associated with functions need to be searched from a database, so that in order to improve the searching efficiency, for any script, element information corresponding to the script is determined, a function corresponding to the script is determined based on the element information, and the script is named by an identifier of the function. Thus, when the script associated with the target function can be obtained from the database, the following steps can be implemented: firstly, the identification of the function is determined, and then the script named by the function identification is searched in a database according to the identification. For example: and if the fingerprint login identifier is A, searching a script named A from the database by using the identifier A.
For ease of understanding, the following describes the process of recording the script in detail, as shown in fig. 3B, wherein:
in step 301: determining that a technician clicks a recording button to start recording;
in step 302: determining a function selected by a user;
in step 303: receiving element information from the external device;
in step 304: running a function selected by a user according to the element information;
in step 305: recording and storing the running condition;
in step 306: determining that a technician triggers an end button to end recording the script;
in step 307: the script is named as the identification corresponding to the function and is stored in a database.
The following examples illustrate: for example, if a user wants to record a script for logging in a fingerprint, a fingerprint instrument is firstly accessed to terminal equipment, then a technician clicks a recording button to start recording, the terminal equipment receives the fingerprint through the fingerprint instrument and logs in through the fingerprint until the login is successful, and the technician triggers an end button; the terminal device names the script as fingerprint entry and stores it in the database.
In some embodiments, the user may perform a custom naming on the script, and the user may further set a storage sequence of the script in the database according to a use habit of the user, which is not limited in this application.
In summary, the function testing method provided by the application only uses the external device once when the script is recorded, and the external device does not need to be accessed in the subsequent function testing, so that the inconvenience caused by adopting the external device to test the function is avoided.
In the present application, in order to ensure that a function testing method provided by the present application can normally operate, a polling detection target function is required, and if an update of the target function is detected, an updated script recorded by a technician needs to be received, and the script currently managed by the target function in a database is replaced with the updated script. For example: when the script corresponding to the current function A is A ', and the function A is detected to be updated to be A1, the script A1' corresponding to A1 is received, and A1 'in the database is replaced by A1'. It should be understood that the polling detection method is used to detect the target function in this application to save resources, and in the specific implementation, the technician may modify the detection in real time according to the requirement.
In the embodiment of the present application, in order to further make the present application more universal, a user may directly update a script, which is specifically implemented as: for any script in the database, if user operation aiming at the script is detected, updating the script according to the user operation; wherein the user operation comprises: modify, delete, supplement some or all of the description. The following describes modifications and deletions, respectively:
1. modifying
For example: aiming at the fingerprint login function, the script recording process corresponding to the initial fingerprint login function is as follows: firstly, a fingerprint instrument is accessed to terminal equipment, then a technician clicks a recording button to start recording, the terminal equipment receives a fingerprint through the fingerprint instrument and logs in through the fingerprint until the login is successful, and the technician triggers an end button; the terminal device names the script as fingerprint entry and stores it in the database. Technical personnel have now updated the fingerprint login function, and the fingerprint login function after the update not only need input the fingerprint still need input login personnel's name, and consequently, the script that initial fingerprint login function corresponds then no longer is suitable for, and the user need record the script again, and the process of recording the script after the update does: firstly, a fingerprint instrument is accessed to terminal equipment, then a technician clicks a recording button to start recording, the terminal equipment receives a fingerprint through the fingerprint instrument and receives a name input by the technician, login is carried out through the fingerprint and the name until login is successful, and the technician triggers an end button; the terminal device names the script as an updated fingerprint and logs in and stores the updated fingerprint in the database.
2. Deleting
For example: aiming at the fingerprint login function, the script recording process corresponding to the initial fingerprint login function is as follows: firstly, a fingerprint instrument is accessed to terminal equipment, then a technician clicks a recording button to start recording, the terminal equipment receives a fingerprint through the fingerprint instrument and logs in through the fingerprint until the login is successful, and the technician triggers an end button; the terminal device names the script as fingerprint entry and stores it in the database. At present, a technician wants to use a face login to replace a fingerprint login, and then queries a script corresponding to the fingerprint login from a database according to an identifier of the fingerprint login, deletes the script, and re-records the script of the face login, wherein the recording process of the script of the face login is as follows: firstly, a face detection device is connected to terminal equipment, then a technician clicks a recording button to start recording, the terminal equipment receives a face image through the face detection device and logs in through the face image until the login is successful, and the technician triggers an end button; the terminal device names the script as a face log-in and stores the face log-in a database. And finishing the deletion of the fingerprint login script and the recording of the face login script.
In order to further improve the efficiency of the functional test, in the concrete implementation, the scripts may be classified and managed, as shown in table 1, the scripts are classified into: fingerprints, signatures, faces, etc.; and then, the fingerprints are subdivided into: fingerprint login, fingerprint verification and other functions; the signature class is subdivided into: self-authentication, signature sign-on, etc.; the human face class is subdivided into: authentication, face login, etc.
It should be noted that, in the specific implementation, the classification of the categories is not limited in the present application, that is, the user can classify the large categories and refine the categories according to the needs.
Major class Refining class 1 Refining class 2
Fingerprints Fingerprint login Fingerprint verification
Signature classes Handwriting verification Signature sign-on
Human face class Identity verification Face check-in
TABLE 1
In some embodiments, in order to ensure that the technician can quickly know the abnormal function, as shown in fig. 4, an abnormal prompt is output when the abnormal function occurs in the detection, so as to remind the technician to modify the abnormal function as soon as possible. Certainly further, in order to enable the user to know that the function is abnormal more quickly and timely, when the function is abnormal, buzzing, vibration and other indications with reminding functions can be output while abnormal reminding is performed. In specific implementation, the user can set the type of the abnormal prompt according to the requirement, for example: it may be set that only the prompt box appears, or that a shock or the like accompanies the prompt box while appearing.
As shown in fig. 5, based on the same inventive concept, there is provided a function testing apparatus 500, including:
a determining module 5001 for determining a target function to be tested in response to the selecting operation;
an obtaining module 5002, configured to obtain element information associated with the target function from a database; the element information is information associated with the target function; and obtaining a script associated with the target function from a database, wherein the script is a code for executing the target function based on the element information;
a test module 5003, configured to embed the element information and the script in a product test code corresponding to the target function, and run the product test code;
the test module is further used for determining that the target function is normal if the product test code runs successfully; and if the product test code fails to run, determining that the target function is abnormal.
In some possible embodiments, the determining module is further configured to:
a polling monitoring target function;
and if the target function is detected to be updated, receiving the script associated with the target function, and replacing the script currently associated with the target function in the database with the script.
In some possible embodiments, the obtaining module is further configured to:
aiming at any script in a database, if user operation aiming at the script is detected, updating the script according to the user operation; wherein the user operation comprises: modify, delete, supplement some or all of the description.
In some possible embodiments, the obtaining module is further configured to:
determining element information corresponding to any script;
determining a function corresponding to the script according to the element information, and naming the script by using the identifier of the function;
the obtaining module, when executing the script associated with the target function from the database, is configured to:
determining an identity of the target function;
and searching the script named by the function identifier from a database according to the function identifier.
In some possible embodiments, after determining that the target function is abnormal if the product test code fails to run, the test module is further configured to:
and recording the abnormal target function, and outputting and displaying.
Having described the functional testing method and apparatus of the exemplary embodiments of the present application, an electronic device according to another exemplary embodiment of the present application is next described.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present application may include at least one processor, and at least one memory. Wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the functional testing method according to various exemplary embodiments of the present application described above in the present specification.
The electronic device 130 according to this embodiment of the present application is described below with reference to fig. 6. The electronic device 130 shown in fig. 6 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.
As shown in fig. 6, the electronic device 130 is represented in the form of a general electronic device. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur via input/output (I/O) interfaces 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, various aspects of a functional testing method provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of a functional testing method according to various exemplary embodiments of the present application described above in this specification when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
The program product for functional testing of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a 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.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a 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 for carrying out operations 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, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (13)

1. A method of functional testing, the method comprising:
in response to the selection operation, determining a target function to be tested;
acquiring element information associated with the target function from a database; the element information is information associated with the target function; and are
Obtaining a script associated with the target function from a database, wherein the script is code for executing the target function based on the element information;
embedding the element information and the script into a product test code corresponding to the target function, and running the product test code;
if the product test code runs successfully, determining that the target function is normal; and if the product test code fails to run, determining that the target function is abnormal.
2. The method of claim 1, further comprising:
a polling monitoring target function;
and if the target function is detected to be updated, receiving the script associated with the target function, and replacing the script currently associated with the target function in the database with the script.
3. The method of claim 1, further comprising:
aiming at any script in a database, if user operation aiming at the script is detected, updating the script according to the user operation; wherein the user operation comprises: modify, delete, supplement some or all of the description.
4. The method of claim 1, further comprising:
determining element information corresponding to any script;
determining a function corresponding to the script according to the element information, and naming the script by using the identifier of the function;
the obtaining the script associated with the target function from the database comprises:
determining an identity of the target function;
and searching the script named by the function identifier from a database according to the function identifier.
5. The method of claim 1, wherein after determining that the target function is abnormal if the product test code fails to run, the method further comprises:
and recording the abnormal target function, and outputting and displaying.
6. A functional testing apparatus, characterized in that the apparatus comprises:
the determining module is used for responding to the selection operation and determining the target function to be tested;
the acquisition module is used for acquiring element information associated with the target function from a database; the element information is information associated with the target function; and obtaining a script associated with the target function from a database, wherein the script is a code for executing the target function based on the element information;
the test module is used for embedding the element information and the script into a product test code corresponding to the target function and running the product test code;
the test module is further used for determining that the target function is normal if the product test code runs successfully; and if the product test code fails to run, determining that the target function is abnormal.
7. The apparatus of claim 6, wherein the determining module is further configured to:
a polling monitoring target function;
and if the target function is detected to be updated, receiving the script associated with the target function, and replacing the script currently associated with the target function in the database with the script.
8. The apparatus of claim 6, wherein the obtaining module is further configured to:
aiming at any script in a database, if user operation aiming at the script is detected, updating the script according to the user operation; wherein the user operation comprises: modify, delete, supplement some or all of the description.
9. The apparatus of claim 6, wherein the obtaining module is further configured to:
determining element information corresponding to any script;
determining a function corresponding to the script according to the element information, and naming the script by using the identifier of the function;
the obtaining module, when executing the script associated with the target function from the database, is configured to:
determining an identity of the target function;
and searching the script named by the function identifier from a database according to the function identifier.
10. The apparatus of claim 6, wherein the test module, after determining that the target function is abnormal if the product test code fails to run, is further configured to:
and recording the abnormal target function, and outputting and displaying.
11. An electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A computer storage medium, characterized in that the computer storage medium stores a computer program for causing a computer to execute the method of any one of claims 1-5.
13. A computer program product, characterized in that, when the computer program is run on a computer, it causes the computer to perform the method according to any of claims 1-5.
CN202111437732.3A 2021-11-30 2021-11-30 Function testing method and device, electronic equipment and storage medium Pending CN114064510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111437732.3A CN114064510A (en) 2021-11-30 2021-11-30 Function testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111437732.3A CN114064510A (en) 2021-11-30 2021-11-30 Function testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114064510A true CN114064510A (en) 2022-02-18

Family

ID=80277140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111437732.3A Pending CN114064510A (en) 2021-11-30 2021-11-30 Function testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114064510A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115757172A (en) * 2022-11-30 2023-03-07 广州品唯软件有限公司 Test execution method and device, storage medium and computer equipment
CN116048961A (en) * 2022-12-13 2023-05-02 地平线征程(杭州)人工智能科技有限公司 Processing method, device, equipment and medium for accessing camera module into application system
CN116860630A (en) * 2023-07-05 2023-10-10 珠海视熙科技有限公司 Equipment testing method and device, storage medium and computer equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115757172A (en) * 2022-11-30 2023-03-07 广州品唯软件有限公司 Test execution method and device, storage medium and computer equipment
CN116048961A (en) * 2022-12-13 2023-05-02 地平线征程(杭州)人工智能科技有限公司 Processing method, device, equipment and medium for accessing camera module into application system
CN116860630A (en) * 2023-07-05 2023-10-10 珠海视熙科技有限公司 Equipment testing method and device, storage medium and computer equipment

Similar Documents

Publication Publication Date Title
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
CN108984389B (en) Application program testing method and terminal equipment
US8151248B1 (en) Method and system for software defect management
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
CN108959059B (en) Test method and test platform
CN112035354B (en) Positioning method, device and equipment of risk codes and storage medium
CN112650688B (en) Automated regression testing method, associated device and computer program product
CN114077525A (en) Abnormal log processing method and device, terminal equipment, cloud server and system
CN110058998B (en) Software testing method and device
US8489941B2 (en) Automatic documentation of ticket execution
CN113014445B (en) Operation and maintenance method, device and platform for server and electronic equipment
CN107003931B (en) Decoupling test validation from test execution
CN106980572B (en) Online debugging method and system for distributed system
CN113934758A (en) Vehicle fault repair method, device, vehicle terminal, server and storage medium
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN113220597A (en) Test method, test device, electronic apparatus, and storage medium
EP2113874A1 (en) Method and system for monitoring computer-implemented processes
CA3144122A1 (en) Data verifying method, device and system
CN111654495B (en) Method, apparatus, device and storage medium for determining traffic generation source
US11537503B2 (en) Code editor for user interface component testing
CN113656314B (en) Pressure test processing method and device
CN115346686A (en) Relation map generation method and device, storage medium and electronic equipment
CN112084114B (en) Method and apparatus for testing interfaces
CN114064504A (en) Detection method, device, medium and computing equipment for full link pressure measurement data isolation

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