CN113157581A - Method and device for automatically triggering service, electronic equipment and storage medium - Google Patents

Method and device for automatically triggering service, electronic equipment and storage medium Download PDF

Info

Publication number
CN113157581A
CN113157581A CN202110461466.1A CN202110461466A CN113157581A CN 113157581 A CN113157581 A CN 113157581A CN 202110461466 A CN202110461466 A CN 202110461466A CN 113157581 A CN113157581 A CN 113157581A
Authority
CN
China
Prior art keywords
service
triggered
test script
automatic
automatic test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110461466.1A
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110461466.1A priority Critical patent/CN113157581A/en
Publication of CN113157581A publication Critical patent/CN113157581A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application provides a method and a device for automatically triggering a service, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving an automatic trigger command, wherein the automatic trigger command comprises a service identifier of a service to be triggered; acquiring an automatic test script corresponding to the service identifier; the automatic test script corresponds to the operation flow of the service to be triggered; and running the automatic test script to realize the automatic triggering of the service to be triggered. In this embodiment, since the automatic test script corresponds to the operation flow of the service to be triggered, when the automatic test script runs, the functional module corresponding to the service to be triggered can be driven to run according to the operation flow, so that the codes of the functional module of the service to be triggered can be reused, and only the script codes of the operation flow need to be written, thereby reducing the code amount and contributing to saving manpower.

Description

Method and device for automatically triggering service, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for automatically triggering a service, an electronic device, and a storage medium.
Background
Most of the systems currently used are of a small scale, a certain function may involve many different backend logics, and the function code requires a user to perform a series of operations when running.
Some functions that require manual operation by a user have automatically triggered service requirements as the service requirements change. In the prior art, original function codes may relate to different languages and different frameworks, and may relate to front and back ends, data from different sources, authentication and other characteristics, so that the original function codes cannot be directly extracted and summarized; in order to meet the requirement of the automatically triggered service, the prior art generally needs to rewrite the corresponding function code with the same language and frame again to meet the requirement of the automatically triggered service, which has the problems of difficult implementation and low efficiency.
Disclosure of Invention
In view of the above, the present application is proposed to provide a method and apparatus, an electronic device, and a storage medium for automatically triggering a service, which overcome the above problems or at least partially solve the above problems, and includes:
a method of automatically triggering a service, the method comprising:
receiving an automatic trigger command, wherein the automatic trigger command comprises a service identifier of a service to be triggered;
acquiring an automatic test script corresponding to the service identifier; the automatic test script corresponds to the operation flow of the service to be triggered;
and running the automatic test script to realize the automatic triggering of the service to be triggered.
Optionally, the running the automated test script to automatically trigger the service to be triggered includes:
and in the process of running the automatic test script, triggering the functional module corresponding to the service to be triggered according to the operation flow so as to realize the automatic triggering of the service to be triggered.
Optionally, when the service to be triggered collects the test result on the test platform and sends the test result to the specified mailbox, the running of the automated test script is performed to automatically trigger the service to be triggered, including:
logging in the test platform;
triggering a summary function module corresponding to the summary test result in the test platform, and enabling the summary function module to operate to obtain a corresponding mail containing the test result;
acquiring the specified mailbox from a preset configuration, and taking the specified mailbox as a receiver of the mail;
and triggering a sending function module to operate the sending function module so as to send the mail to the specified mailbox.
Optionally, the running the automated test script to automatically trigger the service to be triggered further includes:
receiving a setting operation aiming at the execution time of the service to be triggered, and determining a starting time condition of the automatic test script;
and when the current time meets the starting time condition, running the automatic test script.
Optionally, before the receiving the auto-triggering command, the method further comprises:
determining a corresponding automatic test tool according to the system type of the service to be triggered;
and generating an automatic test script corresponding to the operation flow of the service to be triggered by utilizing the automatic test tool.
Optionally, the method further comprises:
storing the automatic test script into a preset database;
and recording the corresponding relation between the storage path of the automatic test script and the service identifier into a preset mapping table.
Optionally, the obtaining of the automated test script corresponding to the service identifier includes:
searching a storage path of the automatic test script corresponding to the service identifier from the preset mapping table;
and acquiring the automatic test script from the preset database according to the storage path.
An apparatus for automatically triggering a service, the apparatus comprising:
the first receiving module is used for receiving an automatic trigger command, wherein the automatic trigger command comprises a service identifier of a service to be triggered;
the script obtaining module is used for obtaining an automatic test script corresponding to the service identifier; the automatic test script corresponds to the operation flow of the service to be triggered;
and the script running module is used for running the automatic test script so as to automatically trigger the service to be triggered.
Optionally, the script running module is specifically configured to trigger the function module corresponding to the service to be triggered according to the operation flow in the process of running the automatic test script, so as to automatically trigger the service to be triggered.
Optionally, when the service to be triggered collects the test result on the test platform and sends the test result to the specified mailbox, the script running module includes:
the login module is used for logging in the test platform;
the summarizing triggering module is used for triggering a summarizing function module corresponding to the summarizing test result in the test platform to enable the summarizing function module to operate so as to obtain a corresponding mail containing the test result;
the mailbox acquisition module is used for acquiring the specified mailbox from preset configuration and taking the specified mailbox as a receiver of the mail;
and the sending triggering module is used for triggering the sending function module to operate the sending function module so as to send the mail to the specified mailbox.
Optionally, the script execution module further includes:
the second receiving module is used for receiving the setting operation of the execution time of the service to be triggered and determining the starting time condition of the automatic test script;
and the running starting module is used for running the automatic test script when the current time meets the starting time condition.
Optionally, the apparatus further comprises:
the test tool determining module is used for determining a corresponding automatic test tool according to the system type of the service to be triggered;
and the test script generating module is used for generating an automatic test script corresponding to the operation flow of the service to be triggered by utilizing the automatic test tool.
Optionally, the apparatus further comprises:
the test script storage module is used for storing the automatic test script into a preset database;
and the corresponding relation mapping module is used for recording the corresponding relation between the storage path of the automatic test script and the service identifier into a preset mapping table.
Optionally, the script obtaining module includes:
the path determining module is used for searching a storage path of the automatic test script corresponding to the service identifier from the preset mapping table;
and the target acquisition module is used for acquiring the automatic test script from the preset database according to the storage path.
An electronic device comprising a processor, a memory and a computer program stored on the memory and being executable on the processor, the computer program, when executed by the processor, implementing the steps of the method of automatically triggering a service as described above.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of automatically triggering a service as described above.
The application has the following advantages:
in the embodiment of the application, the automatic trigger command is received, the automatic trigger command comprises the service identifier of the service to be triggered, then the automatic test script corresponding to the service identifier is obtained, and the automatic test script is operated, so that the service to be triggered is automatically triggered. In this embodiment, since the automatic test script corresponds to the operation flow of the service to be triggered, when the automatic test script runs, the functional module corresponding to the service to be triggered can be driven to run according to the operation flow, so that the codes of the functional module of the service to be triggered can be reused, and only the script codes of the operation flow need to be written, thereby reducing the code amount and contributing to saving manpower.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings needed to be used in the description of the present application will be briefly introduced below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive labor.
Fig. 1 is a flowchart illustrating steps of a method for automatically triggering a service according to an embodiment of the present application;
fig. 2 is a block diagram of a device for automatically triggering a service according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a method for automatically triggering a service according to an embodiment of the present application is shown, where the method may be performed by a device for automatically triggering a service, and the device for automatically triggering a service may be considered to be a virtual device constructed by software and/or hardware, for example, by program code. The method specifically comprises the following steps:
step 101, receiving an automatic trigger command, wherein the automatic trigger command comprises a service identifier of a service to be triggered;
102, acquiring an automatic test script corresponding to the service identifier; the automatic test script corresponds to the operation flow of the service to be triggered;
and 103, running the automatic test script to automatically trigger the service to be triggered.
The method and the device for automatically triggering the service to be triggered receive the automatic triggering command, the automatic triggering command comprises the service identification of the service to be triggered, the automatic testing script corresponding to the service identification is obtained, and the automatic testing script is operated, so that the service to be triggered is automatically triggered. In this embodiment, since the automatic test script corresponds to the operation flow of the service to be triggered, when the automatic test script runs, the functional module corresponding to the service to be triggered can be driven to run according to the operation flow, so that the codes of the functional module of the service to be triggered can be reused, and only the script codes of the operation flow need to be written, thereby reducing the code amount and contributing to saving manpower.
Hereinafter, a method of automatically triggering a service in the present exemplary embodiment will be further described.
In step 101, an automatic trigger command is received, where the automatic trigger command includes a service identifier of a service to be triggered.
In this embodiment of the present application, the device that automatically triggers the service may serve as a called party, and provide a calling interface for other systems/devices to call, and accordingly, the other systems/devices serve as calling parties. When the calling party calls the calling interface of the called party, the called party correspondingly receives the automatic triggering command. The automatic trigger command may carry a service identifier of a service to be triggered, where the service to be triggered may be one of services provided by the caller.
Specifically, the called party may provide multiple services, and the calling party stores at least one automated test script corresponding to one of the services to implement an automatic triggering function of the service. And displaying a control corresponding to the calling interface of the called party in the display interface corresponding to the calling party or the third-party display interface, and displaying the service identification of the target service on the control so as to prompt the user of the service corresponding to the control. When a user needs to execute a target service, an automatic trigger command can be initiated to a device for automatically triggering the service by means of a trigger control and the like, wherein the automatic trigger command comprises a service identifier of the target service, and the target service is a service to be triggered.
Illustratively, when the target service is a mail sending service, and when the user triggers a control of the mail sending service, the calling party may call a calling interface of the device for automatically triggering the service, so as to implement the function of the automatic mail sending service through the device for automatically triggering the service.
Generally, if the service of sending the mail is realized without adopting a mode of calling an interface of a device for automatically triggering the service, the service of sending the mail can be completed only by logging in a mailbox → clicking a button for writing the mail → filling a subject, a receiver, the content of the mail, and the like on the interface of writing the mail → clicking a button for sending the mail.
In step 102, obtaining an automated test script corresponding to the service identifier; the automatic test script corresponds to the operation process of the service to be triggered.
In the embodiment of the application, an automatic test script corresponding to the service to be triggered can be generated and stored in advance; the automatic test script corresponds to the operation process of the service to be triggered, and it can be understood that the automatic test script includes the script of the operation process and needs to be different from the functional module of the service. That is, the automated test script is mainly used to automatically execute the steps of human operation through the automated test script, thereby realizing automation.
Illustratively, when the service to be triggered is a mail sending service, the operation flow of the mail sending service may include: logging in mailbox → clicking on the write button → filling in the subject, recipient, mail content, etc. in the write mail interface → clicking on the send button. The corresponding automated test script may be: logging in a mailbox → simulating a click-to-write button → filling a subject, a receiver, mail content and the like in a mail-writing interface → simulating a click-to-send button, wherein the logging in the mailbox can directly and automatically input a user name and a password into a user name and password input box in a script or send a request to a corresponding system through an http request to obtain a token with related authority so as to realize logging in the mailbox; and the filling of the subject, the receiver, the mail content and the like can be realized in a preset configuration mode.
Therefore, the automatic test script in the embodiment of the application does not need to pay attention to how the function module is implemented, that is, when the automatic test script is generated, only how a user operates to implement the function needs to be known, and a corresponding script is written. When the automatic test script is called to realize the function of automatically triggering the service, the part of the service function module is involved, and the original code of the function module can be directly multiplexed; that is, the automated test script does not need to write functional module code, so that the amount of code written can be reduced. In addition, the original functional module code may also involve interaction among a plurality of complex modules, the automatic service triggering is realized through the automatic test script provided by the embodiment of the application, the difficulty of code compiling can be reduced, the synchronization of the triggered functional logic during automatic triggering and the triggered functional logic during manual triggering can be ensured, and the accuracy of the triggered function is ensured.
Optionally, the generation process of the automated test script may include the following steps:
determining a corresponding automatic test tool according to the system type of the service to be triggered;
and generating an automatic test script corresponding to the operation flow of the service to be triggered by utilizing the automatic test tool.
Generally, the automated testing tools corresponding to different system types are different, for example, when the service to be triggered is realized through a web page, a web automated testing tool is selected; and when the service to be triggered is realized through the APP access of the android terminal, selecting an automatic testing tool of the android mobile terminal.
After the automatic test tool is determined, the corresponding automatic test script can be compiled by using the automatic test tool and the operation flow of the service to be triggered, and the corresponding automatic test script is stored, so that the automatic test script can be ensured to be adaptive to the operation environment of the service to be triggered.
Further, in an optional embodiment, there may be a plurality of services to be triggered, and the method may further include:
storing the automatic test script into a preset database;
and recording the corresponding relation between the storage path of the automatic test script and the service identifier into a preset mapping table.
In this embodiment, when there are multiple services to be triggered, the automated test script corresponding to each service to be triggered may be stored in the preset database. For the convenience of subsequent use, the corresponding relationship between the storage path of the automatic test script and the corresponding service identifier of the service to be triggered can be recorded, and the corresponding relationship is recorded in the preset mapping table.
Further, the process of obtaining the automated test script corresponding to the service identifier may include:
searching a storage path of the automatic test script corresponding to the service identifier from the preset mapping table;
and acquiring the automatic test script from the preset database according to the storage path.
In this embodiment, because the preset database stores a plurality of automated test scripts corresponding to the service to be triggered, when the target service to be triggered is determined, the storage path of the corresponding automated test script can be found from the preset mapping table according to the service identifier of the target service to be triggered, and then the corresponding automated test script is obtained from the preset database according to the storage path.
In step 103, the automated test script is run to automatically trigger the service to be triggered.
After the automatic test script is determined, the automatic test script can be automatically operated to realize the function of automatically triggering the service to be triggered.
Specifically, in the process of running the automatic test script, the functional module corresponding to the service to be triggered is triggered according to the operation flow of the service to be triggered, so as to realize automatic triggering of the service to be triggered.
Illustratively, continuing to take the example that the service to be triggered is a mail sending service, when an automatic test script is run, and when the automatic test script is run to a node corresponding to a login mailbox, a user name and a password in the automatic test script can be used to fill in a corresponding input box, so as to realize automatic login mailbox; then the automatic test script continues to run until a letter-writing button is simulated and clicked, and then an email-writing interface can be entered; and then, the automatic test script continuously runs to the nodes of the filling subject, the receiver, the mail content and the like, at the moment, the subject, the receiver, the mail content and the like in the preset configuration can be obtained and filled into the corresponding input field, and finally, the automatic test script continuously runs to the simulated click sending button, so that the mail can be sent to the corresponding receiver, and the function of automatically triggering the mail sending service is realized.
Further, in an optional embodiment of the present application, the running the automated test script to automatically trigger the service to be triggered may further include:
receiving a setting operation aiming at the execution time of the service to be triggered, and determining a starting time condition of the automatic test script;
and when the current time meets the starting time condition, running the automatic test script.
In some scenarios, a user needs to process a certain service at regular time or repeatedly process a certain service according to a certain time rule, at this time, the execution time of the service to be triggered may be set before sending the automatic trigger command, and the device for automatically triggering the service may determine the start time condition of the automatic test script according to the setting operation after receiving the setting operation for the execution time of the service to be triggered. For example, when a user needs to go 8 on the 1 st morning of 4 months of 2021: 00 when processing the target service, the execution time of the target service can be set to be 2021, 4, month, 1, day 8: 00, namely the starting time condition of the automatic test script is 2021 year 4, month 1, day 8: 00. as another example, when the user needs to be at 8 a.m. each day: 00 when processing the target service, the execution time of the target service may be set to 8: 00 and repeated every day, namely the starting time condition of the automatic test script is 8: 00.
after the starting time condition of the automatic test script is determined, whether the current time meets the starting time condition or not is judged, if yes, the automatic test script is operated, and if not, the automatic test script is not operated. That is, after the user sets the execution time of the service to be triggered, the automated test script corresponding to the service to be triggered can be run according to the execution time, so as to meet the requirements of the user.
The method and the device for automatically triggering the service to be triggered receive the automatic triggering command, the automatic triggering command comprises the service identification of the service to be triggered, the automatic testing script corresponding to the service identification is obtained, and the automatic testing script is operated, so that the service to be triggered is automatically triggered. In this embodiment, since the automatic test script corresponds to the operation flow of the service to be triggered, when the automatic test script runs, the functional module corresponding to the service to be triggered can be driven to run according to the operation flow, so that the codes of the functional module of the service to be triggered can be reused, and only the script codes of the operation flow need to be written, thereby reducing the code amount and contributing to saving manpower.
In order to enable those skilled in the art to more clearly understand the technical solution of the present application, a process of automatically triggering a service in the embodiment of the present application will be described below by taking an example that a service to be triggered collects a test result on a test platform and sends the test result to a specified mailbox.
In the prior art, when a user needs to collect test results on a test platform and send the test results to a designated mailbox, the user needs to click a 'collecting' button on a test report page in the test platform, the test platform can automatically collect test operation conditions of the week and generate a preview mail pattern, after the user passes the examination, the user needs to input a receiver in an input box corresponding to the receiver, and finally, the 'sending' button is clicked to finish mail sending.
In the process of implementing the service, the mail content (the summarized test result) is a content text generated by depending on a javascript library at the front end, and when a send button is clicked, the content text is also sent to the background, and then the background sends the mail through an SMTP protocol.
Therefore, when the automation of the above-mentioned service needs to be realized, because the mail content file is directly generated by the front end after the front end collects different test operation results, if the mail content file is developed by the back end, the javascript library needs to be rewritten due to different operation environments and development languages, and the process is complicated and has no operability.
Aiming at the scene, the scheme provided by the application only needs to construct a simplest script triggering system and compile an automatic test script, namely the device for automatically triggering the service. The process of the automatic test script comprises the following steps: the method comprises the steps of logging in a test platform by a user name and a password → entering a report page → simulating clicking a summary button → inputting a subject and a receiver → simulating clicking a sending button, wherein the user name and the password can be written into an automatic test script, and the inputting of the subject and the receiver can be realized in a system in a configuration mode.
When the above-mentioned automatic test script runs, the following processes can be included:
logging in a test platform by using a user name and a password in the automatic test script;
triggering a summarizing function module corresponding to the summarizing test result in the test platform, and enabling the summarizing function module to operate to obtain a corresponding mail containing the test result;
acquiring a designated mailbox from a preset configuration, and taking the designated mailbox as a receiver of the mail;
and triggering the sending function module to operate the sending function module so as to send the mail to the specified mailbox.
That is to say, the method for automatically triggering a service provided in the embodiment of the present application can directly multiplex a function module of a service to be triggered, and therefore, how to implement the function module of the service to be triggered does not need to be concerned.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 2, a block diagram of an embodiment of an apparatus for automatically triggering a service according to the present application is shown, where the apparatus may specifically include the following modules:
a first receiving module 201, configured to receive an automatic trigger command, where the automatic trigger command includes a service identifier of a service to be triggered;
the script obtaining module 202 is configured to obtain an automated test script corresponding to the service identifier; the automatic test script corresponds to the operation flow of the service to be triggered;
and the script running module 203 is configured to run the automatic test script to automatically trigger the service to be triggered.
Optionally, the script running module 203 is specifically configured to trigger the function module corresponding to the service to be triggered according to the operation flow in the process of running the automatic test script, so as to implement automatic triggering of the service to be triggered.
Optionally, when the service to be triggered collects the test result on the test platform and sends the test result to the specified mailbox, the script running module 203 includes:
the login module is used for logging in the test platform;
the summarizing triggering module is used for triggering a summarizing function module corresponding to the summarizing test result in the test platform to enable the summarizing function module to operate so as to obtain a corresponding mail containing the test result;
the mailbox acquisition module is used for acquiring the specified mailbox from preset configuration and taking the specified mailbox as a receiver of the mail;
and the sending triggering module is used for triggering the sending function module to operate the sending function module so as to send the mail to the specified mailbox.
Optionally, the script execution module 203 further includes:
the second receiving module is used for receiving the setting operation of the execution time of the service to be triggered and determining the starting time condition of the automatic test script;
and the running starting module is used for running the automatic test script when the current time meets the starting time condition.
Optionally, the apparatus further comprises:
the test tool determining module is used for determining a corresponding automatic test tool according to the system type of the service to be triggered;
and the test script generating module is used for generating an automatic test script corresponding to the operation flow of the service to be triggered by utilizing the automatic test tool.
Optionally, the apparatus further comprises:
the test script storage module is used for storing the automatic test script into a preset database;
and the corresponding relation mapping module is used for recording the corresponding relation between the storage path of the automatic test script and the service identifier into a preset mapping table.
Optionally, the script obtaining module 202 includes:
the path determining module is used for searching a storage path of the automatic test script corresponding to the service identifier from the preset mapping table;
and the target acquisition module is used for acquiring the automatic test script from the preset database according to the storage path.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiment of the application also discloses an electronic device, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the method for automatically triggering the service are realized.
The embodiment of the application also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of the method for automatically triggering the service.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of 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, embodiments of 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.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of 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 terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, 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 terminal 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 terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method for automatically triggering the service, the device for automatically triggering the service, the electronic device and the storage medium provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for automatically triggering a service, the method comprising:
receiving an automatic trigger command, wherein the automatic trigger command comprises a service identifier of a service to be triggered;
acquiring an automatic test script corresponding to the service identifier; the automatic test script corresponds to the operation flow of the service to be triggered;
and running the automatic test script to realize the automatic triggering of the service to be triggered.
2. The method according to claim 1, wherein the running the automated test script to automatically trigger the service to be triggered comprises:
and in the process of running the automatic test script, triggering the functional module corresponding to the service to be triggered according to the operation flow so as to realize the automatic triggering of the service to be triggered.
3. The method according to claim 2, wherein when the service to be triggered is a service that collects test results on a test platform and sends the test results to a specified mailbox, the running of the automated test script to automatically trigger the service to be triggered comprises:
logging in the test platform;
triggering a summary function module corresponding to the summary test result in the test platform, and enabling the summary function module to operate to obtain a corresponding mail containing the test result;
acquiring the specified mailbox from a preset configuration, and taking the specified mailbox as a receiver of the mail;
and triggering a sending function module to operate the sending function module so as to send the mail to the specified mailbox.
4. The method according to any one of claims 1-3, wherein the running the automated test script to automatically trigger the service to be triggered further comprises:
receiving a setting operation aiming at the execution time of the service to be triggered, and determining a starting time condition of the automatic test script;
and when the current time meets the starting time condition, running the automatic test script.
5. The method of claim 1, wherein prior to said receiving an auto-trigger command, the method further comprises:
determining a corresponding automatic test tool according to the system type of the service to be triggered;
and generating an automatic test script corresponding to the operation flow of the service to be triggered by utilizing the automatic test tool.
6. The method of claim 5, further comprising:
storing the automatic test script into a preset database;
and recording the corresponding relation between the storage path of the automatic test script and the service identifier into a preset mapping table.
7. The method of claim 6, wherein the obtaining the automated test script corresponding to the service identifier comprises:
searching a storage path of the automatic test script corresponding to the service identifier from the preset mapping table;
and acquiring the automatic test script from the preset database according to the storage path.
8. An apparatus for automatically triggering a service, the apparatus comprising:
the first receiving module is used for receiving an automatic trigger command, wherein the automatic trigger command comprises a service identifier of a service to be triggered;
the script obtaining module is used for obtaining an automatic test script corresponding to the service identifier; the automatic test script corresponds to the operation flow of the service to be triggered;
and the script running module is used for running the automatic test script so as to automatically trigger the service to be triggered.
9. An electronic device, comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, the computer program, when executed by the processor, implementing the steps of the method of automatically triggering a service according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method of automatically triggering a service of any one of claims 1 to 7.
CN202110461466.1A 2021-04-27 2021-04-27 Method and device for automatically triggering service, electronic equipment and storage medium Pending CN113157581A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110461466.1A CN113157581A (en) 2021-04-27 2021-04-27 Method and device for automatically triggering service, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110461466.1A CN113157581A (en) 2021-04-27 2021-04-27 Method and device for automatically triggering service, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113157581A true CN113157581A (en) 2021-07-23

Family

ID=76871744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110461466.1A Pending CN113157581A (en) 2021-04-27 2021-04-27 Method and device for automatically triggering service, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113157581A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834588A (en) * 2014-02-11 2015-08-12 腾讯科技(深圳)有限公司 Permanent residence cross site script vulnerability detection method and apparatus
CN110618778A (en) * 2019-09-19 2019-12-27 深圳前海环融联易信息科技服务有限公司 Method and system for automatically generating business data, electronic equipment and computer storage medium
CN111078637A (en) * 2019-10-12 2020-04-28 中国平安财产保险股份有限公司 Script file online method and device, computer equipment and storage medium
CN111897518A (en) * 2020-07-23 2020-11-06 广东电网有限责任公司韶关供电局 Method, device, equipment and storage medium for automatically executing business
CN112306893A (en) * 2020-11-27 2021-02-02 平安普惠企业管理有限公司 UI page testing method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834588A (en) * 2014-02-11 2015-08-12 腾讯科技(深圳)有限公司 Permanent residence cross site script vulnerability detection method and apparatus
CN110618778A (en) * 2019-09-19 2019-12-27 深圳前海环融联易信息科技服务有限公司 Method and system for automatically generating business data, electronic equipment and computer storage medium
CN111078637A (en) * 2019-10-12 2020-04-28 中国平安财产保险股份有限公司 Script file online method and device, computer equipment and storage medium
CN111897518A (en) * 2020-07-23 2020-11-06 广东电网有限责任公司韶关供电局 Method, device, equipment and storage medium for automatically executing business
CN112306893A (en) * 2020-11-27 2021-02-02 平安普惠企业管理有限公司 UI page testing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109857667B (en) Interface automation test method, test device, test equipment and storage medium
CN108319547B (en) Test case generation method, device and system
CN111159049B (en) Automatic interface testing method and system
CN102567198B (en) System and method for testing application program in physical system environment
CN110795311B (en) Event playback method and device
CN110716853A (en) Test script recording method, application program testing method and related device
CN109976966A (en) A kind of application program launching time counting method, apparatus and system
CN114398293A (en) Interface test case generation method, electronic device and storage medium
CN110765010B (en) Method and device for online debugging visual development based on Flink
CN114003451B (en) Interface testing method, device, system and medium
CN111767229A (en) Performance test method, device and equipment
CN109587351B (en) Call testing method, device, equipment and storage medium
CN112559348A (en) Test analysis method, system, equipment and medium based on jacoco
CN109542775B (en) Test script generation and execution method and device
CN113157581A (en) Method and device for automatically triggering service, electronic equipment and storage medium
CN112564996A (en) Pressure test flow scheduling method, pressure test flow control device and computer readable medium
US10169216B2 (en) Simulating sensors
CN115987821A (en) Gateway routing test method and device
CN110727416B (en) Development framework generation method and related device
CN110221952B (en) Service data processing method and device and service data processing system
CN110633214A (en) Configuration method and device of internal test message
CN112905449B (en) Target test method, device, equipment and storage medium
CN112835803B (en) Tool generation method, test data construction method, device, equipment and medium
CN109324966B (en) Test script generation and execution method and device
CN116860322A (en) Front-end data source processing method, device, equipment and 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