CN116107913B - Test control method, device and system of single-node server - Google Patents

Test control method, device and system of single-node server Download PDF

Info

Publication number
CN116107913B
CN116107913B CN202310362913.7A CN202310362913A CN116107913B CN 116107913 B CN116107913 B CN 116107913B CN 202310362913 A CN202310362913 A CN 202310362913A CN 116107913 B CN116107913 B CN 116107913B
Authority
CN
China
Prior art keywords
tested
server
test
task
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310362913.7A
Other languages
Chinese (zh)
Other versions
CN116107913A (en
Inventor
吴朝峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202310362913.7A priority Critical patent/CN116107913B/en
Publication of CN116107913A publication Critical patent/CN116107913A/en
Application granted granted Critical
Publication of CN116107913B publication Critical patent/CN116107913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The embodiment of the specification provides a test control method, device and system of a single-node server, wherein the method comprises the following steps: obtaining a to-be-tested request sequence of a to-be-tested server, wherein the to-be-tested server is any server in a server cluster, the to-be-tested request sequence comprises at least two to-be-tested requests, and the to-be-tested requests carry a time sequence identifier; generating a corresponding test task according to the time sequence identifier of the request to be tested in the request sequence to be tested, wherein the test task carries the corresponding time sequence identifier; according to the time sequence identification of the test task, sequentially sending the generated test task to a server to be tested; and under the condition that the test task is executed, determining a test result of the server to be tested according to an execution log fed back by the server to be tested. The test tasks are accurately sent to the single-node server according to the fixed time sequence, so that the load time sequence consistency of the single-node server in each test is ensured, and the accuracy of the test result is improved.

Description

Test control method, device and system of single-node server
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a test control method and a test system of a single-node server.
Background
With the continuous development of computer technology, cloud technology is becoming popular. Program development and server deployment are increasingly separated into two types of work that can be performed separately by different technicians. Currently, merchants specially providing server services develop online server cluster services, and the online server cluster can simultaneously proxy function tasks of different users, so that strong function computing capability is provided.
However, when the test request is executed on the whole server cluster, the test request is distributed to the single-node servers after passing through the load balancing module, so that the same test request can not be fixedly sent to the same single-node server every time of the test, and the time sequence of receiving the test request by the same single-node server can not be ensured to be consistent every time. Therefore, according to the test method, the test results obtained through multiple tests are distinguished and cannot be accurately positioned, and the problem positioning efficiency is low, so that waste of test resources is generated.
Disclosure of Invention
In view of this, the present embodiment provides a test control method of a single-node server. One or more embodiments of the present specification relate to a test control apparatus for a single-node server, a computing device, a computer-readable storage medium, and a computer program for solving the technical drawbacks of the prior art.
According to a first aspect of embodiments of the present disclosure, there is provided a test control method of a single-node server, applied to a client, including:
obtaining a to-be-tested request sequence of a to-be-tested server, wherein the to-be-tested server is any server in a server cluster, the to-be-tested request sequence comprises at least two to-be-tested requests, and the to-be-tested requests carry a time sequence identifier;
generating a corresponding test task according to the time sequence identifier of the request to be tested in the request sequence to be tested, wherein the test task carries the corresponding time sequence identifier;
according to the time sequence identification of the test task, sequentially sending the generated test task to a server to be tested;
and under the condition that the test task is executed, determining a test result of the server to be tested according to an execution log fed back by the server to be tested.
According to a second aspect of embodiments of the present disclosure, there is provided a test control device of a single-node server, configured at a client, including:
the system comprises a sequence acquisition module, a sequence judgment module and a sequence judgment module, wherein the sequence acquisition module is configured to acquire a to-be-tested request sequence of a to-be-tested server, the to-be-tested server is any server in a server cluster, the to-be-tested request sequence comprises at least two to-be-tested requests, and the to-be-tested requests carry a time sequence identifier;
The task generation module is configured to generate a corresponding test task according to the time sequence identifier of the request to be tested in the request sequence to be tested, wherein the test task carries the corresponding time sequence identifier;
the task sending module is configured to send the generated test tasks to the server in sequence according to the time sequence identifiers of the test tasks;
the test result determining module is configured to determine a test result of the server to be tested according to the execution log fed back by the server under the condition that the test task is executed.
According to a third aspect of embodiments of the present disclosure, there is provided a test system for a single-node server, including a client and a server to be tested:
and the client is configured to realize the steps of the test control method of the single-node server when being executed.
The server to be tested is configured to receive and execute the test task sent by the client and generate an execution log; and under the condition that each test task is executed, collecting an execution log and feeding back the execution log to the client.
According to a fourth aspect of embodiments of the present specification, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions that, when executed by the processor, implement the steps of the test control method for a single-node server described above.
According to a fifth aspect of embodiments of the present specification, there is provided a computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the test control method of a single-node server described above.
An embodiment of the present disclosure implements obtaining a sequence of requests to be tested of a server to be tested, where the server to be tested is any server in a server cluster, the sequence of requests to be tested includes at least two requests to be tested, and the requests to be tested carry a timing identifier; generating a corresponding test task according to the time sequence identifier of the request to be tested in the request sequence to be tested, wherein the test task carries the corresponding time sequence identifier; according to the time sequence identification of the test task, sequentially sending the generated test task to a server to be tested; and under the condition that the test task is executed, determining a test result of the server to be tested according to an execution log fed back by the server to be tested.
Therefore, according to the time sequence identification of the to-be-tested request in the to-be-tested request sequence, the test task with a fixed time sequence can be generated, and the test task can be accurately sent to one single-node server according to the sequence consistent with the time sequence identification of each to-be-tested request, so that the load test of the single-node server according to the task logic is realized, the consistency of the load time sequence in each test is ensured, the accuracy of the test result is improved, the problem positioning efficiency is improved, and in addition, because a user can accurately test the single-node server instead of the whole server cluster, the test resource can be saved, and the test cost is reduced.
Drawings
FIG. 1 is a flow chart of a method for testing and controlling a single-node server according to one embodiment of the present disclosure;
FIG. 2 is a system diagram of a single-node server testing system according to one embodiment of the present disclosure;
FIG. 3 is a process flow diagram of a method for testing and controlling a single-node server according to one embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a test control device of a single-node server according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of a computing device provided in one embodiment of the present description.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many other forms than described herein and similarly generalized by those skilled in the art to whom this disclosure pertains without departing from the spirit of the disclosure and, therefore, this disclosure is not limited by the specific implementations disclosed below.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in this specification are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related country and region, and are provided with corresponding operation entries for the user to select authorization or rejection.
First, terms related to one or more embodiments of the present specification will be explained.
And (3) function calculation: the system is an event-driven full-support management functional service, a user does not need to manage infrastructure such as a server, only needs to write codes and upload the codes, the function calculation can be ready for computing resources, and the codes of the user can be operated in an elastic and reliable mode.
Functional service: is an event driven computational execution model that runs in a stateless container.
Safety container: the main difference between the common container and the main container is that each container runs in a single micro virtual machine and has independent operating system kernel and security isolation of a virtualization layer.
SSH protocol (secure file transfer protocol): is a data stream connection, network transport protocol that provides file access, transfer and management functions.
In the present specification, a test control method of a single-node server is provided, and the present specification relates to a test control apparatus of a single-node server, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
With the development of internet cloud technology, when a computer runs a program and executes corresponding functions, technicians responsible for clients can gradually focus on the development of client codes only, the construction of infrastructure such as a server is stripped from development work, and the management is carried out by technicians specially developing a server. The server and the client are completely separated, and the method for respectively developing the server and the client is a new Internet service based on the development concept without the server.
At present, function computation is applied to a server cluster, so that computing resources can be prepared, codes of client developers can be operated in an elastic and reliable mode, and event-driven functional service is used for realizing full-automatic management of the whole life cycle of a task according to task logic.
A server cluster is to centralize a plurality of servers to perform the same service, and the server cluster appears to a client as if there is only one server. The server cluster can use a plurality of computers to perform parallel computation so as to obtain high computation speed, and can also use a plurality of computers to perform backup, so that the whole system is damaged by any machine, the normal operation can be maintained, and the client task is ensured not to be interrupted.
Currently, tests for function computation include: the method comprises the steps of functional test, pressure test, fuzzy test and task test, wherein the functional test, the pressure test and the fuzzy test are tests for a single-node server in a server cluster, and the tests are only test loads generated by a set test script and do not have the capability of testing the test loads according to the time sequence of task logic and a fixed time sequence. The task test is currently performed on the whole server cluster, a test request is sent to a server cluster comprising a plurality of single-node servers in a certain time period, and the test request is distributed on each single-node server in the cluster as uniformly as possible through a function calculation load balancing module.
However, since the test requests are sent by the function calculation load balancing module, it cannot be ensured that the same test request is fixedly sent to the same single-node server every time of the test, and the same single-node server cannot be ensured that the time sequence of receiving the test request is consistent every time. Therefore, according to the test method, the test results obtained through multiple tests are distinguished and cannot be accurately positioned, and the problem positioning efficiency is low, so that waste of test resources is generated.
Based on this, according to the test control method of the single-node server applied to the client provided in one embodiment of the present disclosure, a to-be-tested request sequence of a to-be-tested server is obtained, where the to-be-tested server is any one server in a server cluster, and the to-be-tested request sequence includes at least two to-be-tested requests, where the to-be-tested requests carry a time sequence identifier; generating a corresponding test task according to the time sequence identifier of the request to be tested in the request sequence to be tested, wherein the test task carries the corresponding time sequence identifier; according to the time sequence identification of the test task, sequentially sending the generated test task to a server to be tested; and under the condition that the test task is executed, determining a test result of the server to be tested according to an execution log fed back by the server to be tested.
According to the time sequence identification of the to-be-tested request in the to-be-tested request sequence, the test task with a fixed time sequence can be generated, and the test task can be accurately sent to a single-node server according to the sequence consistent with the time sequence identification of each to-be-tested request, so that the load test of the single-node server according to the task logic is realized, the consistency of the load time sequence in each test is ensured, the accuracy of the test result is improved, the problem positioning efficiency is improved, and in addition, because a user can accurately test the single-node server instead of the whole server cluster, the test resource can be saved, and the test cost is reduced.
Referring to fig. 1, fig. 1 shows a flowchart of a test control method of a single-node server applied to a client according to an embodiment of the present disclosure, which specifically includes the following steps.
Step 102: the method comprises the steps of obtaining a to-be-tested request sequence of a to-be-tested server, wherein the to-be-tested server is any server in a server cluster, the to-be-tested request sequence comprises at least two to-be-tested requests, and the to-be-tested requests carry a time sequence identifier.
At present, the task test is based on the whole server cluster, the test request is sent, the test is performed on the whole server cluster, the consumed test time is long, the consumed test resources are more, and the load balancing module can uniformly distribute the test load request on each single-node server in the cluster according to the load condition in the actual test, so that the test task executed by each test on the single-node server is possibly different from the last time, and the consistency of the task time sequence cannot be ensured.
To simulate test tasks performed by a single node server in a server cluster, one or more embodiments of the present disclosure obtain a sequence of requests to be tested for a server to be tested.
Specifically, the server to be tested is a server to be subjected to load test, and may be any server in a server cluster. The server cluster is composed of a plurality of single-node servers, can integrate the computing power of the plurality of single-node servers, realizes high-performance operation, and can be particularly a cloud server cluster composed of a plurality of cloud services. The request sequence to be tested is a request sequence sent by the server to be tested. In practical applications, the request to be tested may be understood as a specific task execution request, for example, for a cloud server node, the request to be tested may be a request for executing a task corresponding to a function calculation. The time sequence identifier carried by the request to be tested can be specific time, for example, 01 minutes when the request to be tested 1 carries the time sequence identifier 14, 02 minutes when the request to be tested 2 carries the time sequence identifier 14, or a sequential identifier, for example, the preset execution sequence of the request to be tested is that the request to be tested 1 is executed first, then the request to be tested 2 is executed, and finally the request to be tested 3 is executed, then the requests to be tested 1, 2 and 3 can respectively carry the numbers 1, 2 and 3, and when the request is sent, the requests can be sent in sequence from small to large according to the order of the number, or can be sent randomly out of the order, so that the purpose of identifying the time sequence of the request to be tested can be achieved according to the time sequence identifier carried by the request to be tested.
Because of the implementation of an internet project, the construction of a server and the development of a client are usually closely related and implemented by the same technical team, but at present, function computation applied to a cloud server cluster can automatically prepare computing resources and run codes of client developers in an elastic and reliable manner, so that technicians can only concentrate on the development of the client, but the deployment construction of the server and the execution of tasks on the server are completely realized by the technicians responsible for the cloud server.
Therefore, for technicians concentrating on developing servers, the abnormal problems of the server clusters in the process of providing services for users need to be solved in time, so that the problem positioning requirements on the problems can be generated; moreover, the testers responsible for the server cluster can test each single-node server in the server cluster frequently so as to calculate certain performance indexes according to the test results and count the performance indexes to realize performance tuning.
It should be noted that, for an abnormal problem occurring in a process of providing a service for a user by a server cluster, there is a need to perform downlink reproduction on an online load condition to locate a problem encountered in a process of performing a task on an online, in one or more embodiments of the present disclosure, a request sequence to be tested of a server to be tested is obtained, which may be implemented by the following method:
Acquiring a task execution record of a server to be tested in a preset time period;
and determining a request sequence to be tested of the server to be tested according to the task execution record.
Specifically, in the process of providing services online, each task to be executed may be sent to a load balancing module, where the load balancing module may allocate the task to be executed to a corresponding server based on the current load situation of each server in the server cluster, and each server may only record, in a log, attribute parameters of the task, such as a task identifier, a task receiving time, a task execution parameter, and the like, when executing the task. Therefore, the server with faults can be analyzed based on the logs of each server in the server cluster, and the server to be tested and the corresponding preset time period for the problem to be reproduced can be determined. The server cluster log can be obtained from a cluster management module included in a server cluster where the server to be tested is located, so that the corresponding single-node servers with faults in different time periods in the process of providing service on the server cluster line can be determined, and the server to be tested is determined. The server to be tested and the online problem recurrence time period of the server to be tested can be determined by directly reading the log collection module of each single-node server in the server cluster.
In practical application, in order to improve isolation between different task processes in a server, thereby guaranteeing data security and avoiding potential safety hazards of a system, in one or more embodiments of the present disclosure, after a test task is sent to a server to be tested, the server to be tested is controlled to create a secure container, and a corresponding test task is executed in the secure container. It should be noted that, the security container is different from the common container in that there is no kernel, and each security container is deployed in a separate micro virtual machine and has an independent operating system kernel and a virtualization layer. Correspondingly, different security containers are generated according to the received task request time sequence aiming at the same single-node server, and corresponding tasks are operated in the security containers to generate execution logs corresponding to the tasks. Therefore, for the request sequence to be tested, it can be understood that each request to be tested carries the task parameter and the container creation instruction in the request sequence to be tested.
Specifically, for a time period when a server to be tested fails, a log collection module in a node of the server to be tested can obtain an execution log corresponding to the server to be tested in the failure time period, and analyze the execution log to obtain a task execution record of the server to be tested in a preset time period. The time sequence record of the container creation on line can be read from the task execution record, namely, the time sequence of the container creation in the time period when the user task of the server to be tested fails is read.
In practical application, because each task needs to be created in advance when executing, the time sequence of creating the container can be obtained through the time sequence record created by the obtained container, and the time sequence created by the container indicates the execution sequence of the corresponding task, so that a test request sequence can be correspondingly generated according to the execution sequence, and in the test request sequence, each test request is identified according to the time sequence created by the container, so that the task request sent to the server on line is ensured to be consistent with the task time sequence executed by the server in time sequence.
Illustratively, in the process that the server to be tested provides the online service, the time sequence record of the container creation in the preset time period is as follows: the containers a, c and f are created in the 8 time period of 01 minutes, the containers e and d are created in the 8 time period of 02 minutes, and the container b is created in the 8 time period of 04 minutes, so that the task execution sequence is the container a, c, f, e, d, b according to the container creation time sequence record, and test tasks are generated according to the sequence when the online test is performed, so that the online service process is accurately simulated, and the test accuracy is improved.
In practical application, the execution log can be obtained from the on-line server cluster through the modes of inputting by a tester or automatically obtaining the client at preset time intervals, and the like, and under the condition of determining the server to be tested and the preset time period, the time sequence record of the creation quantity of the container on the line of the server to be tested is used as the input of a request sequence obtaining module in the client, and the request sequence obtaining module outputs the request sequence to be tested to a test task generating module of the client according to the input time sequence record, so that the test task generating module generates a test task according to the request sequence to be tested.
The server cluster where the server to be tested is located is obtained, an execution log generated in the process of executing the on-line tasks is obtained, the single-node server with the abnormality and the time period corresponding to the abnormality are determined from the execution log of the server cluster, the server to be tested which is specifically tested can be determined, the container creation sequence in the preset time period is obtained from the execution log of the server to be tested, and when the on-line tasks are repeated on line, the time sequence of the test tasks is ensured to be consistent with that of the on-line tasks, and the test accuracy is improved. Meanwhile, the test is carried out only for the fault time period, so that the test resources can be saved, and the problem positioning efficiency is improved.
For technicians developing the server, the problems on the server line can be positioned and solved, the server cluster can be tested at regular intervals, the function calculation performance index is counted, and the performance is adjusted according to the counting result.
Therefore, in order to facilitate a technician to test a server cluster and ensure that task timing sequences of each round of testing are consistent for a single-node server, so as to facilitate anomaly detection and performance tuning for the single node, in one or more embodiments of the present disclosure, a sequence of requests to be tested of a server to be tested is obtained, which may also be implemented by:
And receiving a request sequence to be tested configured by a user aiming at the server to be tested.
Specifically, the user can understand a technician for testing the server cluster, and the tester can set a request sequence to be tested according to a preset single-node server load curve and send the request sequence to be tested to the client, so that the simulation of the user-defined test load curve is realized. The preset load curve can be to uniformly generate load tasks at fixed time intervals, or to explosive increase the number of load tasks in a certain time period, so as to simulate different online service conditions.
In practical application, a tester can set time for each request to be tested, or can set sending sequence only for each request to be tested, and can be specifically determined according to a load curve which the tester wants to simulate. For example, a tester wants to simulate a load curve of a single-node smooth operation of a server, 10 requests to be tested can be preset, and each request to be tested is 1 minute in time interval, that is, 01 minutes when the time sequence of the request to be tested is identified by the time sequence of the request to be tested 1, 02 minutes when the time sequence of the request to be tested is identified by the time sequence of the request to be tested 2, and 10 minutes when the time sequence of the request to be tested is identified by the 14. If a tester wants to simulate the load capacity of a single node of a server for burst requests in a certain moment, 1000 requests can be sent in a preset time within 1 minute according to the sequence, and the sequence can be expressed by data from small to large. For example, request 1 under test timing identifier 1, request 2 under test timing identifier 2.
After a batch of requests to be tested are set by a tester, the batch of requests to be tested are input to the client at the same time, or each time a request is set, the requests are input to the client once. In practical application, a tester can input a configured request to be tested into the test load model as input of the test load model in the client, so that a request sequence to be tested is generated by the test load model, and the request sequence to be tested is output to the test task generating module, so that the test task generating module generates a test task according to the request sequence to be tested.
The test task can be accurately sent to the single-node server according to the time sequence according to the request time sequence set by the user through the user-defined setting of the test request by the tester, so that the user-defined test load curve is simulated, the performance of function calculation can be optimized according to the simulation result of the load curve, the test accuracy of the server node is improved, and the consumption of test resources is reduced.
Step 104: and generating a corresponding test task according to the time sequence identifier of the to-be-tested request in the to-be-tested request sequence, wherein the test task carries the corresponding time sequence identifier.
In practical application, according to the time sequence identifier of the to-be-tested request in the to-be-tested request sequence, the test tasks corresponding to the to-be-tested requests are generated, so that the test tasks can be pushed to the to-be-tested server according to the sequence of the to-be-tested requests in the to-be-tested request sequence, namely, the time sequence of the test tasks is ensured to be consistent with the time sequence of the to-be-tested requests in the to-be-tested request sequence.
Specifically, the client may include a task generating module, where the task generating module is configured to receive a sequence of requests to be tested output by the test load model, and generate test tasks corresponding to at least two requests to be tested respectively according to timing identifiers corresponding to at least two requests to be tested in the sequence of requests to be tested respectively. The test tasks can comprise different types of load functions, and can comprise a calculation type load function, a network type load function, a storage type load function and the like, wherein the calculation type load function can realize a complex operation function; the network type load function can realize the functions of access to different gateways, network connection and the like; the storage type load function can realize a storage function of a large amount of data, for example, the game data and account progress data of a player on the same day in one game are recorded and stored. It will be appreciated that a test task may include a plurality of different types of load functions, for example, a test task is to operate on a complex function and persist the operation result, where the test task includes both a computational load function and a storage load function.
In one or more embodiments of the present disclosure, according to a timing identifier of a request to be tested in a request to be tested sequence, a corresponding test task is generated, which may be implemented by the following method:
generating corresponding test tasks in sequence according to the time sequence identifiers of the to-be-tested requests in the to-be-tested request sequence;
in practical application, in order to ensure that the test tasks generated in sequence can be sent to the server to be tested in a consistent sequence, the generated test tasks can be stored after being generated. Accordingly, after generating the corresponding test task, the method may further include the following steps:
and adding the generated test task to a target test task queue.
Specifically, because the to-be-tested request in the to-be-tested request sequence carries the time sequence identifier, the test task can be sequentially generated from front to back according to the time sequence corresponding to the time sequence identifier, and the time identifier corresponding to the to-be-tested request is carried in the test task. And sending the generated test tasks to a target test task queue for storage according to the sequence of the generation of the test tasks.
That is, after one test task is generated, the next test task can be generated according to the sequence.
Corresponding test tasks are sequentially generated according to the time sequence identification of the request to be tested, the test tasks are sent to the queue for storage according to the time sequence identification of the request to be tested, the tasks stored in the queue can be issued according to the time sequence by utilizing the characteristic of first-in first-out of the queue, and therefore consistency of the time sequence of the test tasks is ensured, and burst capacity for uniformly sending the test tasks in unit time intervals or sending all the test tasks at a certain moment in the unit time intervals is provided.
Optionally, the task generating module may store each test task in the target test task queue according to the time sequence identifier, or may sequence the generated test tasks according to the time sequence identifier, and store the sequenced test tasks in the target test task queue according to the sequence from front to back.
Correspondingly, in one or more embodiments of the present disclosure, according to the timing identifier of the request to be tested in the request to be tested sequence, a corresponding test task is generated, which may also be implemented by the following method:
and generating a test task corresponding to the request to be tested in the request sequence to be tested, and carrying a corresponding time sequence identifier in the test task.
In practical application, for each test task corresponding to each request to be tested respectively generated according to each request to be tested in the request to be tested sequence, each test task can be generated in sequence without according to the time sequence identifier carried by each request to be tested. In one or more embodiments of the present disclosure, each test task corresponding to each request to be tested may be generated in any order, and each test task carries a timing identifier consistent with the corresponding request to be tested. For example, the time sequence identifier of the request to be tested is 1, and the test task generated according to the request to be tested can also carry the time sequence identifier 1. Therefore, when the server to be tested is tested later, the generated test tasks can be sent to the server to be tested according to the sequence identification and the sequence consistent with the sequence identification.
Accordingly, after generating the corresponding test task, the method may further include the following steps:
storing the generated test task;
and under the condition that the test task corresponding to the request to be tested in the request sequence to be tested is generated, adding the test task to the target test task queue according to the time sequence identification of the test task.
Specifically, when the test task corresponding to the test request in the test request sequence is generated, the test task corresponding to any test request can be randomly generated instead of being generated or stored according to the sequence identifier of the test request, and the generated test task carries the sequence identifier of the corresponding test request.
In practical application, various modes of generating test tasks can be adopted, alternatively, a parallel generation mode is not needed, and then the next test task is generated after one test task is generated, or one test request is randomly selected to generate the test task, and then the next test request is randomly selected to generate the test task.
In practical application, after a batch of test tasks are generated and stored, the test tasks can be added to the target test task queue according to the sequence identification of the test tasks and the sequence corresponding to the sequence identification.
By adding the test tasks to the target test task queue according to the time identification, the test tasks sent to the server can be ensured to be sent according to the time sequence identification of the task request, and the time sequence consistency of the execution tasks of the server to be tested is ensured for each test. And by storing the generated test tasks in the queue, time compensation can be realized in the queue, and the time fluctuation of the generation and transmission of the number of the two batches of test tasks is ensured to be within 5 milliseconds. Taking out test tasks from the queue and publishing them can provide the ability to send test tasks evenly in a unit time interval or to send all test tasks at a time in a unit time interval.
In addition, besides the two modes, the generated test tasks can be directly stored without using the target test queue, and then when the test tasks are sent to the server, the test tasks to be pushed are determined according to the sequence of the stored sequence identifications of the test tasks by traversing the sequence identifications of the test tasks.
Step 106: and sending the generated test tasks to the server to be tested in sequence according to the time sequence identification of the test tasks.
In practical applications, the client may also include a process pool module. The task generating module can control the test tasks stored in the target test queue, send the test tasks to the working process in the process pool module according to time sequence, and then the working process in the process pool module can manage the life cycle of the received test tasks in the form of task threads, and send the test tasks to the single-node server so as to complete load test of the server.
According to one or more embodiments of the present disclosure, according to a time sequence identifier of a test task, the generated test task is sequentially sent to a server to be tested, and the method is implemented as follows:
and acquiring a current task to be pushed from the target test task queue every set time length, and pushing the current task to be pushed to the server to be tested.
Specifically, the task generating module included in the client may acquire a current task to be pushed from the target test task queue every a set period of time, and push the current task to be pushed to a working process in the process pool module included in the client. The set duration may be a fixed time period, for example, 1 millisecond, 1 second, 1 minute, etc., and may acquire one task to be pushed and push the task at fixed time intervals, or acquire a plurality of tasks to be pushed and push the task at fixed time intervals, and specifically, the set duration is determined according to a time sequence identifier of each request to be tested in the request sequence to be tested. The current task to be pushed is a task to be pushed to the server to be tested, specifically, the current task to be pushed can be in the form of a task thread and is managed by a working process.
For example, in the process of executing user codes on line by function calculation, the server to be tested receives an explosive type request instruction within a certain minute, then a request sequence to be tested obtained according to a container creation amount time sequence record within the certain minute can carry a time sequence identifier capable of identifying the sequence of each request to be tested within the minute, and test tasks generated according to each request to be tested in the request sequence to be tested correspondingly carry the time sequence identifier, so that a task generating module in a client side can acquire a plurality of test tasks in a target test task queue within a minute according to the time sequence identifier and push the test tasks to a working process in a process pool module in an explosive type.
The current task to be pushed is obtained from the target test task queue at intervals of set time length, and is pushed to the server to be tested, so that the time fluctuation generated and sent by the number of the two batches of test tasks can be ensured to be within 5 milliseconds, and the capability of uniformly sending the test tasks in a unit time interval or sending all the test tasks at a certain moment in the unit time interval is provided.
In order to ensure that the task to be pushed to the server to be pushed can be consistent with the time sequence of each request to be tested in the request sequence to be tested, one or more embodiments of the present disclosure acquire the current task to be pushed from the target test task queue, and push the current task to be pushed to the server to be tested, by the following means:
Distributing the current task to be pushed to a corresponding target process, wherein the target process is used for asynchronously managing at least one test task;
and pushing the current task to be pushed to the server to be tested through the target process.
In particular, the target process is a process for asynchronously managing at least one test task, which can be understood as a master process in one working component. The task to be pushed can be distributed to the corresponding target process according to the idle condition of the process in the current process pool module.
In practical application, a plurality of working processes may be set in the process pool module, in a preferred embodiment, the working processes may be configured to be 300, and each working process may manage 3 test task threads in an asynchronous manner. When the task to be pushed is not received, the working process is in an idle state and can be marked as idle and dormant so as to save memory resources, and under the condition that the task to be pushed is received, the working process is immediately converted from the dormant state to the working state, and the creation request of a container corresponding to each task to be pushed is controlled in an asynchronous mode.
Specifically, the asynchronous mode means that the control of the same process on a plurality of threads can be executed asynchronously, and when a new test task thread is received by the process, the process can immediately control the life cycle of the new test task thread and send the test task to the server to be tested. The tasks to be pushed are pushed to the server to be tested in an asynchronous mode, so that the client can send the test tasks to the server according to the time sequence consistent with the time sequence identification of the request to be tested in the request sequence to be tested, and the time sequence of the test tasks received by the server in each test process is consistent.
Optionally, the target process can also manage the whole life cycle of the task thread, so that the life cycle management of the container on the server to be tested is implemented according to the consistent time sequence.
The task generating module may acquire a current task to be pushed from the target test task queue, generate a task thread corresponding to the current task to be pushed and send the task thread to a target process in an idle state in the process pool module, the target process may asynchronously manage the life cycles of 3 task threads, the target process may immediately send a container creation request to the server to be tested after receiving the task thread 1, and in the process of waiting for the server to be tested to return a message that the container creation is successful, may continue to receive the task thread 2 and send the container creation request corresponding to the task thread 2 to the server to be tested, and immediately send the container creation request corresponding to the task thread 3 to the server to be tested after receiving the task thread 3 by the target process. The target process receives a container creation success message for the task thread 1 returned by the server, sends a test load task corresponding to the task thread 1 to the server to be tested, sends a container deletion request corresponding to the task thread 1 to the server to be tested after receiving a message of the completion of the execution of the load test task returned by the server to be tested, and destroys the task thread 1 after the server to be tested feeds back the message of the completion of the container deletion.
The current task to be pushed is distributed to the corresponding target process, the current task to be pushed is pushed to the server to be tested in an asynchronous mode through the target process, and the test tasks sent to the server to be tested can be ensured to be sent according to the time sequence of each request to be tested in the request sequence to be tested, so that the consistency of each time test time sequence of the single-node server can be ensured, the time sequence accuracy of online recurrence of the online problem can be ensured, the problem positioning efficiency is improved, meanwhile, the self-defined test request of a tester can be accurately tested, the execution time sequence of the test tasks is ensured to be consistent with the time sequence defined by a user, and the accuracy of load curve simulation is improved.
Step 108: and under the condition that the test task is executed, determining a test result of the server to be tested according to an execution log fed back by the server to be tested.
In practical application, when the test task is executed by the server to be tested, a message of the completion of the task execution is fed back to the target process, and the target task process can destroy the corresponding test task thread according to the message of the completion of the task execution fed back by the server to be tested. The server to be tested creates a container according to the request corresponding to the test task, executes the corresponding test task, and generates an execution log in the process of deleting the container after the execution is finished, and records data related to the test task, such as creation time, task execution time, deletion time and the like of the container. The log collection module in the server to be tested can collect the execution log in the execution process of the server to be tested.
Specifically, the execution log is a log of record-related data that is generated when the server to be tested performs a corresponding operation according to a series of requests (e.g., a container creation request, a task execution request, a container deletion request, etc.) corresponding to the test task. The test result of the server to be tested can be understood as a result obtained by analyzing the log data after the server to be tested finishes the test task of the preset condition, wherein the preset condition can comprise preset time and preset task number; the test results comprise load graphs, container average creation time, container average deletion time, container internal task average execution time, CPU average occupancy rate, memory average occupancy rate and other data capable of reflecting the calculation performance of the single-node server function.
For example, the test task execution log of the server to be tested within the last 5 minutes may be obtained from the log collection module of the server to be tested every 5 minutes during the test. Or, after the whole test is finished, the execution log recorded after the whole test process sent by the server to be tested is finished can be received.
In practical application, the last test task in the target test task queue can be issued to the process pool module according to the task generation module to determine that the whole test is finished, or the whole test can be determined to be finished according to the fact that all processes in the process pool enter a dormant state.
It should be noted that, the transmission of the execution log between the client and the server to be tested may be performed through an SSH protocol. Specifically, the client may obtain, from the server to be tested, an execution log in a current latest time interval according to a preset time interval, and may also receive, from the server to be tested, an execution log sent by the server to be tested according to the preset time interval through an SSH protocol. The transmission of the execution log is completed through the SSH protocol, so that the file transmission efficiency can be improved, and the safety of file transmission can be improved.
Optionally, the client may include a log analysis module, and accordingly, in the case that the test task is performed, in one or more embodiments of the present disclosure, according to the execution log fed back by the server to be tested, the determining a test result of the server to be tested may be implemented by the following method:
acquiring an execution log fed back by a server to be tested;
analyzing the execution log to obtain a test result report of the server to be tested.
Specifically, the log analysis module of the client may analyze the execution log collected by the server, and for example, the creation duration of all containers in a preset time period may be read from the execution log, and the creation duration of all containers may be averaged to obtain an average creation duration of the containers in the server to be tested. The creation time of the network components corresponding to all the containers in the preset time period can be counted, and the creation time of all the network components is averaged to obtain the average creation time of the network components corresponding to all the containers in the server to be tested. And the data such as CPU occupancy rate, memory occupancy rate and the like of the server to be tested per minute can be counted in a preset time period, and a load curve graph is drawn according to the data to be used as a test result report of the server to be tested.
In practical application, the client may further include a test report generating module, for analyzing the test result obtained by the execution log, to generate an HTML format test result report, so as to implement safe, persistent storage and visual display of the test result report, so as to count each performance index according to the report, and perform optimization on each performance calculated by the function according to the statistics result, and perform configuration optimization adjustment on the system components, hardware, and the like for the server to be tested.
Accordingly, in one or more embodiments of the present disclosure, analyzing an execution log to obtain a test result report of a server to be tested may be implemented in the following manner:
analyzing the execution log to obtain an initial test result of the server to be tested;
and generating a test result report in an HTML format according to the initial test result, and visually displaying the test result report.
Specifically, the initial test result may be understood as data related to the server test result, which is obtained by parsing an execution log, for example, data such as creation time of all containers in a preset period of time, creation time of network components corresponding to the containers, occupancy rate of a CPU, a memory, and the like per minute. The test result report can be stored in a browser through an HTML format, and according to the acquired test result report in the HTML format, various indexes can be counted to generate a visual view reflecting the performance of the server, such as a histogram, a line graph, a pie chart, a graph and the like.
By analyzing the execution log, the test result report in the HTML format is generated according to the execution log, so that the test result report can be conveniently and safely transmitted in a high-efficiency mode, the test result report can be conveniently displayed on browsers corresponding to different clients, a tester can conveniently position the problems of the server to be tested according to the recurrence result of the problems on the line, or different workers can conveniently count various performance indexes, and the tuning efficiency of the server to be tested is improved.
According to the test control method of the single-node server applied to the client provided by one embodiment of the specification, a to-be-tested request sequence of the to-be-tested server is obtained, wherein the to-be-tested server is any server in a server cluster, the to-be-tested request sequence comprises at least two to-be-tested requests, and the to-be-tested requests carry time sequence identifiers; generating a corresponding test task according to the time sequence identifier of the request to be tested in the request sequence to be tested, wherein the test task carries the corresponding time sequence identifier; according to the time sequence identification of the test task, sequentially sending the generated test task to a server to be tested; and under the condition that the test task is executed, determining a test result of the server to be tested according to an execution log fed back by the server to be tested.
According to the time sequence identification of the to-be-tested request in the to-be-tested request sequence, the test task with a fixed time sequence can be generated, and the test task can be accurately sent to a single-node server according to the sequence consistent with the time sequence identification of each to-be-tested request, so that the load test of the single-node server according to the task logic is realized, the consistency of the load time sequence in each test is ensured, the accuracy of the test result is improved, the problem positioning efficiency is improved, and in addition, because a user can accurately test the single-node server instead of the whole server cluster, the test resource can be saved, and the test cost is reduced.
Referring to fig. 2, fig. 2 shows a system schematic diagram of a testing system of a single-node server, which specifically includes a client 201 and a server 202 to be tested, according to one embodiment of the present disclosure.
Client 201 includes request sequence acquisition module 2012, test task generation module 2014, process pool module 2016, log analysis module 2018, and report generation module 2020.
The server under test 202 includes a test task execution module 2022 and an execution log collection module 2024.
Specifically, the request sequence obtaining module 2012 can be understood as a test load model, and can automatically generate a request sequence to be tested according to a test request input by a tester or obtain an online container creation time sequence of a server to be tested, and send the request sequence to the test task generating module 2014. It should be noted that, the request sequence obtaining module 2012 may send the request to be tested to the test task generating module 2014 in a round-robin manner according to the timing sequence identifier of the request to be tested in the request sequence to be tested in a uniform or burst manner within a unit time interval.
The test task generating module 2014 generates a test task according to the received request to be tested and the time sequence identifier of the request to be tested, and can store the test task in the target test queue according to the time sequence identifier so as to realize time compensation and ensure that the time fluctuation generated and sent by the two batches of test tasks is within 5 milliseconds. The test task generation module 2014 may issue the test tasks in the target test queue into the process pool module 2016.
It should be noted that the test task may be managed by the work process in the process pool module 2016 in the form of a thread. The process pool module 2016 includes a plurality of work processes, each of which can manage threads corresponding to a plurality of test tasks. Each work process can manage the whole life cycle of the thread in an asynchronous mode, and the consistency of the test tasks sent to the server to be tested in time sequence is ensured.
The work process in the process pool module 2016 sends the test task to the server 202 to be tested, and the test task execution module in the server 202 to be tested creates a secure container according to the received test task and executes the task corresponding to the test task in the container. It should be noted that, the process pool module 2016 performs interaction with the test task execution module 2022 through messages, and the process controls the life cycle of the test task thread according to the execution message fed back by the test task execution module 2022, and sends a container deletion request to instruct the server to be tested to delete the corresponding container and destroy the corresponding test task thread in the process pool module when the task execution module 2022 feeds back that the test task is executed.
The execution log collection module 2024 in the server under test 202 may collect the execution log recorded by the test task execution module 2022 during execution of the test task, and transmit the collected execution log to the log analysis module 2018 in the client 201 through the SSH protocol.
The log analysis module 2018 may analyze the execution log of the server to be tested, and send the test result obtained by the analysis to the report generation module 2020. The report generating module 2020 may generate the test report in HTML format according to the test result, so as to facilitate secure transmission of the test report, and may obtain the test report through different browsers. And the test result is convenient for a tester to analyze.
The following describes, with reference to fig. 3, an example of application of the test control method of the single-node server provided in the present specification to a function computing cloud server, where the test control method of the single-node server is further described. Fig. 3 is a flowchart of a processing procedure of a test control method of a single-node server according to an embodiment of the present disclosure, which specifically includes the following steps.
Step 302: and acquiring an online task execution record of the single-node function computing cloud server in a preset time period.
Step 304: and determining a request sequence to be tested of the single-node function computing cloud server according to the container creation time sequence in the online task execution record, wherein the request sequence to be tested comprises at least two requests to be tested, and the requests to be tested carry a time sequence identifier.
Step 306: and generating corresponding test tasks in sequence according to the time sequence identification of the to-be-tested request in the to-be-tested request sequence, and adding the generated test tasks to the target test task queue.
Step 308: and acquiring a current task to be pushed from the target test task queue at intervals of set time length, and distributing the current task to be pushed to a corresponding target process.
Step 310: and pushing the current task to be pushed to the single-node function computing cloud server through the target process.
Step 312: and receiving the feedback execution log after the single-node function computing cloud server finishes all the test tasks.
Step 314: analyzing the execution log to obtain an initial test result of the single-node function computing cloud server.
Step 316: and generating a test result report in an HTML format according to the initial test result, and visually displaying the test result report.
Corresponding to the method embodiment, the present disclosure further provides an embodiment of a test control device for a single-node server, and fig. 4 shows a schematic structural diagram of a test control device for a single-node server according to one embodiment of the present disclosure. As shown in fig. 4, the apparatus includes:
the sequence acquisition module 402 is configured to acquire a sequence of requests to be tested of a server to be tested, where the server to be tested is any server in the server cluster, the sequence of requests to be tested includes at least two requests to be tested, and the requests to be tested carry a timing sequence identifier;
the task generating module 404 is configured to generate a corresponding test task according to the time sequence identifier of the request to be tested in the request sequence to be tested, wherein the test task carries the corresponding time sequence identifier;
the task sending module 406 is configured to send the generated test tasks to the server in sequence according to the time sequence identification of the test tasks;
The test result determining module 408 is configured to determine, according to the execution log fed back by the server, a test result of the server to be tested when the test task is completed.
Optionally, the sequence acquisition module 402 is further configured to:
acquiring a task execution record of a server to be tested in a preset time period;
and determining a request sequence to be tested of the server to be tested according to the task execution record.
Optionally, the sequence acquisition module 402 is further configured to:
and receiving a request sequence to be tested configured by a user aiming at the server to be tested.
Optionally, the task generating module 404 further includes a first adding unit configured to: and adding the generated test task to a target test task queue.
Optionally, the task generating module 404 further includes a second adding unit configured to: carrying a corresponding time sequence identifier in the test task;
storing the generated test task;
and under the condition that the test task corresponding to the request to be tested in the request sequence to be tested is generated, adding the test task to the target test task queue according to the time sequence identification of the test task.
Optionally, the task sending module 406 is further configured to:
And acquiring a current task to be pushed from the target test task queue every set time length, and pushing the current task to be pushed to the server to be tested.
Optionally, the task sending module 406 is further configured to:
distributing the current task to be pushed to a corresponding target process, wherein the target process is used for asynchronously managing at least one test task;
and pushing the current task to be pushed to the server to be tested through the target process.
Optionally, the test result determination module 408 is further configured to:
acquiring an execution log fed back by a server to be tested;
analyzing the execution log to obtain a test result report of the server to be tested.
Optionally, the test result determination module 408 is further configured to:
analyzing the execution log to obtain an initial test result of the server to be tested;
and generating a test result report in an HTML format according to the initial test result, and visually displaying the test result report.
The above is a schematic scheme of a test control device of a single-node server in this embodiment. It should be noted that, the technical solution of the test control device of the single-node server and the technical solution of the test control method of the single-node server belong to the same concept, and details of the technical solution of the test control device of the single-node server, which are not described in detail, can be referred to the description of the technical solution of the test control method of the single-node server.
Fig. 5 illustrates a block diagram of a computing device 500 provided in accordance with one embodiment of the present description. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. Processor 520 is coupled to memory 510 via bus 530 and database 550 is used to hold data.
Computing device 500 also includes access device 540, access device 540 enabling computing device 500 to communicate via one or more networks 560. Examples of such networks include public switched telephone networks (PSTN, public Switched Telephone Network), local area networks (LAN, local Area Network), wide area networks (WAN, wide Area Network), personal area networks (PAN, personal Area Network), or combinations of communication networks such as the internet. The access device 540 may include one or more of any type of network interface, wired or wireless (e.g., network interface card (NIC, network interface controller)), such as an IEEE802.11 wireless local area network (WLAN, wireless Local Area Network) wireless interface, a worldwide interoperability for microwave access (Wi-MAX, worldwide Interoperability for Microwave Access) interface, an ethernet interface, a universal serial bus (USB, universal Serial Bus) interface, a cellular network interface, a bluetooth interface, near field communication (NFC, near Field Communication).
In one embodiment of the present description, the above-described components of computing device 500, as well as other components not shown in FIG. 5, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device shown in FIG. 5 is for exemplary purposes only and is not intended to limit the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or personal computer (PC, personal Computer). Computing device 500 may also be a mobile or stationary server.
Wherein the processor 520 is configured to execute computer-executable instructions that, when executed by the processor, perform the steps of the data processing method described above. The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the test control method of the single-node server belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the test control method of the single-node server.
An embodiment of the present disclosure also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the test control method of a single-node server described above.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the test control method of the single-node server belong to the same concept, and details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the test control method of the single-node server.
An embodiment of the present disclosure further provides a computer program, where the computer program, when executed in a computer, causes the computer to execute the steps of the test control method of a single node server described above.
The above is an exemplary version of a computer program of the present embodiment. It should be noted that, the technical solution of the computer program and the technical solution of the test control method of the single-node server belong to the same concept, and details of the technical solution of the computer program, which are not described in detail, can be referred to the description of the technical solution of the test control method of the single-node server.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the embodiments are not limited by the order of actions described, as some steps may be performed in other order or simultaneously according to the embodiments of the present disclosure. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all required for the embodiments described in the specification.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It should be noted that, in the embodiment of the present application, the use of user data may be involved, and in practical application, the user specific personal data may be used in the solution described herein within the scope allowed by the applicable legal regulations in the country under the condition of meeting the applicable legal regulations in the country (for example, the user explicitly agrees to the user to notify practically, etc.).
The preferred embodiments of the present specification disclosed above are merely used to help clarify the present specification. Alternative embodiments are not intended to be exhaustive or to limit the application to the precise form disclosed. Obviously, many modifications and variations are possible in light of the teaching of the embodiments. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the application. This specification is to be limited only by the claims and the full scope and equivalents thereof.

Claims (12)

1. A test control method of a single-node server is applied to a client and comprises the following steps:
obtaining a to-be-tested request sequence of a to-be-tested server, wherein the to-be-tested server is any server in a server cluster, the to-be-tested request sequence comprises at least two to-be-tested requests, the to-be-tested requests carry a time sequence identifier, the to-be-tested requests comprise container creation instructions generated in the process that the to-be-tested server executes on-line tasks in the server cluster, and the time sequence identifier is obtained according to the time sequence of on-line container creation;
generating a corresponding test task according to the time sequence identifier of the to-be-tested request in the to-be-tested request sequence, wherein the test task carries the time sequence identifier corresponding to the to-be-tested request;
according to the time sequence identification of the test task, sequentially sending the generated test task to the server to be tested, wherein the sequentially sending the generated test task to the server to be tested comprises the following steps: distributing a current task to be pushed to a corresponding target process, so that the target process pushes the current task to be pushed to the server to be pushed in an asynchronous mode;
and under the condition that the test task is executed, determining a test result of the server to be tested according to an execution log fed back by the server to be tested.
2. The method of claim 1, the obtaining a sequence of requests to be tested of the server to be tested, comprising:
acquiring a task execution record of a server to be tested in a preset time period;
and determining a request sequence to be tested of the server to be tested according to the task execution record.
3. The method of claim 1, the obtaining a sequence of requests to be tested of a server to be tested, further comprising:
and receiving a request sequence to be tested configured by a user aiming at the server to be tested.
4. The method of claim 1, further comprising, after generating the corresponding test task:
and adding the generated test task to a target test task queue.
5. The method of claim 1, further comprising, after generating the corresponding test task:
carrying a corresponding time sequence identifier in the test task;
storing the generated test task;
and under the condition that the test task corresponding to the request to be tested in the request sequence to be tested is generated, adding the test task to a target test task queue according to the time sequence identification of the test task.
6. The method according to claim 4 or 5, wherein the sequentially sending the generated test tasks to the server to be tested according to the time sequence identifier of the test task includes:
And acquiring a current task to be pushed from the target test task queue every set time length, and pushing the current task to be pushed to the server to be tested.
7. The method according to claim 1, wherein the determining, when the test task is performed, the test result of the server to be tested according to the execution log fed back by the server to be tested includes:
acquiring an execution log fed back by the server to be tested;
analyzing the execution log to obtain a test result report of the server to be tested.
8. The method of claim 7, wherein the parsing the execution log to obtain the test result report of the server under test comprises:
analyzing the execution log to obtain an initial test result of the server to be tested;
and generating a test result report in an HTML format according to the initial test result, and visually displaying the test result report.
9. A test control device of a single-node server is configured at a client and comprises:
and a sequence acquisition module: obtaining a to-be-tested request sequence of a to-be-tested server, wherein the to-be-tested server is any server in a server cluster, the to-be-tested request sequence comprises at least two to-be-tested requests, the to-be-tested requests carry a time sequence identifier, the to-be-tested requests comprise container creation instructions generated in the process that the to-be-tested server executes on-line tasks in the server cluster, and the time sequence identifier is obtained according to the time sequence of on-line container creation;
The task generation module: generating a corresponding test task according to the time sequence identifier of the to-be-tested request in the to-be-tested request sequence, wherein the test task carries the time sequence identifier corresponding to the to-be-tested request;
the task sending module: according to the time sequence identification of the test tasks, sequentially sending the generated test tasks to a server, wherein the sequentially sending the generated test tasks to the server to be tested comprises the following steps: distributing a current task to be pushed to a corresponding target process, so that the target process pushes the current task to be pushed to the server to be pushed in an asynchronous mode;
the test result determining module: and under the condition that the test task is executed, determining a test result of the server to be tested according to the execution log fed back by the server.
10. A test system of a server comprises a client and a server to be tested:
-a client configured to perform the steps of the method of any of claims 1 to 8;
the server to be tested is configured to receive and execute the test task sent by the client and generate an execution log; and under the condition that each test task is executed, collecting the execution log and feeding back to the client.
11. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer executable instructions, the processor being configured to execute the computer executable instructions, which when executed by the processor, implement the steps of the method of any one of claims 1 to 8.
12. A computer readable storage medium storing computer executable instructions which when executed by a processor implement the steps of the method of any one of claims 1 to 8.
CN202310362913.7A 2023-04-06 2023-04-06 Test control method, device and system of single-node server Active CN116107913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310362913.7A CN116107913B (en) 2023-04-06 2023-04-06 Test control method, device and system of single-node server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310362913.7A CN116107913B (en) 2023-04-06 2023-04-06 Test control method, device and system of single-node server

Publications (2)

Publication Number Publication Date
CN116107913A CN116107913A (en) 2023-05-12
CN116107913B true CN116107913B (en) 2023-11-14

Family

ID=86254675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310362913.7A Active CN116107913B (en) 2023-04-06 2023-04-06 Test control method, device and system of single-node server

Country Status (1)

Country Link
CN (1) CN116107913B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116506340A (en) * 2023-06-27 2023-07-28 云账户技术(天津)有限公司 Flow link testing method and device, electronic equipment and storage medium

Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978261A (en) * 2014-04-03 2015-10-14 腾讯科技(深圳)有限公司 Test method, device and system of application program
CN106897206A (en) * 2015-12-18 2017-06-27 阿里巴巴集团控股有限公司 A kind of service test method and device
CN107071074A (en) * 2017-06-30 2017-08-18 郑州云海信息技术有限公司 A kind of load-balancing method and web server group system
CN107197475A (en) * 2016-03-14 2017-09-22 重庆邮电大学 A kind of sensing node identifier resolution method of testing and system based on multithreading
CN107743138A (en) * 2017-07-24 2018-02-27 上海壹账通金融科技有限公司 Push server distribution method, device, computer equipment and storage medium
CN108650149A (en) * 2018-04-24 2018-10-12 平安科技(深圳)有限公司 Server testing method, device, equipment and computer readable storage medium
CN109800137A (en) * 2018-12-06 2019-05-24 珠海西山居互动娱乐科技有限公司 A kind of server performance test method and system
CN110297766A (en) * 2019-06-03 2019-10-01 合肥移瑞通信技术有限公司 Method for testing software and software testing system based on distributed test node cluster
CN110457199A (en) * 2018-05-08 2019-11-15 北京京东尚科信息技术有限公司 The method and apparatus of performance test
CN110704177A (en) * 2019-09-04 2020-01-17 金蝶软件(中国)有限公司 Computing task processing method and device, computer equipment and storage medium
CN111159009A (en) * 2019-11-29 2020-05-15 深圳智链物联科技有限公司 Pressure testing method and device for log service system
CN111324545A (en) * 2020-03-13 2020-06-23 中国工商银行股份有限公司 Application server middleware performance test method, test terminal and application server
CN111753291A (en) * 2020-06-18 2020-10-09 支付宝(杭州)信息技术有限公司 Application container creating method, device and equipment
CN111782551A (en) * 2020-08-04 2020-10-16 腾讯科技(深圳)有限公司 Test method and device for block chain item and computer equipment
CN112035309A (en) * 2020-09-07 2020-12-04 深圳市亿道信息股份有限公司 Automatic testing method, server and automatic testing system for intelligent terminal function
CN112256593A (en) * 2020-12-18 2021-01-22 腾讯科技(深圳)有限公司 Program processing method and device, computer equipment and readable storage medium
WO2021147282A1 (en) * 2020-01-20 2021-07-29 华为技术有限公司 Method, apparatus and device for detecting malicious file, and storage medium
CN113434384A (en) * 2020-03-23 2021-09-24 北京京东振世信息技术有限公司 Pressure testing method and device
CN113485880A (en) * 2021-07-12 2021-10-08 浙江网商银行股份有限公司 Test method and device
CN114286358A (en) * 2020-09-27 2022-04-05 大唐移动通信设备有限公司 Method, device and system for processing test data and readable storage medium
CN114328210A (en) * 2021-12-24 2022-04-12 中国联合网络通信集团有限公司 Test method, test device and computer readable storage medium
CN114356750A (en) * 2021-12-10 2022-04-15 深圳市捷视飞通科技股份有限公司 Test method, test device, computer equipment and storage medium
CN114745358A (en) * 2022-03-23 2022-07-12 网宿科技股份有限公司 IP address management method, system and controller in load balancing service
CN115658471A (en) * 2022-09-23 2023-01-31 天津车之家软件有限公司 Test task scheduling method, test task execution method and test system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030103310A1 (en) * 2001-12-03 2003-06-05 Shirriff Kenneth W. Apparatus and method for network-based testing of cluster user interface
JP5828348B2 (en) * 2011-12-21 2015-12-02 富士通株式会社 Test server, information processing system, test program, and test method

Patent Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978261A (en) * 2014-04-03 2015-10-14 腾讯科技(深圳)有限公司 Test method, device and system of application program
CN106897206A (en) * 2015-12-18 2017-06-27 阿里巴巴集团控股有限公司 A kind of service test method and device
CN107197475A (en) * 2016-03-14 2017-09-22 重庆邮电大学 A kind of sensing node identifier resolution method of testing and system based on multithreading
CN107071074A (en) * 2017-06-30 2017-08-18 郑州云海信息技术有限公司 A kind of load-balancing method and web server group system
CN107743138A (en) * 2017-07-24 2018-02-27 上海壹账通金融科技有限公司 Push server distribution method, device, computer equipment and storage medium
CN108650149A (en) * 2018-04-24 2018-10-12 平安科技(深圳)有限公司 Server testing method, device, equipment and computer readable storage medium
CN110457199A (en) * 2018-05-08 2019-11-15 北京京东尚科信息技术有限公司 The method and apparatus of performance test
CN109800137A (en) * 2018-12-06 2019-05-24 珠海西山居互动娱乐科技有限公司 A kind of server performance test method and system
CN110297766A (en) * 2019-06-03 2019-10-01 合肥移瑞通信技术有限公司 Method for testing software and software testing system based on distributed test node cluster
CN110704177A (en) * 2019-09-04 2020-01-17 金蝶软件(中国)有限公司 Computing task processing method and device, computer equipment and storage medium
CN111159009A (en) * 2019-11-29 2020-05-15 深圳智链物联科技有限公司 Pressure testing method and device for log service system
WO2021147282A1 (en) * 2020-01-20 2021-07-29 华为技术有限公司 Method, apparatus and device for detecting malicious file, and storage medium
CN111324545A (en) * 2020-03-13 2020-06-23 中国工商银行股份有限公司 Application server middleware performance test method, test terminal and application server
CN113434384A (en) * 2020-03-23 2021-09-24 北京京东振世信息技术有限公司 Pressure testing method and device
CN111753291A (en) * 2020-06-18 2020-10-09 支付宝(杭州)信息技术有限公司 Application container creating method, device and equipment
CN111782551A (en) * 2020-08-04 2020-10-16 腾讯科技(深圳)有限公司 Test method and device for block chain item and computer equipment
CN112035309A (en) * 2020-09-07 2020-12-04 深圳市亿道信息股份有限公司 Automatic testing method, server and automatic testing system for intelligent terminal function
CN114286358A (en) * 2020-09-27 2022-04-05 大唐移动通信设备有限公司 Method, device and system for processing test data and readable storage medium
CN112256593A (en) * 2020-12-18 2021-01-22 腾讯科技(深圳)有限公司 Program processing method and device, computer equipment and readable storage medium
CN113485880A (en) * 2021-07-12 2021-10-08 浙江网商银行股份有限公司 Test method and device
CN114356750A (en) * 2021-12-10 2022-04-15 深圳市捷视飞通科技股份有限公司 Test method, test device, computer equipment and storage medium
CN114328210A (en) * 2021-12-24 2022-04-12 中国联合网络通信集团有限公司 Test method, test device and computer readable storage medium
CN114745358A (en) * 2022-03-23 2022-07-12 网宿科技股份有限公司 IP address management method, system and controller in load balancing service
CN115658471A (en) * 2022-09-23 2023-01-31 天津车之家软件有限公司 Test task scheduling method, test task execution method and test system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Scheduling unrelated parallel machines with a common server and sequence dependent setup times;Houda RABOUDI等;《IFAC-PapersOnLine》;第55卷(第10期);2179-2184 *
基于容器的分布式融合通信服务器的设计与实现;翟雅荣;《中国优秀硕士学位论文全文数据库 信息科技辑》;第2019年卷(第1期);I139-107 *
密钥管理服务器的优化设计与实现;石磊;《中国优秀硕士学位论文全文数据库 信息科技辑》;第2019年卷(第5期);I136-196 *

Also Published As

Publication number Publication date
CN116107913A (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN110321273B (en) Service statistics method and device
CN105450476B (en) A kind of regression test system and test method
US10339039B2 (en) Virtual service interface
WO2017114152A1 (en) Service dial testing method, apparatus and system
CN113485880A (en) Test method and device
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN110908708B (en) Code release method, device and system
CN112835792B (en) Pressure testing system and method
CN110784374A (en) Method, device, equipment and system for monitoring operation state of service system
CN107168844B (en) Performance monitoring method and device
CN116107913B (en) Test control method, device and system of single-node server
CN111897877B (en) High-performance high-reliability data sharing system and method based on distributed ideas
CN109857643A (en) A kind of method and device of virtual platform performance automatic test
CN116302989A (en) Pressure testing method and system, storage medium and computer equipment
CN109087107B (en) Real-time monitoring method and system based on distributed memory database and electronic equipment
CN113157790B (en) Nuclear fusion curve editing method, system, terminal and medium
CN104539449B (en) A kind of failure information processing method and relevant apparatus
CN116149915A (en) Pressure testing method and tool
CN112579833B (en) Service association relation acquisition method and device based on user operation data
CN116523244A (en) Testing manpower risk early warning method based on outsourcing resources
CN113918636A (en) ETL-based data throughput analysis method
CN113238919A (en) Statistical method, device and system for user access number
CN113806331A (en) Data processing method and device
CN112631914A (en) Data testing method and device
CN113031960B (en) Code compiling method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant