CN116149983A - Script testing method, device, equipment and storage medium - Google Patents
Script testing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN116149983A CN116149983A CN202211442108.7A CN202211442108A CN116149983A CN 116149983 A CN116149983 A CN 116149983A CN 202211442108 A CN202211442108 A CN 202211442108A CN 116149983 A CN116149983 A CN 116149983A
- Authority
- CN
- China
- Prior art keywords
- data
- test
- execution end
- target
- identifier
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 405
- 238000013515 script Methods 0.000 title claims abstract description 142
- 230000003993 interaction Effects 0.000 claims abstract description 91
- 238000000034 method Methods 0.000 claims abstract description 54
- 230000002452 interceptive effect Effects 0.000 claims abstract description 43
- 238000010998 test method Methods 0.000 claims abstract description 40
- 238000012544 monitoring process Methods 0.000 claims abstract description 21
- 230000004044 response Effects 0.000 claims description 6
- 238000012956 testing procedure Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 14
- 238000004590 computer program Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000000977 initiatory effect Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000013100 final test Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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 provides a script test method, a script test device, script test equipment and a script test storage medium, and relates to the technical field of program test. Comprising the following steps: continuously monitoring the data quantity of data to be operated in a database; if the data volume is increased, reading newly-increased data to be operated, wherein the newly-increased data to be operated comprises an execution end classification identifier and an interaction flow identifier; determining a target execution end according to the execution end classification identifier; determining a corresponding target script to be tested according to the interaction flow identification; the method comprises the steps of sending a target script to be tested and newly added data to be run to a target execution end, enabling the target execution end to run the target script to be tested by adopting the newly added data to be run, obtaining test result data, and sending the test result data to a server; according to the interactive flow identifier, adding a new execution end classification identifier and a new interactive flow identifier into the test result data to obtain new data to be run; and storing the new data to be run into a database. The method solves the problem of low testing efficiency.
Description
Technical Field
The present disclosure relates to the field of program testing technologies, and in particular, to a script testing method, device, equipment, and storage medium.
Background
Before the network service product is applied online, the program or script for realizing the network service product needs to be tested first, and can be run online after the test is qualified. The network service product has the condition that the mobile terminal and the webpage terminal are in interactive operation, at least two programs or scripts are required to be operated in sequence at the moment, and the test is required to be performed in sequence when the test is performed.
Currently, in the prior art, when testing a service product with interaction is executed, while testing at either one of a mobile terminal or a web terminal is being executed, testing at the other terminal needs to be queued.
However, the inventors found that at least the following technical problems exist in the prior art: in the case of multiple interactive service product testing, the problem of inefficiency in testing can be caused by queuing.
Disclosure of Invention
The application provides a script testing method, device, equipment and storage medium, which are used for solving the problem of low testing efficiency.
In a first aspect, the present application provides a script testing method, applied to a server, including: responding to the starting of any test flow, and continuously monitoring the data quantity of the data to be operated in the database; if the data volume is increased, reading newly-increased data to be operated, wherein the newly-increased data to be operated comprises an execution end classification identifier and an interaction flow identifier; determining a target execution end according to the execution end classification identifier; determining a corresponding target script to be tested according to the interactive flow identifier; the method comprises the steps of sending a target script to be tested and newly added data to be run to a target execution end, enabling the target execution end to run the target script to be tested by adopting the newly added data to be run, obtaining test result data, and sending the test result data to a server; according to the interactive flow identifier, adding a new execution end classification identifier and a new interactive flow identifier into the test result data to obtain new data to be run; and storing the new data to be run into a database until all the test flows are finished.
In one possible implementation, the test procedure includes at least two test links arranged in sequence, and the interactive procedure identifier corresponds to a target test link in the test procedure; correspondingly, adding a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run, including: determining a corresponding target test link according to the interactive flow identifier; determining the next test link of the target test link in the test flow as a link to be tested; determining a new execution end classification identifier and a new interaction flow identifier according to a link to be tested; and adding a new execution end classification identifier and a new interaction flow identifier into the test result data to obtain new data to be run.
In one possible implementation manner, determining a new execution end classification identifier and a new interaction flow identifier according to a link to be tested includes: searching a corresponding relation between a preset test link and an execution end according to the link to be tested to obtain a corresponding execution end; searching a preset corresponding relation between the execution end and the execution end classification identifier according to the corresponding execution end to obtain a new execution end classification identifier; and searching the corresponding relation between the test link and the interactive flow identifier according to the link to be tested, and determining a new interactive flow identifier.
In one possible implementation, the test procedure includes at least two test links arranged in sequence, and the interactive procedure identifier corresponds to the target test link; accordingly, the test flow ends, including: the test result data comprises error reporting data; or the target test link is the last test link in the test flow.
In one possible implementation, after the test procedure is finished, the method further includes: determining test result data of a target test link as a final result; and writing the final result into a database.
In one possible implementation, before continuously monitoring the data amount of the data to be run in the database, the method further includes: receiving a script to be tested and a test instruction sent by a client; and starting a test flow according to the script to be tested and the test instruction.
In one possible implementation manner, the test flow includes a plurality of test links arranged in sequence, and the interactive flow identifier corresponds to a target test link in the test flow; correspondingly, before storing the new data to be run in the database, the method further comprises: acquiring a test link sequence of a test flow; determining all subsequent links of the target test link according to the target test link and the sequence of the test links; searching the corresponding relation between the preset test links and the execution ends according to each subsequent link to obtain the execution ends corresponding to all the subsequent links; if the execution ends corresponding to all the subsequent links are the same, generating a fixed execution end classification identifier according to any subsequent link, and adopting the fixed execution end classification identifier as the execution end classification identifier corresponding to all the subsequent links.
In a second aspect, the present application provides a script testing method, applied to an execution end, including:
receiving a target to-be-tested script and newly-added to-be-operated data sent by a server, wherein the newly-added to-be-operated data is obtained by continuously monitoring the data quantity of the to-be-operated data in a database by the server in response to the starting of any test flow, reading the data quantity under the condition that the data quantity is increased, and the newly-added to-be-operated data comprises an execution end classification identifier and an interaction flow identifier, wherein the target to-be-tested script is determined by the server according to the interaction flow identifier; and adopting the newly added data to be run to run the target script to be tested to obtain test result data, and sending the test result data to the server, so that the server adds a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run, and storing the new data to be run into the database until all the test flows are finished.
In a third aspect, the present application provides a script testing device, comprising: the data monitoring module is used for responding to the starting of any test flow and continuously monitoring the data quantity of the data to be operated in the database; the data reading module is used for reading newly-increased data to be operated if the data volume is increased, wherein the newly-increased data to be operated comprises an execution end classification identifier and an interaction flow identifier; the execution end determining module is used for determining a target execution end according to the execution end classification identifier; the script determining module is used for determining a corresponding target script to be tested according to the interaction flow identification; the data transmission module is used for transmitting the target script to be tested and the newly added data to be run to the target execution end so that the target execution end adopts the newly added data to be run to run the target script to be tested, test result data is obtained, and the test result data is transmitted to the server; the data acquisition module is used for adding a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run; and the data writing module is used for storing the new data to be run into the database until all the test flows are finished.
In a fourth aspect, the present application provides a script testing device, comprising: the data receiving module is used for receiving a target to-be-tested script and newly added to-be-operated data sent by the server, wherein the newly added to-be-operated data is determined by the server according to the interactive flow identifier, the data amount of the to-be-operated data in the database is continuously monitored by the server in response to the start of any test flow, and the data amount is read under the condition that the data amount is increased; the result sending module is used for adopting the newly added data to be run to run the target script to be tested to obtain test result data, sending the test result data to the server, enabling the server to add the new execution end classification identifier and the new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run, and storing the new data to be run into the database until all the test flows are finished.
In a fifth aspect, the present application provides an electronic device, comprising: a processor, a memory communicatively coupled to the processor; the memory stores computer-executable instructions; the processor executes computer-executable instructions stored in the memory to cause the processor to perform the script test method as described in the first or second aspect.
In a sixth aspect, the present application provides a computer readable storage medium having stored therein computer executable instructions which when executed by a processor are for implementing a script testing method as described in the first or second aspect.
According to the script test method, device and equipment and storage medium, the data amount of the data to be operated in the database is continuously detected, when the data amount is increased, the newly increased data to be operated is read, the corresponding target execution end is determined according to the execution end classification identification in the newly increased data to be operated, the target script to be tested is determined according to the interaction flow identification in the data to be operated, the target script to be tested is operated by the target execution end through the newly increased data to be operated, test result data are obtained, the new execution end classification identification and the new interaction flow identification are added in the test result data, the new data to be operated are stored in the database, so that the next test is started, the execution end which is required to be adopted is determined according to the execution end classification identification is contained in the data to be operated, the script to be tested is determined according to the interaction flow identification, the test of a plurality of scripts can be carried out in parallel under different conditions of the execution ends, and the test efficiency of the script is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is an application scenario schematic diagram of a script testing method provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a script testing method according to an embodiment of the present disclosure;
FIG. 3 is a second flow chart of a script testing method according to an embodiment of the present disclosure;
FIG. 4 is an interactive flow diagram of a script testing method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a script testing device according to an embodiment of the present disclosure;
FIG. 6 is a second schematic structural diagram of a script testing device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
With the development of internet technology, network services are gradually perfected, and in the process of updating and iterating network services, network service products to be online need to be tested.
In the prior art, in the process of testing a network service product, each test task is queued, when the test task needs to be interactively performed by two or more execution ends, in the process of executing one execution end, the other execution end needing to be interacted needs to wait until the execution of the one execution end is finished, and an execution result is obtained. This may lead to a situation where the execution end waits, resulting in a low test efficiency.
In order to solve the technical problems, the inventor proposes the following technical ideas: by adding the execution end classification identifier and the interaction flow identifier in the data to be operated, the execution end and the test script of the test task are respectively determined, and when the data is newly added in the database, the execution end classification identifier and the interaction flow identifier are read to distribute the test task.
Fig. 1 is an application scenario schematic diagram of a script testing method provided in an embodiment of the present application. As in fig. 1, in this scenario, it includes: server 101, execution side 102 and database 103.
The server 101 may be a single server, or may be implemented by using a server or a cluster of a plurality of servers having a higher processing capability and higher security, or may be replaced by a computer or a notebook computer having a higher computing capability. An automated test platform, such as Jenkins, may be deployed in the server.
The execution end 102 may be a server for testing, or may be an electronic device such as a mobile phone, a computer, or a tablet computer.
The connection modes among the server 101, the execution end 102 and the database 103 can be communication connection. Communication connections, including through wired connections and also through wireless network connections, wherein the networks used by wireless network connections may include various types of wired and wireless networks such as, but not limited to: internet, local area network, wireless fidelity (Wireless Fidelity, WIFI), wireless local area network (Wireless Local Area Networks, WLAN), general packet radio service technology (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), 2G/3G/4G/5G cellular networks, satellite communications networks, and the like.
In a specific implementation process, the server 101 is configured to respond to any test procedure start, monitor a data amount of data to be run in the database 103, read the newly added data to be run under the condition that the data amount is increased, determine a target execution end and a target script to be tested according to an execution end classification identifier and an interaction procedure identifier in the newly added data to be run, and send the target script to be tested and the newly added data to be run to the target execution end. And receiving test result data sent by a target execution end, adding a new execution end classification identifier and a new interaction flow identifier into the test result data to obtain new data to be run, and storing the new data to be run into the database 103.
The execution end 102 is configured to receive the target script to be tested and the newly added data to be run, execute the target script to be tested by using the newly added data to be run, obtain test result data, and send the test result data to the server 101.
It will be appreciated that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the script testing method. In other possible embodiments of the present application, the architecture may include more or fewer components than those illustrated, or some components may be combined, some components may be separated, or different component arrangements may be specifically determined according to the actual application scenario, and the present application is not limited herein. The components shown in fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a script testing method according to an embodiment of the present application. The execution subject of the embodiment of the present application may be the server 101 in fig. 1, or may be a computer and/or a mobile phone, which is not particularly limited in this embodiment. As shown in fig. 2, the method includes:
s201: and responding to the starting of any test flow, and continuously monitoring the data quantity of the data to be operated in the database.
In this step, the starting of the test procedure may be that a test procedure starting instruction sent by the client is received, or a preset test procedure reaches a starting time. The data to be operated in the database can contain incremental serial number identifiers, the database can also add the incremental serial number identifiers for the newly added data to be operated, the incremental serial number identifiers can also be added by the server when writing new data to be tested into the database, and the monitoring data quantity can be realized by monitoring the maximum value of the serial number identifiers or the serial number identifier of the latest data to be operated. The monitoring of the data amount of the data to be run in the database can also be realized by a preset script, a command or a preset program.
For example, after any test procedure is started, if it is monitored that the maximum serial number identifier of the data to be operated or the serial number identifier of the latest piece of data to be operated is 289, then the data size of the data to be operated is 289, for example, if it is also monitored that the maximum serial number identifier of the data to be operated or the serial number identifier of the latest piece of data to be operated is 27, then the data size of the data to be operated is 27, for example, if it is also monitored that the serial number identifier of the data to be operated starts to increase from 0, then the actual number of data to be operated is 30 if it is monitored that the maximum serial number identifier of the data to be operated is 29.
S202: if the data volume is increased, the newly-increased data to be operated is read, wherein the newly-increased data to be operated comprises an execution end classification identifier and an interaction flow identifier.
In this step, the data amount may be increased by using a preset script, command or program to monitor the data amount, or may be increased by using a numerical value identified by a maximum sequence number. The execution end classification identifier may correspond to different execution ends, the same test flow may be composed of one or more test links, the execution end corresponding to each test link may be different, and the interaction flow identifier may correspond to a test link in the test flow.
For example, when the maximum serial number identifier of the data to be operated is monitored to be changed from 289 to 290, the data amount of the data to be operated is increased, the maximum serial number identifier in the data to be operated is read to be 290, for example, the maximum serial number identifier in the data to be operated is changed from 1 to 3, two pieces of data to be operated are newly added, the maximum serial number identifier in the data to be operated is read to be 2 and the serial number identifier in the data to be operated is 3, for example, the maximum serial number identifier in the data to be operated is changed from 95 to 96, 1 piece of data to be operated is newly added, and the data to be operated is read to be 96. The execution end classification identifier may be a number, such as 1, 0, or a letter, such as A, B, C. The corresponding relation between the execution end classification identifier and the execution end is, for example, 0 corresponds to the mobile end and 1 corresponds to the web page end.
S203: and determining the target execution end according to the execution end classification identification.
In this step, the corresponding relationship between the preset classification identifier and the execution end may be searched according to the execution end classification identifier, so as to obtain the target execution end. The storage mode of the corresponding relation between the classification identifier and the execution end can be stored in a form, a dictionary or a key value pair mode. The target execution end may be an idle execution end in the class of execution ends.
The correspondence between the classification identifier and the execution end is described in step S202. If the execution end corresponding to the execution end classification identifier is a mobile phone end, selecting an idle mobile phone from the mobile phones as a target execution end. If the execution end corresponding to the execution end classification identifier is a webpage end, selecting idle test equipment from the webpage end test equipment as a target execution end. If the execution end corresponding to the execution end classification identifier is a computer end, selecting an idle computer from all computers as a target execution end.
S204: and determining a corresponding target script to be tested according to the interaction flow identification.
In this step, the corresponding relation between each preset interactive flow identifier and the test script may be searched according to the interactive flow identifier, so as to obtain the target script to be tested.
The corresponding relation between each interactive flow identifier and the test script can be set by receiving the setting information sent by the client, or the name or script content of each script to be tested contains the interactive flow identifier, and the corresponding relation between the interactive flow identifier and the test script is obtained by matching the interactive flow identifier with the name or script content of the script.
The script to be tested can also be sent by a client, and the client can be terminal equipment used by a tester. The script to be tested may also be a preset code.
S205: and sending the target script to be tested and the newly added data to be run to the target execution end so that the target execution end runs the target script to be tested by adopting the newly added data to be run to obtain test result data, and sending the test result data to the server.
In this step, the script and the data to be run may be sent in a file form, or the sending manner of the data to be run may be that a download instruction is sent to the execution end, so that the execution end downloads the data to be run from the database or the server, or the script and the data to be run may be sent in other forms, which is not limited in particular in this application.
S206: and adding a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run.
The test flow comprises at least two test links, in the step, the interactive flow identifier corresponds to the target test link, the next test link in the test flow subsequent to the target test link can be searched, the execution end corresponding to the next test link and the corresponding interactive flow identifier are searched, the corresponding relation between the execution end and the execution end classification identifier is searched according to the corresponding execution end, a new execution end classification identifier is obtained, the new execution end classification identifier and the new interactive flow identifier are written into test result data, and the new execution end classification identifier and the new interactive flow identifier can be written into a preset position of the test result data when being written.
Wherein the preset position of the test result data is, for example, the beginning or the end of the test result data.
S207: and storing the new data to be run into a database until all the test flows are finished.
In this step, the new data to be run is stored in the database, or the new data to be run may be sent to the database, so that the database stores the new data to be run. And adding a new serial number identifier into the new data to be operated according to the serial number identifier of the existing data to be operated. After a test procedure is finished, the above steps S206 to S207 of the test procedure may not be performed any more, and the test result data may be used as a final test result.
As can be seen from the description of the foregoing embodiments, in the embodiments of the present application, by continuously detecting the data amount of the data to be run in the database, and when the data amount increases, reading the newly increased data to be run, determining the corresponding target execution end by the execution end classification identifier in the newly increased data to be run, determining the target script to be tested by the interaction flow identifier in the data to be run, running the target script to be tested by the target execution end by using the newly increased data to be run, obtaining test result data, adding the new execution end classification identifier and the new interaction flow identifier in the test result data, and storing the new data to be run in the database to start the next test, since the execution end to be used is determined by the execution end classification identifier in the data to be run, determining the script to be tested by the interaction flow identifier, the test of multiple scripts can be performed in parallel under different conditions of the execution ends, and the test efficiency of the scripts is increased.
In one possible implementation manner, the test procedure includes at least two test links arranged in sequence, and the interactive procedure identifier corresponds to a target test link in the test procedure.
Correspondingly, in the step S206, a new execution end classification identifier and a new interaction flow identifier are added to the test result data according to the interaction flow identifier, so as to obtain new data to be run, including:
s2061: and determining a corresponding target test link according to the interaction flow identifier.
In this step, the corresponding relationship between the preset interaction flow identifier and the test link may be searched according to the interaction flow identifier, so as to obtain the target test link.
The corresponding relation between the interactive flow identifier and the test link can be obtained by receiving the setting of the client, or can be configured when the test flow or the test task is established. The storage format of the correspondence relationship may be a table, a dictionary, or key value pairs, which is not particularly limited in the present application.
S2062: and determining the next test link of the target test links in the test flow as a link to be tested.
In this step, the order of the test links in the test flow may be obtained, so that the next test link of the target test link is found according to the target test link.
For example, there are five test links A, B, C, D, E in the current test flow in sequence, and if the target test link is B, C is the next test link, and C is determined as the link to be tested. The naming of the test link and the specific test content of the test link are not limited.
S2063: and determining a new execution end classification identifier and a new interaction flow identifier according to the links to be tested.
In this step, the link to be tested corresponds to the execution end, the execution end corresponds to the execution end classification identifier, and the link to be tested also corresponds to the interaction flow identifier.
In one possible implementation manner, in this step, according to a link to be tested, determining a new execution end classification identifier and a new interaction flow identifier, which specifically include:
S2063A: and searching the corresponding relation between the preset test link and the execution end according to the link to be tested to obtain the corresponding execution end.
In this step, the preset corresponding relationship between the test link and the execution end may be obtained by receiving the setting information of the client end, or may be set when the test flow is created.
S2063B: and searching a preset corresponding relation between the execution end and the execution end classification identifier according to the corresponding execution end to obtain a new execution end classification identifier.
In this step, the correspondence between the execution end and the execution end classification identifier may be fixed, for example, the descriptions in the step S202 and the step S203 are omitted here.
S2063C: and searching the corresponding relation between the test link and the interactive flow identifier according to the link to be tested, and determining a new interactive flow identifier.
In this step, the corresponding relationship between the test link and the interactive flow identifier may also be obtained by receiving the setting information of the client, or may be set when the test flow is created.
S2064: and adding a new execution end classification identifier and a new interaction flow identifier into the test result data to obtain new data to be run.
This step is similar to the above description of step S206, and will not be repeated here.
From the description of the above embodiments, it can be known that in the embodiments of the present application, by determining the corresponding target test link by using the interaction flow identifier, determining the next test link of the target test link in the test flow as the to-be-tested link, determining the new execution end classification identifier and the new interaction flow identifier by using the to-be-tested link, adding the new execution end classification identifier and the new interaction flow identifier to the test result data, and obtaining new data to be run, the new interaction flow identifier corresponding to the to-be-tested link is determined by using the interaction flow identifier corresponding to the current test link, and the new data to be run is generated by using the test result obtained by the completed test link, so that the server can detect that the database has new data to be run to be increased, and continuous running of the test flow is realized.
In one possible implementation, the test procedure includes at least two test links arranged in sequence, and the interactive procedure identifier corresponds to the target test link.
Accordingly, in the step S207, the test procedure is ended, including: S207A or S207B.
S207A: the test result data includes error reporting data.
In this step, a preset error reporting mark or error reporting string may be included in the test result.
Wherein the ERROR characters such as "ERROR", "warning" or "ERROR", etc., are not particularly limited in this application.
S207B: the target test link is the last test link in the test flow.
In this step, since the order of the test links in the test flow is fixed, in the case that the target test link is the last test link in one test link, when the target test link ends, the test flow ends.
For example: the current test flow has A, B, C three test links, the target test link is a C test link, and when the target test link obtains a test result, the test flow is ended.
As can be seen from the description of the above embodiments, in the embodiments of the present application, when the summary of the test result data includes error reporting data or the target test link is the last test link in the test flow, the end of the test flow is determined, so that the process of generating new data to be run from the result data of any flow is terminated when the end of the flow is achieved, and the data in the monitoring database is stopped when all the test flows are terminated, so as to achieve the termination of the test flow.
In one possible implementation manner, after the test procedure is finished in step S205, the method further includes:
S206A: and determining the test result data of the target test link as a final result.
In this step, if the test result data of the target test link includes error reporting data, the test result data including the error reporting data may be determined as a final result, or the error reporting data may be directly determined as a final result. If the test result data of the target test link does not contain error reporting data, determining the test result data as a final result.
S206B: and writing the final result into a database.
In this step, the final result may be sent to a database for storage.
As can be seen from the description of the above embodiments, in the embodiments of the present application, the test result data of the target test link is determined as the final result, and the final result is stored in the database, so as to implement the traceability of the test result.
In one possible implementation, after obtaining the final result, generating the test report using the final result and/or the test result may be further included.
Specifically, the name and the final result of the test procedure may be written into an existing test report template, each test link and the corresponding test result in the test procedure may be written into an existing test report template, or each test link, the corresponding test result and the final result of each test link may be written into an existing test report template.
In one possible implementation, before continuously monitoring the data amount of the data to be run in the database, the method further includes:
s210: and receiving the script to be tested and the test instruction sent by the client.
In this step, the client may be a terminal device of a tester, one or more scripts to be tested may be tested, and the test instruction may be an instruction to start the test. The test flow can have a corresponding flow name, the flow name can be set by a tester, the test instruction can be a preset character string, the test instruction can also be an instruction containing the flow name of the test flow, and the test flow can also comprise a test link in the test flow, a corresponding relation between the test link and an execution end, a corresponding relation between the execution end and an execution end classification identifier, a corresponding relation between an interaction flow identifier and the test link, and the like.
S211: and starting a test flow according to the script to be tested and the test instruction.
In this step, a test procedure corresponding to the script to be tested may be started according to the test instruction.
For example, when the script E, F, G, H to be tested corresponding to the test link A, B, C, D is currently received, the test link A, B, C, D belongs to the test flow X, and the test instruction corresponding to the test flow X is also received, the test flow X is started, and the script E, F, G, H to be tested is sequentially tested.
As can be seen from the description of the above embodiments, in the embodiments of the present application, the test flow is started according to the received script to be tested and the test instruction, so as to achieve the effects of starting control of the test flow and creating the test flow.
In one possible implementation, the test procedure includes a plurality of test links arranged in sequence, and the interactive procedure identifier corresponds to a target test link in the test procedure.
Accordingly, before storing the new data to be run in the database in step S207, the method further includes:
S207D: and acquiring a test link sequence of the test flow.
In this step, the test link order of the test flow may be set when the test flow is created. The test link sequence comprises test links which are sequentially arranged.
S207E: and determining all subsequent links of the target test link according to the target test link and the sequence of the test links.
In this step, the target test link may be found in the test link sequence, and all test links after the target test link are used as the subsequent links.
For example, the current test flow sequentially has a test link A, B, C, D, E, if the target test link is a test link B, then the test link C, D, E is a subsequent test link, if the target test link is a test link a, then B, C, D, E is a subsequent test link, and if the target test link is a test link D, then only the test link E is a subsequent test link.
S207F: and searching the corresponding relation between the preset test links and the execution ends according to each subsequent link to obtain the execution ends corresponding to all the subsequent links.
In this step, the correspondence between the test link and the execution end and the above steps are described in step S2063A, which is not described here again.
S207G: if the execution ends corresponding to all the subsequent links are the same, generating a fixed execution end classification identifier according to any subsequent link, and adopting the fixed execution end classification identifier as the execution end classification identifier corresponding to all the subsequent links.
In this step, for example, the execution end corresponding to all the subsequent links is a mobile end, the execution end classification identifier corresponding to the mobile end is used as a fixed execution end classification identifier, and the execution end classification identifier corresponding to the mobile end is used as the execution end classification identifier corresponding to all the subsequent links. For example, if the execution end corresponding to all the subsequent links is a web page end, the execution end classification identifier corresponding to the web page end is used as a fixed execution end classification identifier, and the execution end classification identifier corresponding to the web page end is used as the execution end classification identifier corresponding to all the subsequent links.
As can be seen from the description of the foregoing embodiments, in the embodiments of the present application, by determining all subsequent links of a target test link according to the target test link and the acquired test link sequence, searching for a correspondence between the test link and an execution end, to obtain execution ends corresponding to all subsequent links, and generating, according to any subsequent link, a fixed execution end classification identifier under the condition that the execution ends corresponding to the subsequent links are the same, and using the fixed execution end classification identifier as the execution end classification identifier corresponding to the subsequent link, a process of determining the execution end classification identifier only needs to be performed once under the condition that the execution ends corresponding to the subsequent links are the same.
Fig. 3 is a second flowchart of a script testing method according to an embodiment of the present application. The execution body of the embodiment of the present application may be the execution end 102 in fig. 1. As shown in fig. 3, the method includes:
s301: and receiving a target to-be-tested script and newly-added to-be-operated data sent by the server, wherein the newly-added to-be-operated data is obtained by continuously monitoring the data quantity of the to-be-operated data in the database by the server in response to the starting of any test flow, reading the data quantity under the condition of increasing the data quantity, and determining the target to-be-tested script according to the interactive flow identifier by the server, wherein the newly-added to-be-operated data comprises an executing end classification identifier and the interactive flow identifier.
In this step, the target script to be tested and the newly added data to be run sent by the server may be received through a network.
S302: and adopting the newly added data to be run to run the target script to be tested to obtain test result data, and sending the test result data to the server, so that the server adds a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run, and storing the new data to be run into the database until all the test flows are finished.
In this step, the newly added data to be run may be input into the target script to be tested to obtain the test result data, or the newly added data to be run may be read by using the target script to be tested, so as to run the target script to be tested to obtain the test result data.
From the description of the above embodiment, it can be known that, in the embodiment of the present application, by receiving the target to-be-tested script and the newly added to-be-run data sent by the server, and running the target to-be-tested script by using the newly added to-be-run data, test result data is obtained, so as to achieve the purpose of running the script at the execution end and obtaining the test result, and provide the running environment of the script.
Fig. 4 is an interactive flow diagram of a script testing method according to an embodiment of the present application. As shown in fig. 4, the interaction flow includes:
s401: the server responds to the starting of any test flow, and continuously monitors the data quantity of the data to be operated in the database;
s402: if the data volume is increased, the server reads newly-increased data to be operated in the database, wherein the newly-increased data to be operated comprises an execution end classification identifier and an interaction flow identifier;
s403: the server determines a target execution end according to the execution end classification identifier;
S404: the server determines a corresponding target script to be tested according to the interaction flow identification;
s405: the target script to be tested and the newly added data to be run are sent to a target execution end,
s406: the target execution end adopts the newly added data to be executed to execute the target script to be tested, test result data is obtained, and the test result data is sent to the server;
s407: the server adds a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run;
s408: and the server stores the new data to be run into the database until all the test flows are finished.
Fig. 5 is a schematic structural diagram of a script testing device according to an embodiment of the present application. As shown in fig. 5, the script test device 500 includes: the system comprises a data monitoring module 501, a data reading module 502, an execution end determining module 503, a script determining module 504, a data sending module 505, a data obtaining module 506 and a data writing module 507.
The data monitoring module 501 is configured to continuously monitor the data amount of the data to be run in the database in response to the initiation of any test procedure.
The data reading module 502 is configured to read the newly added data to be operated if the data amount increases, where the newly added data to be operated includes an execution end classification identifier and an interaction flow identifier.
The execution end determining module 503 is configured to determine a target execution end according to the execution end classification identifier.
The script determining module 504 is configured to determine a corresponding target script to be tested according to the interaction flow identifier.
The data sending module 505 is configured to send the target script to be tested and the newly added data to be run to the target execution end, so that the target execution end uses the newly added data to be run to run the target script to be tested, obtain test result data, and send the test result data to the server.
The data obtaining module 506 is configured to add a new execution end classification identifier and a new interaction flow identifier to the test result data according to the interaction flow identifier, so as to obtain new data to be run.
And the data writing module 507 is configured to store the new data to be run into the database until all the test flows are finished.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In one possible implementation, the test procedure includes at least two test links arranged in sequence, and the interactive procedure identifier corresponds to a target test link in the test procedure.
The data obtaining module 506 is specifically configured to determine a corresponding target test link according to the interaction flow identifier. And determining the next test link of the target test links in the test flow as a link to be tested. And determining a new execution end classification identifier and a new interaction flow identifier according to the links to be tested. And adding a new execution end classification identifier and a new interaction flow identifier into the test result data to obtain new data to be run.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In one possible implementation manner, the data obtaining module 506 is specifically configured to search, according to a link to be tested, a corresponding relationship between a preset test link and an execution end, so as to obtain a corresponding execution end. And searching a preset corresponding relation between the execution end and the execution end classification identifier according to the corresponding execution end to obtain a new execution end classification identifier. And searching the corresponding relation between the test link and the interactive flow identifier according to the link to be tested, and determining a new interactive flow identifier.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In one possible implementation, the test procedure includes at least two test links arranged in sequence, and the interactive procedure identifier corresponds to the target test link.
The data writing module 507 is specifically configured to include error reporting data in the test result data. Or the target test link is the last test link in the test flow, and the test flow is judged to be ended.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In one possible implementation, the script testing device 500 further includes: the results are written to block 508.
The result writing module 508 is configured to determine test result data of the target test link as a final result. And writing the final result into a database.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In one possible implementation, the script testing device 500 further includes: test initiation module 509.
The test starting module 509 is configured to receive a script to be tested and a test instruction sent by the client. And starting a test flow according to the script to be tested and the test instruction.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In one possible implementation, the test procedure includes a plurality of test links arranged in sequence, and the interactive procedure identifier corresponds to a target test link in the test procedure. Script testing device 500 further comprises: the identity determination module 510.
The identification determining module 510 is configured to obtain a test link sequence of the test procedure. And determining all subsequent links of the target test link according to the target test link and the sequence of the test links. And searching the corresponding relation between the preset test links and the execution ends according to each subsequent link to obtain the execution ends corresponding to all the subsequent links. If the execution ends corresponding to all the subsequent links are the same, generating a fixed execution end classification identifier according to any subsequent link, and adopting the fixed execution end classification identifier as the execution end classification identifier corresponding to all the subsequent links.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
Fig. 6 is a schematic structural diagram of a script testing device according to an embodiment of the present application. As shown in fig. 6, the script test device 600 includes: the data receiving module 601 and the result transmitting module 602.
The data receiving module 601 is configured to receive a target to-be-tested script and newly added to-be-operated data sent by a server, where the newly added to-be-operated data is that the server starts responding to any test procedure, continuously monitors a data amount of the to-be-operated data in a database, reads the to-be-operated data under a condition that the data amount is increased, and includes an execution end classification identifier and an interaction procedure identifier, and the target to-be-tested script is determined by the server according to the interaction procedure identifier.
The result sending module 602 is configured to use the newly added data to be run to run the target script to be tested to obtain test result data, and send the test result data to the server, so that the server adds a new execution end classification identifier and a new interaction flow identifier to the test result data according to the interaction flow identifier, obtains new data to be run, and stores the new data to be run into the database until all the test flows are finished.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In order to achieve the above embodiments, the present application further provides an electronic device.
Referring to fig. 7, a schematic structural diagram of an electronic device 700 suitable for implementing embodiments of the present application is shown, where the electronic device 700 may be a terminal device or a server. The terminal device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (Personal Digital Assistant, PDA for short), a tablet (Portable Android Device, PAD for short), a portable multimedia player (Portable Media Player, PMP for short), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 7 is only an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present application.
As shown in fig. 7, the electronic device 700 may include a processor (e.g., a central processing unit, a graphics processor, etc.) 701, and a Memory 702 communicatively connected to the processor, and the processor 701 may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage 708 into a random access Memory (Random Access Memory, RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
In general, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 707 including, for example, a liquid crystal display (Liquid Crystal Display, LCD for short), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 shows an electronic device 700 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 709, or installed from storage 708, or installed from ROM 702. When being executed by the processing means 701, performs the above-described functions defined in the method of the embodiments of the present application.
It should be noted that the computer readable storage medium described in the present application may be a computer readable signal medium or a computer storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal that propagates in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable storage 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 storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer-readable storage medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer-readable storage medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above-described embodiments.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (Local Area Network, LAN for short) or a wide area network (Wide Area Network, WAN for short), or it may be connected to an external computer (e.g., connected via the internet using an internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present 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 involved in the embodiments described in the present application may be implemented by software, or may be implemented by hardware. The names of the units do not in any way constitute a limitation of the module itself, for example, the data reading module may be described as "newly added data reading module to be run".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The present application further provides a computer readable storage medium, in which computer execution instructions are stored, when a processor executes the computer execution instructions, the technical scheme of the script test method in any of the above embodiments is implemented, and the implementation principle and the beneficial effects of the script test method are similar to those of the script test method, and can be seen, and the detailed description is omitted herein.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this application is not limited to the specific combinations of features described above, but it is intended to cover other embodiments in which any combination of features described above or equivalents thereof is possible without departing from the spirit of the disclosure. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.
The application further provides a computer program product, which comprises a computer program, when the computer program is executed by a processor, the technical scheme of the script testing method in any of the above embodiments is implemented, and the implementation principle and the beneficial effects are similar to those of the script testing method, and can be seen from the implementation principle and the beneficial effects of the script testing method, and the detailed description is omitted herein.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (12)
1. A script testing method, applied to a server, comprising:
responding to the starting of any test flow, and continuously monitoring the data quantity of the data to be operated in the database;
if the data volume is increased, reading newly increased data to be operated, wherein the newly increased data to be operated comprises an execution end classification identifier and an interaction flow identifier;
determining a target execution end according to the execution end classification identifier;
determining a corresponding target script to be tested according to the interaction flow identification;
the target script to be tested and the newly added data to be run are sent to the target execution end, so that the target execution end runs the target script to be tested by adopting the newly added data to be run, test result data are obtained, and the test result data are sent to the server;
adding a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run;
And storing the new data to be run into the database until all the test flows are finished.
2. The method of claim 1, wherein the test procedure includes at least two test links arranged in sequence, and the interactive procedure identifier corresponds to a target test link in the test procedure;
correspondingly, adding a new execution end classification identifier and a new interaction flow identifier to the test result data according to the interaction flow identifier to obtain new data to be run, including:
determining a corresponding target test link according to the interaction flow identifier;
determining the next test link of the target test link in the test flow as a link to be tested;
determining a new execution end classification identifier and a new interaction flow identifier according to the links to be tested;
and adding a new execution end classification identifier and a new interaction flow identifier into the test result data to obtain new data to be run.
3. The method according to claim 2, wherein determining a new execution-side classification identifier and a new interaction flow identifier according to the link to be tested comprises:
Searching a corresponding relation between a preset test link and an execution end according to the link to be tested to obtain a corresponding execution end;
searching a preset corresponding relation between the execution end and the execution end classification identifier according to the corresponding execution end to obtain the new execution end classification identifier;
and searching the corresponding relation between the test link and the interaction flow identifier according to the link to be tested, and determining the new interaction flow identifier.
4. The method of claim 1, wherein the test procedure includes at least two test links arranged in sequence, and the interactive procedure identifier corresponds to a target test link;
accordingly, the test flow ends, including:
the test result data comprises error reporting data; or alternatively, the first and second heat exchangers may be,
the target test link is the last test link in the test flow.
5. The method of claim 4, further comprising, after the testing procedure is completed:
determining the test result data of the target test link as a final result;
writing the final result into the database.
6. The method according to any one of claims 1 to 5, further comprising, prior to continuously monitoring the amount of data in the database for which data is to be run:
Receiving a script to be tested and a test instruction sent by a client;
and starting a test flow according to the script to be tested and the test instruction.
7. The method according to any one of claims 1 to 5, wherein the test procedure includes a plurality of test links arranged in sequence, and the interactive procedure identifier corresponds to a target test link in the test procedure;
correspondingly, before the new data to be run is stored in the database, the method further comprises:
acquiring a test link sequence of the test flow;
determining all subsequent links of the target test link according to the target test link and the sequence of the test links;
searching the corresponding relation between the preset test links and the execution ends according to each subsequent link to obtain the execution ends corresponding to all the subsequent links;
if the execution ends corresponding to all the follow-up links are the same, generating a fixed execution end classification identifier according to any follow-up link, and adopting the fixed execution end classification identifier as the execution end classification identifier corresponding to all the follow-up links.
8. The script testing method is characterized by being applied to an execution end and comprising the following steps:
receiving a target to-be-tested script and newly added to-be-operated data sent by a server, wherein the newly added to-be-operated data is obtained by continuously monitoring the data quantity of the to-be-operated data in a database by the server in response to the starting of any test flow, and reading the to-be-operated data under the condition that the data quantity is increased, wherein the newly added to-be-operated data comprises an execution end classification identifier and an interaction flow identifier, and the target to-be-tested script is determined by the server according to the interaction flow identifier;
And running the target script to be tested by adopting the newly added data to be run to obtain test result data, and sending the test result data to the server so that the server adds a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run, and storing the new data to be run into the database until all the test flows are finished.
9. A script testing device, comprising:
the data monitoring module is used for responding to the starting of any test flow and continuously monitoring the data quantity of the data to be operated in the database;
the data reading module is used for reading newly-increased data to be operated if the data volume is increased, wherein the newly-increased data to be operated comprises an execution end classification identifier and an interaction flow identifier;
the execution end determining module is used for determining a target execution end according to the execution end classification identifier;
the script determining module is used for determining a corresponding target script to be tested according to the interaction flow identification;
the data sending module is used for sending the target script to be tested and the newly added data to be run to the target execution end so that the target execution end runs the target script to be tested by adopting the newly added data to be run to obtain test result data, and sending the test result data to a server;
The data obtaining module is used for adding a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run;
and the data writing module is used for storing the new data to be run into the database until all the test flows are finished.
10. A script testing device, comprising:
the data receiving module is used for receiving a target to-be-tested script and newly added to-be-operated data sent by a server, wherein the newly added to-be-operated data is obtained by continuously monitoring the data quantity of the to-be-operated data in a database by the server in response to the start of any test flow, and the newly added to-be-operated data is read under the condition that the data quantity is increased and comprises an execution end classification identifier and an interaction flow identifier, and the target to-be-tested script is determined by the server according to the interaction flow identifier;
and the result sending module is used for running the target script to be tested by adopting the newly added data to be run to obtain test result data, and sending the test result data to the server so that the server adds a new execution end classification identifier and a new interaction flow identifier into the test result data according to the interaction flow identifier to obtain new data to be run, and storing the new data to be run into the database until all the test flows are finished.
11. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory, causing the processor to perform the script testing method of any of claims 1-7 or claim 8.
12. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are for implementing the script testing method of any of claims 1 to 7 or claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211442108.7A CN116149983A (en) | 2022-11-17 | 2022-11-17 | Script testing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211442108.7A CN116149983A (en) | 2022-11-17 | 2022-11-17 | Script testing method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116149983A true CN116149983A (en) | 2023-05-23 |
Family
ID=86353293
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211442108.7A Pending CN116149983A (en) | 2022-11-17 | 2022-11-17 | Script testing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116149983A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103150255A (en) * | 2013-03-29 | 2013-06-12 | 北京经纬恒润科技有限公司 | Method and device for testing script |
CN109726107A (en) * | 2018-06-01 | 2019-05-07 | 平安普惠企业管理有限公司 | Test method, device, equipment and storage medium |
CN110460612A (en) * | 2019-08-15 | 2019-11-15 | 中国平安财产保险股份有限公司 | Safety detecting method, equipment, storage medium and device |
WO2021184725A1 (en) * | 2020-03-16 | 2021-09-23 | 平安科技(深圳)有限公司 | User interface test method and apparatus, storage medium, and computer device |
CN114817079A (en) * | 2022-06-30 | 2022-07-29 | 云账户技术(天津)有限公司 | Software stability testing method and device, electronic equipment and storage medium |
CN115269376A (en) * | 2022-06-22 | 2022-11-01 | 山石网科通信技术股份有限公司 | Test script generation method and device and electronic equipment |
-
2022
- 2022-11-17 CN CN202211442108.7A patent/CN116149983A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103150255A (en) * | 2013-03-29 | 2013-06-12 | 北京经纬恒润科技有限公司 | Method and device for testing script |
CN109726107A (en) * | 2018-06-01 | 2019-05-07 | 平安普惠企业管理有限公司 | Test method, device, equipment and storage medium |
CN110460612A (en) * | 2019-08-15 | 2019-11-15 | 中国平安财产保险股份有限公司 | Safety detecting method, equipment, storage medium and device |
WO2021184725A1 (en) * | 2020-03-16 | 2021-09-23 | 平安科技(深圳)有限公司 | User interface test method and apparatus, storage medium, and computer device |
CN115269376A (en) * | 2022-06-22 | 2022-11-01 | 山石网科通信技术股份有限公司 | Test script generation method and device and electronic equipment |
CN114817079A (en) * | 2022-06-30 | 2022-07-29 | 云账户技术(天津)有限公司 | Software stability testing method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111555940B (en) | Client test method and device, electronic equipment and computer readable storage medium | |
CN111581291A (en) | Data processing method and device, electronic equipment and readable medium | |
CN112684968A (en) | Page display method and device, electronic equipment and computer readable medium | |
CN111309304B (en) | Method, device, medium and electronic equipment for generating IDL file | |
CN110753089A (en) | Method, device, medium and electronic equipment for managing client | |
CN111597107B (en) | Information output method and device and electronic equipment | |
CN111813685A (en) | Automatic testing method and device | |
CN112099982A (en) | Collapse information positioning method, device, medium and electronic equipment | |
CN110908921A (en) | Game problem positioning method and device, electronic equipment and storage medium | |
CN112182160B (en) | Log data processing method and device, storage medium and electronic equipment | |
CN116700907B (en) | Service call demand document storage method, device, electronic equipment and readable medium | |
CN113392018A (en) | Traffic distribution method, traffic distribution device, storage medium, and electronic device | |
CN112379967B (en) | Simulator detection method, device, equipment and medium | |
US20240105162A1 (en) | Method for training model, speech recognition method, apparatus, medium, and device | |
CN111782549B (en) | Test method and device and electronic equipment | |
CN115328506A (en) | Application package generation method, loading method, device, medium and equipment | |
CN116149983A (en) | Script testing method, device, equipment and storage medium | |
CN111309323B (en) | Parameter initialization method and device and electronic equipment | |
CN114116480A (en) | Method, device, medium and equipment for determining application program test coverage rate | |
CN112487416A (en) | Business process verification method and device and electronic equipment | |
CN112667119A (en) | Measuring point batch correlation method and device, electronic equipment and computer readable medium | |
CN112100159A (en) | Data processing method and device, electronic equipment and computer readable medium | |
CN115374320B (en) | Text matching method and device, electronic equipment and computer medium | |
CN115098453B (en) | Information storage method, apparatus, electronic device, and computer readable medium | |
CN114040014B (en) | Content pushing method, device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |