CN109871309B - Method and system for generating test case of charging system - Google Patents

Method and system for generating test case of charging system Download PDF

Info

Publication number
CN109871309B
CN109871309B CN201711260313.0A CN201711260313A CN109871309B CN 109871309 B CN109871309 B CN 109871309B CN 201711260313 A CN201711260313 A CN 201711260313A CN 109871309 B CN109871309 B CN 109871309B
Authority
CN
China
Prior art keywords
charging
ticket
test
case
flow
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
CN201711260313.0A
Other languages
Chinese (zh)
Other versions
CN109871309A (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Henan Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Henan 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 China Mobile Communications Group Co Ltd, China Mobile Group Henan Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201711260313.0A priority Critical patent/CN109871309B/en
Publication of CN109871309A publication Critical patent/CN109871309A/en
Application granted granted Critical
Publication of CN109871309B publication Critical patent/CN109871309B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method and a system for generating a test case of a charging system, which comprises the following steps: s1, generating a test flow of the test case according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow; s2, matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket; and S3, generating a test case by taking the first charging data as the input of the test flow and the second charging data as the output of the test flow. The method has the advantages that the test cases are produced on the basis of the test flow, the efficiency of the existing manual configuration of the automatic cases is improved to a great extent, the existing detailed lists are directly extracted according to the scenes corresponding to the cases, the decoded call tickets are reversely generated and provided for an automatic test tool to use, and the call tickets have strong pertinence and applicability.

Description

Method and system for generating test case of charging system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a system for generating a test case of a billing system.
Background
With the development of telecommunication technology, telecommunication operators provide telecommunication services with various functions for users. Therefore, accurate charging for various telecommunication services is not only an important guarantee for enterprise operation, but also an important means for improving user satisfaction. The telecommunication charging system in the prior art has complex data configuration, and if the test needs to cover all charging scenes, the number of involved cases can reach tens of thousands or even hundreds of thousands. Therefore, in the prior art, a test method for performing extraction verification mainly based on a typical scenario is generally adopted. Because of intense competition among the three operators, each operator continuously pushes out new services to attract new customers and retain old customers in order to meet the market competition requirements, a BOSS (Business & Operation Support System) System is also driven to be continuously upgraded to Support the requirements of Business departments on new services. The BOSS refers to a service operation support system. The so-called BOSS is divided into four parts: a charging and settlement system, a business and accounting system, a customer service system and a decision support system. The BOSS is a framework from the service level to carry a service system, a CRM system, and a charging system. Longitudinal and transverse management in a unified framework is realized. Frequent upgrade operations can cause an increase in the instability factor of the billing system, while the BOSS system is a system with extremely high requirements for accuracy and stability, which puts extremely high requirements on the release quality of each software.
From the perspective of software engineering, software release is subjected to processes of demand analysis, design, development, test and release, and software test is a key link for ensuring the quality of software release to the maximum extent.
Quality assurance required to be issued by a plurality of provincial charging systems still stays in mechanical manual testing, and automatic testing tools are selected by a plurality of provinces to ensure the issuing quality through an automatic verification mode.
So-called manual testing even by a designated tester, on the basis of his understanding of the requirements, carries out the associated testing work. On the basis of testing the newly added functions, the tester also needs to ensure the upgrade change, and has no influence on the running program of the current network. Moreover, the test is not completed smoothly in one step, and the code can be modified repeatedly and finally realized, so that a tester needs to repeatedly perform the same test content to verify whether the modified code meets the functional requirements or not, and the modified code can not be normally issued until the test is passed.
The automatic testing tool is greatly improved on the basis of manual testing, a tester does not need to repeat a mechanical testing task, only needs to update the updated content and run the edited automatic case, the whole testing project can be completed through the automatic testing tool, and as for whether the test result is a test result required by the function, only needs to analyze a test report after the automatic testing is completed, so that even if the test is repeated, the program is mechanically executed. And the standardized automatic cases and the standardized case steps can reduce errors in manual execution. However, for a charging system that operates stably, a large number of complete automated scenario cases are required to ensure the integrity and comprehensiveness of the automated regression test. The current case needs for automated testing are typically done through manual configuration. However, the telecommunication billing system has many service scenes and very complicated price packages, so that an automatic tester needs to configure a large number of automatic cases, and the workload of case configuration of the automatic test becomes very huge. To create an automated regression case base for a billing system requires a significant investment of human resources. Moreover, due to the continuous updating and upgrading of the charging system, some test cases can fail along with the upgrading of the system, and the case upgrading or the reconfiguration work needs to be done manually.
Disclosure of Invention
The invention provides a method and a system for generating a charging system test case, which overcome the problems or at least partially solve the problems, and solve the problems that the test case needs manual configuration and the charging system is continuously upgraded to cause the failure of the test case in the prior art.
According to an aspect of the present invention, a method for generating a test case of a billing system is provided, which includes:
s1, generating a test flow of the test case according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
s2, matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
and S3, generating a test case by taking the first charging data as the input of the test flow and the second charging data as the output of the test flow.
Preferably, in step S1, the test process includes a start-stop service process, a cleaning test directory, a ticket input, and a ticket file comparison.
Preferably, step S1 is preceded by:
constructing a case template base, and configuring a case template for each service, wherein the case template comprises all execution steps of a charging process of the corresponding service;
and the same case template is configured for the services with the same charging process.
Preferably, the step S1 specifically includes:
matching a corresponding case template from a case template library according to the process name of the charging process of the service, and replacing the test case parameters required to be used in each execution step in the case template with variables;
the test case parameters comprise a process ID, input and output of the process, a backup catalog, a case collection temporary catalog, a standardized single catalog and a regular expression of a collection file.
Preferably, the step S2 specifically includes:
selecting a scene ID of a ticket to be extracted according to a charging scene corresponding to the test flow, and extracting the ticket from a detailed ticket library of a charging system;
extracting effective field information in the call bill, reversely deducing the value of the decoded field according to the call bill generation logic, and backfilling the value into a template of the decoded call bill to generate the offline decoded call bill.
Preferably, in step S2, the extracting the ticket from the detail library of the charging system specifically includes:
and composing the scene ID, the original ticket gateway mark and a product used for calculating the cost in the detail ticket library into a ticket extraction key value, performing ticket extraction, and extracting only one ticket with the same extraction key value.
A charging system test case generation system comprises:
the case generation module is used for generating a test flow from the case template base according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
the ticket extraction module is used for matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
and the case generation module is used for generating the test case by taking the first charging data as the input of the test flow and taking the second charging data as the output of the test flow.
A billing system test case generating apparatus, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the billing system test case generation method described above.
A computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the billing system test case generation method as described above.
A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the billing system test case generation method as described above.
The invention provides a method and a system for generating a test case of a charging system, wherein the test case is produced on the basis of a test flow, the relevant configuration of the test flow is obtained and analyzed, an entity case corresponding to the flow is generated according to the steps configured in an automatic case template, the calculation and replacement of entity parameters corresponding to various variables are automatically completed, and finally, an automatic test case which can be directly used is generated; the efficiency of original manual configuration of the automatic case is improved to a great extent, the configuration information of the relevant flow is automatically extracted, and the risk of disorder parameter configuration during manual configuration of the case is reduced; according to the scene corresponding to the case, the existing detailed list is directly extracted, the decoded ticket is reversely generated and provided for an automatic testing tool, and the ticket has strong pertinence and applicability.
Drawings
Fig. 1 is a schematic flow chart of a method for generating a test case of a billing system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an embodiment of a test case generation method according to the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
As shown in fig. 1, a method for generating a test case of a billing system is shown, which includes:
s1, generating a test flow of the test case according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
s2, matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
and S3, generating a test case by taking the first charging data as the input of the test flow and the second charging data as the output of the test flow.
The charging process refers to a process flow for processing a user call event and calculating generated charges in the BOSS system charged by an operator.
And the pricing is to calculate the amount of money consumed by the user this time according to the time/amount of the service used by the user, the identity of the user, the preferential strategy and other conditions. For example, a small page makes a call for 5 minutes. He is a user with a dynamic zone, 0.1 yuan per minute, and is currently not favorable. The so-called "rating" step is to calculate 5 × 0.1 to 0.5 yuan. This is the simplest rating.
In this embodiment, step S1 is preceded by:
constructing a case template base, and configuring a case template for each service, wherein the case template comprises all execution steps of a charging process of the corresponding service;
and the same case template is configured for the services with the same charging process.
In this embodiment, the case template has configured therein automatic specification steps and parameters, which can represent a representative case of a specified characteristic case standardization step. The step of the case template configuration corresponding to the test case can be copied, the automatic case is regenerated, and the corresponding test parameters are replaced, so that the generation of the automatic case can be completed.
The case template can be manually configured and can also be imported into the test database in the form of basic data. The method comprises the following steps that a service is used as a unit for distinguishing, one case template is configured for one service, different charging processes (comprising the same testing module) of the same service use corresponding service templates; if the charging modules contained in the charging process are different with the same service, a plurality of corresponding case templates need to be configured; of course, if different services and the charging process include the same module, multiple services may share one case template.
The method comprises the steps of configuring a case template of a test case, matching the corresponding business of the test flow through the name of the specified business test flow in all steps of the automated test case configured in the case template, finding the corresponding case template to generate the test case corresponding to the flow, and automatically replacing test parameters for operation, thereby realizing the automatic generation of the case, reducing configuration errors, simplifying the case and improving the operation efficiency.
Specifically, in this embodiment, the generating a test flow specifically includes:
A. and case variable configuration, namely, configuring and storing parameters required by a later-stage configuration test case in a variable form, and only configuring variable names, wherein variable values are null. All variables can be imported into the project testing database in the form of basic data at the beginning of project implementation.
B. And configuring an automatic case template, wherein different templates are adopted by different services, and if the different services have the same test case execution steps, the same template can be used. All steps of template configuration test case include start-stop service process, clearing test catalog, ticket input and final ticket file comparison. Each step in the template requires the use of test parameters, replaced with the variables configured in a. The template of the test case can be imported in the early stage by means of basic data.
C. And preparing a flow used for testing, ensuring the correctness of the testing flow, and normally deploying and using the flow.
D. And automatic test case generation, namely determining a case template corresponding to the business according to the specified business process name, and generating a specific test case corresponding to the process. The parameters of the test cases replaced by the variables in the test cases are replaced one by one in a mode of retrieving process configuration and reassembling and assembling. The method comprises the steps of process ID, process input and output, backup of related directories, case collection temporary directories, standard call ticket directories, regular expressions of collected files and other parameters used by a series of test cases, wherein the parameters are automatically replaced to generate a complete test process of the test case which can be directly used.
And designing a configuration case template according to the scheme of the flow. The specific steps of the template are set according to usual test habits, the flow is stopped firstly, then the input and output directories are cleaned, the interference of non-specified test files on the test result is eliminated, the account book data is cleaned next, the influence of data such as free resources and the like existing in a test user on the test result is eliminated, then the specified test ticket file is copied to the input directory of the flow, the test flow is started, the file output is waited, finally the output file is collected to be compared with the standard ticket file, and a comparison report is output. Because the template is configured, all the related parameters including directory information, process ID, ticket file and the like are uniformly replaced by variables.
The method comprises the steps of analyzing flow configuration through a case automatic generation tool, acquiring flow ID, input and output catalogues of the flow, relevant configuration information such as services corresponding to the flow and the like, locking a case template used by the flow, generating a corresponding flow case through a selected template, and matching and replacing variables used in the case one by one.
In this embodiment, the step S2 specifically includes:
selecting a scene ID of a ticket to be extracted according to a charging scene corresponding to the test flow, and extracting the ticket from a detailed ticket library of a charging system;
extracting effective field information (including the code of the place where the call occurs, the number information of both parties of the call, the service code of the service, etc.) in the call ticket, reversely deducing the value of the decoded field according to the call ticket generating logic, and backfilling the value into a decoded call ticket template to generate an offline decoded call ticket.
The naming rule of the template is matched with the charging process and stored in a variable option mode, and the automatic script can automatically match the corresponding case template according to the name of the charging process.
For example: 1) template name of ordinary voice service: rating _ gsm; 2) the template name of the voice service of the duplication checking module is contained: rating _ gsm _ dupcheck.
The ticket extraction is in the form of sql, and the result meeting the conditions in the detailed billing database is stored in a catalog configured by the automatic host computer in the form of a file for the subsequent ticket construction.
In the script of intelligent ticket construction, the configured sql is returned, the configured ticket field in the sql is extracted and stored locally, and then the ticket before charging is constructed through the stored file.
Specifically, according to a test scene which can be correspondingly verified by the generated test flow, a scene ID of a ticket to be extracted is selected, a detailed ticket data source is specified, and the ticket is extracted according to a certain condition. The method comprises the steps of extracting a call ticket, not considering a user number in a detailed ticket, forming a call ticket extraction key value by an extraction tool through three elements of a scene ID, an original call ticket gateway identifier and a product used for calculating cost in the detailed ticket, extracting only one call ticket with the same key value, simplifying fields in a detailed ticket table, extracting only necessary fields forming a decoding call ticket, storing the fields in a file form, recording the user number of a call ticket file, and recording the opposite-end number if the extracted call ticket has related identifiers such as group conversation.
Further, reading the stored detailed bill file, reversely deducing the decoded field value according to the logic of charging processing from the field effective information in the bill, and backfilling the field effective information into the decoded bill template, thereby piecing together a brand new offline decoded bill, wherein the newly generated bill file name is identified by the scene ID corresponding to the bill service name, and the subsequent identification and use are convenient.
And extracting relevant user data in an MDB (Message Driven Bean) in the generation environment according to the recorded user number (including an opposite terminal number), and using the user automatic regression test.
Specifically, firstly, a service corresponding to a case is locked according to the generated case, a total amount of scenes configured at present of the service is displayed, scenes needing to be processed by the case are selected, a detailed list database and a corresponding detailed list of a charging system are specified, call ticket fields needing to be extracted are sorted and stored in an automatic testing system according to key values formed by call ticket gateway identifications, call ticket scene IDs and charge calculation products, call tickets are filtered, repeated call tickets with the same key values are not extracted, and the call ticket fields needing to be extracted are sorted and stored. Finally, the extracted call ticket field information is stored in a file form.
Designing a data structure for storing the general information of the extracted call ticket, wherein the data structure is designed as follows:
Figure BDA0001493493500000091
and traversing the stored ticket data file, and analyzing and processing the ticket information in the ticket file one by taking the ticket as a unit. For some simple call ticket fields, similar to information such as user numbers, gateway identifiers and the like, directly backfilling the call ticket to the template; for some complex fields and in the service processing process, because of the automatic change of the special logic modification of the service, the reverse logic derivation of the service processing is carried out, and the derivation result is backfilled to the corresponding fields in the template ticket, such as the original cost field, the original flow field and the like. And after all fields of one call ticket are refilled, storing the newly generated call ticket into a new file, naming the new call ticket file by using a service number and a scene ID (identity), and if the new call ticket file is a special scene, matching a special mark such as roaming and the like. And the call tickets of the same scene are stored in the same file.
Because the bills in the bill file of the charging system all have a bill header composition of a set rule, the bill header contains the block size and the bill size of each bill in the file and the session information when generating the bill, in order to ensure the availability of the bill, the bill file needs to be reconstructed according to the rule and the method for generating the bill by the charging system, and the correct bill header is calculated and assembled. And at this moment, the steps of the automatic production of the call ticket are completely finished.
In this embodiment, the detailed list of the charging system is used as a data source, through an internal filtering algorithm, the ticket data of a specified scene is extracted, then the fields of the corresponding positions of the template tickets are replaced one by the obtained ticket data, finally, the reasonable ticket header in the ticket file is calculated according to the rule of ticket generation, and the valid tickets are spliced according to the format of the decoded tickets.
The ticket file comprises first charging data before rating and second charging data after rating;
and taking the first charging data as the input of the test flow and the second charging data as the output of the test flow to generate the test case.
As shown in fig. 2, firstly, a charging flow of the voice service is selected, an automatic regression step is automatically generated according to the charging flow, and a test flow is generated; selecting a domestic long-distance common call scene for local dialing, wherein the call scene refers to a charging event generated by a user and comprises roaming, long distance, internet surfing, short number, short message and the like; extracting effective fields in an effective ticket of a specified scene according to a database table stored in a specified voice call ticket, namely removing repeated tickets of the same scene and then remaining used tickets, and extracting fields defining call events, wherein the fields comprise codes of places where calls occur, number information of both parties of the calls, service codes of used services and the like; locking user information in the extracted call ticket, wherein the user information comprises a mobile phone number or a fixed phone number of a user; generating a call ticket file which can be used by the case, and automatically generating a voice test case according to the call ticket file and the test flow.
An automatic test work order can be created according to the test case, the test work order is operated, a test work order report is generated, and the test of the charging system is carried out.
Because the data source with the automatic call ticket structure is obtained from the charging system, in order to ensure the consistency of the automatic test output call ticket and the charging system call ticket, the related test data such as user data used by the automatic test, test product data and the like are kept consistent with the charging system as much as possible, and thus, the validity of the test output result can be ensured.
The embodiment further provides a system for generating a test case of a billing system, including:
the case generation module is used for generating a test flow from the case template base according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
the ticket extraction module is used for matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
and the case generation module is used for generating the test case by taking the first charging data as the input of the test flow and taking the second charging data as the output of the test flow.
The embodiment further provides a device for generating a test case of a charging system, including: a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus;
wherein,
the processor, the memory and the communication interface complete mutual communication through the bus;
the communication interface is used for information transmission between the test equipment and the communication equipment of the display device;
the processor is configured to call the program instructions in the memory to execute the method for generating the billing system test case provided by the above embodiments of the method, including:
s1, generating a test flow of the test case according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
s2, matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
and S3, generating a test case by taking the first charging data as the input of the test flow and the second charging data as the output of the test flow.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to execute the billing system test case generation method provided by the above-mentioned method embodiments, for example, including:
s1, generating a test flow of the test case according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
s2, matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
and S3, generating a test case by taking the first charging data as the input of the test flow and the second charging data as the output of the test flow.
The present embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions, where the computer instructions cause the computer to execute the method for generating a test case of a billing system provided in the foregoing method embodiments, for example, the method includes:
s1, generating a test flow of the test case according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
s2, matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
and S3, generating a test case by taking the first charging data as the input of the test flow and the second charging data as the output of the test flow.
The invention provides a method and a system for generating a test case of a charging system, wherein the test case is produced on the basis of a test flow, the relevant configuration of the test flow is obtained and analyzed, an entity case corresponding to the flow is generated according to the steps configured in an automatic case template, the calculation and replacement of entity parameters corresponding to various variables are automatically completed, and finally, an automatic test case which can be directly used is generated; the efficiency of original manual configuration of the automatic case is improved to a great extent, the configuration information of the relevant flow is automatically extracted, and the risk of disorder parameter configuration during manual configuration of the case is reduced; according to the scene corresponding to the case, the existing detailed list is directly extracted, the decoded ticket is reversely generated and provided for an automatic testing tool, and the ticket has strong pertinence and applicability. Compared with the original method for manually configuring cases, the method has the advantages that the case configuration time is shortened, the success rate of case configuration in one step is improved, the coverage range of the configuration cases is more comprehensive, the working efficiency of an automatic test tool is integrally improved, and the maintenance cost of the BOSS side of the module is saved.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the test equipment and the like of the display device are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, the method of the present invention is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A method for generating a test case of a charging system is characterized by comprising the following steps:
s1, generating a test flow of the test case according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
wherein, before the step S1, the method further includes:
constructing a case template base, and configuring a case template for each service, wherein the case template comprises all execution steps of a charging process of the corresponding service;
configuring the same case template for the services with the same charging process;
wherein, the step S1 specifically includes:
matching a corresponding case template from a case template library according to the process name of the charging process of the service, and replacing the test case parameters required to be used in each execution step in the case template with variables;
the test case parameters comprise a process ID, input and output of the process, a backup catalog, a case collection temporary catalog, a standardized single catalog and a regular expression of a collection file;
s2, matching a corresponding charging scene according to the charging process, extracting a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
wherein, the step S2 specifically includes:
selecting a scene ID of a ticket to be extracted according to a charging scene corresponding to the test flow, and extracting the ticket from a detailed ticket library of a charging system;
wherein, extracting the ticket from the detailed list library of the charging system comprises: forming a call ticket extraction key value by the three elements of the scene ID, the original call ticket gateway mark and a product for calculating the cost in the detailed ticket library, performing call ticket extraction, and extracting only one call ticket with the same extraction key value;
extracting field effective information in the call bill, reversely deducing a decoded field value according to call bill generation logic, and backfilling the field value into a decoded call bill template to generate an offline decoded call bill;
and S3, generating a test case by taking the first charging data as the input of the test flow and the second charging data as the output of the test flow.
2. The method for generating the test case of the billing system of claim 1, wherein in the step S1, the test procedure comprises a start-stop service procedure, a cleaning test directory, a ticket input, and a ticket file comparison.
3. A charging system test case generation system is characterized by comprising:
the case template base construction module is used for constructing a case template base and configuring a case template for each service, and the case template comprises all execution steps of the charging process of the corresponding service;
configuring the same case template for the services with the same charging process;
the case generation module is used for generating a test flow from the case template base according to the charging flow of the service, wherein the test flow comprises all execution steps of the charging flow;
wherein the case generation module is specifically configured to:
matching a corresponding case template from a case template library according to the process name of the charging process of the service, and replacing the test case parameters required to be used in each execution step in the case template with variables;
the test case parameters comprise a process ID, input and output of the process, a backup catalog, a case collection temporary catalog, a standardized single catalog and a regular expression of a collection file;
the ticket extraction module is used for matching a corresponding charging scene according to the charging process, fishing a ticket from a detailed ticket library of a charging system according to the charging scene, and obtaining first charging data before rating and second charging data after rating according to the ticket;
the call ticket extraction module is specifically used for:
selecting a scene ID of a ticket to be extracted according to a charging scene corresponding to the test flow, and extracting the ticket from a detailed ticket library of a charging system;
wherein, extracting the ticket from the detailed list library of the charging system comprises: forming a call ticket extraction key value by the three elements of the scene ID, the original call ticket gateway mark and a product for calculating the cost in the detailed ticket library, performing call ticket extraction, and extracting only one call ticket with the same extraction key value;
extracting field effective information in the call bill, reversely deducing a decoded field value according to call bill generation logic, and backfilling the field value into a decoded call bill template to generate an offline decoded call bill;
and the case generation module is used for generating the test case by taking the first charging data as the input of the test flow and taking the second charging data as the output of the test flow.
4. A test case generation device for a billing system, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 or 2.
5. A computer program product, characterized in that the computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method according to any of claims 1 or 2.
6. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 or 2.
CN201711260313.0A 2017-12-04 2017-12-04 Method and system for generating test case of charging system Active CN109871309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711260313.0A CN109871309B (en) 2017-12-04 2017-12-04 Method and system for generating test case of charging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711260313.0A CN109871309B (en) 2017-12-04 2017-12-04 Method and system for generating test case of charging system

Publications (2)

Publication Number Publication Date
CN109871309A CN109871309A (en) 2019-06-11
CN109871309B true CN109871309B (en) 2020-12-04

Family

ID=66915481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711260313.0A Active CN109871309B (en) 2017-12-04 2017-12-04 Method and system for generating test case of charging system

Country Status (1)

Country Link
CN (1) CN109871309B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783758B (en) * 2019-11-11 2024-02-27 阿里云计算有限公司 Test case library and feature library generation method, device and storage medium
CN112995934A (en) * 2019-12-16 2021-06-18 ***通信集团湖南有限公司 Call bill generating method and device and call bill charging result verifying method and device
CN113011869A (en) * 2019-12-19 2021-06-22 中国电信股份有限公司 Test data generation method and device and computer readable storage medium
CN111240983A (en) * 2020-01-14 2020-06-05 北京思特奇信息技术股份有限公司 Method and device for realizing automatic test of telecommunication charging service
CN113452533B (en) * 2020-03-24 2022-08-02 ***通信集团山东有限公司 Charging self-inspection and self-healing method and device, computer equipment and storage medium
CN111489178A (en) * 2020-04-16 2020-08-04 北京思特奇信息技术股份有限公司 Method and system for marketing support through event detection
CN112637793B (en) * 2020-11-30 2022-06-03 北京思特奇信息技术股份有限公司 Scene charging method, system, electronic equipment and storage medium based on 5G
CN112799951B (en) * 2021-02-04 2023-03-31 上海云轴信息科技有限公司 Method and equipment for generating automatic test case for charging system
CN115150764B (en) * 2022-06-29 2024-02-23 中国联合网络通信集团有限公司 Tariff configuration method, tariff configuration device, tariff configuration equipment and tariff configuration medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8019049B2 (en) * 2007-03-27 2011-09-13 Avaya Inc. Method for generating reliability tests based on orthogonal arrays and field data
CN104468259A (en) * 2014-11-11 2015-03-25 上海新炬网络信息技术有限公司 Method for automatically testing communication service expense
CN104572449A (en) * 2014-12-23 2015-04-29 ***通信集团广东有限公司 Automatic test method based on case library
CN105245396A (en) * 2014-07-11 2016-01-13 华为软件技术有限公司 Fee verification method and fee verification system
CN107357735A (en) * 2017-07-20 2017-11-17 万帮充电设备有限公司 Discount method of testing and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100583920C (en) * 2007-01-26 2010-01-20 华为技术有限公司 Method and apparatus for generating testing script, testing method, apparatus and system
US8270952B2 (en) * 2009-01-28 2012-09-18 Headwater Partners I Llc Open development system for access service providers
CN101730043A (en) * 2008-10-29 2010-06-09 ***通信集团吉林有限公司 Pricing test method and system
CN101827346B (en) * 2009-03-04 2013-07-17 ***通信集团上海有限公司 Automatic test method and device for charge system
US8826239B2 (en) * 2010-10-06 2014-09-02 International Business Machines Corporation Asynchronous code testing in integrated development environment (IDE)
CN103198009B (en) * 2012-01-04 2016-09-07 ***通信集团公司 A kind of universal testing method, system and related device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8019049B2 (en) * 2007-03-27 2011-09-13 Avaya Inc. Method for generating reliability tests based on orthogonal arrays and field data
CN105245396A (en) * 2014-07-11 2016-01-13 华为软件技术有限公司 Fee verification method and fee verification system
CN104468259A (en) * 2014-11-11 2015-03-25 上海新炬网络信息技术有限公司 Method for automatically testing communication service expense
CN104572449A (en) * 2014-12-23 2015-04-29 ***通信集团广东有限公司 Automatic test method based on case library
CN107357735A (en) * 2017-07-20 2017-11-17 万帮充电设备有限公司 Discount method of testing and device

Also Published As

Publication number Publication date
CN109871309A (en) 2019-06-11

Similar Documents

Publication Publication Date Title
CN109871309B (en) Method and system for generating test case of charging system
CN106326219B (en) Method, device and system for checking business system data
CN102236672B (en) A kind of data lead-in method and device
CN104468259B (en) A kind of communication traffic rate automated testing method
CN106845781B (en) Scene and flow generation system and method for business test
CN108509392B (en) Multi-mechanism account checking method, system, computer equipment and storage medium
CN101998472A (en) Complaint pre-treatment method as well as complaint treatment method, device and system
CN108632047B (en) Method and device for determining tariff data
CN111240983A (en) Method and device for realizing automatic test of telecommunication charging service
CN111340639A (en) Settlement data processing method and device
CN111124917A (en) Public test case management and control method, device, equipment and storage medium
CN104994220B (en) A kind of data processing method and system
US9398441B2 (en) Method and apparatus for identifying re-subscribed user
CN102970159B (en) Data auditing and repair process method and apparatus
CN109919762A (en) Reporting method, device, equipment and the storage medium of customer information
CN112256978B (en) Data processing method, device and medium based on data model
CN115269616A (en) Method and system for realizing business rule configuration based on template
CN111831698B (en) Data auditing method, system and electronic equipment
CN113407456A (en) Verification method, device, equipment and storage medium of reconstruction system
CN113011869A (en) Test data generation method and device and computer readable storage medium
CN112364058B (en) Auditing method and device for commodity price configuration
CN110166636A (en) Device, method and the storage medium of pressure test
CN114071389B (en) Test verification method and device, computer equipment and storage medium
Jukić et al. The use of call detail records and data mart dimensioning for telecommunication companies
CN115392885A (en) Automatic maintenance method and system for line information, electronic equipment and storage medium

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