CN117234952B - Distributed automatic test method and system - Google Patents

Distributed automatic test method and system Download PDF

Info

Publication number
CN117234952B
CN117234952B CN202311503672.XA CN202311503672A CN117234952B CN 117234952 B CN117234952 B CN 117234952B CN 202311503672 A CN202311503672 A CN 202311503672A CN 117234952 B CN117234952 B CN 117234952B
Authority
CN
China
Prior art keywords
test
test case
determining
complexity
priority value
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
CN202311503672.XA
Other languages
Chinese (zh)
Other versions
CN117234952A (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.)
Hangyin Consumer Finance Co ltd
Original Assignee
Hangyin Consumer Finance Co 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 Hangyin Consumer Finance Co ltd filed Critical Hangyin Consumer Finance Co ltd
Priority to CN202311503672.XA priority Critical patent/CN117234952B/en
Publication of CN117234952A publication Critical patent/CN117234952A/en
Application granted granted Critical
Publication of CN117234952B publication Critical patent/CN117234952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Abstract

The invention provides a distributed automatic test method and a system, which belong to the technical field of program test and specifically comprise the following steps: the method comprises the steps of obtaining the number of modules and the number of functions of a software system corresponding to a test case, determining the test complexity of the test case by combining the data quantity and the flow complexity of the test case in the test process, determining the test priority value of the test case based on the historical test priority value, the updated test priority value and the test complexity of the test case, determining the distribution sequence of the test case based on the test priority value, and distributing the test case to a matched client for automatic test to obtain a test result by taking the matched client with the shortest test time and the test case as constraint conditions, so that the efficiency of program test is further improved.

Description

Distributed automatic test method and system
Technical Field
The invention belongs to the technical field of program testing, and particularly relates to a distributed automatic testing method and system.
Background
With the increasing complexity of software systems, the efficiency of testing cannot meet the requirement due to the fact that a certain test terminal is singly adopted for testing the software systems, so that the distributed automatic test mode is applied, and the test efficiency can be greatly improved on the basis of guaranteeing the test precision through the cooperative scheduling of a plurality of test terminals.
In the prior art, a plurality of collaborative optimization scheduling methods of test terminals based on a distributed automation system are provided, specifically, in the invention patent CN201610111905.5, namely a distributed automation test method and system, through identifying the clients with idle environmental states, a specified number of test cases are sent to the clients, so that a pre-installed test program is started to test the test cases and feed test results back to a database, but the following technical problems exist:
1. in the prior art, because of the differences of the processing capacities of different clients and the complexity of the test cases, the time consumed by the different clients in processing the different test cases also has certain differences, so if the different test cases cannot be distributed according to the differences of the complexity of the test cases and the processing capacities of the clients, the efficiency of the test cannot be ensured.
2. In the prior art, because of the difference between the number of software modules and the number of update functions of the updated software system related to different test cases, there is a certain difference in the test priorities of different test cases, so when the test cases are distributed, if the test priorities of different test cases are not considered, the test efficiency cannot be ensured.
Aiming at the technical problems, the invention provides a distributed automatic testing method and a distributed automatic testing system.
Disclosure of Invention
In order to achieve the purpose of the invention, the invention adopts the following technical scheme:
according to one aspect of the present invention, a distributed automated testing method is provided.
The distributed automatic test method is characterized by comprising the following steps of:
s1, acquiring the number of modules and the number of functions of a software system corresponding to a test case, and determining the test complexity of the test case by combining the data quantity and the flow complexity of the test case in the test process;
s2, determining the idle client according to the running state of the test client, determining the processing time consumption of different test cases in different idle clients through the running states of different idle clients and the test complexity of the test cases, and taking the idle client with the processing time consumption less than the preset time as the matching client of the test cases;
s3, acquiring updated software modules and updated software functions of the software system corresponding to the test case, determining historical test priority values of the test case according to different updated software modules and historical use data of the updated software functions of the software system of a historical version, determining updated test priority values of the test case according to different updated software modules and updated conditions of the updated software functions of the software system of a to-be-online version, and determining the test priority values of the test case based on the historical test priority values, the updated test priority values and test complexity of the test case;
and S4, determining the distribution sequence of the test cases based on the test priority value, and distributing the test cases to the matching client for automatic test by taking the shortest test time consumption and the matching client of the test cases as constraint conditions to obtain a test result.
The invention has the beneficial effects that:
1. the technical problem of lower testing efficiency caused by the original simple unordered testing of different clients is avoided by determining the testing complexity of the test cases, meanwhile, a foundation is laid for further dynamically distributing the clients according to the testing complexity of the different test cases by evaluating the testing complexity, and the testing efficiency is improved.
2. By carrying out the processing time consumption of different test cases in different idle clients and the determination of the matching clients of the test cases, the accurate evaluation of the processing time consumption of different test cases is realized, meanwhile, the technical problem of too low test efficiency caused by too long time consumption of a certain idle client is avoided through the evaluation of the matching clients, and the overall test efficiency is improved.
3. The test priority value of the test case is determined based on the historical test priority value, the updated test priority value and the test complexity of the test case, so that the test complexity of different test cases is considered, and the association relationship with an updating module and an updating function of a software system is considered, and the distribution accuracy of the test case is further improved.
The further technical scheme is that the number of modules and the number of functions of the software system corresponding to the test case are determined according to the test targets and the test flows of the test case.
The further technical scheme is that the flow complexity of the test case is determined according to the number of times of data circulation of the test case in the test process, wherein the more the number of times of data circulation of the test case in the test process is, the higher the flow complexity of the test case is.
The further technical scheme is that the time consuming determination of the processing of different test cases in different idle clients is performed through the running states of the different idle clients and the test complexity of the test cases, and specifically comprises the following steps:
and determining the hardware use occupancy rate of different idle clients based on the running states of the different idle clients, determining the processing capacity of the idle clients by combining the hardware configuration of the idle clients, and determining the time consumption of the test case in the processing of the idle clients by the processing capacity of the idle clients and the test complexity of the test case.
The further technical scheme is that the preset time is determined according to the test complexity of the test case, and the higher the test complexity of the test case is, the longer the preset time is.
The further technical scheme is that the method for determining the test priority value of the test case comprises the following steps:
determining the comprehensive test priority value of the test case according to the historical test priority value of the test case and the updated test priority value;
determining the test priority of the test case based on the test complexity of the test case;
and determining the test priority value of the test case based on the test priority of the test case and the comprehensive test priority value.
The further technical scheme is that the method for determining the comprehensive test priority value of the test case according to the historical test priority value and the updated test priority value of the test case specifically comprises the following steps:
and determining the comprehensive test priority value of the test case according to the historical test priority value of the test case and the maximum value of the updated test priority value.
In a second aspect, the present invention provides a distributed automatic testing system, and the distributed automatic testing method is characterized by comprising:
the system comprises a complexity evaluation module, a time-consuming evaluation module, a test sequence determination module and an allocation module;
the complexity evaluation module is responsible for acquiring the module number and the function number of the software system corresponding to the test case, and determining the test complexity of the test case by combining the data quantity and the flow complexity of the test case in the test process;
the time consumption evaluation module is responsible for determining idle clients according to the running states of the test clients, determining the processing time consumption of different test cases in different idle clients through the running states of different idle clients and the test complexity of the test cases, and taking the idle clients with the processing time consumption less than the preset time as the matched clients of the test cases;
the test sequence determining module is responsible for acquiring an updated software module and an updated software function of a software system corresponding to the test case, determining a historical test priority value of the test case according to historical use data of different updated software modules and updated software functions, determining an updated test priority value of the test case according to the updated conditions of different updated software modules and updated software functions, and determining the test priority value of the test case based on the historical test priority value, the updated test priority value and the test complexity of the test case;
the allocation module is responsible for determining the allocation sequence of the test cases based on the test priority value, and allocating the test cases to the matching clients for automatic testing by taking the shortest test time and the matching clients of the test cases as constraint conditions to obtain test results.
Additional features and advantages will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings;
FIG. 1 is a flow chart of a distributed automated testing method;
FIG. 2 is a flow chart of a method of determining a test complexity of a test case;
FIG. 3 is a flow chart of a method of determining historical test priority values for test cases;
FIG. 4 is a flow chart of a method of determining updated test priority values for test cases;
FIG. 5 is a block diagram of a distributed automated test system.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present disclosure.
The applicant finds that in the prior art, when the distributed automatic test is performed, the test cases are often randomly distributed to different clients for testing, but because the test complexity of the different test cases has a certain degree of difference, the different clients also have a certain degree of difference, and meanwhile, the update modules of the software systems and the data of the updated software functions corresponding to the different test cases also have a certain degree of difference, so that the test priority of the different test cases also has a difference, and therefore, if the factors are not considered, the test of the test cases cannot be efficiently realized.
In order to solve the technical problems, the applicant adopts the following technical scheme:
firstly, differential testing difficulty is determined through differences of software modules and software functions of different software systems related to test cases, and particularly, the testing difficulty can be determined through preset corresponding relations according to intervals where the number of the software modules and the number of the software functions are located;
because the running states and hardware configurations of different clients have a certain degree of difference, the time consumption of the test cases in the different clients can be determined through the test difficulty and the real-time running state of the clients, and particularly the time consumption of the test can be determined according to the historical time consumption of the test cases with the corresponding test difficulty in the clients;
determining test priority values of different test cases according to the number of updated software modules and the number of updated software functions related to the different test cases, wherein the test priority values can be determined specifically by the sum of the updated software modules corresponding to the test cases and the priority values corresponding to the updated software functions;
and taking the test priority value as the distribution sequence of the test cases, taking the shortest test time consumption of the client as the target, realizing the distribution of the test cases on the test terminal, and outputting the test result according to the distributed result.
The following is a detailed description from both the perspective of the method class embodiment and the system class embodiment.
In order to solve the above problem, according to one aspect of the present invention, as shown in fig. 1, there is provided a distributed automatic testing method, which is characterized by specifically including:
s1, acquiring the number of modules and the number of functions of a software system corresponding to a test case, and determining the test complexity of the test case by combining the data quantity and the flow complexity of the test case in the test process;
it should be noted that, the number of modules and the number of functions of the software system corresponding to the test case are determined according to the test target and the test flow of the test case.
It can be understood that the complexity of the flow of the test case in the step S1 is determined according to the number of times of data transfer of the test case in the test process, where the greater the number of times of data transfer of the test case in the test process, the higher the complexity of the flow of the test case.
In one possible embodiment, as shown in fig. 2, the method for determining the test complexity of the test case in the step S1 is as follows:
acquiring the number of modules of the software system corresponding to the test case, judging whether the number of modules of the software system corresponding to the test case is within a preset number range, if so, entering the next step, and if not, determining the test complexity of the test case through the preset test complexity;
acquiring the function number of the software system corresponding to the test case, judging whether the function number of the software system corresponding to the test case is within a preset number range, if so, entering the next step, and if not, determining the test complexity of the test case through the preset test complexity;
acquiring the data volume of the test case in the test process, judging whether the data volume of the test case in the test process is within a preset data volume range, if so, entering the next step, and if not, determining the test complexity of the test case through the preset test complexity;
determining the number of functions of different modules of the software system according to the number of functions of the software system corresponding to the test case, determining a screening module based on the number of functions of different modules of the software system corresponding to the test case, and determining the complexity of the test range of the test case by using the number of screening modules, the number of functions of the screening module, the number of modules and the number of functions;
determining the data volume of different data transfer times of the test case in the test process based on the data volume of the test case in the test process, determining the flow complexity through the data transfer times and the data volume of different data transfer times, and determining the test flow complexity of the test case based on the flow complexity and the data volume of the test case in the test process;
and acquiring the input data quantity and the test target of the test case, and determining the test complexity of the test case by combining the test flow complexity and the test range complexity of the test case.
It should be further noted that, the value range of the test complexity of the test case is between 0 and 1, where the higher the test complexity of the test case is, the more complex the test case is.
In another possible embodiment, the method for determining the test complexity of the test case in the step S1 is as follows:
acquiring the function quantity of the software system corresponding to the test case and the data quantity of the test case in the test process, and determining the test complexity of the test case through the preset test complexity when the data quantity of the test case in the test process is within a preset data quantity range and the function quantity of the software system corresponding to the test case is within a preset quantity range;
when the data volume of the test case in the test process is not in a preset data volume range or the function number of the software system corresponding to the test case is not in a preset number range:
determining the number of functions of different modules of the software system according to the number of functions of the software system corresponding to the test case, determining a screening module based on the number of functions of different modules of the software system corresponding to the test case, and determining the complexity of the test range of the test case by using the number of screening modules, the number of functions of the screening module, the number of modules and the number of functions;
determining the data volume of different data transfer times of the test case in the test process based on the data volume of the test case in the test process, determining the flow complexity through the data transfer times and the data volume of different data transfer times, and determining the test flow complexity of the test case based on the flow complexity and the data volume of the test case in the test process;
and acquiring the input data quantity and the test target of the test case, and determining the test complexity of the test case by combining the test flow complexity and the test range complexity of the test case.
In the embodiment, the technical problem of lower testing efficiency caused by the original simple unordered testing of different clients is avoided by determining the testing complexity of the test cases, and meanwhile, a foundation is laid for further dynamically distributing the clients according to the testing complexity of the different test cases by evaluating the testing complexity, so that the testing efficiency is improved.
S2, determining the idle client according to the running state of the test client, determining the processing time consumption of different test cases in different idle clients through the running states of different idle clients and the test complexity of the test cases, and taking the idle client with the processing time consumption less than the preset time as the matching client of the test cases;
in one possible embodiment, the determining that the processing time of the different test cases at the different idle clients is performed by the running states of the different idle clients and the test complexity of the test cases in the step S2 specifically includes:
and determining the hardware use occupancy rate of different idle clients based on the running states of the different idle clients, determining the processing capacity of the idle clients by combining the hardware configuration of the idle clients, and determining the time consumption of the test case in the processing of the idle clients by the processing capacity of the idle clients and the test complexity of the test case.
It should be further noted that, in the step S2, the preset time is determined according to the test complexity of the test case, and specifically, the higher the test complexity according to the test case is, the longer the preset time is.
In this embodiment, by performing the processing time consumption of different test cases at different idle clients and the determination of the matching clients of the test cases, not only is the accurate evaluation of the processing time consumption of different test cases realized, but also the technical problem of too low test efficiency caused by too long time consumption of a certain idle client is avoided through the evaluation of the matching clients, and the overall test efficiency is improved.
S3, acquiring updated software modules and updated software functions of the software system corresponding to the test case, determining historical test priority values of the test case according to different updated software modules and historical use data of the updated software functions of the software system of a historical version, determining updated test priority values of the test case according to different updated software modules and updated conditions of the updated software functions of the software system of a to-be-online version, and determining the test priority values of the test case based on the historical test priority values, the updated test priority values and test complexity of the test case;
in one possible embodiment, as shown in fig. 3, the method for determining the historical test priority value of the test case in the step S3 is as follows:
s31, determining a recommended test priority value of the test case according to the number of updated software functions of the software system with the historical version corresponding to the test case, determining whether the recommended test priority value can be adopted to determine the historical test priority value of the test case according to the number of updated software modules of the software system with the historical version corresponding to the test case, if so, entering the next step, and if not, entering the step S33;
s32, determining whether the historical test priority value of the test case can be determined by adopting the recommended test priority value according to the historical use data of the updated software function of the software system with the historical version corresponding to the test case and the historical use data of the updated software module, if so, taking the recommended test priority value as the historical test priority value of the test case, and if not, entering step S33;
s33, determining the number of software functions of different updated software modules based on the updated software modules of the software system to be on-line version corresponding to the test case, and determining the test priority value of the software modules of the test case according to the number of the software functions of the different updated software modules and the number of the updated software modules;
s34, determining the historical use priority value of the test case according to the historical use number and the historical use times of the updated software function and the updated software module based on the historical use data of the updated software function and the historical use data of the updated software module of the software system with the historical version corresponding to the test case;
s35, correcting the recommended test priority value through the historical use priority value of the test case and the test priority value of the software module of the test case to obtain the determination of the historical test priority value of the test case.
In one possible embodiment, the historical usage data of the updated software function in the step S3 includes a number of historical usage persons, a number of historical usage times, a duration of historical usage, and a maximum number of concurrent historical usage persons.
In another possible embodiment, the method for determining the historical test priority value of the test case in the step S3 is as follows:
according to the number of the updated software functions and the number of the updated software modules of the software system of the history version corresponding to the test case, when the number of the updated software functions and the number of the updated software modules of the software system of the history version corresponding to the test case meet the requirements:
and determining the historical use busyness of the updated software functions and the updated software modules of the software system based on the historical use data of the updated software functions and the historical use data of the updated software modules of the software system of the historical version, and when the historical use busyness of the updated software functions and the updated software modules of the software system are in a preset range:
determining a historical test priority value of the test case through a preset test priority;
when any one of the number of updated software functions and the number of updated software modules of the software system with the history version corresponding to the test case does not meet the requirement or any one of the number of updated software functions and the historical use busyness of the updated software modules of the software system with the history version is not in a preset range:
determining the number of software functions of different updated software modules based on the updated software modules of the software system with the historical version corresponding to the test case, and determining the test priority value of the software modules of the test case according to the number of the software functions of the different updated software modules and the number of the updated software modules;
determining the historical use priority value of the test case according to the historical use number and the historical use number of the updated software function and the updated software module, and determining the historical use priority value of the test case according to the historical use data of the updated software function and the historical use number of the updated software module of the software system with the historical version corresponding to the test case;
and correcting the recommended test priority value through the historical use priority value of the test case and the test priority value of the software module of the test case to obtain the determination of the historical test priority value of the test case.
In one possible embodiment, as shown in fig. 4, the method for determining the updated test priority value of the test case in the step S3 includes:
s41, determining a basic test priority value of the test case according to the number of updated software functions of the software system to be on-line version corresponding to the test case and the number of updated software modules of the software system;
s42, determining the update amplitude of the update software function according to the update condition of the update software function of the software system of the to-be-online version corresponding to the test case, determining whether the update test priority value of the test case can be determined by adopting the basic test priority value or not based on the update amplitude of the update software function, if so, entering the next step, and if not, entering the step S44;
s43, determining the number and the update amplitude of update software functions of the update software module according to the update condition of the update software module of the software system to be on-line version corresponding to the test case, determining whether the update test priority value of the test case can be determined by adopting the basic test priority value or not based on the number and the update amplitude of the update software functions of the update software module, if yes, determining the update test priority value of the test case by the basic test priority value, and if not, entering step S44;
s44, based on the updated software modules of the software system of the to-be-online version corresponding to the test case, determining the number of updated software functions of different updated software modules and the updated amplitude of different updated software modules, and determining the updated test priority value of the software modules of the test case according to the updated amplitude of different updated software modules, the number of updated software functions and the number of updated software modules;
s45, acquiring the update amplitude of the updated software function, and correcting the basic test priority value of the test case by combining the update test priority value of the software module of the test case to obtain the update test priority value of the test case.
In one possible embodiment, the method for determining the test priority value of the test case in the step S3 includes:
determining the comprehensive test priority value of the test case according to the historical test priority value of the test case and the updated test priority value;
determining the test priority of the test case based on the test complexity of the test case;
and determining the test priority value of the test case based on the test priority of the test case and the comprehensive test priority value.
In one possible embodiment, the determining the comprehensive test priority value of the test case according to the historical test priority value and the updated test priority value of the test case specifically includes:
and determining the comprehensive test priority value of the test case according to the historical test priority value of the test case and the maximum value of the updated test priority value.
In this embodiment, the test priority value of the test case is determined based on the historical test priority value, the updated test priority value and the test complexity of the test case, so that not only the test complexity of different test cases is considered, but also the association relationship with the update module and the update function of the software system is considered, and the distribution accuracy of the test cases is further improved.
And S4, determining the distribution sequence of the test cases based on the test priority value, and distributing the test cases to the matching client for automatic test by taking the shortest test time consumption and the matching client of the test cases as constraint conditions to obtain a test result.
In one possible embodiment, the test cases are distributed to the matching clients, and are determined by adopting a PSO algorithm-based optimizing model, wherein the specific steps of constructing the PSO algorithm optimizing model are as follows:
1. particle swarm initialization: setting the population scale, and initializing the position of each particle and the optimizing speed.
2. And calculating the fitness value of each particle according to the objective function, and initializing an individual global optimal value. For each particle, its fitness value f (x) is calculated and its individual optimal value is initialized to the current position, the global optimal value being the position of the particle with the smallest fitness value among all particles.
3. Judging whether a termination condition is met, setting the maximum iteration number as 100 or setting the fitness value error as 0.001, stopping searching if the maximum iteration number is reached or the fitness value error is smaller than 0.001, and outputting a search result; otherwise, continuing the next step.
4. And calculating fitness values of the particles according to the objective function, recalculating the fitness values of the particles, and updating historical optimal values and global optimal values of the particles. For each particle, comparing the current fitness value with the historical optimal value, if the current fitness value is smaller, updating the historical optimal value as the current position, comparing the historical optimal values of all particles, and selecting the particle position with the smallest fitness value as the global optimal value.
5. And step 3, repeatedly executing until the termination condition is met, and finally, outputting a global optimal value by the PSO algorithm, namely distributing the test cases to the matched clients.
On the other hand, as shown in fig. 5, the present invention provides a distributed automatic test system, and the distributed automatic test method is characterized by comprising:
the system comprises a complexity evaluation module, a time-consuming evaluation module, a test sequence determination module and an allocation module;
the complexity evaluation module is responsible for acquiring the module number and the function number of the software system corresponding to the test case, and determining the test complexity of the test case by combining the data quantity and the flow complexity of the test case in the test process;
the time consumption evaluation module is responsible for determining idle clients according to the running states of the test clients, determining the processing time consumption of different test cases in different idle clients through the running states of different idle clients and the test complexity of the test cases, and taking the idle clients with the processing time consumption less than the preset time as the matched clients of the test cases;
the test sequence determining module is responsible for acquiring an updated software module and an updated software function of a software system corresponding to the test case, determining a historical test priority value of the test case according to historical use data of different updated software modules and updated software functions, determining an updated test priority value of the test case according to the updated conditions of different updated software modules and updated software functions, and determining the test priority value of the test case based on the historical test priority value, the updated test priority value and the test complexity of the test case;
the allocation module is responsible for determining the allocation sequence of the test cases based on the test priority value, and allocating the test cases to the matching clients for automatic testing by taking the shortest test time and the matching clients of the test cases as constraint conditions to obtain test results.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices, non-volatile computer storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the section of the method embodiments being relevant.
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 foregoing is merely one or more embodiments of the present description and is not intended to limit the present description. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present description, is intended to be included within the scope of the claims of the present description.

Claims (11)

1. The distributed automatic test method is characterized by comprising the following steps of:
acquiring the number of modules and the number of functions of a software system corresponding to a test case, and determining the test complexity of the test case by combining the data quantity and the flow complexity of the test case in the test process;
determining idle clients according to the running states of the test clients, determining the processing time consumption of different test cases in different idle clients through the running states of different idle clients and the test complexity of the test cases, and taking the idle clients with the processing time consumption smaller than the preset time as the matching clients of the test cases;
acquiring updated software modules and updated software functions of a software system corresponding to the test case, determining a historical test priority value of the test case according to different updated software modules and historical use data of the updated software functions of a software system of a historical version, determining an updated test priority value of the test case according to different updated software modules and updated conditions of the updated software functions of the software system to be on-line, and determining the test priority value of the test case based on the historical test priority value, the updated test priority value and the test complexity of the test case;
and determining the distribution sequence of the test cases based on the test priority value, and distributing the test cases to the matching client for automatic test by taking the matching client with the shortest test time consumption and the test cases as constraint conditions to obtain a test result.
2. The distributed automatic test method according to claim 1, wherein the number of modules and the number of functions of the software system corresponding to the test case are determined according to a test target and a test flow of the test case.
3. The distributed automatic test method according to claim 1, wherein the flow complexity of the test case is determined according to the number of times the test case is transferred in the test process, and wherein the more the number of times the test case is transferred in the test process, the higher the flow complexity of the test case.
4. The distributed automated testing method of claim 1, wherein the determining of the test complexity of the test case is:
acquiring the number of modules of the software system corresponding to the test case, judging whether the number of modules of the software system corresponding to the test case is within a preset number range, if so, entering the next step, and if not, determining the test complexity of the test case through the preset test complexity;
acquiring the function number of the software system corresponding to the test case, judging whether the function number of the software system corresponding to the test case is within a preset number range, if so, entering the next step, and if not, determining the test complexity of the test case through the preset test complexity;
acquiring the data volume of the test case in the test process, judging whether the data volume of the test case in the test process is within a preset data volume range, if so, entering the next step, and if not, determining the test complexity of the test case through the preset test complexity;
determining the number of functions of different modules of the software system according to the number of functions of the software system corresponding to the test case, determining a screening module based on the number of functions of different modules of the software system corresponding to the test case, and determining the complexity of the test range of the test case by using the number of screening modules, the number of functions of the screening module, the number of modules and the number of functions;
determining the data volume of different data transfer times of the test case in the test process based on the data volume of the test case in the test process, determining the flow complexity through the data transfer times and the data volume of different data transfer times, and determining the test flow complexity of the test case based on the flow complexity and the data volume of the test case in the test process;
and acquiring the input data quantity and the test target of the test case, and determining the test complexity of the test case by combining the test flow complexity and the test range complexity of the test case.
5. The distributed automated test method of claim 4, wherein the test case has a test complexity ranging from 0 to 1, and wherein the higher the test case has the more complex the test case is.
6. The distributed automatic test method according to claim 1, wherein the determining of the processing time consumption of different test cases at different idle clients according to the running states of different idle clients and the test complexity of the test cases specifically comprises:
and determining the hardware use occupancy rate of different idle clients based on the running states of the different idle clients, determining the processing capacity of the idle clients by combining the hardware configuration of the idle clients, and determining the time consumption of the test case in the processing of the idle clients by the processing capacity of the idle clients and the test complexity of the test case.
7. The method of claim 1, wherein the preset time is determined according to a test complexity of the test case, and specifically the higher the test complexity according to the test case, the longer the preset time.
8. The distributed automated test method of claim 1, wherein the method of determining the historical test preference value for the test case comprises:
s31, determining a recommended test priority value of the test case according to the number of updated software functions of the software system with the historical version corresponding to the test case, determining whether the recommended test priority value can be adopted to determine the historical test priority value of the test case according to the number of updated software modules of the software system with the historical version corresponding to the test case, if so, entering the next step, and if not, entering the step S33;
s32, determining whether the historical test priority value of the test case can be determined by adopting the recommended test priority value according to the historical use data of the updated software function of the software system with the historical version corresponding to the test case and the historical use data of the updated software module, if so, taking the recommended test priority value as the historical test priority value of the test case, and if not, entering step S33;
s33, determining the number of software functions of different updated software modules based on the updated software modules of the software system to be on-line version corresponding to the test case, and determining the test priority value of the software modules of the test case according to the number of the software functions of the different updated software modules and the number of the updated software modules;
s34, determining the historical use priority value of the test case according to the historical use number and the historical use times of the updated software function and the updated software module based on the historical use data of the updated software function and the historical use data of the updated software module of the software system with the historical version corresponding to the test case;
s35, correcting the recommended test priority value through the historical use priority value of the test case and the test priority value of the software module of the test case to obtain the determination of the historical test priority value of the test case.
9. The distributed automated test method of claim 1, wherein the historical usage data of the updated software function includes a number of historical uses, a length of time of historical use, and a maximum number of concurrent historical uses.
10. The distributed automatic test method according to claim 1, wherein the method for determining the test priority value of the test case is as follows:
determining the comprehensive test priority value of the test case according to the historical test priority value of the test case and the updated test priority value;
determining the test priority of the test case based on the test complexity of the test case;
and determining the test priority value of the test case based on the test priority of the test case and the comprehensive test priority value.
11. A distributed automation test system employing a distributed automation test method according to any one of claims 1 to 10, comprising:
the system comprises a complexity evaluation module, a time-consuming evaluation module, a test sequence determination module and an allocation module;
the complexity evaluation module is responsible for acquiring the module number and the function number of the software system corresponding to the test case, and determining the test complexity of the test case by combining the data quantity and the flow complexity of the test case in the test process;
the time consumption evaluation module is responsible for determining idle clients according to the running states of the test clients, determining the processing time consumption of different test cases in different idle clients through the running states of different idle clients and the test complexity of the test cases, and taking the idle clients with the processing time consumption less than the preset time as the matched clients of the test cases;
the test sequence determining module is responsible for acquiring an updated software module and an updated software function of a software system corresponding to the test case, determining a historical test priority value of the test case according to historical use data of different updated software modules and updated software functions, determining an updated test priority value of the test case according to the updated conditions of different updated software modules and updated software functions, and determining the test priority value of the test case based on the historical test priority value, the updated test priority value and the test complexity of the test case;
the allocation module is responsible for determining the allocation sequence of the test cases based on the test priority value, and allocating the test cases to the matching clients for automatic testing by taking the shortest test time and the matching clients of the test cases as constraint conditions to obtain test results.
CN202311503672.XA 2023-11-13 2023-11-13 Distributed automatic test method and system Active CN117234952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311503672.XA CN117234952B (en) 2023-11-13 2023-11-13 Distributed automatic test method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311503672.XA CN117234952B (en) 2023-11-13 2023-11-13 Distributed automatic test method and system

Publications (2)

Publication Number Publication Date
CN117234952A CN117234952A (en) 2023-12-15
CN117234952B true CN117234952B (en) 2024-03-22

Family

ID=89095248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311503672.XA Active CN117234952B (en) 2023-11-13 2023-11-13 Distributed automatic test method and system

Country Status (1)

Country Link
CN (1) CN117234952B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786667A (en) * 2016-02-29 2016-07-20 惠州Tcl移动通信有限公司 Distributed automated testing method and system
CN109947649A (en) * 2019-03-20 2019-06-28 北京邮电大学 A kind of sort method and device of regression test case
CN111190810A (en) * 2019-08-26 2020-05-22 腾讯科技(深圳)有限公司 Method, device, server and storage medium for executing test task
CN112231223A (en) * 2020-10-27 2021-01-15 南京林洋电力科技有限公司 Distributed automatic software testing method and system based on MQTT
CN115374019A (en) * 2022-10-27 2022-11-22 畅捷通信息技术股份有限公司 Method and system for testing distributed UI test cases and computer storage medium
CN116185869A (en) * 2023-03-08 2023-05-30 山东云海国创云计算装备产业创新中心有限公司 Software testing method, system, computer equipment and storage medium
CN116737597A (en) * 2023-08-10 2023-09-12 杭银消费金融股份有限公司 Test case processing method, system and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9489289B2 (en) * 2014-12-09 2016-11-08 Sap Se Adaptive framework automatically prioritizing software test cases

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786667A (en) * 2016-02-29 2016-07-20 惠州Tcl移动通信有限公司 Distributed automated testing method and system
CN109947649A (en) * 2019-03-20 2019-06-28 北京邮电大学 A kind of sort method and device of regression test case
CN111190810A (en) * 2019-08-26 2020-05-22 腾讯科技(深圳)有限公司 Method, device, server and storage medium for executing test task
CN112231223A (en) * 2020-10-27 2021-01-15 南京林洋电力科技有限公司 Distributed automatic software testing method and system based on MQTT
CN115374019A (en) * 2022-10-27 2022-11-22 畅捷通信息技术股份有限公司 Method and system for testing distributed UI test cases and computer storage medium
CN116185869A (en) * 2023-03-08 2023-05-30 山东云海国创云计算装备产业创新中心有限公司 Software testing method, system, computer equipment and storage medium
CN116737597A (en) * 2023-08-10 2023-09-12 杭银消费金融股份有限公司 Test case processing method, system and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Test Case Prioritization Based on Path Complexity;Tehseen Afzal Etc.;2019 International Conference on Frontiers of Information Technology (FIT);全文 *
人工智能结合自动化测试技术在卫星测试系统中的应用探索;王爽 等;电脑知识与技术;第17卷(第8期);全文 *
基于历史信息的自适应测试用例优先级技术;常龙辉;缪淮扣;肖蕾;;计算机科学(09);全文 *
基于历史数据和多目标优化的测试用例排序方法;李兴佳 等;计算机应用;全文 *

Also Published As

Publication number Publication date
CN117234952A (en) 2023-12-15

Similar Documents

Publication Publication Date Title
CN110705705B (en) Convolutional neural network model synchronous training method, cluster and readable storage medium
CN114756358B (en) DAG task scheduling method, device, equipment and storage medium
CN117132001B (en) Multi-target wind control strategy optimization method and system
Mitzenmacher Analyzing distributed join-idle-queue: A fluid limit approach
CN115394358B (en) Single-cell sequencing gene expression data interpolation method and system based on deep learning
Terekhov et al. Integrating queueing theory and scheduling for dynamic scheduling problems
CN109344967B (en) Intelligent electric meter life cycle prediction method based on artificial neural network
Mehta et al. Dynamic resource allocation heuristics that manage tradeoff between makespan and robustness
CN113886080A (en) High-performance cluster task scheduling method and device, electronic equipment and storage medium
CN117234952B (en) Distributed automatic test method and system
Stützle et al. Automatic (offline) configuration of algorithms
Sukhija et al. Portfolio-based selection of robust dynamic loop scheduling algorithms using machine learning
Moore An accurate and efficient parallel genetic algorithm to schedule tasks on a cluster
Boulmier et al. An autonomic approach for the selection of robust dynamic loop scheduling techniques
CN109389517B (en) Analysis method and device for quantifying line loss influence factors
CN113806094A (en) Cloud platform resource dynamic scheduling method based on deep learning
CN113568747A (en) Cloud robot resource scheduling method and system based on task classification and time sequence prediction
CN113220466A (en) Cloud service load universal prediction method based on long-term and short-term memory model
CN112463334A (en) Training task queuing reason analysis method, system, equipment and medium
CN116248520A (en) Benchmark test method and system for collaborative optimization of network platform manufacturing service
CN111913887A (en) Software behavior prediction method based on beta distribution and Bayesian estimation
Vahidipour et al. Priority assignment in queuing systems with unknown characteristics using learning automata and adaptive stochastic Petri nets
CN112632615B (en) Scientific workflow data layout method based on hybrid cloud environment
CN113822441B (en) Decision model training method, device, terminal equipment and storage medium
Ghiani et al. Optimization via simulation: Solution concepts, algorithms, parallelcomputing strategies and commercial software

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