In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
From a certain level, precision testing gives real vitality to test cases. Traditional test cases are only text files that can only be understood and analyzed by people. There is no meaning and value in the computer and algorithm level. The following figure shows the overall architecture of the precision test:
First of all, you may be curious, where did the concept of "use case Rubik's cube" come from? Test case Rubik's Cube is a general term for a set of functions that naturally arise in the design, development, and business practice of accurate testing. When we draw an architectural graphic representation of the functions related to use case analysis of accurate testing, it naturally looks like a Rubik's cube, and the so-called "magic" is the superpower given by the core algorithm of accurate testing.
The image above shows the overall structure of the nebula precision testing system. The "test Rubik's cube" is distributed in the upper left corner. As we all know, the core technology of accurate testing is the establishment of the traceability relationship between test cases and code, on which the core functional area of testing Rubik's cube can be built. As follows:
The so-called "square" actually represents a collection of test cases, each test case is identified by a small square, and the set of all test cases is identified by a large square. Now let's look at the functions that the Rubik's Cube of use cases can provide under the precision testing framework (if you don't know much about the underlying technology of precision testing, you can review the White Paper on Precision testing Framework in advance). In the precision testing system, the code logic corresponding to the test case can be traced and stored automatically, so the test case has the basis for in-depth analysis. At present, there are three aspects in the Rubik's cube of accurate testing (with the increase of subsequent functions, the analysis will be increased), that is, regression test case selection, test case clustering analysis, test minimization, supplemented by intelligent defect location technology. The following is a detailed description of the "use case Rubik's Cube". The selected tool is the nebula precision testing platform ThreadingTest product series.
First of all, it introduces the selection of regression test cases. From the Rubik's cube view, you can see the regression use case selection (mainly selecting the key use cases that may be affected). There is a big difference between the so-called regression testing and automated regression in accurate testing. Regression in automated testing, which we hear more often, actually means to rerun automated use cases. Regression testing in accurate testing is through the internal algorithm to automatically select new version modified test cases that may be affected. Through the selection of regression test cases, the problem of which use cases and key tests should be tested online in the new version is solved, which is also the biggest problem in agile development. The following is the schematic of the regression test case selection:
Introduction to the principle:
Test case An and test case B are test cases tested in version A, with A1, A2, A3, B2 in the green circle. And so on are the function information collected in the run corresponding to the test case.
In the process of version iteration, version B also tests its test case An and adds test case C to accurately test and collect the corresponding function information.
When version C is released iteratively, the accurate test compares the function information of the last run version of test case A, B, C with the version function information of version C, and sorts the regression priority according to the change difference.
① test case A finally runs in version B, and the corresponding function information is A1, A2, B1, A3. Compared with the function in version C, there is no code change, and the regression priority value is 0.
Because ② test case B did not run in version B, the last run was version A. the test data of version A, B1, B2, B3, C3 and the function in version C were compared, and the code of function C3 was changed, and the regression priority value was calculated to be 1.
③ test case C finally runs in B, and the corresponding function information is C1, C2, C3, A3, and compared with the function in version C. it is concluded that the code of function C3 has changed, the function C2 has been deleted, and the regression priority value is 3.
The ④ results are ranked by regression priority, and it is concluded that the highest regression priority value of test case C is 3 > test case B regression priority value is 1 > test case A, regression priority value is 0, there is no need for regression.
When the new version is launched, the precision testing system will automatically give a list of test cases affected by this release and the extent to which it has been received. As shown below:
Usually, the classification of test cases is manually classified according to the functional organization. in the accurate testing system, the test case in the Rubik's cube is cluster analysis. Because the test cases contain corresponding internal code execution logic, the execution path can be calculated directly through code blocks or functions, for example, a program has a total of 10 functions.
The clustering result in "use case Rubik's Cube" has very practical value, which is reflected in the following points:
1. With the results of use case clustering, the correctness of test execution can be verified from the management side. Traditional tests are usually executed manually, so it is very difficult to confirm whether the test cases are executed in error or in accordance with the predetermined requirements, which is also an important reason why the cost of test management has been very high. Through the analysis of the clustering results of the accurate test "use case Rubik's cube", if two test cases which have different functions and should not be together are divided into a group, then the product manager or project manager will easily identify the execution errors of the test cases and deal with them in time in the last link of the product release.
two。 Through the function of clustering results of test cases of "use case Rubik's cube", the dense area of defect distribution can be found. Because clustering is based on the code path difference information corresponding to the execution of use cases, the clustering results fully and truly reflect the sense of space between use cases, and the results are very meaningful. The distribution of defects is generally regular: if there are errors in use cases with similar functions, the same type of use cases are more likely to go wrong. Therefore, when there is not enough time, we can randomly select several clusters for each use case according to the clustering results. If there is no bug, you can relax the inspection of other use cases in the cluster, and if defects are found, then other use cases in the cluster also need to be examined.
In the case of a large number of enterprise application automation testing scenarios, with the accumulation of time, a large number of logically repetitive test cases are produced. Through the test case set minimization algorithm of use case Rubik's Cube, use cases with repetition or inclusion relationships can be removed from the use case set. The principle is very simple: assuming that two use cases have a full inclusion relationship in code coverage, then the included use cases can be removed from the use case set. The data based on the algorithm is still the technical data of the traceability relationship between the test case and the code.
Another wonderful feature in use case Rubik's Cube is intelligent defect location technology. Nebula precision testing provides three calculation formulas.
Through intelligent defect location, test engineers only need to mark the execution status of the use case from a functional point of view (whether there is a defect or not), and then combine the nebula to accurately test the code spectrum of the corresponding program automatically recorded by the "use case Rubik's cube". The defect can be accurately located at the code level.
1. source code
A brief analysis of line 15, when the tenth line y
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.