Business scenario testing method, device, electronic device and storage medium

By building simulation scenarios and generating script files, the overall linkage verification of complex business scenarios is achieved, the problem of single verification scenarios in the existing technology is solved, and the stable upgrade of the version and the scalability of verification components is ensured.

CN112988600BActive Publication Date: 2024-11-22INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110473721.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-29
Publication Date
2024-11-22
Estimated Expiration
2041-04-29

AI Technical Summary

Technical Problem

Existing automated verification tools can only provide a single technical scenario verification capability, and cannot meet the overall linkage verification needs of complex business scenarios, resulting in limited stability of version upgrades during production.

Method used

By selecting multiple pre-set scenario components to build simulation scenarios, generating script files, and performing verification test operations based on script files, combining pre-set configuration information for verification, analyzing verification results to generate analysis reports, realizing the overall linkage of complex business scenarios verify.

Benefits of technology

It provides an overall linkage verification function for complex business scenarios, ensures stable upgrade of the version during production, reduces the risk of verification errors, and supports flexible expansion of verification components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112988600B_ABST
    Figure CN112988600B_ABST
Patent Text Reader

Abstract

The present invention discloses a business scenario testing method, device, electronic device and storage medium, which relates to the field of information security, wherein the method comprises: in response to starting a business scenario testing operation, selecting multiple pre-set scenario components based on the business scenario to be tested to construct a simulation scenario, wherein the scenario components comprise: a verification component; generating a script file according to the logical relationship between the scenario components in the simulation scenario; performing a test operation on the simulation scenario according to the script file, and in response to executing the script file corresponding to the verification component, performing a corresponding verification test operation based on pre-set configuration information; analyzing the simulation scenario according to the verification test operation and expected information, and generating an analysis result. Through the present invention, an overall linkage verification function can be provided for complex business scenarios, ensuring the stable upgrade of versions during production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security, and in particular to a business scenario testing method, device, electronic equipment and storage medium. Background Art

[0002] As the iteration cycle of the software industry becomes shorter and shorter, in order to ensure the normal operation of the online business functions, it is necessary to do a good job of technical verification during the production period. Many production verification tasks of traditional applications are completed manually by operation and maintenance personnel, which invisibly increases the production time window and the possibility of manual error verification. With the transformation of operation and maintenance automation, more and more automated verification tools have been launched. However, the verification scenarios of these automated verification tools are relatively single and lack linkage verification effects. Faced with complex business scenarios, single verification functions such as data verification and interface verification cannot meet the needs. In addition, production practice has found that passing local function verification does not mean that the overall business scenario function can operate normally. Summary of the invention

[0003] In view of this, the present invention provides a business scenario testing method, an electronic device and a storage medium to solve at least one of the above-mentioned problems.

[0004] According to a first aspect of the present invention, a business scenario testing method is provided, the method comprising:

[0005] In response to starting a business scenario test operation, a plurality of pre-set scenario components are selected based on the business scenario to be tested to construct a simulation scenario, wherein the scenario components include: a verification component;

[0006] Generate a script file according to the logical relationship between the scene components in the simulation scene;

[0007] Performing a test operation on the simulation scenario according to the script file, and in response to executing the script file corresponding to the verification component, performing a corresponding verification test operation based on the preset configuration information;

[0008] Analyze the simulation scenario based on the validation test operations and expected information, and generate analysis results.

[0009] According to a second aspect of the present invention, a service scenario testing device is provided, the device comprising:

[0010] A simulation scenario construction unit is used to select a plurality of pre-set scenario components based on the business scenario to be tested to construct a simulation scenario in response to starting a business scenario test operation, wherein the scenario components include: a verification component;

[0011] A script file generation file is used to generate a script file according to the logical relationship between the scene components in the simulation scene;

[0012] A testing unit, configured to perform a test operation on the simulation scenario according to the script file, and in response to executing the script file corresponding to the verification component, perform a corresponding verification test operation based on preset configuration information;

[0013] The analysis unit is used to analyze the simulation scenario according to the verification test operation and the expected information, and generate the analysis result.

[0014] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.

[0015] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0016] It can be seen from the above technical solution that a simulation scenario is constructed by selecting multiple pre-set scenario components based on the business scenario to be tested, and then a script file is generated according to the logical relationship between the scenario components in the simulation scenario, and the simulation scenario is tested according to the script file. When the script file corresponding to the verification component is executed, the corresponding verification test operation is performed based on the pre-set configuration information, and then the simulation scenario is analyzed according to the verification test operation and the expected information to generate an analysis result. Compared with the existing technology, this technical solution can provide an overall linkage verification function for complex business scenarios, thereby ensuring the stable upgrade of the version during production. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 is a flowchart of a business scenario testing method according to an embodiment of the present invention;

[0019] Figure 2 is a structural block diagram of a business scenario testing device according to an embodiment of the present invention;

[0020] Figure 3 is an example structural block diagram of a business scenario testing system according to an embodiment of the present invention;

[0021] Figure 4 is a structural block diagram of a front-end arrangement device 1 according to an embodiment of the present invention;

[0022] Figure 5 is a structural block diagram of an arrangement engine device 2 according to an embodiment of the present invention;

[0023] Figure 6 is a structural block diagram of a production verification component execution device 3 according to an embodiment of the present invention;

[0024] Figure 7 is a structural block diagram of an early warning device 4 according to an embodiment of the present invention;

[0025] Figure 8 According to an embodiment of the present invention, Figure 3 Flowchart of the system's working principle;

[0026] Fig. 9 It is a schematic block diagram of the system structure of the electronic device 600 according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] At present, automated verification tools can only provide a single technical scenario verification capability, and can only verify simple functions or a small part of functions in complex business scenarios. They cannot meet the verification of complex business functions such as the entire transaction link, which reduces the stability of version upgrades during production. Based on this, an embodiment of the present invention provides a business scenario testing solution, which can provide an overall linkage verification function for complex business scenarios, thereby ensuring the stable upgrade of versions during production. The following is a detailed description of the embodiments of the present invention in conjunction with the accompanying drawings.

[0029] Figure 1 is a flow chart of a business scenario testing method according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0030] Step 101, in response to starting a business scenario test operation, a plurality of pre-set scenario components are selected based on the business scenario to be tested to construct a simulation scenario, wherein the scenario components include: a verification component.

[0031] Step 102, generating a script file according to the logical relationship between the scene components in the simulation scene, wherein the logical relationship may include: series connection and / or parallel connection.

[0032] Step 103, performing a test operation on the simulation scenario according to the script file, and in response to executing the script file corresponding to the verification component, performing a corresponding verification test operation based on the preset configuration information;

[0033] Step 104: Analyze the simulation scenario according to the verification test operation and the expected information, and generate analysis results.

[0034] A simulation scenario is constructed by selecting multiple pre-set scenario components based on the business scenario to be tested, and then a script file is generated according to the logical relationship between the scenario components in the simulation scenario, and the simulation scenario is tested according to the script file. When the script file corresponding to the verification component is executed, the corresponding verification test operation is performed based on the pre-set configuration information, and then the simulation scenario is analyzed according to the verification test operation and expected information to generate an analysis result. Compared with the prior art, the embodiment of the present invention can provide an overall linkage verification function for complex business scenarios, thereby ensuring the stable upgrade of the version during production.

[0035] In step 101, a plurality of pre-set scenario components may be selected based on the business scenario to be tested; and then the selected plurality of scenario components may be connected according to the logical relationship to construct the simulation scenario.

[0036] In the specific implementation process, the verification components include: a database verification component, an interface verification component, a configuration file verification component and a log file verification component.

[0037] When the verification component is a database verification component, the verification test operation of step 103 includes: executing a script file on a database corresponding to the database verification component based on preset configuration information.

[0038] When the verification component is an interface verification component, the verification test operation of step 103 includes: based on preset configuration information, calling an interface corresponding to the interface verification component and executing a script file on the interface.

[0039] When the verification component is a configuration file verification component, the verification test operation of step 103 includes: based on preset configuration information, obtaining a configuration file corresponding to the configuration file verification component and executing a script file on the configuration file.

[0040] When the verification component is a log file verification component, the verification test operation of step 103 includes: based on preset configuration information, obtaining a log file corresponding to the log file verification component and executing a script file on the log file.

[0041] In actual operation, the above-mentioned pre-set configuration information can be set based on different business scenarios and different test operations, and the present invention is not limited to this.

[0042] Based on similar inventive concepts, an embodiment of the present invention further provides a business scenario testing device, which can preferably be used to implement the process in the above method embodiment.

[0043] Figure 2 is a structural block diagram of a business scenario testing device according to an embodiment of the present invention, such as Figure 2 As shown, the device includes: a simulation scenario construction unit 21, a script file generation file 22, a testing unit 23 and an analysis unit 24, wherein:

[0044] The simulation scenario construction unit 21 is used for selecting a plurality of pre-set scenario components based on the business scenario to be tested to construct a simulation scenario in response to starting the business scenario test operation, wherein the scenario components include: a verification component;

[0045] The script file generation file 22 is used to generate a script file according to the logical relationship between the scene components in the simulation scene, and the logical relationship includes at least one of the following: series connection and parallel connection;

[0046] The testing unit 23 is used to perform a test operation on the simulation scenario according to the script file, and in response to the script file corresponding to the execution verification component, perform a corresponding verification test operation based on the preset configuration information;

[0047] The analysis unit 24 is used to analyze the simulation scenario according to the verification test operation and the expected information, and generate an analysis result.

[0048] A simulation scenario is constructed by selecting multiple pre-set scenario components based on the business scenario to be tested through the simulation scenario construction unit 21. Then, the script file generation file 22 generates a script file according to the logical relationship between the scenario components in the simulation scenario. The testing unit 23 performs test operations on the simulation scenario according to the script file. When the script file corresponding to the verification component is executed, the corresponding verification test operation is performed based on the pre-set configuration information. Then, the analysis unit 24 analyzes the simulation scenario according to the verification test operation and the expected information to generate an analysis result. Compared with the prior art, the embodiment of the present invention can provide an overall linkage verification function for complex business scenarios, thereby ensuring the stable upgrade of the version during production.

[0049] Specifically, the simulation scene construction unit includes: a selection module and a simulation scene construction module, wherein:

[0050] A selection module, used to select multiple pre-set scenario components based on the business scenario to be tested;

[0051] The simulation scene construction module is used to connect the selected multiple scene components according to the logical relationship to construct the simulation scene.

[0052] In actual operation, the verification components include: database verification component, interface verification component, configuration file verification component and log file verification component.

[0053] In one embodiment, the test unit includes at least one of the following:

[0054] A database testing module, used for executing a script file on a database corresponding to the database verification component based on preset configuration information when the verification component is a database verification component;

[0055] An interface testing module, which is used for calling an interface corresponding to the interface verification component and executing a script file on the interface based on preset configuration information when the verification component is an interface verification component;

[0056] A configuration file testing module, used for obtaining a configuration file corresponding to the configuration file verification component and executing a script file on the configuration file based on preset configuration information when the verification component is a configuration file verification component;

[0057] The log file testing module is used for obtaining the log file corresponding to the log file verification component and executing a script file on the log file based on preset configuration information when the verification component is a log file verification component.

[0058] In order to better understand the present invention, the following Figure 3 The embodiment of the present invention is described in detail with reference to an example system, where the example system is implemented based on a Jenkins (an open source automation server) system.

[0059] like Figure 3 As shown, the exemplary system includes: a front-end orchestration device 1 (having the function of the above-mentioned simulation scenario construction unit 21), an orchestration engine device 2 (having the function of the above-mentioned script file generation file 22), a production verification component execution device 3 (having the function of the above-mentioned test unit 23), and an early warning device 4 (having the function of the above-mentioned analysis unit 24). The front-end orchestration device 1 is connected to the orchestration engine device 2; the orchestration engine device 2 is connected to the production verification component execution device 3 and the early warning device 4, wherein:

[0060] The front-end arrangement device 1 supports users to maintain the pipeline arrangement information in the front-end. Users can select predefined verification components and maintain the serial and parallel relationships between pipeline verification components, the data flow relationship between verification components, and the logical relationship between verification components by dragging page frames and lines. After the pipeline maintenance is completed, the arrangement engine device 2 can be connected to generate and execute pipeline tasks, and the verification task pipeline as a whole and the verification results of each step can be displayed by jumping to the Blue Ocean interface native to Jenkins.

[0061] The orchestration engine device 2 is connected to the front-end orchestration device 1, obtains the pipeline configuration information orchestrated by the user, and forms the script of the jenkins pipeline. The string-type tasks are distinguished by different stages, and the parallel tasks are used as multiple steps in the same stage. The variable information of each verification component configuration is written in the jenkins server configuration file to realize data transfer between different stages, and support the verification result of the previous verification component as the input condition of the subsequent verification component. By stringing in the logical relationship combination unit, it supports the combination of multiple verification components to obtain the final verification result. For example, when the verification unit A or the verification unit B succeeds, the overall verification is considered successful. When the pipeline task is triggered by the front-end, the jenkins pipeline build task execution starts.

[0062] The production verification component execution device 3 supports verification components such as database verification unit, configuration file verification unit, log verification unit, interface verification unit, etc. When the orchestration engine device executes the pipeline task and calls a verification component, it interacts with the corresponding verification component by calling the HTTP (HyperText Transfer Protocol) interface. The verification component supports flexible management and can bring out new verification units through configuration information to achieve rich and extended functions.

[0063] The early warning device 4 analyzes the execution results of the pipeline tasks. When it is considered that there is an abnormality in the verification, the verification result information is sent to the monitoring center for alarm and pushed to the staff.

[0064] In order to further understand the exemplary system, each device is described in detail below with reference to the accompanying drawings.

[0065] (1) Front-end arrangement device 1

[0066] The front-end page is implemented through the jQuery (a JavaScript framework) framework, which is used to interact with users. It provides verification unit components in the foreground, including database verification components, log verification components, interface verification components, and configuration file verification components. It supports extending verification component options through configuration in the back-end. Users can edit the pipeline by dragging page frames and lines. Each link in the pipeline configures variables as input conditions or execution results. The subsequent links can refer to the execution results of the previous links as input conditions. When the user completes the pipeline configuration, the execution button can be used to trigger the pipeline execution. The page jumps to the Blue Ocean interface native to Jenkins to display the overall verification task pipeline and the verification results of each step.

[0067] Figure 4 It is a structural block diagram of the front-end arrangement device 1, such as Figure 4 As shown, the front-end arrangement device 1 includes: a pipeline arrangement unit 11 and a task management unit 12, wherein:

[0068] Pipeline choreography unit 11: used to provide a user interactive interface, provide a verification unit component in the foreground, and support database verification components, log verification components, interface verification components, and configuration file verification components. Users can edit the pipeline by dragging page frames and lines. Each link in the pipeline configures variables as input conditions or execution results. The subsequent links can refer to the execution results of the previous links as input conditions. When the user completes the pipeline editing and clicks Save, the connection choreography engine device 2 saves the configuration information.

[0069] Task management unit 12: provides a foreground task execution button. When the user can press the button to trigger the pipeline execution, the orchestration engine device 2 is connected to start the pipeline execution. At the same time, the foreground page jumps to the Jenkins native Blue Ocean interface to display the verification task pipeline as a whole and the verification results of each step.

[0070] (2) Arrangement engine device 2

[0071] The user configuration information is read from the front-end orchestration device 1, and then the device generates a Jenkins pipeline declarative script based on the configuration information, and writes the serial, parallel and logical combination relationships of each verification component into the declarative script. For each link variable configured in the front-end, by writing it into the Jenkins server configuration file, shared reading and writing between each link is realized, ensuring that the subsequent link of the pipeline can read the result variable of the previous link.

[0072] Figure 5 is a structural block diagram of the arrangement engine device 2, such as Figure 5 As shown, the orchestration engine device 2 includes: an orchestration configuration unit 21 and a pipeline execution unit 22, wherein:

[0073] Orchestration configuration unit 21: Get the pipeline orchestration configuration information passed in by the front end, and generate a Jenkins pipeline declarative script according to certain rules. The outermost pipeline uses {} to contain the entire script. Stages are defined in the script as execution links. Stages support using {} to contain multiple string-type execution links. A single stage can be nested in parallel to define multiple parallel execution stage links. The script example is as follows:

[0074]

[0075]

[0076] The declarative script is saved on the Jenkins server. The declarative script mainly stores the serial, parallel and logical combination relationships between the verification components.

[0077] Pipeline execution unit 22: executes declarative scripts through jenkins pipeline. When executing to the verification component, connect to the production verification component execution device 3. After each verification component is executed, the result variable information of the front-end configuration is written into the jenkins configuration file. In the pipeline, it is saved to the jenkins server temporary file through the variable name and variable value. When the subsequent verification component involves the use of variables, the variable value is obtained from the configuration file through the unstash operation. The specific configuration example is as follows. After the final pipeline is executed, the early warning device 4 is connected.

[0078]

[0079]

[0080] (3) Production verification component execution device 3

[0081] It supports verification components such as database verification unit, configuration file verification unit, log verification unit, interface verification unit, etc. When the orchestration engine device executes the pipeline task and calls a verification component, it interacts with the corresponding verification component by calling the HTTP interface. The verification component supports flexible management and can bring out new verification units through configuration information to achieve rich functional expansion.

[0082] Figure 6 is a structural block diagram of the production verification component execution device 3, such as Figure 6 As shown, the production verification component execution device 3 includes: an overall scheduling unit 31, a database verification unit 32, an interface verification unit 33, a configuration file verification unit 34, and a log verification unit 35, wherein:

[0083] The overall scheduling unit 31 is used to directly connect with the orchestration engine device 2, and forward the request to the database verification unit 32, the interface verification unit 33, the configuration file verification unit 34, and the log verification unit 35 according to the request verification component type. It supports the introduction of new verification units by importing configuration to achieve rich and extended functions.

[0084] Database verification unit 32: supports connection with common databases such as Oracle and MySQL, obtains execution results according to user-defined scripts, and compares them with expected values. If the expected values ​​are not met, verification failure is returned, otherwise verification is considered successful.

[0085] Example: Application configuration database address jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521 / paas, user password information, execute SQL (Structured Query Language) statement: select count(1)from table, expected result is greater than 10. The database verification unit will select the database driver according to the database type, then establish a connection with the database through the user password information and execute SQL statements, compare the SQL execution result with the expected value, and if the SQL execution result is 11, it is considered that the verification has passed.

[0086] The interface verification unit 33 supports HTTP interface call requests and performs verification according to the interface address and expected keywords predefined by the user. If the expected keywords are not met in the interface return information, verification failure is returned, otherwise verification is considered successful.

[0087] Example: The application configures the interface access address http: / / xxx:80 / xxx / xxx, requests the http header {"Authorization":"xxx"}, and expects the result to contain the xxxx keyword. The interface verification unit calls the interface through the HTTP protocol, obtains the result returned by the interface, and then analyzes whether the result contains the expected xxxx keyword. If so, the verification is considered successful.

[0088] Configuration file verification unit 34: supports verification of configuration files in traditional servers and containers, pulls configuration files from servers or containers through Ansible (a cloud management platform) or Docker API (an interface), and then parses the configuration files and searches based on keywords predefined by the user. If the keyword cannot be searched, verification failure is returned, otherwise verification is considered successful.

[0089] Example: Application configuration server IP: xxx.xxx.xxx.xxx, user and password information, configuration file path / home / xxx / a.properties, and expected configuration item key=value. The configuration file verification unit connects to the server through the ansible operation and maintenance tool SSh (Secure Shell, a protocol that provides security for remote login sessions and other network services) to pull the configuration file to the local, selects the corresponding parsing method according to the configuration file suffix, and then matches whether the content contains the key=value configuration item. If it does, the verification is considered to be successful. For the verification of the configuration file in the container, the main difference is the way to pull the configuration file. The configuration file needs to be pulled from the container to the local through the exec api interface provided by docker.

[0090] Log verification unit 35: supports verification of log files in traditional servers and containers. Log files are pulled from servers or containers through ansible or docker api, and then the log files are parsed and searched according to user-defined keywords. If the keyword cannot be searched, verification failure is returned, otherwise verification is considered successful.

[0091] Example: Application configuration server IP: xxx.xxx.xxx.xxx, user and password information, log file path / home / xxx / a.log, and expected keyword success. The configuration file verification unit connects to the server through the ansible operation and maintenance tool SSh to pull the log file to the local computer, parses the log file to see if it contains the keyword, and if so, the verification is considered successful. For configuration file verification in the container, the main difference is the way to pull the configuration file. The configuration file needs to be pulled from the container to the local computer through the exec api interface provided by docker.

[0092] (4) Early warning device 4

[0093] The early warning device 4 receives the execution results of the pipeline and analyzes the results. If there is any abnormal verification, an early warning is triggered, and the early warning information is sent to the monitoring center and pushed to the administrator.

[0094] Figure 7 It is the structural diagram of the early warning device, such as Figure 7 As shown, the early warning device includes: an analysis unit 41 and an early warning unit 42, wherein:

[0095] The analysis unit 41 analyzes the execution results of the pipeline tasks in the orchestration engine device 2. If the verification shows an abnormality, the analysis unit 41 connects to the early warning unit 42 to send an alarm message.

[0096] Early warning unit 42: After sorting out the verification abnormality information, it connects to the monitoring center to send the alarm information, and pushes the verification result information to the administrator in the form of email.

[0097] Figure 8 is based on Figure 3 The system's working principle flow chart is as follows: Figure 8 As shown, the process includes:

[0098] Step 801: The user configures and saves pipeline information through the front-end arrangement device 1;

[0099] Step 802: The background orchestration engine device 2 generates a Jenkins declarative script after obtaining the configuration information;

[0100] Step 803: The user clicks the pipeline execution button to trigger execution through the front-end arrangement device 1;

[0101] Step 804: the background orchestration engine device 2 starts the jenkins pipeline task execution;

[0102] Step 805: the pipeline execution process connects to the production verification component execution device 3, executes the specific verification unit and obtains the verification result;

[0103] Step 806: After the pipeline is executed, the early warning device 4 is connected to analyze the verification result and push the result information to the user.

[0104] The embodiment of the present invention associates simple, atomic technical verification components through a custom orchestration pipeline to achieve serial and parallel execution, transfer data between verification components and combine verification results according to logical relationships, thereby flexibly meeting the needs of technical verification of complex business scenarios during production, reducing the risk of problems introduced by production version upgrades, and at the same time, the system has the ability to expand verification components, which can reduce the maintenance cost of subsequent enrichment of verification components.

[0105] In actual operation, the above-mentioned units and modules may be provided in combination or individually, and the present invention is not limited thereto.

[0106] This embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, etc., but this embodiment is not limited thereto. In this embodiment, the electronic device may be implemented with reference to the above method embodiment and the embodiment of the business scenario testing device / system, the contents of which are incorporated herein, and the repeated parts are not repeated.

[0107] Fig. 9 FIG. 6 is a schematic block diagram of a system structure of an electronic device 600 according to an embodiment of the present invention. Fig. 9 As shown, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. It should be noted that this figure is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0108] In one embodiment, the business scenario testing function may be integrated into the central processor 100. The central processor 100 may be configured to perform the following control:

[0109] In response to starting a business scenario test operation, a plurality of pre-set scenario components are selected based on the business scenario to be tested to construct a simulation scenario, wherein the scenario components include: a verification component;

[0110] Generate a script file according to the logical relationship between the scene components in the simulation scene;

[0111] Performing a test operation on the simulation scenario according to the script file, and in response to executing the script file corresponding to the verification component, performing a corresponding verification test operation based on the preset configuration information;

[0112] Analyze the simulation scenario based on the validation test operations and expected information, and generate analysis results.

[0113] From the above description, it can be seen that the electronic device provided in the embodiment of the present application constructs a simulation scenario by selecting multiple pre-set scenario components based on the business scenario to be tested, and then generates a script file according to the logical relationship between the scenario components in the simulation scenario, and performs test operations on the simulation scenario according to the script file. When the script file corresponding to the verification component is executed, the corresponding verification test operation is performed based on the pre-set configuration information, and then the simulation scenario is analyzed according to the verification test operation and the expected information to generate an analysis result. Compared with the prior art, the present technical solution can provide an overall linkage verification function for complex business scenarios, thereby ensuring the stable upgrade of the version during production.

[0114] In another embodiment, the business scenario testing device / system may be configured separately from the central processor 100. For example, the business scenario testing device / system may be configured as a chip connected to the central processor 100, and the business scenario testing function may be implemented through the control of the central processor.

[0115] like Fig. 9 As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Fig. 9 In addition, the electronic device 600 may also include Fig. 9 For components not shown, reference may be made to the prior art.

[0116] like Fig. 9 As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.

[0117] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.

[0118] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.

[0119] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.

[0120] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0121] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0122] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.

[0123] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned business scenario testing method are implemented.

[0124] To summarize, in order to meet the demand for automated technical verification of complex business scenarios during production and to solve the problem that current technical verification scenarios are single and simple, an embodiment of the present invention proposes a production verification solution for complex business scenarios. By providing custom orchestration capabilities, simple, atomic technical verification components are connected in series and parallel, while providing data interaction capabilities between front and back verification components and combination capabilities based on logical relationships, and has the ability to flexibly customize the orchestration of technical verification for business scenarios.

[0125] The preferred embodiments of the present invention are described above with reference to the accompanying drawings. Many features and advantages of these embodiments are clear from this detailed description, and therefore the claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. In addition, since many modifications and changes are easily conceivable to those skilled in the art, it is not intended to limit the embodiments of the present invention to the precise structure and operation illustrated and described, but all suitable modifications and equivalents falling within its scope may be covered.

[0126] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0127] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0128] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0130] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A business scenario testing method, characterized in that: The method comprises: In response to starting a business scenario test operation, a plurality of pre-set scenario components are selected based on the business scenario to be tested to construct a simulation scenario, wherein the scenario components include: a verification component; Generate a script file according to the logical relationship between the scene components in the simulation scene; Performing a test operation on the simulation scenario according to the script file, and in response to executing the script file corresponding to the verification component, performing a corresponding verification test operation based on the preset configuration information; Analyze simulation scenarios based on validation test operations and expected information and generate analysis results; The verification components are an interface verification component, a configuration file verification component and a log file verification component; The performing of the corresponding verification test operation based on the preset configuration information includes: Verify according to the user-defined interface address and expected keywords. If the interface return information does not meet the expected keywords, the verification is considered failed. Otherwise, the verification is considered successful. Pull the configuration file from the server or container through Ansible or Docker API, then parse the configuration file and search according to the user's predefined keywords. If the keyword cannot be found, the verification fails. Otherwise, the verification is considered successful. Pull the log file from the server or container through Ansible or Docker API, then parse the log file and search according to the user's predefined keywords. If the keyword cannot be found, the verification fails. Otherwise, the verification is considered successful.

2. The method according to claim 1, characterized in that The logical relationship includes at least one of the following: series connection, parallel connection, and selecting a plurality of pre-set scenario components based on the business scenario to be tested to construct a simulation scenario includes: Select multiple pre-set scenario components based on the business scenario to be tested; The selected multiple scene components are connected according to the logical relationship to construct the simulation scene.

3. The method according to claim 1, characterized in that The verification component is a database verification component, and the corresponding verification test operation performed based on the preset configuration information includes: Based on the preset configuration information, a script file is executed on the database corresponding to the database verification component.

4. A business scenario testing device, characterized in that: The device comprises: A simulation scenario construction unit is used to select a plurality of pre-set scenario components based on the business scenario to be tested to construct a simulation scenario in response to starting a business scenario test operation, wherein the scenario components include: a verification component; A script file generation file is used to generate a script file according to the logical relationship between the scene components in the simulation scene; A testing unit, configured to perform a test operation on the simulation scenario according to the script file, and in response to executing the script file corresponding to the verification component, perform a corresponding verification test operation based on preset configuration information; An analysis unit, used for analyzing the simulation scenario according to the verification test operation and the expected information, and generating analysis results; The test unit includes at least one of the following: An interface test module, used for performing verification according to the interface address and expected keywords predefined by the user when the verification component is an interface verification component, and returning a verification failure if the expected keywords are not met in the interface return information, otherwise the verification is considered successful; A configuration file testing module is used when the verification component is a configuration file verification component. The configuration file is pulled from the server or container through ansible or docker api, and then the configuration file is parsed and searched according to the keywords predefined by the user. If the keyword cannot be searched, the verification fails, otherwise the verification is considered successful. The log file test module is used when the verification component is a log file verification component. The log file is pulled from the server or container through ansible or docker api, and then the log file is parsed and searched according to the user's predefined keywords. If the keyword cannot be searched, the verification failure is returned, otherwise the verification is considered successful.

5. The device according to claim 4, characterized in that The simulation scene construction unit comprises: A selection module, used to select multiple pre-set scenario components based on the business scenario to be tested; The simulation scene construction module is used to connect the selected multiple scene components according to the logical relationship to construct the simulation scene. The logical relationship includes at least one of the following: series connection and parallel connection.

6. The device according to claim 4, characterized in that The testing unit also includes: The database testing module is used to execute a script file on a database corresponding to the database verification component based on preset configuration information when the verification component is a database verification component.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 3 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.