CN111367790A - Meta-heuristic test case sequencing method based on hybrid model - Google Patents

Meta-heuristic test case sequencing method based on hybrid model Download PDF

Info

Publication number
CN111367790A
CN111367790A CN202010092901.3A CN202010092901A CN111367790A CN 111367790 A CN111367790 A CN 111367790A CN 202010092901 A CN202010092901 A CN 202010092901A CN 111367790 A CN111367790 A CN 111367790A
Authority
CN
China
Prior art keywords
test
test case
steps
test cases
brightness
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.)
Granted
Application number
CN202010092901.3A
Other languages
Chinese (zh)
Other versions
CN111367790B (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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202010092901.3A priority Critical patent/CN111367790B/en
Publication of CN111367790A publication Critical patent/CN111367790A/en
Priority to PCT/CN2021/081496 priority patent/WO2021160190A1/en
Application granted granted Critical
Publication of CN111367790B publication Critical patent/CN111367790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Monitoring And Testing Of Transmission In General (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a meta-heuristic test case sequencing method based on a hybrid model, and belongs to the technical field of wireless communication. The method comprises the following steps: s1: collecting communication protocol test cases related to test requirements of tested parties, and calculating similarity factors S among the test casesi,jAnd the TF-IDF value of the importance of the test data; s2: initializing Brightness of Firefly Agent (FA) based on TF-IDF valuei,jAnd designing an objective function f (x)i,j) (ii) a S3: according to edit distance and Brightnessi,jSearching a node candidate Set to be reached next by FA in a global search mode by using an improved firefly algorithmcandidate(ii) a S4: from candidate SetcandidateBy local search according to the similarity factor Si,jSelecting an optimal solution; s5: and changing the starting point position of the test case, repeating the steps from S2 to S4, searching and recording the optimal moving path of the FA, and outputting an optimal test sequence. The invention improves the testing efficiency of the industrial wireless communication protocol and reduces the testing cost.

Description

Meta-heuristic test case sequencing method based on hybrid model
Technical Field
The invention belongs to the technical field of wireless communication, and relates to a meta-heuristic test case sequencing method based on a hybrid model.
Background
In the communication protocol testing process of the industrial wireless sensor network, along with the version change of the tested system and the repair of system defects, regression testing is needed to ensure that the modified part has no influence on the unmodified part or new faults are not introduced. Under resource-constrained conditions, re-executing all test cases takes time, labor, and money. Therefore, it is necessary to select more valuable test cases from the test case library to be preferentially executed so as to feed back to the tester earlier. The test case priority ordering technology carries out priority ordering on the test cases with different contribution degrees according to a given target and the importance degree, and can improve the requirement coverage rate and the fault detection rate of regression testing.
The research objective of the test case prioritization technology is defined as follows: for a given test suite T, the full-permutation result of T is PT, the target function f of sequencing, and the purpose of test case priority sequencing is as follows: for the
Figure BDA0002384299230000011
F (T') > f (T) holds.
At present, an effective method for sequencing the priority of test cases is lacked in the communication protocol test of the industrial wireless sensor network, and due to the particularity of input data of the communication protocol test, an effective method for measuring the priority relation between the test cases is difficult to find. Therefore, in the conventional software test case prioritization, although the research and application of the meta-heuristic test case ranking method have achieved many results in the regression test. But the search mode of the test case priority space is single, so that the search result is not ideal. Therefore, how to determine the priority sequence among the test cases more quickly and better becomes a problem for the communication protocol test of the industrial wireless sensor network.
Disclosure of Invention
In view of this, the present invention provides a meta-heuristic test case ordering method based on a hybrid model.
In order to achieve the purpose, the invention provides the following technical scheme:
a meta-heuristic test case ordering method based on a hybrid model comprises the following steps:
s1: collecting communication protocol test cases related to test requirements of tested parties, and calculating similarity factors S among the test casesi,jAnd the TF-IDF value of the importance of the test data;
s2: initializing Brightness of Firefly Agent (FA) based on TF-IDF values of test datai,jAnd designing an objective function f (x)i,j);
S3: taking the current test case as a starting point, and according to the edit distances Levenshteindstance and Brightnessi,jSearching a node candidate Set to be reached next by FA in a global search mode by using an improved firefly algorithmcandidate
S4: from candidate SetcandidateBy local search according to the similarity factor Si,jSelecting the optimal solution, recording the moving path of FA and updating the node distance
Figure BDA0002384299230000021
S5: and changing the starting point position of the test case, repeating the steps from S2 to S4, searching and recording the optimal moving path of the FA, and outputting an optimal test sequence.
Optionally, in step S1, the calculating the similarity between the test cases and the importance of the test data specifically includes the following steps:
1) preprocessing for filtering test data, and using influence factor α for invalid data in case of communication protocol test because the test data is presented in byte array form and contains many user-set parameters including source address and destination addressiFiltration, αiThe value of 0 or 1, i represents the number of the tested protocol field, and α of the fieldiA value of 0 indicates that the field is invalid, and the following calculation procedure uses α dataiFiltering;
2) determining the correlation between the test cases, and generating a correlation coefficient matrix between the test cases by calculating the edit distance between every two test cases, wherein the method specifically comprises the following steps:
s11: measuring the content in the test cases by using the character string spacing, and measuring the character string spacing of different test cases by using the edit distance; measured using the formula shown below:
Figure BDA0002384299230000022
wherein, leva,b(i, j) represents the edit distance between two test cases a, b, aiRepresenting the ith byte in a, bjRepresents the jth byte in b;
s12: obtaining the overlapping distance between a and b as max (i, j) -lev from the calculated editing distance between a and ba,b(i, j) as PiEdit distance leva,b(i, j) is denoted as Qi(ii) a Obtaining the similarity coefficient S between different test casesi,jComprises the following steps:
Figure BDA0002384299230000023
s13: according to the similarity coefficient Si,jObtaining the similarity between the ith test case and the jth test case, thereby obtaining a similarity coefficient matrix Ms
Figure BDA0002384299230000031
3) Determining the importance of the test data by calculating the TF-IDF value of the test data for each test data li,jThe method specifically comprises the following steps:
s14: counting the occurrence times n of each piece of test data in all test casesk,jFor a particular test case, its importance is expressed as:
Figure BDA0002384299230000032
in the above formula, ni,jIs the item in test case diThe denominator is in the file diThe sum of the occurrence times of all the words in the list;
s15: the inverse text frequency (IDF) is a measure for measuring the general importance of a piece of test data, and the IDF of a certain piece of test data is obtained by dividing the total number of test cases by the number of test cases containing the test data and taking the logarithm of the obtained result:
Figure BDA0002384299230000033
where | D | represents the total number of test cases,
Figure BDA0002384299230000034
representation containing test data ti,jNumber of test cases of, ti,jJ test data representing the ith test case;
s16: the importance of the test case is calculated by the following formula:
Figure BDA0002384299230000035
optionally, in the step S2, the Brightness of the Firefly Agent (FA) is initializedi,jAnd designing an objective function f (x)i,j) The method specifically comprises the following steps:
s21: the importance coefficient of each piece of test data calculated according to S1 is used as the initial brightness of each agent, and the calculation formula is as follows:
Figure BDA0002384299230000036
wherein, WiRepresenting the weight of the test case i; the brightness update of the current agent is based on the Firefly Agent (FA) current bitPlacing the product of the weights and the correlation coefficients of other agents;
s22: by associating the brightness with the objective function to be optimized, formulating it, the fitness function of the new optimization algorithm is formulated:
Figure BDA0002384299230000041
wherein, Wi-1Represents the weight of the test case i-1, Order represents the test case sequence number with determined priority, unOrder represents the test case sequence number with undetermined priority, Random (·) N-2 < [ [ Ni-i [ ]]-0.1]< N }, N represents the total number of test cases; x is the number ofi,jIs of the fitness value f (x)i,j) Influenced by the next arriving point, so that k nodes with the maximum fitness value are found from the test cases which are not added into the Order and are added into the candidate Setcandidate
Optionally, in the step S22, the Brightness of the Firefly Agent (FA)i,jAnd an objective function f (x)i,j) The rule updating method specifically comprises the following steps:
s221: setting fitness function/objective function f (x)i,j),xi,jA jth agent representing an ith test case;
s222: initialize x with equation (7)i,jAs the entrance to the firefly agent;
S223:Xithe nodes reached by the firefly agent are represented, and the node distance updating formula is as follows:
Figure BDA0002384299230000042
wherein β and α are constants, β is the absorptivity of light, and is usually 1, α∈ [0, 1%]ε is a random factor obeying uniform distribution, γ represents the attraction coefficient, Si,jRepresenting node XiAnd XjBy a matrix MsGiving out;
all the FAs are unisexual, each FA attracts or is attracted by other FAs, and the attraction force of the FA is proportional to the brightness of the FA; when the FAs are attracted by other similar kinds, their brightness becomes the magnitude of the attraction.
Optionally, in step S4, the selection policy of the node reached by the firefly agent in the next step specifically includes the following steps:
s41: calculated according to equation (9)
Figure BDA0002384299230000043
And SetcandidateDistances of all nodes inside;
s42: selecting a distance
Figure BDA0002384299230000044
The smallest node is used as the (i + 1) th sequence;
s43: recording the moving path of FA and updating the node distance by a hybrid model
Figure BDA0002384299230000045
S44: this is repeated until unOrder is empty.
Optionally, in step S5, outputting the optimal test sequence specifically includes the following steps:
s51: changing the starting point position of the test case and restoring the initial condition before;
s52: repeating the steps S2-S4;
s53: and finding out the optimal test sequence in all flight paths.
The invention has the beneficial effects that: the method provided by the invention can meet the requirement of priority sequencing of the test cases of the wireless sensor network communication protocol, can improve the test efficiency of the program and the test suite, and can reduce the test cost.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a general flowchart of a test case prioritization method according to the present invention.
FIG. 2 is a schematic diagram of a hybrid model based on edit distance and TF-IDF according to the present invention.
FIG. 3 is a flow chart of a firefly algorithm based on a hybrid model according to the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention in a schematic way, and the features in the following embodiments and examples may be combined with each other without conflict.
Wherein the showings are for the purpose of illustrating the invention only and not for the purpose of limiting the same, and in which there is shown by way of illustration only and not in the drawings in which there is no intention to limit the invention thereto; to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there is an orientation or positional relationship indicated by terms such as "upper", "lower", "left", "right", "front", "rear", etc., based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not an indication or suggestion that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes, and are not to be construed as limiting the present invention, and the specific meaning of the terms may be understood by those skilled in the art according to specific situations.
As shown in fig. 1, the method for ranking the meta-heuristic test cases based on the hybrid model includes three stages: the first phase is the process performed on the raw test case data, referred to as the preprocessing phase. And filtering invalid fields according to different fields defined by the standard specification of the tested protocol, thereby avoiding the influence of invalid data on the final result. And the second stage is a stage of constructing a mixed space search model, and a mixed search space is constructed by respectively carrying out local search and global search through a correlation coefficient matrix among test cases and a firefly agent for measuring the importance degree of test data. And the third stage is a firefly algorithm implementation stage based on the hybrid model, and the optimal flight path is obtained by taking each test case as a starting point and selecting through calculation of the hybrid model. Finally, an optimal test sequence is found through all flight paths, as shown in fig. 2.
The meta-heuristic test case sequencing method based on the hybrid model specifically comprises the following steps:
the method comprises the following steps: collecting communication protocol test cases related to test requirements of tested parties, and calculating similarity factors S among the test casesi,jAnd the TF-IDF value of the importance of the test data. Firstly, preprocessing is carried out, test data are filtered, the correlation among test cases is determined, and the importance degree of the test data is determined.
1. Impact factor α for invalid data according to different fields of tested protocoliFiltration is carried out, αiThe value of 0 or 1, i represents the number of the tested protocol field, α of the fieldiA value of 0 indicates that the field is invalid data.
2. Calculating a correlation coefficient matrix among the test cases, which specifically comprises the following steps:
1) the content in the test cases is measured in terms of string spacing, and the string spacing of different test cases is measured in terms of edit distance. Measured using the formula shown below:
Figure BDA0002384299230000061
wherein, leva,b(i, j) represents the edit distance between two test cases a, b, aiRepresenting the ith byte in a, bjRepresenting the jth byte in b.
2) The calculated edit distance between a and b can obtain the overlapping distance between a and b as max (i, j) -leva,b(i, j) as PiEdit distance Qi=leva,b(i, j) is denoted as Qi. Therefore, the similarity coefficient S for measuring different test cases can be obtainedi,jComprises the following steps:
Figure BDA0002384299230000062
3) according to the similarity coefficient Si,jThe similarity between the ith test case and the jth test case can be obtained, so that a similarity coefficient matrix M is obtaineds
Figure BDA0002384299230000063
3. Calculating the importance degree of the test data, specifically comprising the following steps:
1) counting the occurrence times n of each piece of test data in all test casesk,jFor a particular test case, its importance can be expressed as:
Figure BDA0002384299230000071
in the above formula, ni,jIs the item in test case diThe denominator is in the file diThe sum of the number of occurrences of all words in (b).
2) The inverse text frequency (IDF) is a measure for measuring the general importance of a piece of test data, and the IDF of a particular piece of test data can be obtained by dividing the total number of test cases by the number of test cases containing the test data and taking the logarithm of the obtained result:
Figure BDA0002384299230000072
where | D | represents the total number of test cases,
Figure BDA0002384299230000073
representation containing test data ti,jNumber of test cases of, ti,jAnd j test data representing the ith test case.
3) The importance of the test case can be calculated by the following formula:
Figure BDA0002384299230000074
step two: initializing and updating luminance Brightness of Firefly Agent (FA)i,jAnd an objective function f (x)i,j) The method specifically comprises the following steps:
1. the importance coefficient of each piece of test data calculated according to S1 is used as the initial brightness of each agent, and the calculation formula is as follows:
Figure BDA0002384299230000075
wherein, WiRepresenting the weight of test case i. The brightness update for the current agent is based on the product of the Firefly Agent (FA) current location weight and the correlation coefficients of the other agents.
2. By associating the luminance with the objective function to be optimized, it can be formulated, so that the fitness function of the new optimization algorithm is formulated:
Figure BDA0002384299230000076
wherein, Wi-1Represents the weight of the test case i-1, Order represents the test case sequence number with determined priority, unOrder represents the test case sequence number with undetermined priority, Random (·) N-2 < [ [ N ]i-i]-0.1]< N }, where N represents the total number of test cases. x is the number ofi,jIs of the fitness value f (x)i,j) Influenced by the next arriving point, so that k nodes with the maximum fitness value are found from the test cases which are not added into the Order and are added into the candidate Setcandidate
3. Updating luminance Brightness of Firefly Agent (FA)i,jAnd an objective function f (x)i,j) The method specifically comprises the following steps:
1) setting fitness function/objective function f (x)i,j),xi,jAnd j intelligent agent for representing the ith test case.
2) Initialize x with equation (7)i,jAs the entry to the firefly agent.
3)XiThe nodes reached by the firefly agent are represented, and the node distance updating formula is as follows:
Figure BDA0002384299230000081
wherein β and α are constants, β is the absorptivity of light, and is usually 1, α∈ [0, 1%]ε is a random factor obeying uniform distribution, γ represents the attraction coefficient, Si,jRepresenting node XiAnd XjBy a matrix MsIt is given.
All FAs are unisexual, each of which attracts or is attracted to other FAs, the attraction of a FA being proportional to its brightness. When the FAs are attracted by other similar kinds, their brightness becomes the magnitude of the attraction.
Step three: the selection strategy of the next arriving node specifically comprises the following steps:
1) calculated according to equation (9)
Figure BDA0002384299230000082
And SetcandidateDistances of all nodes inside.
2) Selecting a distance
Figure BDA0002384299230000083
The smallest node is taken as the (i + 1) th sequence.
3) Recording the moving path of FA and updating the node distance by a hybrid model
Figure BDA0002384299230000084
4) This is repeated until unOrder is empty.
Step four: outputting an optimal test sequence, and specifically comprising the following steps:
1) and changing the starting point position of the test case and restoring the initial condition before.
2) And repeating the process from the second step to the third step.
3) And finding out the optimal test sequence in all flight paths.
The method is implemented as shown in fig. 3.
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.

Claims (6)

1. A meta-heuristic test case ordering method based on a hybrid model is characterized in that: the method comprises the following steps:
s1: collecting communication protocol test cases related to test requirements of tested parties, and calculating similarity factors S among the test casesi,jAnd the TF-IDF value of the importance of the test data;
s2: initializing luminance birthness of Firefly Agent (FA) according to TF-IDF value of test datai,jAnd designing an objective function f (x)i,j);
S3: taking the current test case as a starting point, and according to the edit distances Levenshtein distance and Brightnessi,jSearching a node candidate Set to be reached next by FA in a global search mode by using an improved firefly algorithmcandidate
S4: from candidate SetcandidateBy local search according to the similarity factor Si,jSelecting the optimal solution, recording the moving path of FA and updating the node distance
Figure FDA0002384299220000012
S5: and changing the starting point position of the test case, repeating the steps from S2 to S4, searching and recording the optimal moving path of the FA, and outputting an optimal test sequence.
2. The method according to claim 1, wherein the meta-heuristic test case ranking method based on the hybrid model comprises: in step S1, the step of calculating the similarity between the test cases and the importance of the test data specifically includes the following steps:
1) preprocessing for filtering test data, and using influence factor α for invalid data in case of communication protocol test because the test data is presented in byte array form and contains many user-set parameters including source address and destination addressiFiltration, αiThe value of 0 or 1, i represents the number of the tested protocol field, and α of the fieldiA value of 0 indicates that the field is invalid, and the following calculation procedure uses α dataiFiltering;
2) determining the correlation between the test cases, and generating a correlation coefficient matrix between the test cases by calculating the edit distance between every two test cases, wherein the method specifically comprises the following steps:
s11: measuring the content in the test cases by using the character string spacing, and measuring the character string spacing of different test cases by using the edit distance; measured using the formula shown below:
Figure FDA0002384299220000011
wherein, leva,b(i, j) represents the edit distance between two test cases a, b, aiRepresenting the ith byte in a, bjRepresents the jth byte in b;
s12: obtaining the overlapping distance between a and b as max (i, j) -lev from the calculated editing distance between a and ba,b(i, j) as PiEdit distance leva,b(i, j) is denoted as Qi(ii) a Obtaining the similarity coefficient S between different test casesi,jComprises the following steps:
Figure FDA0002384299220000021
s13: according to the similarity coefficient Si,jObtaining the similarity between the ith test case and the jth test case, thereby obtaining a similarity coefficient matrix Ms
Figure FDA0002384299220000022
3) Determining the importance of the test data by calculating the TF-IDF value of the test data for each test data li,jThe method specifically comprises the following steps:
s14: counting the occurrence times n of each piece of test data in all test casesk,jFor a particular test case, its importance is expressed as:
Figure FDA0002384299220000023
in the above formula, ni,jIs the item in test case diThe denominator is in the file diThe sum of the occurrence times of all the words in the list;
s15: the inverse text frequency (IDF) is a measure for measuring the general importance of a piece of test data, and the IDF of a certain piece of test data is obtained by dividing the total number of test cases by the number of test cases containing the test data and taking the logarithm of the obtained result:
Figure FDA0002384299220000024
where | D | represents the total number of test cases,
Figure FDA0002384299220000026
representation containing test data ti,jNumber of test cases of, ti,jJ test data representing the ith test case;
s16: the importance of the test case is calculated by the following formula:
Figure FDA0002384299220000025
3. the method according to claim 1, wherein the meta-heuristic test case ranking method based on the hybrid model comprises: in the step S2, Brightness of Firefly Agent (FA) is initializedi,jAnd designing an objective function f (x)i,j) The method specifically comprises the following steps:
s21: the importance coefficient of each piece of test data calculated according to S1 is used as the initial brightness of each agent, and the calculation formula is as follows:
Figure FDA0002384299220000031
wherein, WiRepresenting the weight of the test case i; of the current agentThe brightness update is based on the product of the Firefly Agent (FA) current location weight and the correlation coefficients of other agents;
s22: by associating the brightness with the objective function to be optimized, formulating it, the fitness function of the new optimization algorithm is formulated:
Figure FDA0002384299220000032
wherein, Wi-1Represents the weight of the test case i-1, Order represents the test case sequence number with determined priority, unOrder represents the test case sequence number with undetermined priority, Random (·) N-2 < [ [ N ]i-i]-0.1]< N }, N represents the total number of test cases; x is the number ofi,jIs of the fitness value f (x)i,j) Influenced by the next arriving point, so that k nodes with the maximum fitness value are found from the test cases which are not added into the Order and are added into the candidate Setcandidate
4. The meta-heuristic test case ranking method based on the hybrid model according to claim 2, characterized in that: in the step S22, Brightness of Firefly Agent (FA)i,jAnd an objective function f (x)i,j) The rule updating method specifically comprises the following steps:
s221: setting fitness function/objective function f (x)i,j),xi,jA jth agent representing an ith test case;
s222: initialize x with equation (7)i,jAs the entrance to the firefly agent;
S223:Xithe nodes reached by the firefly agent are represented, and the node distance updating formula is as follows:
Figure FDA0002384299220000033
wherein β and α are constants, β is the absorptivity of light, and is usually 1, α∈ [0, 1%]ε is a random factor obeying uniform distribution, γ represents the attraction coefficient, Si,jRepresenting node XiAnd XjBy a matrix MsGiving out;
all the FAs are unisexual, each FA attracts or is attracted by other FAs, and the attraction force of the FA is proportional to the brightness of the FA; when the FAs are attracted by other similar kinds, their brightness becomes the magnitude of the attraction.
5. The method according to claim 3, wherein the meta-heuristic test case ranking method based on the hybrid model is as follows: in step S4, the selection policy of the node reached by the firefly agent in the next step specifically includes the following steps:
s41: calculated according to equation (9)
Figure FDA0002384299220000034
And SetcandidateDistances of all nodes inside;
s42: selecting a distance
Figure FDA0002384299220000035
The smallest node is used as the (i + 1) th sequence;
s43: recording the moving path of FA and updating the node distance by a hybrid model
Figure FDA0002384299220000036
S44: this is repeated until unOrder is empty.
6. The method according to claim 1, wherein the meta-heuristic test case ranking method based on the hybrid model comprises: in step S5, outputting an optimal test sequence, specifically including the following steps:
s51: changing the starting point position of the test case and restoring the initial condition before;
s52: repeating the steps S2-S4;
s53: and finding out the optimal test sequence in all flight paths.
CN202010092901.3A 2020-02-14 2020-02-14 Meta heuristic test case ordering method based on mixed model Active CN111367790B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010092901.3A CN111367790B (en) 2020-02-14 2020-02-14 Meta heuristic test case ordering method based on mixed model
PCT/CN2021/081496 WO2021160190A1 (en) 2020-02-14 2021-03-18 Metaheuristic test case ranking method based on hybrid model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010092901.3A CN111367790B (en) 2020-02-14 2020-02-14 Meta heuristic test case ordering method based on mixed model

Publications (2)

Publication Number Publication Date
CN111367790A true CN111367790A (en) 2020-07-03
CN111367790B CN111367790B (en) 2023-05-12

Family

ID=71208053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010092901.3A Active CN111367790B (en) 2020-02-14 2020-02-14 Meta heuristic test case ordering method based on mixed model

Country Status (2)

Country Link
CN (1) CN111367790B (en)
WO (1) WO2021160190A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181849A (en) * 2020-10-23 2021-01-05 网易(杭州)网络有限公司 Test case identification method, device, equipment and storage medium
WO2021160190A1 (en) * 2020-02-14 2021-08-19 重庆邮电大学 Metaheuristic test case ranking method based on hybrid model
CN113345420A (en) * 2021-06-07 2021-09-03 河海大学 Countermeasure audio generation method and system based on firefly algorithm and gradient evaluation
CN117234957A (en) * 2023-11-16 2023-12-15 山东科技大学 Test case priority ordering method based on improved firefly algorithm

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114580864B (en) * 2022-02-21 2023-12-05 石河子大学 Multi-element energy storage distribution method, system and equipment for comprehensive energy system
CN114706769A (en) * 2022-03-30 2022-07-05 天津大学 Log-based regression test-oriented black box test case sequencing method
CN114978974B (en) * 2022-05-20 2023-09-19 国网重庆市电力公司电力科学研究院 Wireless communication module testing method, device, equipment and storage medium
CN118035125B (en) * 2024-04-11 2024-06-14 江西财经大学 Method and system for generating random test case based on double-level probability selection

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040096827A1 (en) * 2002-08-16 2004-05-20 Wheeler Ward C. Method for search based character optimization
CN101551776A (en) * 2009-04-24 2009-10-07 北京航空航天大学 A measuring and assessment method for software credibility during the testing process
CN104572449A (en) * 2014-12-23 2015-04-29 中国移动通信集团广东有限公司 Automatic test method based on case library
CN105528289A (en) * 2015-12-04 2016-04-27 中国矿业大学 Regression test case prioritization method based on branch coverage and similarity
CN108021509A (en) * 2017-12-27 2018-05-11 西安交通大学 Test case dynamic order method based on program behavior network polymerization
US20190079853A1 (en) * 2017-09-08 2019-03-14 Devfactory Fz-Llc Automating Identification of Test Cases for Library Suggestion Models
CN110647461A (en) * 2019-08-19 2020-01-03 江苏大学 Multi-information fusion regression test case sequencing method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7552361B2 (en) * 2006-12-14 2009-06-23 International Business Machines Corporation Software testing optimization apparatus and method
CN108763055B (en) * 2018-04-19 2020-08-25 北京航空航天大学 Construction method of test case constraint control technology based on epigenetic inheritance
CN111367790B (en) * 2020-02-14 2023-05-12 重庆邮电大学 Meta heuristic test case ordering method based on mixed model

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040096827A1 (en) * 2002-08-16 2004-05-20 Wheeler Ward C. Method for search based character optimization
CN101551776A (en) * 2009-04-24 2009-10-07 北京航空航天大学 A measuring and assessment method for software credibility during the testing process
CN104572449A (en) * 2014-12-23 2015-04-29 中国移动通信集团广东有限公司 Automatic test method based on case library
CN105528289A (en) * 2015-12-04 2016-04-27 中国矿业大学 Regression test case prioritization method based on branch coverage and similarity
US20190079853A1 (en) * 2017-09-08 2019-03-14 Devfactory Fz-Llc Automating Identification of Test Cases for Library Suggestion Models
CN108021509A (en) * 2017-12-27 2018-05-11 西安交通大学 Test case dynamic order method based on program behavior network polymerization
CN110647461A (en) * 2019-08-19 2020-01-03 江苏大学 Multi-information fusion regression test case sequencing method and system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
MUHAMMAD KHATIBSYARBINI等: "Test Case Prioritization Using Firefly Algorithm for Software Testing", 《IEEE ACCESS》 *
WENJUN SU等: "A Meta-heuristic Test Case Prioritization Method Based on Hybird Model", 《2020 INTERNATIONAL CONFERENCE ON COMPUTER ENGINEERING AND APPLICATION (ICCEA)》 *
张娜等: "基于MOABCO的多目标测试用例优先级排序", 《测试技术学报》 *
苏文君: "基于SpringBoot的WIA-PA测试软件设计及优化", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021160190A1 (en) * 2020-02-14 2021-08-19 重庆邮电大学 Metaheuristic test case ranking method based on hybrid model
CN112181849A (en) * 2020-10-23 2021-01-05 网易(杭州)网络有限公司 Test case identification method, device, equipment and storage medium
CN112181849B (en) * 2020-10-23 2023-07-25 网易(杭州)网络有限公司 Test case identification method, device, equipment and storage medium
CN113345420A (en) * 2021-06-07 2021-09-03 河海大学 Countermeasure audio generation method and system based on firefly algorithm and gradient evaluation
CN117234957A (en) * 2023-11-16 2023-12-15 山东科技大学 Test case priority ordering method based on improved firefly algorithm
CN117234957B (en) * 2023-11-16 2024-02-06 山东科技大学 Test case priority ordering method based on improved firefly algorithm

Also Published As

Publication number Publication date
WO2021160190A1 (en) 2021-08-19
CN111367790B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN111367790A (en) Meta-heuristic test case sequencing method based on hybrid model
Chen et al. Improving Bayesian network structure learning with mutual information-based node ordering in the K2 algorithm
Orzack et al. A critical assessment of Levins's The strategy of model building in population biology (1966)
EP2860672A2 (en) Scalable cross domain recommendation system
CN105929690B (en) A kind of Flexible Workshop Robust Scheduling method based on decomposition multi-objective Evolutionary Algorithm
CN111883223B (en) Report interpretation method and system for structural variation in patient sample data
CN107491992B (en) Intelligent service recommendation method based on cloud computing
CN109801680B (en) Tumor metastasis and recurrence prediction method and system based on TCGA database
CN106529580A (en) EDSVM-based software defect data association classification method
CN108304496A (en) Node similarity relation detection method based on composite unit path in Heterogeneous Information net
AU2014255472B2 (en) Diagnosing combinations of failures in a system
Medo Statistical validation of high-dimensional models of growing networks
CN106156857A (en) The method and apparatus selected for mixed model
CN105973828A (en) Infrared spectroscopy quantitative analysis method and system
CN112907026A (en) Comprehensive evaluation method based on editable mesh index system
CN114627980A (en) Chemical inverse synthesis analysis method and system
Oogi et al. Uchuu–ν2GC galaxies and AGN: cosmic variance forecasts of high-redshift AGN for JWST, Euclid, and LSST
Garavaglia et al. Subgraphs in preferential attachment models
CN111782978A (en) Method and device for processing point of interest data, electronic equipment and readable medium
US8189931B2 (en) Method and apparatus for matching of bracketed patterns in test strings
Ahanor et al. DiversiTree: A new method to efficiently compute diverse sets of near-optimal solutions to mixed-integer optimization problems
CN110162704B (en) Multi-scale key user extraction method based on multi-factor genetic algorithm
CN113610148A (en) Fault diagnosis method based on bias weighting AdaBoost
CN114548417A (en) Machine learning model training method and system based on data correction
JP2021086241A (en) Transferability determination device, transferability determination method and transferability determination program

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