Testing method and device for service platform
By loading the configuration parameters of all middleware in the service platform into the unified testing system, the problems of low efficiency, high cost and interdependence in the existing technology are solved, and efficient and low-cost unified middleware testing is achieved.
Patent Information
- Application Number
- CN202210073726.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-01-21
AI Technical Summary
In the prior art, the testing of a single middleware in the service platform is inefficient and costly, and the interdependence problem between middleware is difficult to solve.
By obtaining the configuration parameters of all middleware in the service platform, loading them into the test system, and using a unified test system to call and test the middleware to output the test results.
It realizes unified testing of middleware in the service platform, reduces testing costs, improves testing efficiency, and solves the problem of interdependence between middlewares.
Smart Images

Figure CN114238152B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a testing method and device for a service platform. Background Art
[0002] Since the existing service platform is mainly used by developers and operation and maintenance personnel, in order to improve the coverage of test cases, it is necessary to test the interfaces provided by each middleware in the service platform during the testing process. The current testing method for the middleware in the service platform is: different test tools are written according to different middleware for testing. Each test tool is independent of each other and produces a test report. The testing method in the prior art has high testing costs and high maintenance costs for a single test tool. When there is a problem of mutual dependence between the middleware, that is, middleware A depends on middleware B, and middleware B depends on middleware C, it is difficult for a single test tool to troubleshoot the problem. Summary of the invention
[0003] The present invention provides a testing method and device for a service platform, which are used to solve the defects of low efficiency and high cost in the prior art of testing a single middleware in the service platform, realize unified testing of the middleware in the service platform, and reduce testing costs.
[0004] In a first aspect, the present disclosure provides a testing method for a service platform, comprising:
[0005] Get the configuration parameters of the middleware of the service platform under test;
[0006] Loading the configuration parameters of the middleware into the test system to obtain the loaded test system;
[0007] The loaded test system is used to execute the test task, call and test the loaded middleware, and output the test result.
[0008] According to a testing method for a service platform provided by the present disclosure, obtaining configuration parameters of a middleware of the tested service platform includes:
[0009] Obtain configuration parameters of the service gateway, configuration parameters of the distributed cache system, configuration parameters of the distributed message queue, configuration parameters of the distributed scheduling, and / or configuration parameters of the elastic search platform.
[0010] According to a testing method for a service platform provided by the present disclosure, the testing system includes: a front-end service layer and a testing service layer, wherein the front-end service layer and the testing service layer are connected via a communication protocol;
[0011] Loading the configuration parameters of the middleware into the test system includes:
[0012] Loading the configuration parameters of the service gateway into the front-end service layer;
[0013] The configuration parameters of the distributed cache system, the configuration parameters of the distributed message queue, the configuration parameters of the distributed scheduling and / or the configuration parameters of the elastic search platform are loaded into the test service layer.
[0014] According to a testing method for a service platform provided by the present disclosure, the testing system includes a front-end page;
[0015] The method of using the loaded test system to execute the test task, calling and testing the loaded middleware, and outputting the test results includes:
[0016] Receiving a service input instruction through the front-end page, and sending the service input instruction to the front-end service layer;
[0017] Calling the service corresponding to the service input instruction through the front-end service layer, and performing pre-processing on the service;
[0018] The service is executed based on the loaded middleware through the test service layer to call and test the middleware, and obtain and output the test result.
[0019] According to a testing method for a service platform provided by the present disclosure, the testing system includes a database;
[0020] After outputting the test results, the method further includes:
[0021] The test service layer stores the relevant data of the service in the database.
[0022] According to a testing method for a service platform provided by the present disclosure, the testing system includes: a distributed service tracking system, a unified log processing platform and a unified alarm platform;
[0023] The method further comprises:
[0024] Monitoring the call information of the service through the distributed service tracking system;
[0025] Collecting and storing log services through the unified log processing platform;
[0026] The unified alarm platform is used to converge and send alarm services.
[0027] In a second aspect, the present disclosure provides a testing device for a service platform, comprising:
[0028] The first processing module is used to obtain the configuration parameters of the middleware of the tested service platform;
[0029] A second processing module is used to load the configuration parameters of the middleware into the test system to obtain the loaded test system;
[0030] The third processing module is used to use the loaded test system to execute the test task, call and test the loaded middleware, and output the test result.
[0031] According to a testing device for a service platform provided by the present disclosure, the first processing module is used to:
[0032] Obtain configuration parameters of the service gateway, configuration parameters of the distributed cache system, configuration parameters of the distributed message queue, configuration parameters of the distributed scheduling, and / or configuration parameters of the elastic search platform.
[0033] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described testing methods for a service platform are implemented.
[0034] The present disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described testing methods for a service platform.
[0035] The test method and device for the service platform provided by the present invention obtain the configuration parameters of the middleware of the tested service platform; that is, the configuration parameters of all the middleware to be tested on the service platform are retrieved, and then the configuration parameters of the middleware are loaded into the test system to obtain the test system loaded with the middleware; because the parameters of all the middleware of the service platform have been added to the test system, the test system can be used to uniformly call and test the loaded middleware, which can solve the problem of mutual dependence between the middleware, and can also reduce the test cost and improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the present disclosure or 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0037] Figure 1 It is a flowchart of a testing method for a service platform provided by the present disclosure;
[0038] Figure 2is a schematic diagram of the structure of the test system provided by the present disclosure;
[0039] Figure 3 is a structural schematic diagram of a testing device for a service platform provided by the present disclosure;
[0040] Figure 4 It is a schematic diagram of the structure of an electronic device provided by the present disclosure. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present disclosure.
[0042] Combine the following Figure 1 A testing method for a service platform provided by an embodiment of the present disclosure is described, including:
[0043] Step 100: Obtain configuration parameters of the middleware of the tested service platform;
[0044] Specifically, this embodiment is described by taking the PssS platform as an example. Platform as a Service (PaaS) is a mode of sending operating systems and related services over the Internet without downloading or installing. Because Platform as a Service can transfer resources from a private computer to a network cloud, it is sometimes also called "cloudware". Platform as a Service is an extension of Software as a Service. Software as a Service is the deployment of software as a hosted service and providing it to customers over the Internet.
[0045] At present, the testing method for middleware in PaaS platform is: write different test tools according to different middleware for testing, and each test tool is independent of each other and produces test reports. Since most PaaS platforms are service platforms, the users are mainly developers and operation and maintenance personnel.
[0046] Middleware is a large category of basic software and belongs to the category of reusable software. As the name implies, middleware is between the operating system software and the user's application software. Middleware is above the operating system, network and database, and below the application software. Its overall function is to provide an operating and development environment for the application software above it, helping users to flexibly and efficiently develop and integrate complex application software.
[0047] In the present disclosure, obtaining the configuration parameters of the tested middleware is equivalent to obtaining the middleware.
[0048] Step 200: Load the configuration parameters of the middleware into the test system to obtain the loaded test system;
[0049] Specifically, the obtained configuration parameters of the middleware are loaded into the test system, that is, the middleware is added to the test system, thereby obtaining the test system loaded with the middleware.
[0050] By loading the middleware into the corresponding service provided by the test system, the middleware can be tested during the execution of the corresponding business.
[0051] Step 300: Utilize the loaded test system to execute the test task, call and test the loaded middleware, and output the test result.
[0052] Specifically, middleware is a universal service located between the platform (hardware and operating system) and the application, which has standard program interfaces and protocols. For different operating systems and hardware platforms, they can have multiple implementations that comply with interface and protocol specifications.
[0053] In this step, by obtaining the configuration parameters of the middleware, it is equivalent to obtaining the type, interface program and protocol of the middleware.
[0054] Due to the importance of standard interfaces for portability and standard protocols for interoperability, middleware has become a major part of many standardization efforts. For application software development, middleware is far more important than operating systems and network services. The program interface provided by middleware defines a relatively stable high-level application environment. No matter how the underlying computer hardware and system software are updated, as long as the middleware is upgraded and updated and the external interface definition of the middleware remains unchanged, the application software will hardly need any modification, thus protecting the company's significant investment in application software development and maintenance.
[0055] Since there are multiple middlewares loaded in the test system, and not all middlewares are called at the same time during different task execution processes, when testing different middlewares, it is necessary to call the corresponding middleware interface to achieve the integration of the middleware and the test system, and then realize the testing of the middleware.
[0056] The test method for the service platform provided by the embodiment of the present disclosure obtains the configuration parameters of the middleware of the tested service platform; that is, the configuration parameters of all the middleware to be tested on the service platform are retrieved, and then the configuration parameters of the middleware are loaded into the test system to obtain the test system loaded with the middleware; since the parameters of all the middleware of the service platform have been added to the test system, the test system can be used to uniformly call and test the loaded middleware, which can solve the problem of mutual dependence between the middleware, and can also reduce the test cost and improve the test efficiency.
[0057] According to a testing method for a service platform provided by an embodiment of the present disclosure, obtaining configuration parameters of a middleware of the tested service platform includes:
[0058] Obtain configuration parameters of the service gateway, configuration parameters of the distributed cache system, configuration parameters of the distributed message queue, configuration parameters of the distributed scheduling, and / or configuration parameters of the elastic search platform.
[0059] Specifically, the present disclosure simulates the real business scenarios of banks to realize the series connection of multiple middleware in the PaaS service platform to perform regression testing and smoke testing. The main functions include: login, logout, balance query, transfer, and operation log. Among them, regression testing refers to retesting after modifying the old code to confirm that the modification has not introduced new errors or caused errors in other codes. The smoke test mainly tests whether the main process of the system is available.
[0060] The login and logout functions of the test system use a distributed cache system + cookie method to record the user's login status. The distributed cache system has the characteristics of high performance and high response. By calling the interface of the distributed cache system to store the user's cookie information, when the user is logged in for a long time, the cache system will update the validity period of the cookie. At the same time, when the user exits the test system, the test system deletes the data by calling the interface of the cache system. During the regression test and smoke test, if the login and logout functions are normal, it means that the main process test of the distributed cache system has passed.
[0061] The user transfer function is implemented by introducing a message queue. Assuming there are two accounts A and B, when account A transfers money to account B, account A deducts money and generates messages to the message queue. Account B consumes the messages as a consumer, and uses the transaction message function of the message queue to ensure the consistency of sending messages and executing local transactions. Among them, the message queue is used when there is no need to obtain results immediately, but there is a control on the concurrency. The message queue is a linked list of messages. The message can be regarded as a record with a specific format and a specific priority. The process with write permission to the message queue can add new messages to the message queue according to certain rules; the process with read permission to the message queue can read messages from the message queue. The message queue is continuous with the kernel. In the test, if the transfer can be successfully achieved during the transfer process, it means that the message queue middleware is normal.
[0062] Due to the large amount of data in user operation logs, the elastic search platform is used to create indexes, maintain indexes, monitor indexes and alarm, etc. Among them, the elastic search platform is an open source, highly scalable distributed full-text search engine. In order to process large data sets and achieve fault tolerance and high availability, elastic search can run on many interacting servers.
[0063] According to a testing method for a service platform provided by an embodiment of the present disclosure, the testing system includes a front-end page;
[0064] The method of using the loaded test system to execute the test task, calling and testing the loaded middleware, and outputting the test results includes:
[0065] Receiving a service input instruction through the front-end page, and sending the service input instruction to the front-end service layer;
[0066] Calling the service corresponding to the service input instruction through the front-end service layer, and performing pre-processing on the service;
[0067] The service is executed based on the loaded middleware through the test service layer to call and test the middleware, and obtain and output the test result.
[0068] Specifically, the separation of front-end and back-end has become the industry standard for Internet project development. It is effectively decoupled through the nginx+tomcat method (nodejs can also be added in the middle), and the separation of front-end and back-end will lay a solid foundation for future large-scale distributed architecture, elastic computing architecture, microservice architecture, and multi-terminal services (multiple clients, such as browsers, car terminals, Android, IOS, etc.). The core idea is that the front-end HTML page calls the back-end RESTFUL API interface through AJAX and uses JSON data for interaction.
[0069] Web server: generally refers to servers like Nginx and Apache, which can generally only parse static resources; application server: generally refers to servers like Tomcat, Jetty, Resin, which can parse dynamic resources as well as static resources, but their ability to parse static resources is not as good as that of web servers; generally, only web servers can be accessed from the external network, and application servers can only be accessed from the intranet.
[0070] In the application mode with front-end and back-end separation, the back-end only returns the data required by the front-end, and no longer renders HTML pages or controls the effects of the front-end. As for what effects the front-end users see and how the data requested from the back-end is loaded into the front-end, it is all decided by the front-end itself. Web pages have their own processing methods, and applications have their own processing methods. However, no matter which front-end is used, the required data is basically the same, and the back-end only needs to develop a set of logic to provide data to the outside world.
[0071] In the application model with separated front-end and back-end, the coupling degree between the front-end and the back-end is relatively low.
[0072] In the application model with separation of front-end and back-end, we usually call each view developed in the back-end an interface, or API, and the front-end accesses the interface to add, delete, modify and query data.
[0073] Distributed deployment technology refers to storing data in a dispersed manner on multiple independent machines and devices, adopting a scalable system structure, using multiple storage servers to share the storage load, and using location servers to locate storage information. It not only solves the bottleneck problem of a single storage server in a traditional centralized storage system, but also improves the system's reliability, availability, and scalability.
[0074] Distributed services, as the name implies, are deployed on different machines. A service may be responsible for several functions. It is a SOA-oriented architecture. Services interact with each other through RPC or webservice. After the logical architecture is designed, the physical architecture should be designed. The system application is deployed on more than one server or virtual machine, and the separately deployed parts exchange information with each other through various communication protocols.
[0075] Due to the separation of front-end and back-end and distributed processing, the test system can be operated by operating the front-end visualization page, thereby achieving detection and observation of the middleware test.
[0076] Combination Figure 2 As shown, a test method for a service platform is provided according to an embodiment of the present disclosure, wherein the test system comprises: a front-end service layer and a test service layer, wherein the front-end service layer and the test service layer are connected via a communication protocol;
[0077] Loading the configuration parameters of the middleware into the test system includes:
[0078] Loading the configuration parameters of the service gateway into the front-end service layer;
[0079] The configuration parameters of the distributed cache system, the configuration parameters of the distributed message queue, the configuration parameters of the distributed scheduling and / or the configuration parameters of the elastic search platform are loaded into the test service layer.
[0080] Specifically, in the embodiment of the present disclosure, the test system includes: a front-end page (PaaS_atp_web), a front-end service layer (PaaS_atp_front), a test service layer (PaaS_atp_server) and a relational database; wherein the front-end page and the front-end service layer use the http protocol for information exchange; the front-end service layer and the test service layer use the rpc protocol for information exchange.
[0081] The front-end page includes the web page structure layer, web page presentation layer and web page behavior layer. The structural layer of the web page is created by markup languages such as HTML or XHTML. Tags, that is, words that appear in angle brackets, describe the semantic meaning of the web page content, but these tags do not contain any information about how to display the relevant content. For example, the P tag expresses the following semantics: "This is a text paragraph." The presentation layer of the web page is created by CSS. CSS answers the question of "how to display the relevant content." The behavior layer of the web page is responsible for answering the question of "how the content should respond to events." This is an area dominated by the Javascript language and DOM.
[0082] The presentation and behavior layers of a web page always exist, even if no specific instructions are given. At this time, the web browser will impose its default styles and default event handlers on the structural layer of the web page. For example, the browser will leave a margin when rendering the "text paragraph" element, and some browsers will pop up a tooltip showing the value of the element's title attribute when the user hovers the mouse pointer over an element, and so on.
[0083] From the perspective of network and security, the front-end service layer has the function of isolating the host (an application placed outside the intranet to separate the intranet and the extranet) to ensure that external applications cannot directly access the core services, such as various external interfaces of the bank (telecom collection, bank-securities link). From the business perspective, the front-end service layer provides a bridge for communication between the business channel and the core service host. It generally plays the role of managing and scheduling transactions initiated by the business channel. The call of the front-end service layer can reduce the burden of the core back-end server. Of course, it also has the processing function of non-core business. The independent processor system located between the server and the client of the application system is responsible for data format conversion, connection management, business flow management, peripheral scheduling, peripheral processing, and handing over business data to the back-end application service system for processing. In the C / S concept, C and S are relative. Although most of them are fixed, they are also specified. For example, in the business application of the bank, the request cannot be issued from the back-end application server. Taking the example of agency collection, the front-end service layer is an application gateway. In fact, in current applications, due to the existence of the front-end service layer, the host becomes invisible. The business systems at both ends of the government intranet and extranet need to exchange data. A front-end service layer is deployed in front of each business system to achieve data exchange. The front-end service layer is a physical machine with a front-end exchange system deployed. It is responsible for caching the data that needs to be exchanged or exchanged to this server.
[0084] The front-end service layer mainly performs isolation and preprocessing. In the disclosed embodiment, the service gateway is in the front-end service layer, and the service gateway is a single access point and acts as a proxy for multiple services. The service gateway enables transformation, routing and common processing across all services.
[0085] The circuit breaker degradation is based on the failure ratio (abnormal ratio). When the calls reach a certain level and the failure ratio reaches the set threshold, the circuit breaker will be automatically triggered. At this time, all calls to the resource will be blocked until the specified time window has passed and then restored heuristically.
[0086] According to different call relationships, different operating indicators (such as QPS, number of concurrent calls, system load, etc.) are used as benchmarks to control the flow of resource calls and adjust random requests into appropriate shapes. Direct rejection mode: that is, requests that exceed the limit are directly rejected. Slow start warm-up mode: When the traffic surges, control the rate at which traffic passes through, so that the traffic passing through increases slowly, and gradually increases to the upper threshold limit within a certain period of time, giving the cold system time to warm up and avoid the cold system being overwhelmed. Speed uniformer mode: The uniform speed mode implemented by the Leaky Bucket algorithm strictly controls the time interval for request passage. At the same time, the accumulated requests will be queued, and requests that exceed the timeout period will be directly rejected.
[0087] The testing service layer, also known as the server-side, is the part of the interactive site that is not visible to the user or to the client. As we discussed above, the backend is responsible for storing and retrieving data and supports the frontend or client for smooth operation.
[0088] Furthermore, in the disclosed embodiment, the front-end page and the front-end service layer use the HTTP protocol for information exchange; HTTP is a standard (TCP) for requests and responses between a client terminal (user) and a server (website), the requesting program is a client, and the service provider is a server. First, the calling process sends a call message with process parameters to the service process, and then waits for a response message. On the server side, the process remains in a dormant state until the call message arrives. When a call message arrives, the server obtains the process parameters, calculates the results, sends a reply message, and then waits for the next call message. Finally, the client calling process receives the reply message, obtains the process result, and then the call execution continues.
[0089] According to a testing method for a service platform provided in an embodiment of the present disclosure, the testing system includes a database;
[0090] After outputting the test results, the method further includes:
[0091] The test service layer stores the relevant data of the service in the database.
[0092] Specifically, a relational database is a database built on the basis of a relational model, which uses mathematical concepts and methods such as set algebra to process data in the database.
[0093] The front-end service layer and the test service layer use the RPC protocol to exchange information, wherein the RPC adopts the client / server mode.
[0094] According to a test method for a service platform provided by an embodiment of the present disclosure, the test system includes: a distributed service tracking system, a unified log processing platform and a unified alarm platform;
[0095] The method further comprises:
[0096] Monitoring the call information of the service through the distributed service tracking system;
[0097] Collecting and storing log services through the unified log processing platform;
[0098] The unified alarm platform is used to converge and send alarm services.
[0099] Specifically, the service platform is also used to maintain business programs. Therefore, the test system disclosed in this disclosure monitors the service call status through a distributed service tracking system. The distributed service tracking system is to support the growing huge business volume. By integrating and splitting services, the service can not only withstand the impact of traffic through cluster deployment, but also be flexibly expanded according to the business. A request is completed through three or four service calls at least, and spans dozens or even hundreds of service nodes.
[0100] The "unification" of the unified log processing platform has three meanings here: unified monitoring: unified monitoring of the network, host, storage, database, middleware, load balancer, and interface interaction involved in each application system through log data; unified collection, analysis, aggregation and correlation display: the collected log data is uniformly parsed, correlated and stored, and search query functions are provided. It supports multi-dimensional queries to facilitate maintenance personnel to troubleshoot problems; unified log specifications: in order to achieve cross-system analysis and management, log specifications are an important part of unified logs. The purpose of specifications is to achieve better readability and analyzability. Therefore, unified log specifications are the foundation of the unified log platform.
[0101] The unified log platform can be used for: Performance and stability monitoring: collecting and displaying the performance indicators of the equipment in near real time (for example, 5-minute granularity), so that operation and maintenance personnel can intuitively understand the health status of each device and program involved in the system.
[0102] System monitoring from the user's perspective: The response time obtained when a user accesses the system through the front-end page refers to the time it takes for the user's access to be sent to the server and for the server to respond and return. By capturing these data packets through traffic mirroring and analyzing them, we can calculate indicators such as the system page response time, page visits, error rate, etc., and monitor the system's operating status from the user's perspective.
[0103] Card order business statistics analysis: Summarize and analyze the interface interactions of all businesses. You can query the detailed business interface interaction time according to the associated fields to achieve end-to-end business analysis. This part of the design can also effectively avoid disputes between systems and use unified data to reflect the real situation of interface interactions.
[0104] Audit log query and analysis: The collection and aggregation of audit logs from databases, operating systems, and business systems provides a data source for auditors.
[0105] The unified alarm platform consists of three main parts: data collection module, data extraction module and monitoring alarm module.
[0106] Among them, the data extraction module is used for data communication between the other two modules, and the data collection module can be composed of one or more data collection servers. Each data collection server can directly collect various data indicators from the server group, standardize the data format, and finally store the data in the data collection server.
[0107] The monitoring alarm module obtains the required data from the data collection server through the data extraction module, and then sets the alarm threshold, alarm contact, etc. for the data, and finally realizes real-time alarm. The alarm method supports mobile phone SMS alarm, email alarm, etc. In addition, the alarm method can also be expanded through plug-ins or custom scripts.
[0108] As can be seen from the above, the present disclosure lowers the testing threshold by adopting a business scenario approach to conduct unified testing on all middleware, and does not test the middleware of each service platform separately, thereby improving testing efficiency.
[0109] Combination Figure 3 As shown, the present disclosure provides a testing device for a service platform, comprising:
[0110] The first processing module 31 is used to obtain configuration parameters of the middleware of the tested service platform;
[0111] A second processing module 32 is used to load the configuration parameters of the middleware into the test system to obtain the test system loaded with the middleware;
[0112] The third processing module 33 is used to use the loaded test system to execute the test task, call and test the loaded middleware, and output the test result.
[0113] Since the device provided in the embodiment of the present invention can be used to execute the method described in the above embodiment, its working principle and beneficial effects are similar, so they are not described in detail here. For specific contents, please refer to the introduction of the above embodiment.
[0114] The test device for the service platform provided by the present invention obtains the configuration parameters of the middleware of the tested service platform; that is, the configuration parameters of all the middleware to be tested on the service platform are retrieved, and then the configuration parameters of the middleware are loaded into the test system to obtain the test system loaded with the middleware; because the parameters of all the middleware of the service platform have been added to the test system, the test system can be used to uniformly call and test the loaded middleware, which can solve the problem of mutual dependence between the middleware, and can also reduce the test cost and improve the test efficiency.
[0115] According to a testing device for a service platform provided by an embodiment of the present disclosure, the first processing module 31 is specifically used to:
[0116] Obtain configuration parameters of the service gateway, configuration parameters of the distributed cache system, configuration parameters of the distributed message queue, configuration parameters of the distributed scheduling, and / or configuration parameters of the elastic search platform.
[0117] According to a test device for a service platform provided by an embodiment of the present disclosure, in the second processing module 32, the test system includes: a front-end service layer and a test service layer, and the front-end service layer and the test service layer are connected via a communication protocol;
[0118] The second processing module 32 is specifically used for:
[0119] Loading the configuration parameters of the service gateway into the front-end service layer;
[0120] The configuration parameters of the distributed cache system, the configuration parameters of the distributed message queue, the configuration parameters of the distributed scheduling and / or the configuration parameters of the elastic search platform are loaded into the test service layer.
[0121] According to a testing device for a service platform provided in an embodiment of the present disclosure, the testing system includes a front-end page;
[0122] The third processing module 33 is specifically used for:
[0123] Receiving a service input instruction through the front-end page, and sending the service input instruction to the front-end service layer;
[0124] Calling the service corresponding to the service input instruction through the front-end service layer, and performing pre-processing on the service;
[0125] The service is executed based on the loaded middleware through the test service layer to call and test the middleware, and obtain and output the test result.
[0126] According to a testing device for a service platform provided in an embodiment of the present disclosure, the testing system includes a database;
[0127] After outputting the test results, the device further comprises a storage module, which is used to store the relevant data of the service into the database through the test service layer.
[0128] According to an embodiment of the present disclosure, a test device for a service platform is provided, wherein the test system includes: a distributed service tracking system, a unified log processing platform, and a unified alarm platform;
[0129] The device also includes:
[0130] A service calling module, used for monitoring the calling information of the service through the distributed service tracking system;
[0131] A log storage module, used for collecting and storing log services through the unified log processing platform;
[0132] The alarm service module is used to converge and send alarm services through the unified alarm platform.
[0133] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a test method for the service platform, the method comprising: obtaining configuration parameters of the middleware of the tested service platform; loading the configuration parameters of the middleware into the test system to obtain the test system loaded with the middleware; and using the test system to call and test the loaded middleware.
[0134] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the embodiment of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0135] On the other hand, the present disclosure also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the test method for the service platform provided by the above methods, and the method includes: obtaining configuration parameters of the middleware of the tested service platform; loading the configuration parameters of the middleware into a test system to obtain a test system with the middleware loaded; and using the test system to call and test the loaded middleware.
[0136] On the other hand, the present disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the above-mentioned testing methods for the service platform, the method comprising: obtaining configuration parameters of the middleware of the tested service platform; loading the configuration parameters of the middleware into a test system to obtain a test system with the middleware loaded; and using the test system to call and test the loaded middleware.
[0137] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A testing method for a service platform, characterized in that: include: Get the configuration parameters of the middleware of the tested service platform; Loading the configuration parameters of the middleware into the test system to obtain the loaded test system; Utilize the loaded test system to execute the test task, call and test the loaded middleware, and output the test result; Get the configuration parameters of the middleware of the service platform under test, including: Obtaining configuration parameters of the service gateway, configuration parameters of the distributed cache system, configuration parameters of the distributed message queue, configuration parameters of the distributed scheduling, and / or configuration parameters of the elastic search platform; The test system comprises: a front-end service layer and a test service layer, wherein the front-end service layer and the test service layer are connected via a communication protocol; Loading the configuration parameters of the middleware into the test system includes: Loading the configuration parameters of the service gateway into the front-end service layer; The configuration parameters of the distributed cache system, the configuration parameters of the distributed message queue, the configuration parameters of the distributed scheduling and / or the configuration parameters of the elastic search platform are loaded into the test service layer.
2. The testing method for the service platform according to claim 1, characterized in that: The test system includes a front-end page; The method of using the loaded test system to execute the test task, calling and testing the loaded middleware, and outputting the test results includes: Receiving a service input instruction through the front-end page, and sending the service input instruction to the front-end service layer; Calling the service corresponding to the service input instruction through the front-end service layer, and performing pre-processing on the service; The service is executed based on the loaded middleware through the test service layer to call and test the middleware, and obtain and output the test result.
3. The testing method for the service platform according to claim 2, characterized in that: The test system includes a database; After outputting the test results, the method further includes: The test service layer stores the relevant data of the service in the database.
4. The testing method for the service platform according to claim 1, characterized in that: The test system includes: a distributed service tracking system, a unified log processing platform and a unified alarm platform; The method further comprises: Monitoring the call information of the service through the distributed service tracking system; Collecting and storing log services through the unified log processing platform; The unified alarm platform is used to converge and send alarm services.
5. A testing device for a service platform, characterized in that: include: The first processing module is used to obtain the configuration parameters of the middleware of the tested service platform; A second processing module is used to load the configuration parameters of the middleware into the test system to obtain the loaded test system; The test system comprises: a front-end service layer and a test service layer, wherein the front-end service layer and the test service layer are connected via a communication protocol; A third processing module is used to use the loaded test system to execute the test task, call and test the loaded middleware, and output the test result; The first processing module is specifically used to: obtain configuration parameters of the service gateway, configuration parameters of the distributed cache system, configuration parameters of the distributed message queue, configuration parameters of the distributed scheduling and / or configuration parameters of the elastic search platform; The second processing module is specifically used to: load the configuration parameters of the service gateway into the front-end service layer; load the configuration parameters of the distributed cache system, the configuration parameters of the distributed message queue, the configuration parameters of the distributed scheduling and / or the configuration parameters of the elastic search platform into the test service layer.
6. 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 testing method for the service platform as described in any one of claims 1 to 4 are implemented.
7. A non-transitory 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 testing method for the service platform as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Testing method and apparatus for middleware and computer readable storage medium
CN107632928A