A test method for a server project, an electronic device, and a storage medium
By establishing a requirement difference matrix and automatically generating test cases, the problems of low efficiency and information lag in manual analysis in multi-project parallel scenarios are solved, and efficient and objective test plan formulation and execution are achieved.
Patent Information
- Application Number
- CN202511105993.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-08-07
AI Technical Summary
Existing technologies suffer from low efficiency, information lag, and subjective judgment bias in manual requirements analysis in multi-project parallel scenarios, making it difficult to formulate scientific and reasonable test plans.
By acquiring project data from multiple server projects, a requirement difference matrix is established to identify undetermined test cases with similar requirement dimensions. Test plans are automatically generated, replacing manual data collection and comparison. The differences are quantified using feature vectors and cosine similarity calculations to generate standardized test cases and plans.
It improves testing efficiency, reduces repetitive work and human error, ensures the objectivity and coverage of test plans, and supports rapid product line iteration.
Smart Images

Figure CN120610901B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of server testing, and particularly relates to a test method for a server project, an electronic device and a storage medium. BACKGROUND
[0002] In the field of server project research and development testing, with the expansion of business and iteration of technology, multiple projects often need to be promoted simultaneously. In these parallel projects, there are often similar requirements, such as stability testing of basic function modules and compatibility testing of specific protocols. However, the current project management and testing method has significant drawbacks. The traditional single-project requirement analysis and testing design mode only focuses on local data of a single project, and conducts requirement analysis and testing scheme formulation work for a single project in isolation, ignoring the overall consideration of the product line.
[0003] In order to improve this situation, some practitioners try to use manual cross-project requirement analysis. However, this method has many problems in actual application. On the one hand, its efficiency is extremely low, highly dependent on manual operation to collect and compare massive multi-project requirement data, with high communication and coordination costs. Not only a lot of time is consumed, but manual operation is prone to errors. On the other hand, manual communication methods have natural limitations and cannot obtain complete data of all projects in real time, which makes the analysis results often lag or one-sided, and cannot truly reflect the overall situation of the project. In addition, it is difficult for manual operation to systematically compare and analyze the differences in requirements implementation of different projects from multiple dimensions such as performance parameters, compatibility range, testing depth and coverage, which makes it difficult to develop a scientific and reasonable scheme when optimizing the testing scheme, and lacks sufficient data support. With the increasing number of projects, the complexity of manual analysis increases exponentially, which cannot meet the needs of the rapid development of the product line. SUMMARY
[0004] The present application provides a test method for a server project, an electronic device and a storage medium, to at least solve the problems of low efficiency, information lag and subjective judgment deviation of related technical manual analysis in large-scale project parallel scenarios.
[0005] The present application provides a test method for a server project, comprising:
[0006] Obtain project data of a plurality of server projects; perform comparative analysis on the project data to establish a requirement difference matrix of the plurality of server projects; wherein, elements in a same row of the requirement difference matrix represent project data of different server projects under a same requirement dimension, and elements in a same column represent project data of a same server project under different requirement dimensions; obtain pending test cases of the plurality of server projects according to the requirement difference matrix and the project data, the pending test cases being test cases corresponding to server projects having similar requirement dimensions; determine test schemes of the server projects according to the pending test cases; and test the servers according to the test schemes of the server projects respectively.
[0007] The application further provides a test device of a server project, comprising:
[0008] a project data obtaining module, configured to obtain project data of a plurality of server projects;
[0009] a cross-project multi-dimension analysis module, configured to perform comparative analysis on the project data to establish a requirement difference matrix of the plurality of server projects; wherein, elements in a same row of the requirement difference matrix represent project data of different server projects under a same requirement dimension, and elements in a same column represent project data of a same server project under different requirement dimensions;
[0010] a test case obtaining module, configured to obtain pending test cases of the plurality of server projects according to the requirement difference matrix and the project data, the pending test cases being test cases corresponding to server projects having similar requirement dimensions;
[0011] a test scheme generating module, configured to determine test schemes of the server projects according to the pending test cases;
[0012] a test module, configured to test the servers according to the test schemes of the server projects respectively.
[0013] The application further provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to execute the computer program to implement steps of the test method of the server project.
[0014] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement steps of the test method of the server project.
[0015] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement steps of the test method of the server project.
[0016] The application can identify the to-be-determined test cases corresponding to the projects with similar demand dimensions by acquiring project data of multiple server projects and performing comparative analysis, and establishing a demand difference matrix, and reuse the to-be-determined test cases with similar demands, thereby reducing repeated labor, saving resources such as manpower and time, and improving test efficiency. The demand difference matrix clearly presents the differences of different projects in each demand dimension, and the test scheme determined based on this reuses the test cases with similar demands and can also deal with the difference part. Through systematic project data comparison and demand difference matrix construction, the process of manually collecting and comparing data is replaced, the communication and coordination cost and human error are reduced, the problems of low efficiency, information lag and subjective judgment deviation of manual analysis in the large-scale project parallel scene are solved, and the cross-project test case reuse and scheme development are more efficient and objective. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0018] Figure 1 A system architecture schematic diagram for a test method of a server project provided by an embodiment of the present application to execute;
[0019] Figure 2 A flowchart of a test method of a server project provided by an embodiment of the present application;
[0020] Figure 3 A structure schematic diagram of a test device of a server project provided by an embodiment of the present application;
[0021] Figure 4 A structure schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0023] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0024] To more clearly illustrate the embodiments of this application, the technical terms used in the embodiments will be briefly introduced below:
[0025] Based on the distributed Spring Boot microservice architecture, the traditional monolithic application is broken down into multiple independent and autonomous microservices. The Spring Boot framework enables rapid service development, and distributed technology is used to achieve collaboration and communication between services.
[0026] Extract, transform, load (ETL) tools are core tools in the field of data integration, used to extract, clean, and transform data from multiple data sources, and finally load it into target data storage (such as data warehouses or data lakes). Apache NiFi is a powerful open-source ETL tool.
[0027] The Structured Query Language (MySQL) database stores data based on a relational model (table structure), organizes information through rows and columns, supports SQL (Structured Query Language) for data manipulation, and ensures data consistency and integrity.
[0028] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0029] like Figure 1 As shown, Figure 1 This diagram illustrates the specific system architecture upon which the test methods for a server project depend. This architecture can be based on a distributed Spring Boot microservice architecture, including: a data acquisition module, a difference analysis module, a report generation module, a test case selection module, a test plan formulation module, and a test execution module.
[0030] The data acquisition module collects project data from multiple channels, including requirement documents, test reports, and defect systems, based on dimensions such as functionality, performance, and security, including requirement descriptions, test cases, and defect records.
[0031] The difference analysis module converts the collected data into a feature vector, calculates the cross-project requirement difference using algorithms such as cosine similarity, generates a requirement difference matrix, and quantifies the difference degree of different projects in each dimension.
[0032] The report generation module outputs an analysis report containing similar requirement proportion, difference impact, and other content based on the difference matrix, and supports visual forms such as PDF and heat map.
[0033] The use case selection module calculates the similarity through the difference matrix and matches the historical test cases for reuse. If the similarity is high, it directly reuses; if there is no reusable case, it generates a new test case based on the similar requirement dimension. For example, if multiple projects require high concurrency testing, a unified test case is designed.
[0034] The scheme development module combines project priority and test cases to allocate test resources and generate a project-specific test plan, including test steps, resource allocation, execution order, etc.
[0035] The test execution module automatically deploys the test environment, calls the automated test system to execute the plan, automatically runs the test script according to the use case, supports failure retry to avoid the impact of environmental occasional faults, and alarms when the failure rate exceeds the preset failure rate threshold.
[0036] Embodiments of the present application provide a data skew evaluation method, which combines the execution process of the test method of the server project and describes the method in detail.
[0037] As shown in Figure 2 The embodiments of the present application provide a test method for a server project, which includes the following steps S201-S205:
[0038] S201, obtaining project data of multiple server projects.
[0039] The project data includes but is not limited to at least one of the following: project requirement document, defect record, functional design document, business process description, technical implementation scheme, and historical test case.
[0040] In some embodiments, after obtaining the project data, the project data is first classified and arranged. Specifically, the project data is classified and arranged according to multiple requirement dimensions, including but not limited to: functional requirement dimension, performance requirement dimension, and security requirement dimension. The functional requirement dimension focuses on the technical implementation details of the same function between different server projects; the performance requirement dimension compares the running efficiency difference between different server projects through quantitative indicators; and the security requirement dimension focuses on the security level difference between different server projects.
[0041] For example, the project data of the function requirement dimension includes input and output parameters, interface calling processes, etc. For the input and output parameters, project A requires a user's ID card number as input, and project B requires a user's mobile phone number. For the interface calling processes, project A needs to log in and verify before calling the interface, and project B can directly call the interface.
[0042] The project data of the performance requirement dimension includes throughput, response time, resource utilization, etc. For the throughput, project A requires the number of requests processed per second to be greater than or equal to 500, and project B requires the number of requests processed per second to be greater than or equal to 800. For the response time, project A requires the average response time to be less than or equal to 200 milliseconds, and project B requires the average time to be less than or equal to 500 milliseconds. For the resource utilization, project A requires the central processing unit (CPU) occupancy rate to be less than or equal to 30%, and project B requires the CPU occupancy rate to be less than or equal to 60%.
[0043] The project data of the security requirement dimension includes authentication methods, encryption algorithms, permission control strategies, etc. For the authentication methods, project A requires a combination of password and verification code authentication, and project B requires fingerprint authentication. For the encryption algorithm, project A requires the Advanced Encryption Standard (AES) algorithm, and project B requires the Data Encryption Standard (DES) algorithm. For the permission control strategy, project A requires administrator authorization, and project B does not require administrator authorization.
[0044] The above embodiments replace the manual collection and comparison of massive data by systematically obtaining project data and classifying and organizing them according to requirement dimensions, reducing repetitive labor and human errors, and improving analysis efficiency. Classification according to function, performance, security, etc. provides a structured framework for systematic comparison, replacing the limitations of manual multi-dimensional analysis, and providing sufficient data support for subsequent optimization schemes.
[0045] The requirement dimension can also include a resource requirement dimension, a cost requirement dimension, a business requirement dimension, and a price requirement dimension. The resource requirement dimension includes the number of servers, specifications, network bandwidth, storage capacity, etc. The cost requirement dimension includes hardware procurement costs, operation and maintenance costs, energy consumption costs, cloud resource fees, etc. The business requirement dimension includes project size, online cycle, fault frequency, and recovery time, etc. The price requirement dimension includes technology stack, deployment mode, cluster architecture, etc.
[0046] In some embodiments, source data is collected from project management systems, document storage systems, and test management systems by ETL tools. For example, requirement documents and defect records are collected from project management systems, functional design documents and technical solutions are collected from document storage systems, and historical test cases are collected from test management systems.
[0047] The classified project data is pre-processed, including but not limited to deduplication, formatting, and standardization. Optionally, based on server project identifiers and timestamps, redundant data collected repeatedly is deleted; missing fields are filled with default values or historical averages; and units of project data are unified. The classified project data is associated by server project identifiers.
[0048] For example, for project data of different server projects, the names of indicators, calculation ranges, and units are unified. The "interface response speed" is uniformly named as "average response time" and the unit is "milliseconds"; and the "function implementation method" is described in a structured manner.
[0049] Through automated deduplication, formatting, and other preprocessing operations, the tedious process of manually screening and sorting data is replaced, reducing repetitive labor and human errors and improving data processing efficiency. Through standardization processing, the differences in formats and statistical ranges of different project data are eliminated, obstacles for cross-project multi-dimensional systematic comparison are cleared, and analysis bias caused by non-uniform data standards when manually comparing is avoided.
[0050] The pre-processed source data can be used as project data, including server project identifiers (IDs), requirement dimensions, and project indicator values. The project indicator values include response time, throughput, and the like. A data archive is established for each project, the specific indicator values of the project in each requirement dimension are associated, a standardized data set is formed, and the data set is stored in a data table of MySQL, such as project_requirement and performance_index.
[0051] S202, comparing and analyzing the project data to establish a requirement difference matrix of multiple server projects.
[0052] In the requirement difference matrix, the elements in the same row represent the project data of different server projects under the same requirement dimension, and the elements in the same column represent the project data of the same server project under different requirement dimensions. The requirement difference matrix can be a three-dimensional matrix representing the correspondence between server projects, requirement dimensions, and difference values. For example, the requirement difference matrix [500, 800] has the meaning shown in Table 1. In the table, TPS is the number of transactions per second, representing the number of transactions that the system can complete per unit of time.
[0053] Table 1
[0054]
[0055] In some embodiments, in the process of performing step S202, the project data is first converted into feature vectors, then the first similarity of the feature vectors in any requirement dimension is calculated, and then the requirement difference matrix is established according to the similarity. Here, the similarity between different server projects is calculated by the cosine similarity calculation method.
[0056] Specifically, all the project data of the plurality of server projects is converted into feature vectors, and the feature vectors correspond to the server projects one by one; for example, the project data of the text type such as the function description is converted into the feature vectors; and the feature vectors are constructed for the quantitative indicators such as the throughput. Then, the first similarity of any two feature vectors in the same requirement dimension is calculated, which represents the similarity of different server projects in the same requirement dimension. Then, the requirement difference matrix is constructed according to the first similarity to record the specific differences of different server projects.
[0057] Optionally, the first similarity of the feature vectors in any requirement dimension is calculated according to the following formula (1):
[0058] (1)
[0059] wherein, Pi represents the feature vector of the project data Pi in the requirement dimension D k , and Pj represents the feature vector of the project data Pj in the requirement dimension D k . The closer the similarity is to 1, the more similar the project i and the project j are in the requirement dimension D k ; the closer the similarity is to 0, the greater the difference between the project i and the project j in the requirement dimension D k .
[0060] For example, in the function requirement dimension, the specific implementation manner, the input and output requirements, etc. of the same function of different server projects are compared; in the performance requirement dimension, the response time, the throughput, etc. of different server projects are compared; and in the security requirement dimension, the authentication manner, the encryption algorithm, the permission control strategy, etc. of different server projects are compared.
[0061] The project data of the plurality of server projects is compared and analyzed in the cross-project and multi-requirement dimension, including: the plurality of project data is compared horizontally in the same requirement dimension, and the same project data is analyzed in the multi-requirement dimension. The requirement difference matrix is constructed by calculating the similarity of different project data in the preset requirement dimension. The differences of the same server projects in various requirement dimensions are presented in the form of the matrix.
[0062] The above embodiments convert project data into a feature vector and calculate similarity by a cosine similarity formula, replace manual subjective comparison of multi-project data with automated mathematical calculation, greatly reduce the amount of manual operation and errors caused by subjective judgment, and significantly improve analysis efficiency. Through feature vector conversion, various project data is unified into a calculable mathematical form, and combined with the mechanism of calculating the first similarity according to the demand dimension, multi-dimensional systematic quantitative comparison is realized, which makes up for the limitations of manual analysis that cannot comprehensively cover multi-dimensional analysis. The demand difference matrix constructed based on the feature vector and the cosine similarity objectively records the project differences with quantitative similarity, providing accurate data basis for analysis conclusions, avoiding the problem that manual analysis relies on experience judgment and lacks empirical support.
[0063] In some embodiments, for any demand dimension, the difference information between different project data is extracted. For example, in the performance demand dimension, assuming that project A requires a response time less than or equal to 200 ms, and project B requires a response time less than or equal to 150 ms, the difference information indicating the threshold difference is extracted. The elements of the demand difference matrix record the difference information. For quantitative indicators, the matrix elements are specific numerical values and difference amplitudes; for qualitative descriptions, the matrix elements can use structured text to explain the difference between different project data.
[0064] In some embodiments, the similarity of all demand dimensions is integrated to obtain the overall similarity between different server projects through weighted calculation. The weight in the calculation process can be dynamically adjusted according to business priority. Optionally, the overall similarity between different server projects is calculated according to the following formula (2):
[0065] (2)
[0066] In formula (2), Sim ij represents the overall similarity between server project i and server project j, m is the total number of demand dimensions, and k is the kth demand dimension in the m demand dimensions.
[0067] The above embodiments integrate all dimension similarities through weighted calculation, convert the multi-dimensional difference analysis result into the overall similarity between projects, replace manual subjective trade-off of each dimension difference with standardized mathematical calculation, avoid conclusion bias caused by experience preference in manual analysis, and make the judgment of project overall difference more objective. Through the design of integrating all demand dimensions, the analysis covers the demand dimensions, makes up for the limitations of manual analysis that cannot comprehensively integrate multi-dimensional information, and makes the overall difference evaluation between projects more systematic and complete.
[0068] S203, according to the demand difference matrix and the project data, obtaining a plurality of server projects of pending test cases.
[0069] The to-be-determined test case is a test case corresponding to a server project with similar requirement dimensions.
[0070] In some embodiments, a historical test case is obtained from a historical test case library, a historical requirement dimension corresponding to the historical test case is determined, and a second similarity between the historical requirement dimension and a requirement dimension of project data is calculated. If the second similarity is greater than or equal to a similarity threshold, the historical test case is adjusted according to a requirement difference matrix to obtain the to-be-determined test case. The similarity threshold is set in advance and can be 60%.
[0071] Specifically, any one historical test case is obtained from the historical test case library, a requirement dimension of the historical test case is determined, and a second similarity between the requirement dimension of the historical test case and a requirement dimension corresponding to any one server project is calculated. The second similarity is compared with a set similarity threshold. If the second similarity is greater than or equal to the similarity threshold, it indicates that the requirement of the historical test case is similar to the requirement of the current server project. Then, the historical test case is adjusted according to the requirement difference matrix, and a test parameter in the historical test case is adjusted to obtain the to-be-determined test case, so that the test case is more suitable for the requirement of the server project.
[0072] The above embodiments automatically match test cases with similar requirements from the historical test case library, replacing the process of manually constructing test cases from zero, reducing repetitive labor. At the same time, the test parameters are automatically adjusted according to the requirement difference matrix, greatly improving the efficiency of test case adaptation to new projects, avoiding the tediousness of manual modification. The similarity is calculated by standardization instead of manual subjective judgment, and the historical test cases that can be reused are screened. The parameter adjustment is guided by the quantitative difference information in the matrix, reducing errors caused by lack of experience or negligence during manual matching and modification, and improving the accuracy of test cases. Based on the similarity between the requirement dimensions of the historical test case and the requirement dimensions of the current project, the test case is adjusted in combination with the specific difference data in the requirement difference matrix, so that the generation and optimization of the test case have clear data support, avoiding the problem of relying on subjective experience and lacking objective basis when manually designing test cases. In addition, the test case generation of new projects can be processed in batches through an automatic process. When the number of projects increases, the historical test case library and the requirement difference matrix only need to be expanded, avoiding the problem that the complexity of manual processing increases exponentially with the number of projects, supporting rapid iteration of product lines.
[0073] On the basis of the above embodiments, if the second similarity is less than the similarity threshold, the similar requirement dimensions of multiple server projects are determined according to the requirement difference matrix, and then the to-be-determined test cases of the multiple server projects are designed according to the similar requirement dimensions and the project data of the multiple server projects.
[0074] It can be understood that, in the case that the second similarity is less than the similarity threshold, it indicates that there is no reusable historical test case in the historical use case library, and a new test case needs to be designed. When designing, first, the similar requirement dimensions of the plurality of server projects are determined according to the requirement difference matrix of the plurality of server projects constructed in the foregoing, and then the pending test cases of each server project are designed according to the similar requirement dimensions and the project data of the plurality of server projects. It can be reminded to design in cooperation with the test engineers.
[0075] The above embodiment automatically locates the similar requirement dimensions of the plurality of projects based on the requirement difference matrix when no historical test case can be reused, and generates new test cases in combination with the project data, replacing the process of starting from zero and designing one by one manually, reducing repetitive labor, and greatly improving the test case generation efficiency. Designing the test cases based on the similar dimensions quantified in the requirement difference matrix ensures that the new test cases cover the commonality requirements of the projects, avoids the omission or deviation of the test cases caused by the limited perspective or subjective judgment when manually designing, and improves the comprehensiveness and objectivity of the test cases. The similar requirement dimensions are determined through the difference matrix, so that the design of the new test cases is based on the comparison of the data of the plurality of projects, solving the problem that the manual design of the test cases lacks system data support and relies on experience judgment, and making the test cases more suitable for the actual requirements of the projects. The extraction of the similar dimensions based on the matrix and the logic of the test case design can be applied to the new projects in batches, when the number of projects increases, only the analysis range of the matrix needs to be expanded, avoiding the problem that the complexity of the manual design increases exponentially with the number of projects, and supporting the rapid expansion of the product line.
[0076] In some embodiments, an analysis report is generated according to the requirement difference matrix and the project data. Then, the test cases matching the requirements of the project are obtained according to the analysis report.
[0077] The analysis report includes the project requirements, the proportion of the similar requirement dimensions, and the influence of the requirement difference on the development and testing of the project. For example, the analysis report includes that the difference in the performance requirement dimension may cause the concurrent testing of the project to need additional stress testing. The analysis report also includes the number of projects and the proportion of similar requirements.
[0078] The analysis report can be visually displayed by a heat map. The deeper the color of the heat map, the greater the difference between the same project data in different requirement dimensions. To improve the readability of the matrix, the difference degree can be marked by color, such as red for significant difference and yellow for slight difference. The complex matrix data is converted into understandable graphical information, replacing the ambiguity of manually describing the difference in words, and reducing the information interpretation deviation. The analysis report can be a PDF document or a JSON structured data, which is convenient for quick transmission and review, and avoids the information lag caused by manual communication.
[0079] According to the analysis report, similar requirements of the project data are identified, and test cases of the similar requirements are selected or designed. When the test cases are selected or designed, differences of the similar requirements in different projects are fully considered, and it is ensured that the test cases can comprehensively cover the similar requirements in the projects.
[0080] In the above embodiment, the analysis report is automatically generated based on the requirement difference matrix and the project data, and a cumbersome process of manually sorting and summarizing analysis results of multiple projects is replaced. All conclusions in the report are derived based on the requirement difference matrix and the project data, and problems that conclusions in manual analysis depend on experience and lack of empirical support are avoided, and clear basis is provided for decision-making.
[0081] In S204, a test scheme of each server project is determined according to the pending test case.
[0082] In some embodiments, a resource allocation strategy of the test case is determined according to the pending test case and the priority of the multiple server projects, and then a test scheme of each server project is generated according to the resource allocation strategy and the pending test case.
[0083] In the above embodiment, the resource allocation strategy is automatically determined based on the pending test case and the project priority, and a process of manually allocating test resources based on experience is replaced. Low efficiency caused by manual trade-off of priorities of multiple projects is avoided, test requirements of each project are quickly matched with resource supply, and overall test scheme generation efficiency is improved. The resource allocation is guided by standardized priority rules instead of manual subjective judgment, and the rationality of resource inclination to high-priority projects is ensured. The test scheme is generated in combination with specific content of the pending test case, and resource mismatch or scheme omission caused by incomplete consideration during manual allocation is reduced. The resource allocation strategy takes the pending test case derived from historical case adjustment or similar requirement design and the project priority as data basis, so that the test scheme has clear and objective basis, and problems that manual design of the scheme depends on experience and lacks empirical support are avoided, and the scientificity of the scheme is improved.
[0084] In some embodiments, the test scheme includes a resource allocation strategy, a test order, a test plan, a resource scheduling strategy, and a risk plan. The resource allocation strategy allocates resources to the test scheme of each server project according to the priority of the server project. For example, the priority of the core business is higher, and more test equipment is allocated. The test plan includes time nodes and related persons in charge. The resource scheduling strategy includes address information and configuration information of the test server. If a server project fails the performance test, the risk plan is to start a backup stress test cluster.
[0085] Based on the pending test cases, combined with the characteristics and needs of each server project, the test scheme for each server project is formulated and optimized. At the same time, from the overall perspective of the project data, the test scheme is optimized, such as reasonable allocation of test resources, adjustment of test order, etc., to achieve the optimal test effect and form the final test scheme.
[0086] S205, test the server according to the test scheme of each server project respectively.
[0087] In some embodiments, the test environment is deployed according to the test scheme of each server project, and the corresponding test scheme is executed by calling the automated test system in the test environment.
[0088] In some embodiments, the pending test cases are grouped according to the requirement dimension, and the pending test cases with similar requirement dimensions are divided into the same group for execution. The test scheme of each project group is executed respectively, and the environment switching cost is reduced.
[0089] The test scheme of each project data is executed according to the test scheme, and the test result is fed back. The test result includes test log, functional requirement coverage rate, performance requirement compliance rate, etc. If the test scheme execution fails, retry until the execution is successful or the preset retry number is reached. The failure rate can also be calculated, and an alarm is triggered when the failure rate is greater than the preset failure rate threshold. For example, when the failure rate is greater than 30%, the test engineer is notified by email.
[0090] The above embodiments replace the tedious process of manual environment building and case-by-case test execution by automatically deploying the test environment and calling the automated test system to execute the scheme, reducing repetitive operations. At the same time, the automatic retry mechanism is set up to avoid the time loss of manual intervention in handling temporary faults, greatly improving the execution efficiency of multi-project testing. Through real-time feedback of test log, failure rate statistics and alarm mechanism, the passive mode of manual regular inspection of test progress is replaced, ensuring that problems are exposed and handled in a timely manner, and avoiding the lag of fault response caused by manual communication.
[0091] In summary, the test method for a server project provided in the embodiments of the present application explicitly defines the project data range, classifies and organizes the project data according to the function, performance, security and other demand dimensions, replaces manual collection and subjective classification, reduces repetitive labor and human errors, converts the project data into a feature vector, quantifies the multi-dimensional differences by using a cosine similarity formula and generates a demand difference matrix, replaces manual subjective comparison, greatly reduces the operation amount and errors, reuses historical test cases through similarity matching, automatically adjusts the test parameters according to the demand difference matrix, generates new test cases in batches based on similar demand dimensions when there are no reused test cases, avoids the inefficiency of manual zero design, and flexibly expands the similarity calculation logic as the number of projects increases, only needs to expand the feature vector and matrix dimensions, and avoids the exponential increase in manual analysis complexity.
[0092] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment.
[0093] As shown in Figure 3 The embodiments of the present application also provide a test device for a server project, and the device comprises:
[0094] A project data acquisition module 301 is configured to acquire project data of a plurality of server projects.
[0095] A cross-project multi-dimensional analysis module 302 is configured to compare and analyze the project data and establish a demand difference matrix of the plurality of server projects, wherein the elements in the same row of the demand difference matrix represent the project data of different server projects under the same demand dimension, and the elements in the same column represent the project data of the same server project under different demand dimensions.
[0096] A test case acquisition module 303 is configured to acquire pending test cases of the plurality of server projects according to the demand difference matrix and the project data, wherein the pending test cases are test cases corresponding to the server projects with similar demand dimensions.
[0097] A test scheme generation module 304 is configured to determine a test scheme of each server project according to the pending test cases.
[0098] A test module 305 is configured to test the server according to the test scheme of each server project, respectively.
[0099] As an optional embodiment provided in the embodiments of the present application, the cross-project multi-dimensional analysis module 302 is specifically configured to: convert the project data into a feature vector; calculate a first similarity of the feature vector under any demand dimension; and establish the demand difference matrix according to the first similarity.
[0100] As an optional implementation of the embodiments provided in the application, the test case acquisition module 303 is specifically configured to: acquire historical test cases from a historical case library, and determine historical requirement dimensions corresponding to the historical test cases; calculate a second similarity between the historical requirement dimensions and requirement dimensions of the project data; in a case where the second similarity is greater than or equal to a similarity threshold, adjust the historical test cases according to a requirement difference matrix to obtain pending test cases.
[0101] As an optional implementation of the embodiments provided in the application, the test case acquisition module 303 is further configured to: in a case where the second similarity is less than the similarity threshold, determine similar requirement dimensions of the multiple server projects according to the requirement difference matrix; and design the pending test cases of the multiple server projects according to the similar requirement dimensions and the project data.
[0102] As an optional implementation of the embodiments provided in the application, the test module 305 is specifically configured to divide the multiple server projects into multiple project groups according to the requirement dimensions corresponding to the server projects; and execute the test schemes of the server projects in each project group respectively in a unit of the project group.
[0103] As an optional implementation of the embodiments provided in the application, the test scheme generation module 304 is specifically configured to determine a resource allocation strategy of the pending test cases according to the pending test cases and the priorities of the multiple server projects; and generate the test schemes of the multiple server projects according to the resource allocation strategy and the pending test cases.
[0104] As an optional implementation of the embodiments provided in the application, the project data acquisition module 301 is specifically configured to: collect source data from a project management system, a document storage system and a test management system through an extraction, transformation and loading tool; and preprocess the source data to obtain the project data; wherein the preprocessing includes at least one of deduplication, formatting and standardization.
[0105] As an optional implementation of the embodiments provided in the application, the cross-project multi-dimensional analysis module 302 is further configured to: classify and arrange the project data of the multiple server projects according to multiple requirement dimensions; wherein the multiple requirement dimensions include at least two of a functional requirement dimension, a performance requirement dimension, a security requirement dimension, a resource requirement dimension, a cost requirement dimension, a business requirement dimension and a price requirement dimension.
[0106] The description of the features in the embodiments of the server project testing device can be referred to the related description of the embodiments of the server project testing method, which will not be repeated here.
[0107] As Figure 4As shown, the embodiments of the present application also provide an electronic device, comprising a memory 401 and a processor 402, the memory 401 stores a computer program, and the processor 402 is configured to run the computer program to perform the steps in any of the above-mentioned server item test method embodiments.
[0108] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to perform the steps in any of the above-mentioned server item test method embodiments when running.
[0109] In an example embodiment, the above-mentioned computer readable storage medium can include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0110] The embodiments of the present application also provide a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned server item test method embodiments.
[0111] The embodiments of the present application also provide another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned server item test method embodiments.
[0112] The skilled person can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in a general manner. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0113] The above describes in detail the test method of the server project, the electronic equipment and the storage medium provided by the application. The principles and implementation modes of the application are described by applying specific examples, and the above description of the embodiments is only used to help understand the method of the application and its core idea. It should be pointed out that, for ordinary skilled persons in the technical field, some improvements and modifications can be made to the application without departing from the principles of the application, and these improvements and modifications also fall within the protection scope of the claims of the application.
Claims
1. A test method of a server project, characterized by, The method comprises the following steps: obtaining project data of a plurality of server projects; performing comparative analysis on the project data to establish a requirement difference matrix of the plurality of server projects; wherein the elements in the same row of the requirement difference matrix represent the project data of different server projects under the same requirement dimension, and the elements in the same column represent the project data of the same server project under different requirement dimensions; obtaining pending test cases of the plurality of server projects according to the requirement difference matrix and the project data, wherein the pending test cases are test cases corresponding to server projects with similar requirement dimensions; determining a test scheme for each server project according to the pending test cases; testing the servers according to the test schemes of the respective server projects respectively; the step of obtaining the pending test cases of the plurality of server projects according to the requirement difference matrix and the project data comprises the following steps: obtaining historical test cases from a historical case library and determining historical requirement dimensions corresponding to the historical test cases; calculating a second similarity between the historical requirement dimensions and the requirement dimensions of the project data; in the case where the second similarity is greater than or equal to a similarity threshold, adjusting the historical test cases according to the requirement difference matrix to obtain the pending test cases; the step of testing the servers according to the test schemes of the respective server projects respectively comprises the following steps: grouping the pending test cases according to requirement dimensions, and dividing the pending test cases with similar requirement dimensions into the same group, so as to execute the test schemes of the server projects in each project group in a group unit.
2. The method of claim 1, wherein, the step of performing comparative analysis on the project data to establish the requirement difference matrix of the plurality of server projects comprises the following steps: transforming the project data into feature vectors; calculating a first similarity of the feature vectors under any requirement dimension; establishing the requirement difference matrix according to the first similarity.
3. The method of claim 1, wherein, The method further comprises the following steps: in the case where the second similarity is less than the similarity threshold, determining similar requirement dimensions of the plurality of server projects according to the requirement difference matrix; designing the pending test cases of the plurality of server projects according to the similar requirement dimensions and the project data.
4. The method of claim 1, wherein, the step of testing the servers according to the test schemes of the respective server projects respectively comprises the following steps: dividing the plurality of server projects into a plurality of project groups according to the requirement dimensions corresponding to the respective server projects; executing the test schemes of the server projects in each project group in a group unit.
5. The method of claim 1, wherein, the step of determining the test schemes of the respective server projects according to the pending test cases comprises the following steps: determining a resource allocation strategy of the pending test cases according to the pending test cases and the priorities of the plurality of server projects; generating the test schemes of the respective server projects according to the resource allocation strategy and the pending test cases.
6. The method of claim 1, wherein, the step of obtaining the project data of the plurality of server projects comprises the following steps: collecting source data from a project management system, a document storage system and a test management system through an extraction, transformation and loading tool; preprocessing the source data to obtain the project data; wherein the preprocessing comprises at least one of the following: de-duplication, formatting and standardization.
7. The method of claim 1, wherein, Before the comparing and analyzing the project data and establishing the requirement difference matrix of the plurality of server projects, the method further comprises: sorting and arranging the project data of the plurality of server projects according to a plurality of requirement dimensions; wherein the plurality of requirement dimensions comprises at least two of a function requirement dimension, a performance requirement dimension, a security requirement dimension, a resource requirement dimension, a cost requirement dimension, a business requirement dimension and a price requirement dimension.
8. An electronic device, comprising: comprises: a memory for storing a computer program; a processor for implementing the steps of the test method of the server project according to any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, wherein the computer program is executed by the processor to implement the steps of the test method of the server project according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for processing test information
CN116521544A