Automated operation and maintenance test method, device, equipment and storage medium

By building automated operation and maintenance testing tools and integrating various object storage testing tools, the problem of long operation and maintenance time for object storage has been solved, and fault location has been simplified and operation and maintenance efficiency has been improved.

CN112328470BActive Publication Date: 2024-11-15CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011140927.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-22
Publication Date
2024-11-15
Estimated Expiration
2040-10-22

AI Technical Summary

Technical Problem

Object storage is time-consuming and inefficient to maintain. Existing tools such as Ansible cannot achieve one-click integration of different programming languages ​​and command-line tools, and lack a user-friendly front-end interface.

Method used

Build automated operation and maintenance testing tools. By decoupling the functions of the URL controller, business logic layer, model data layer and user interface layer, integrate software development kit, command line and script testing tools to achieve one-click testing and reduce operation and maintenance complexity and time overhead.

Benefits of technology

It simplifies fault location for object storage functional tools, improves operation and maintenance efficiency, and allows operation and maintenance personnel to quickly locate fault points without installing and configuring tools, thereby improving operation and maintenance management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112328470B_ABST
    Figure CN112328470B_ABST
Patent Text Reader

Abstract

The present application relates to the field of object storage technology, and in particular to an automated operation and maintenance test method, device, equipment and storage medium, the method comprising: receiving a test request, the test request carries an identification of a test type, the test type at least including software development kit test, command line test and script test; calling a target processing function set corresponding to the identification of the test type in the business logic layer through a URL controller; obtaining the test data required by the target processing function set through the model data layer; obtaining the response data of the test request according to the target processing function set and the test data; sending the response data to the user interface layer through the business logic layer for processing to obtain the test result. The operation and maintenance personnel can complete the operation of troubleshooting and locating the functional tool by clicking the front-end button, which is convenient for the operation and maintenance personnel to efficiently perform automated operation and maintenance management of product functions on the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of object storage technology, and in particular to an automated operation and maintenance test method, device, equipment and storage medium. Background Art

[0002] Object storage (COS) is a distributed storage service that has no directory hierarchy, no data format restrictions, can accommodate massive amounts of data, and supports HTTP / HTTPS protocol access. Currently, object storage products provide a variety of API interfaces, and users can directly send requests and receive responses through HTTP / HTTPS to achieve interactive operations with the object storage cloud server background. At the same time, object storage products provide a variety of SDKs that support a variety of mainstream programming languages, such as Java, Python, etc., for the majority of users. In addition, object storage products also support command line tools such as COSCMD, S3CMD, etc. for upload, download, and other operations.

[0003] Since there are many types of API interfaces and calling methods for object storage products, and different calling methods rely on different environment configurations, this has caused difficulties for the daily operation and maintenance work of operation and maintenance personnel to a certain extent. For example, operation and maintenance personnel need to master a certain programming language foundation and then configure the corresponding environment before they can troubleshoot the functions of the SDK, which takes a long time and has low operation and maintenance efficiency. Summary of the invention

[0004] The technical problem to be solved by the present invention is the problem of long operation and maintenance time and low efficiency in object storage operation and maintenance.

[0005] To solve the above technical problems, in a first aspect, an embodiment of the present application discloses an automated operation and maintenance testing method, the method comprising:

[0006] Receive a test request, the test request carrying an identifier of a test type, the test type including at least a software development kit test, a command line test, and a script test;

[0007] Calling a target processing function set corresponding to the identifier of the test type in the business logic layer through a URL controller; wherein the business logic layer includes a plurality of processing function sets, each of which corresponds to a test type;

[0008] Acquire the test data required by the target processing function set through the model data layer;

[0009] Obtaining response data of the test request according to the target processing function set and the test data;

[0010] The response data is sent to the user interface layer through the business logic layer for processing to obtain the test result.

[0011] Further, calling a target processing function set corresponding to the identification of the test type in the business logic layer through the URL controller includes:

[0012] Determine, by the URL controller according to the identification of the test type, a mapping path of a target processing function set corresponding to the identification of the test type in the business logic layer;

[0013] The target processing function set is called according to the mapping path.

[0014] Further, the target processing function set includes at least one processing function, each of which corresponds to at least one test; the mapping path includes at least one mapping sub-path, each of which corresponds to one processing function, and at least one mapping sub-path is sorted according to a preset sorting rule; calling the target processing function set according to the mapping path includes:

[0015] Each of the processing functions in the target processing function set is called in sequence according to at least one of the mapping sub-paths for testing.

[0016] Furthermore, the obtaining of the test data required by the target processing function set through the model data layer includes:

[0017] Determine database connection information through the model data layer;

[0018] The test data required by the target processing function set is acquired in the database according to the database connection information.

[0019] Further, the test data includes program configuration information and operation data information, and the step of obtaining the response data of the test request according to the target processing function set and the test data includes:

[0020] Perform configuration test program according to the program configuration information;

[0021] The test program is tested using the running data information to obtain response data of the test request.

[0022] Furthermore, before the business logic layer sends the response data to the user interface layer for processing to obtain the test result, it also includes:

[0023] The response data is stored in the database through the model data layer.

[0024] Further, the sending of the response data to the user interface layer for processing to obtain the test result through the business logic layer includes:

[0025] Sending the response data to a user interface layer, wherein the user interface layer converts the response data into a visualization file;

[0026] The visualization file is fed back to the interactive interface through the business logic layer, and the visualization file contains the test result.

[0027] In a second aspect, an embodiment of the present application discloses an automated operation and maintenance testing device, the device comprising:

[0028] A receiving module, used for receiving a test request, wherein the test request carries an identifier of a test type, and the test type includes at least a software development kit test, a command line test, and a script test;

[0029] A processing function set calling module, used to call a target processing function set corresponding to the identifier of the test type in the business logic layer through a URL controller; wherein the business logic layer includes a plurality of processing function sets, each of which corresponds to a test type;

[0030] A test data acquisition module, used to acquire the test data required by the target processing function set through the model data layer;

[0031] A response data acquisition module, used for obtaining response data of the test request according to the target processing function set and the test data;

[0032] The test result acquisition module is used to send the response data to the user interface layer through the business logic layer for processing to obtain the test result.

[0033] In a third aspect, an embodiment of the present application discloses an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by the processor and executes the automated operation and maintenance testing method as described above.

[0034] In a fourth aspect, an embodiment of the present application discloses a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the automated operation and maintenance testing method as described above.

[0035] The automated operation and maintenance test method, device, equipment, and storage medium provided in the embodiments of the present application have the following technical effects:

[0036] The automated operation and maintenance testing method described in the embodiment of the present application integrates software development kit testing, command line tool testing, and script testing by building an integrated platform, thereby realizing one-click testing on the integrated platform. Operation and maintenance personnel can complete the operation of functional tool fault troubleshooting and locating by clicking a front-end button, without spending time on tool installation and configuration, thereby reducing operation and maintenance time and complexity, simplifying fault location of object storage functional tools, and facilitating operation and maintenance personnel to efficiently perform automated operation and maintenance management of product functions on the network. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0038] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;

[0039] Figure 2 It is a schematic diagram of the framework structure of an automated operation and maintenance testing tool provided in an embodiment of the present application;

[0040] Figure 3 It is a flowchart of an automated operation and maintenance testing method provided in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of an interface of an automated operation and maintenance testing tool provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of the structure of an automated operation and maintenance test device provided in an embodiment of the present application;

[0043] Figure 6 It is a hardware structure block diagram of a server of an automated operation and maintenance testing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0046] Among the many automated operation and maintenance tools, Ansible is a popular tool. Users can use this operation and maintenance tool to perform batch operations on multiple hosts. In object storage products, Ansible is also used to operate multiple machines to complete the installation of modules such as agents and other types of batch operations. The Ansible tool is mainly composed of five parts: control node, controlled node, host file, module, and playbook. Among them, the control node refers to the host where the Ansible tool is installed, which is used to publish and run tasks and execute control commands; the controlled node is the server on which the Ansible task is executed; the host file is a file used to save the inventory list, which contains the IP information and authentication information of all controlled nodes; the module is a code block for the Ansible tool to perform specific tasks; the Playbook is a list of repeatable tasks written in the YAML markup language. The Ansible tool can perform batch operations on controlled nodes through the Playbook. The Ansible tool is software based on the ssh module. The user first configures the machine information that needs to be operated in batches, then creates a YAML file for the Playbook, and then executes the Playbook file to perform tasks on all machines and return the results. The batch operation process of Ansible is completed.

[0047] Although Ansible automated operation and maintenance tools are widely used now, they are more used in batch processing. For one-click processing of object storage function testing, the Ansible tool can only complete operations of different programming languages ​​and command line tools by creating different Playbook files, and cannot be integrated. These operations also require a lot of time and manpower costs. In addition, the Ansible tool currently does not provide a front-end interface for ordinary users, so the operation page of this automated operation and maintenance tool is less friendly. In addition, there are currently no other automated operation and maintenance tools on the market that can test object storage products with one click.

[0048] See also Figure 1 , Figure 1 It is a schematic diagram of an application environment provided by an embodiment of the present application, including a test device 101 and an object storage system 102. Among them, the test device 101 can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, etc., which can be loaded with an automated operation and maintenance test tool. The object storage system 102 is a distributed storage service system that can store massive data for enterprises and individual developers based on cloud services. Users can batch store and process large amounts of data through the Internet at any time. Users can use a console, API (Application Programming Interface), SDK (i.e., software development kit, generally a collection of development tools for software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.) and other methods to connect to the object storage system 102 to store and manage business data in real time.

[0049] See also Figure 2 , Figure 2 It is a schematic diagram of the framework structure of an automated operation and maintenance test tool provided in an embodiment of the present application. The automated operation and maintenance test tool described in the embodiment of the present application mainly consists of four parts, namely, a URL controller (uniform resource locator, unified resource locator system), a business logic layer, a model data layer and a user interface layer. Among them, the role of the URL controller is to distribute the page requests of each URL to different sets of processing functions in the business logic layer for processing. The model data layer is mainly responsible for processing business objects and database objects, and it encapsulates access to the database. The user interface layer is responsible for encapsulating the returned results and converting them into front-end pages. The business logic layer is responsible for receiving front-end requests, processing business logic, interacting with the model data layer and the user interface layer, and returning request results.

[0050] As an example, the automated operation and maintenance test tool is based on the Django framework and is designed using the MTV (Model Template View, MTV) design pattern. Among them, the model (Model) is the model data layer, which is mainly responsible for processing business objects and database objects, and it encapsulates access to the database layer. When adding, deleting, modifying, and checking the data in the database, the corresponding database table will be generated by creating a model, thereby avoiding direct database operations and ensuring data security. The view (View) is the business logic layer, which is responsible for receiving front-end requests, processing business logic, interacting with the model and template, and returning request results; the template (Template) is the user interface layer, which is responsible for encapsulating the returned results and converting them into front-end pages to display to users. In some embodiments, the automated operation and maintenance test tool can also be designed using the MVC (Model View Controller, MVC) design pattern, with the model (Model) being the model data layer, the view (View) being the user interface layer, and the controller (Controller) being the business logic layer.

[0051] Through the above design pattern, the embodiment of the present application provides an automated operation and maintenance testing tool, that is, building an integrated platform, which can integrate software development kit tools (such as Java, Python and other SDKs), command line tools (such as COSCMD, S3CMD, etc.) and script tools (such as sending and receiving requests through HTTP / HTTPS), etc., to achieve one-click testing on the integrated platform, quickly locate the fault, save environment configuration and other work, reduce operation and maintenance time expenditure and operation and maintenance complexity, and facilitate operation and maintenance personnel to efficiently perform automated operation and maintenance management of product functions in underlay networks and overlay networks.

[0052] In an embodiment of the present application, the test device 101 and the object storage system 102 can be connected via a wired link or a wireless link. When the operation and maintenance personnel start the automated operation and maintenance test tool on the test device 101, the test device 101 can directly test the API interface in the object storage system 102 through the communication link established between the test device 101 and the object storage system 102. The above-mentioned framework structure decouples the division of labor of the three parts of the business logic layer, the model data layer, and the user interface layer, reduces the coupling between different code blocks, and enhances the scalability and portability of the code, thereby integrating tools of multiple programming languages ​​and different environmental configuration requirements to form an integrated platform tool for multiple categories of test tools. By using the automated operation and maintenance tool, the operation and maintenance personnel can perform one-click testing on the page, test the API interface, SDK language method, and command line tool of the object storage product, quickly locate the fault point, and improve the operation and maintenance efficiency.

[0053] The following describes a specific embodiment of an automated operation and maintenance testing method of the present application. Figure 3 It is a flowchart of an automated operation and maintenance test method provided in an embodiment of the present application. This specification provides method operation steps such as the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in the order shown in the embodiment or the accompanying drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 3 As shown, the method may include:

[0054] S301: receiving a test request, the test request carrying an identifier of a test type, the test type including at least a software development kit test, a command line test, and a script test;

[0055] In an embodiment of the present application, the operation and maintenance personnel opens the automated operation and maintenance tool on the test device 101. Optionally, the front-end interface of the automated operation and maintenance tool is a browser interface. The operation and maintenance personnel sends a corresponding test request by clicking a test button on the browser interface. The test request will reach the URL controller, and the test request carries an identifier of the test type. Optionally, in order to facilitate the operation of the operation and maintenance personnel, different test buttons send different types of test requests. In some embodiments, the type of test information to be performed can also be entered on the browser interface, and then the browser sends a test request to the URL controller. Specifically, Figure 4 A schematic diagram of an interface of an automated operation and maintenance testing tool provided in an embodiment of the present application, such as Figure 4 As shown in the figure, there are three black oval boxes, which represent the test buttons of HTTP request test, Java SDK test and COSCMD test respectively. It should be noted that Figure 4 The example shown in the figure is only an application example provided by the embodiment of the present application. In actual application, more or fewer function test buttons can be defined. According to the actual operation and maintenance needs, several buttons can be designed on the interface if several function tests are needed in the actual test, so as to support horizontal expansion. For example, test buttons such as HTTPS request test, Python SDK test, and S3CMD test can also be provided. When the operation and maintenance personnel click the button, a request will be automatically sent to the backend for test operation, and the response result will be fed back on the interface.

[0056] S303: calling a target processing function set corresponding to the identification of the test type in the business logic layer through the URL controller;

[0057] In the embodiment of the present application, the operation and maintenance personnel click different buttons on the interface of the automated operation and maintenance test tool to send a test request, which is sent through an agreed communication protocol and can be in the form of an HTTP request or an HTTPS request, etc. The test request reaches the URL controller, and through the mapping relationship file in the URL controller, calls the target processing function set corresponding to the identifier of the test type in the business logic layer. The business logic layer includes multiple processing function sets, each of which can handle tests of a test type.

[0058] The mapping relationship file contains mapping paths of different test types and corresponding processing function sets. The URL controller determines the mapping path of the target processing function set corresponding to the received test request according to the identification of the test type carried in the test request, and then calls the target processing function set according to the mapping path. Specifically, the target processing function set includes at least one processing function, and each processing function corresponds to at least one test; the mapping path includes at least one mapping sub-path, each mapping sub-path corresponds to a processing function, and at least one mapping sub-path is sorted according to a preset sorting rule. According to at least one mapping sub-path, each processing function in the target processing function set is called in turn for testing.

[0059] As an example, the business logic layer is a view in the MTV design pattern, and the view has multiple class views (Class Base View, CBV) corresponding to the test type. Each test type is a class, and different test types are tested through different class views. That is, the same class will define multiple processing functions, and each processing function corresponds to one or more calling interfaces under the test type. Each class view has multiple processing functions, and each processing function corresponds to at least one test. Figure 4 As shown, when the identification of the test type carried in the test request is HTTP test, the URL controller determines the class view of the HTTP test according to the identification of the test type. The class view of the HTTP test contains multiple processing functions for specific tests, such as GET Sercice test processing function, PUT Bucket test processing function, GETObject test processing function, etc. Then determine the mapping sub-path of each processing function, and call the corresponding processing functions in sequence for testing according to the code reading order. The embodiment of the present application defines a class-based view and defines different categories of tools as different classes in the view through CBV, so as to achieve the purpose of integrating test tools that require different configuration environments on the same platform for automated operation and maintenance. When the operation and maintenance personnel send requests for testing different test types at the front end, the calling path of each processing function is mapped to the mapping path of the corresponding target function set through the mapping relationship file.

[0060] S305: Acquire test data required by the target processing function set through the model data layer;

[0061] In the embodiment of the present application, when calling the target processing function set for testing, the model data layer is called to obtain relevant data according to the test requirements in the processing function. Specifically, obtaining the test data required for the target processing function set through the model data layer includes: determining database connection information through the model data layer; and obtaining the test data required for the target processing function set in the database according to the database connection information.

[0062] As an example, the model data layer is the model in the MTV design pattern. The view calls the model to obtain relevant data in the database according to the needs of the processing function in the view. The model avoids direct operations on the database by creating the model. The design of the data model does not need to rely on a specific database. The database can be easily replaced through the configuration file. The model is mainly composed of two modules, namely the database model creation module and the database connection module. Among them, the database model creation module is mainly used to create a database model and generate the database table required for each test. The table contains the installation package, AKSK, bucket-name and other information required for the call; while the database connection module is used to configure the database connection, which fills in information such as the database name, database host, user name and password.

[0063] S307: Obtaining response data of the test request according to the target processing function set and the test data;

[0064] In the embodiment of the present application, after the processing function obtains the relevant test data for testing, the response data of the processing function is obtained. After all the processing functions in the target processing function set are tested, the response data of the test request can be obtained. Specifically, the test data includes program configuration information and running data information. The response data of the test request is obtained according to the target processing function set and the test data, including: configuring the test program according to the program configuration information; testing the test program through the running data information, and obtaining the response data of the test request.

[0065] As an example, according to the processing function requirements, the model calls the program configuration information in the database (such as the installation package of the current test interface) to configure the test program, and then tests the test program through the running data information (such as the test account key). Through the interaction between the view and the model, the view will obtain the response data of the test request. Optionally, the response data obtained by the view can be divided into three categories, 2XX means that the tool test is successful without failure, such as 200 (success), the server has successfully processed the request; 201 (created), the request is successful and the server has created a new resource. 4XX means that there is a problem with the request, and the code in the view file needs to be checked, such as 400 (wrong request), the server does not understand the syntax of the request; 404 (not found), the server cannot find the requested web page. 5XX means that there is a problem with the tool itself, locate the fault and report an error, such as 500 (server internal error), the server encountered an error and cannot complete the request; 501 (not yet implemented), the server does not have the function to complete the request. For example, this code may be returned when the server cannot recognize the request method.

[0066] In the embodiment of the present application, after the business logic layer obtains the response data, it will store the response data in the database through the model data layer.

[0067] S309: Send the response data to the user interface layer through the business logic layer for processing to obtain the test result.

[0068] In the embodiment of the present application, after the business logic layer obtains the response data, the response data is sent to the user interface layer for processing to obtain a visual response result. Specifically, the business logic layer sends the response data to the user interface layer for processing to obtain the test result, including: sending the response data to the user interface layer, the user interface layer converts the response data into a visual file; the business logic layer feeds back the visual file to the interactive interface, and the visual file contains the test result.

[0069] As an example, the user interface layer is a template in the MTV design mode, and the view sends the response result to the template. The role of the template is to reduce some repeated operations through some logical control codes to generate conversion strings (including HTML, CSS, JS, etc.) more quickly, and implement simple logical judgments. The template mainly includes two modules, the logic control module and the conversion module. The view first fills the response data into the template and converts it into an HTML string, and then calls the rendered web page file in the template through the logic control module. At this time, the view sends the web page file to the browser and responds to its test request. The operation and maintenance personnel can see on the page whether the tool test results are successful, interface failure, or request failure.

[0070] The automated operation and maintenance testing method described in the embodiment of the present application integrates three categories of object storage testing tools, namely software development kit, command line and script, on one platform. The operation and maintenance personnel can complete the operation of the corresponding test function by clicking the front-end test button, thereby realizing troubleshooting and locating the fault. The operation and maintenance personnel do not need to spend time on tool installation and configuration, nor do they need to understand the specific logical implementation of the back-end command line, script and programming language code. They only need to click buttons on the front end, and the back end will automatically find the mapping relationship, execute the corresponding code module and return the result, thereby realizing the rapid location of faults in the operation and maintenance process and simplifying the fault location of the object storage function tool. In addition, the interaction between the model data layer, the user interface layer and the business logic layer reduces the coupling between data and performance, which is conducive to horizontal and vertical expansion, and increases the scope of application and capabilities of the invention itself.

[0071] The present application also discloses an automated operation and maintenance testing device. Figure 5 A schematic diagram of the structure of an automated operation and maintenance test device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the device comprises:

[0072] The receiving module 501 is used to receive a test request, where the test request carries an identifier of a test type, and the test type includes at least a software development kit test, a command line test, and a script test;

[0073] The processing function set calling module 503 is used to call the target processing function set corresponding to the identification of the test type in the business logic layer through the URL controller; wherein the business logic layer includes multiple processing function sets, each processing function set corresponds to a test type;

[0074] A test data acquisition module 505 is used to acquire the test data required by the target processing function set through the model data layer;

[0075] A response data acquisition module 507, used to obtain response data of the test request according to the target processing function set and the test data;

[0076] The test result acquisition module 509 is used to send the response data to the user interface layer through the business logic layer for processing to obtain the test result.

[0077] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal, a server or a similar computing device. Taking running on a server as an example, Figure 6 1 is a hardware structure diagram of a server of an automated operation and maintenance test method provided in an embodiment of the present application. Figure 6As shown, the server 600 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 610 (the processor 610 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 630 for storing data, and one or more storage media 620 (such as one or more mass storage devices) for storing application programs 623 or data 622. Among them, the memory 630 and the storage medium 620 can be short-term storage or permanent storage. The program stored in the storage medium 620 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 610 can be configured to communicate with the storage medium 620 and execute a series of instruction operations in the storage medium 620 on the server 600. The server 600 may also include one or more power supplies 660, one or more wired or wireless network interfaces 650, one or more input and output interfaces 640, and / or one or more operating systems 621, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0078] The input / output interface 640 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 600. In one example, the input / output interface 640 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 640 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0079] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only and does not limit the structure of the above electronic device. Figure 6 More or fewer components as shown, or with Figure 6 Different configurations shown.

[0080] An embodiment of the present application also provides a storage medium, which can be set in a server to store at least one instruction, at least one program, a code set or an instruction set related to an automated operation and maintenance testing method in an implementation method embodiment. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned automated operation and maintenance testing method.

[0081] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0082] Object storage products have rich API interfaces and support multiple SDKs and command line tools. The adaptation environment and programming language of each type of tool are different, which creates certain difficulties in management for operation and maintenance personnel, and there is currently no automated operation and maintenance tool related to the management of object storage product functional tools. The automated operation and maintenance test method, device, equipment or storage medium provided in the embodiment of the present application separates the business logic layer, model data layer, and user interface layer, realizes the decoupling of data and performance, and builds an automated operation and maintenance tool for object storage. The three categories of test tools (software development kit class, command line class, and script class) are tested with one click on the page. The coupling between the code blocks involved in the back end is low, so it can be well expanded horizontally and vertically. When the operation and maintenance personnel are performing operation and maintenance, by clicking the test button on the front-end page, the back end automatically seeks the mapping relationship and executes the corresponding code module. Finally, it is intuitively displayed in the form of a page view, so as to quickly locate the fault point and improve the efficiency of daily operation and maintenance.

[0083] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0084] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0085] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0086] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. An automated operation and maintenance testing method, characterized in that: The method is applied to an automated operation and maintenance testing tool for testing an API interface in an object storage system; the automated operation and maintenance testing tool includes a URL controller, a business logic layer, a model data layer, and a user interface layer; The URL controller is used to distribute the URL page request to different processing function sets in the business logic layer for processing; the model data layer is used to process business objects and database objects; the user interface layer is used to encapsulate the returned results and convert them into front-end pages; the business logic layer is used to receive front-end requests, process business logic, interact with the model data layer and the user interface layer, and return request results; The method comprises: Receive a test request, the test request carrying an identifier of a test type, the test type including at least a software development kit test, a command line test, and a script test; Calling a target processing function set corresponding to the identifier of the test type in the business logic layer through a URL controller; wherein the business logic layer includes a plurality of processing function sets, each of which corresponds to a test type; Acquire the test data required by the target processing function set through the model data layer; Obtaining response data of the test request according to the target processing function set and the test data; The response data is sent to the user interface layer through the business logic layer for processing to obtain the test result.

2. The automated operation and maintenance test method according to claim 1, characterized in that: The calling of a target processing function set corresponding to the identification of the test type in the business logic layer through the URL controller includes: Determine, by the URL controller according to the identification of the test type, a mapping path of a target processing function set corresponding to the identification of the test type in the business logic layer; The target processing function set is called according to the mapping path.

3. The automated operation and maintenance test method according to claim 2, characterized in that: The target processing function set includes at least one processing function, each of which corresponds to at least one test; the mapping path includes at least one mapping sub-path, each of which corresponds to one processing function, and at least one mapping sub-path is sorted according to a preset sorting rule; calling the target processing function set according to the mapping path includes: Each of the processing functions in the target processing function set is called in sequence according to at least one of the mapping sub-paths for testing.

4. The automated operation and maintenance test method according to claim 3, characterized in that: The step of obtaining the test data required by the target processing function set through the model data layer includes: Determine database connection information through the model data layer; The test data required by the target processing function set is acquired in the database according to the database connection information.

5. The automated operation and maintenance test method according to claim 4, characterized in that: The test data includes program configuration information and operation data information, and the step of obtaining response data of the test request according to the target processing function set and the test data includes: Perform configuration test program according to the program configuration information; The test program is tested using the running data information to obtain response data of the test request.

6. The automated operation and maintenance test method according to claim 1, characterized in that: Before the response data is sent to the user interface layer for processing to obtain the test result through the business logic layer, the method further includes: The response data is stored in the database through the model data layer.

7. The automated operation and maintenance test method according to claim 6, characterized in that: The step of sending the response data to the user interface layer for processing to obtain the test result through the business logic layer includes: Sending the response data to a user interface layer, wherein the user interface layer converts the response data into a visualization file; The visualization file is fed back to the interactive interface through the business logic layer, and the visualization file contains the test result.

8. An automated operation and maintenance test device, characterized in that: The device is applied to an automated operation and maintenance test tool for testing an API interface in an object storage system; the automated operation and maintenance test tool includes a URL controller, a business logic layer, a model data layer, and a user interface layer; The URL controller is used to distribute the URL page request to different processing function sets in the business logic layer for processing; the model data layer is used to process business objects and database objects; the user interface layer is used to encapsulate the returned results and convert them into front-end pages; the business logic layer is used to receive front-end requests, process business logic, interact with the model data layer and the user interface layer, and return request results; The device comprises: A receiving module, used for receiving a test request, wherein the test request carries an identifier of a test type, and the test type includes at least a software development kit test, a command line test, and a script test; A processing function set calling module, used to call a target processing function set corresponding to the identifier of the test type in the business logic layer through a URL controller; wherein the business logic layer includes a plurality of processing function sets, each of which corresponds to a test type; A test data acquisition module, used to acquire the test data required by the target processing function set through the model data layer; A response data acquisition module, used for obtaining response data of the test request according to the target processing function set and the test data; The test result acquisition module is used to send the response data to the user interface layer through the business logic layer for processing to obtain the test result.

9. An electronic device, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by the processor and executes the automated operation and maintenance testing method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the automated operation and maintenance testing method as described in any one of claims 1-7.