A kind of method of judging IN service test coverage height
Technical field
The present invention relates to the intelligent network field tests, relate to a kind of method of judging IN service test coverage height specifically.
Background technology
Along with intelligent network the carrying out rapidly of various places, the user is more and more, user's individual demand is also more and more, new business emerges in an endless stream.The whole service logic is a network structure, and big usually service logic is by thousands of SIB (Service Independence Block: service independent block) form.For huge and complicated service logic, if only test at traffic performance, can not travel through all individual paths fully probably, particularly describe when not being very clear or design alteration not in time under the situation such as record at requirement documents, some branches or path more may be left in the basket, in order to ensure the stable operation on intelligent network of this business, must carry out abundant, complete test to all flow processs before putting into effect.
How to weigh the completeness of test, prior art provides following two kinds of solutions: first method is current topmost measurement method of testing, its according to demand document list of requirements is verified item by item; Second method is to judge according to the convergence situation of problem in the regression test, if the curve that problem descends meets certain downward trend, can think that then the version quality tends towards stability, and can be used for actual operation.
Yet all there is apparent in view defective in above-mentioned existing two kinds of method of testings, are difficult to the adequacy and the completeness of operational trials are assessed.Whether the completeness of testing in the first method fully depends on the complete degree of requirement documents, and often need the tester that more rich test experience is arranged to a great extent.Owing to separated several stages between the design in the requirement documents, the realization, in fact be difficult to the crash consistency between assurance requirement documents and the service logic.Therefore at requirement documents not in detail or requirement documents can not reflect the present situation of version fully the time, document in fact is difficult to learn the complete degree of version test according to demand.The use of second method has a prerequisite, is exactly to suppose in advance just to have covered all characteristics when the tester begins to test, if the tester has ignored certain characteristic always, even the problem curve convergence is very fast, the version test also is inadequate.
Summary of the invention
At said circumstances, the present invention proposes a kind of method of judging IN service test coverage height, the adequacy and the completeness of operational trials are weighed.
For achieving the above object, the method for judgement IN service test coverage height of the present invention comprises following steps:
A, the logic to be tested that loads is carried out the operational trials use-case in intelligent service platform, and the service logic information in the intelligent service platform is exported;
The service logic information of b, analysis output, the record test status;
C, statistical test situation, output comprises the test result of test coverage.
Wherein, the service logic information among the described step a specifically comprises: the logic step information of test service use-case, the identification information of test service use-case; Described service logic information is write file, pass through the online output of interface with the form output of file or with described service logic information again.
Record test status among the described step b is meant: the information such as business change result in the service logic Step Information that the SIB information that record has traveled through, record are not gone to, the record test process.
Test result among the described step c comprises: the SIB that has traveled through, the information such as operating position, service logic step sum, the service logic step sum of not going to, logic step coverage rate of SIB, the dissimilar SIB of traversal not.
The present invention is according to the coverage rate assessment result in the test result, and concrete analysis coverage rate statistics so that testing progress, test mass etc. is assessed and feedback improvements, determines whether test coverage is complete, and whether test can be finished.
The test coverage appraisal procedure that the present invention introduces in the intelligent network business field tests can be used as one of the evaluation assignment testing adequacy very important basis.By the operational trials coverage rate that dynamically obtains in the test process, can also the analytical test process in the omission of use-case, understand the execution efficient of test case, thus to test case write and good directive function is played in the assurance of test mass.More specifically, it has following advantage:
1, makes the completeness assessment of operational trials that a quantized data arranged, make professional test no longer blindly;
2, can be used for instructing the tester to make up test case, the structure of test case and the raising of coverage rate are associated, thereby the efficient of raising test case is avoided non-productive work in making up the execution of test case and test case;
3,, avoid the test of traffic performance to omit by the not analysis of the service logic of traversal;
4, understand the operational trials progress, for project plan progress provides reference metric.
Describe the present invention in detail below in conjunction with the drawings and specific embodiments.
Description of drawings
Fig. 1 is the rough schematic view of the present invention's logic to be tested;
Fig. 2 is the flow chart of the method for the invention;
Fig. 3 is the output result of a concrete test service use-case;
Fig. 4 be one in actual environment, when intelligent platform is loaded with a plurality of service logic, the coverage rate of all service logics output result.
Specific implementation
The appearance of intelligent network has made things convenient for people's life, and along with it is constantly developed, the user is more and more, user's requirement is also more and more higher, operational trials, the particularly test of service code coverage rate before putting into effect, be the key that guarantees the intelligent network quality, therefore be absolutely necessary.
Be the simplification schematic flow sheet of a service logic as shown in Figure 1, for convenience of explanation for the purpose of, done and simplify to have handled.Complicated service is than big thousands of times of this professional scale in the reality.It comprises 8 logic steps, wherein, respectively has an error exit when makeing mistakes in the logic step 2,3,5, has a condition judgment branch in the logic step 4.Must consider the structure of test service use-case when test, if do not consider these error exits or condition judgment branch, test does not just have not fully, carries out all sidedly, and the current version of logic so to be tested just might go wrong.If carry out the analysis of test coverage in the test, just can know the logic branch of not testing, replenish the test service use-case then and proceed test.For complicated service more, same, do not carry out the analysis of test coverage, ignoring of logic branch just more likely appears in the test.
The described a kind of method that realizes the IN service test coverage of present embodiment specifically comprises the following step:
The first,, carry out the operational trials use-case, and service logic information is exported at the logic to be tested in the intelligent service platform.
Promptly insert the test pile module interface in the service logic to be tested in intelligent service platform, its function is exactly the complete information of outgoing traffic implementation status.Re-using a concrete test service use-case tests this service logic to be tested, in test process, service logic information such as SIB information (being service identification information) that this test service use-case traveled through, service logic Step Information are write file, again with the form output of file.
The second, analyze the service logic information of output, the record test status.
Promptly the specified file from above-mentioned steps one reads described service logic information, analyze then, write down the test status result of this test service use-case, specifically comprise: the business change object information information in the service logic Step Information that the SIB information that record has traveled through, record have been passed by, the record test process etc.
Three, statistical test situation, output comprises the test result of test coverage.
Be illustrated in figure 3 as the output result of a concrete test service use-case, wherein, can clearly see the operating position of the service logic step that traveled through in this test service use-case, the service logic step that does not traverse, the SIB distribution situation that has traveled through, dissimilar SIB, not SIB distribution situation, snoop logic step sum to be tested and the test coverage of traversal, test coverage be the percentage of the total ratio of the total logic step of the service logic number of steps that traveled through in this test service use-case and logic to be tested.
Make a concrete analysis of the coverage rate statistics at last, so that testing progress, test mass etc. is assessed and feedback improvements.
Among Fig. 3, the test coverage of this test service use-case is 46.15%, and is obviously on the low side, and the test for the treatment of test logic can't finish, can be by above-mentioned result, as replenishing the test service use-case at the SIB that does not have traversal.
Using other test service use-case to repeat above-mentioned step 1, step 2, step 3 gets final product.
Be as shown in Figure 4 one in actual environment, when intelligent platform is loaded with a plurality of service logic, the coverage rate output result of all service logics, its shown respectively each concrete test service use-case corresponding professional sequence number, ID number, the logic step sum, the filename of the specified file of being stored, test coverage, wherein, sequence number is that the test coverage of 5 business is the highest, it is 73.68%, other professional test coverage great majority are distributed in about 40%, the very big business of some logic step sums particularly, it as sequence number 1 business, its logic step adds up to 1077, but test coverage but has only 31.01%, and visible sequence number is that the test of 1 business is abundant not enough, test to it can not finish, and needs to replenish the test service use-case and tests again.
By the specified file of depositing service logic information is analyzed, can obtain the distribution situation of professional concrete each SIB of business that whether changes, traversed in the test process, the professional results such as service logic step that do not go to as yet; With of SIB, the not outputs such as SIB, service logic step sum, the service logic step sum do not gone to and logic step coverage rate of traversal of above-mentioned analysis result as having traveled through, according to output information, can know clearly which logic step do not go to, if any the SIB or the coverage rate of traversal do not reach the EOT requirement, then additional test case continuation execution test.Then according to the traversal SIB distribution situation to professional emphasis optimization.
Service logic Step Information mentioned above, identification information etc. also can be delivered in outputs such as line interface such as socket, fifo.