CN112799951B - Method and equipment for generating automatic test case for charging system - Google Patents
Method and equipment for generating automatic test case for charging system Download PDFInfo
- Publication number
- CN112799951B CN112799951B CN202110155847.7A CN202110155847A CN112799951B CN 112799951 B CN112799951 B CN 112799951B CN 202110155847 A CN202110155847 A CN 202110155847A CN 112799951 B CN112799951 B CN 112799951B
- Authority
- CN
- China
- Prior art keywords
- resource configuration
- resource
- processing rule
- change information
- configuration item
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 108
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000012545 processing Methods 0.000 claims abstract description 90
- 230000008859 change Effects 0.000 claims abstract description 63
- 238000013468 resource allocation Methods 0.000 claims abstract description 36
- 230000015654 memory Effects 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 14
- 230000008569 process Effects 0.000 abstract description 2
- 238000004364 calculation method Methods 0.000 description 12
- 230000005291 magnetic effect Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
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)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application aims to provide a scheme for generating an automatic test case for a charging system. When a resource allocation item and a resource allocation processing rule in a charging system are changed, the scheme acquires the change information of the resource allocation item, the change information of the resource allocation processing rule and a corresponding resource payment mode; then, acquiring a target resource configuration item and a corresponding target resource configuration processing rule thereof through the change information of the resource configuration item and the change information of the resource configuration processing rule; and then generating a corresponding automatic test case according to the target resource configuration item, the target resource configuration processing rule and the resource payment mode. Compared with the prior art, the process of generating the automatic test case does not need manual participation, so that the labor cost of compiling and maintaining the automatic test case of the billing system is saved, and grammatical errors caused by manually compiling the test case are avoided.
Description
Technical Field
The present application relates to the field of information technology, and in particular, to a technology for generating an automatic test case for a billing system.
Background
Although the existing billing system can already realize automatic testing, when the resource configuration items and the resource configuration processing rules are changed, manual intervention is still needed for compiling and maintaining the test cases, so that not only is the labor cost increased, but also syntax errors of the automatic test cases can occur due to manual intervention. Although some existing artificial intelligence test tools can automatically generate test cases, the maintenance cost is high when the tools have problems.
Disclosure of Invention
An object of the present application is to provide a method and an apparatus for generating an automatic test case for a billing system.
According to one aspect of the application, a method for generating an automatic test case for a charging system is provided, wherein the method comprises the following steps:
when a resource configuration item and a resource configuration processing rule in a charging system are changed, obtaining change information of the resource configuration item, change information of the resource configuration processing rule and a corresponding resource payment mode;
acquiring a target resource configuration item and a target resource configuration processing rule corresponding to the target resource configuration item according to the change information of the resource configuration item and the change information of the resource configuration processing rule;
and generating a corresponding automatic test case according to the target resource configuration item, the target resource configuration processing rule and the resource payment mode.
According to another aspect of the present application, there is also provided an apparatus for generating an automatic test case for a billing system, where the apparatus includes:
the change sensing module is used for acquiring change information of the resource configuration item, change information of the resource configuration processing rule and a corresponding resource payment mode when the resource configuration item and the resource configuration processing rule in the charging system are changed;
the data acquisition module is used for acquiring a target resource configuration item and a corresponding target resource configuration processing rule thereof according to the change information of the resource configuration item and the change information of the resource configuration processing rule;
and the generating module is used for generating a corresponding automatic test case according to the target resource configuration item, the target resource configuration processing rule and the resource payment mode.
According to yet another aspect of the present application, there is also provided a computing device, wherein the device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the device to perform the method for generating automatic test cases for a billing system.
According to yet another aspect of the present application, there is also provided a computer readable medium having stored thereon computer program instructions executable by a processor to implement the method for generating automatic test cases for a billing system.
In the scheme provided by the application, when a resource configuration item and a resource configuration processing rule in a charging system are changed, the change information of the resource configuration item, the change information of the resource configuration processing rule and a corresponding resource payment mode are obtained; then, acquiring a target resource configuration item and a corresponding target resource configuration processing rule thereof through the change information of the resource configuration item and the change information of the resource configuration processing rule; and then generating a corresponding automatic test case according to the target resource configuration item, the target resource configuration processing rule and the resource payment mode. Compared with the prior art, the process of generating the automatic test case does not need manual participation, so that the labor cost of compiling and maintaining the automatic test case of the billing system is saved, and grammatical errors caused by manually compiling the test case are avoided.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a method for generating an automatic test case for a billing system according to an embodiment of the present application;
fig. 2 is a schematic diagram of an apparatus for generating an automatic test case for a billing system according to an embodiment of the present application.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present application is described in further detail below with reference to the attached drawing figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, which include both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, programmed devices, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The embodiment of the application provides a method for generating an automatic test case for a charging system, wherein when a resource configuration item and a resource configuration processing rule are changed, change information is obtained, and the automatic test case for the charging system is automatically generated, so that the labor cost for compiling and maintaining the test case is saved, grammatical errors possibly caused by manual intervention are avoided, and the stability of the automatic test case is improved.
In a practical scenario, the device performing the method may be a user equipment, a network device, or a device formed by integrating the user equipment and the network device through a network. The user equipment includes, but is not limited to, a terminal device such as a smartphone, a tablet computer, a Personal Computer (PC), and the like, and the network device includes, but is not limited to, a network host, a single network server, multiple network server sets, or a cloud computing-based computer set. Here, the Cloud is composed of a large number of hosts or network servers based on Cloud Computing (Cloud Computing), which is a type of distributed Computing, one virtual computer consisting of a collection of loosely coupled computers.
Fig. 1 is a flowchart of a method for generating an automatic test case for a billing system according to an embodiment of the present application, where the method includes step S101, step S102, and step S103.
Step S101, when the resource allocation item and the resource allocation processing rule in the charging system are changed, the change information of the resource allocation item, the change information of the resource allocation processing rule and the corresponding resource payment mode are obtained.
The resource configuration item generally consists of a resource type name and a configuration tag thereof, for example, the resource type name includes a cloud host (VMInstance), a cloud disk (Volume), and the like, and the cloud disk is provided with tags such as a high-speed cloud disk and a cloud disk dedicated to a certain storage pool.
In some embodiments, the resource configuration processing rules include charging rules for the resource configuration items. The resource allocation processing rule is one of the attributes of the resource allocation item, and records information such as a charging unit, time, a payment mode and the like supported by the corresponding resource allocation item. For example, the resource configuration processing rule of the resource configuration item "cloud host" may be: 3 yuan/day, real-time charging.
In some embodiments, the step S101 includes: calling a resource configuration item query interface, and obtaining change information of the resource configuration item, change information of the resource configuration processing rule and a corresponding resource payment mode by comparing a configuration template with a result returned by the query interface; the configuration template is used for recording all resource configuration items of historical versions and corresponding resource payment modes.
For example, the configuration template file is stored in the test system, and each time an automatic test case or an updated version is generated, the resource configuration item query interface is called, and the change of the resource configuration item and the resource configuration processing rule is sensed by comparing a result returned by calling with corresponding information recorded in the configuration template.
In some embodiments, the change information of the resource configuration item includes added and/or deleted resource configuration item information; the change information of the resource allocation processing rule comprises the information of the added and/or deleted and/or modified resource allocation processing rule.
For example, the change information of the resource configuration item includes, but is not limited to, information of a resource configuration item (such as a resource type or a tag) added/deleted; for example, a resource configuration item "PCI device" is added to a certain version, and a "low-speed cloud disk" label of a cloud disk is deleted. The change information of the resource allocation processing rule includes, but is not limited to, information of a new/deleted/modified resource allocation processing rule (such as a supported charging mode/unit); for example, a prepayment mode of a cloud host is newly added in a certain version, a real-time charging mode of the PCI equipment is deleted, and a supported charging time unit of 'day/month/year' is modified into 'second/minute/hour'.
In some embodiments, the resource payment schema includes at least any one of: a prepaid mode; and (4) a real-time charging mode.
For example, in the old version, the cloud disk only supports the real-time charging mode, and in the new version, the cloud disk supports the prepaid mode.
In some embodiments, the expected test data calculation method may be selected according to the resource payment mode, and the calculation method may correspond to the payment mode in a one-to-one manner, including a prepaid calculation method and/or a real-time billing calculation method. The prepayment calculation method is based on the current state of the resource and directly multiplies the unit price of the charging time and the prepayment time limit to obtain expected test data; assuming that there are 100GB of cloud disks, using the prepaid model, with a price of 3 yuan/GB/month, prepaid for 1 year, its expected test data is 100 (cloud disk capacity divided by capacity unit) 3 (unit price per GB capacity) 12 (paid duration divided by time unit). The real-time charging calculation method comprises the steps of continuously calculating resource generation cost by taking a charging time unit as an interval according to the current state of the resource, and accumulating to obtain the total cost generated by the resource; assuming that the initial capacity of the cloud disk is 100GB, the price is 3 yuan/GB/sec, and the capacity of the cloud disk is expanded to 500GB after 3 seconds, the cost generated by the cloud disk within 10 seconds is (100 × 3) + (500 × 3 × 7).
In some embodiments, the method further comprises: and calculating expected test data according to the resource payment mode. For example, the test system may call a resource configuration item query interface, obtain a resource payment mode supported by the resource configuration item from a result returned by the query interface, and then calculate the cost of the supported resource payment mode in the generated automatic test sample, where if the prepaid mode and the real-time charging mode are simultaneously supported, the costs in both modes are calculated.
And step S102, acquiring a target resource configuration item and a corresponding target resource configuration processing rule thereof according to the change information of the resource configuration item and the change information of the resource configuration processing rule.
For example, by comparing the configuration template with the result returned by the resource configuration item query interface, the change information of the resource configuration item and the change information of the resource configuration processing rule may be obtained, and then the test system may screen out the difference item (i.e., the changed resource configuration item, the target resource configuration item) in the comparison information, and query the corresponding resource configuration processing rule (i.e., the target resource configuration processing rule) through the interface.
And step S103, generating a corresponding automatic test case according to the target resource configuration item, the target resource configuration processing rule and the resource payment mode.
For example, the target resource configuration item and the target resource configuration processing rule are used as basic data for generating an automatic test case, the basic data are transmitted to an interface for generating the automatic test case, the interface returns a text of the automatic test case, and the test system writes the text into a file and stores the file to a specified path of the automatic test case. And subsequently submitting the automatic test case to an automatic test system for execution.
In some embodiments, the contents of the automatic test case include: the target resource allocation item and the target resource allocation processing rule are used as basic data; creating a corresponding resource configuration example according to the target resource configuration item, and adding a charging rule for the resource configuration example according to the target resource configuration processing rule; the back-end system starts charging by processing the resource configuration example; obtaining a test result by comparing the expected test data with the bill data generated by the back-end system; and if the expected test data is consistent with the bill data, the test is passed, otherwise, the test is failed.
For example, the automatic test case may be a ". Py file," which may specifically include the following: (1) basic data: the resource allocation items and the resource allocation processing rules are stored in a dictionary format; such as { "resource configuration item": "cloud disk", "processing rules": { "time unit": [ "seconds", "minutes", "hours" ], "resource units": [ "MB", "GB", "TB" ], "pay mode": [ "real-time billing" ] } }. (2) Creating a corresponding resource configuration example according to the resource configuration items in the basic data, and adding a charging price to the resource configuration example according to the resource configuration processing rule; for example, a cloud disk is created, the adding price is 100 yuan/TB/second, and the resource payment mode is a real-time charging mode. (3) Resource configuration instance processing, aiming to generate cost for a back-end system and cover part of the instance change scene; for example, a cloud disk instance in the real-time charging mode is set up to 1TB, and is expanded to 2TB after 10 seconds. (4) The cost is checked, the expected test data and the bill data generated by the back end are compared to obtain a test result, if the two data are consistent, the test is passed, and if the two data are not consistent, the test is failed; for example, the cost of a cloud disk instance within 20 seconds is 3000 yuan, if the back-end generated billing data is 3000 yuan, the test is passed, and if the back-end generated billing data is not 3000 yuan, the test is failed.
Fig. 2 is a schematic diagram of an apparatus for generating an automatic test case for a billing system according to an embodiment of the present application, where the apparatus includes a modification sensing module 201, a data obtaining module 202, and a generating module 203.
The change sensing module 201, when the resource configuration item and the resource configuration processing rule in the charging system are changed, obtains the change information of the resource configuration item, the change information of the resource configuration processing rule, and the corresponding resource payment mode.
The resource configuration item generally consists of a resource type name and a configuration tag thereof, for example, the resource type name includes a cloud host (VMInstance), a cloud disk (Volume), and the like, and the cloud disk is provided with tags such as a high-speed cloud disk and a cloud disk dedicated to a certain storage pool.
In some embodiments, the resource configuration processing rules include charging rules for the resource configuration items. The resource allocation processing rule is one of the attributes of the resource allocation item, and records information such as a charging unit, time, a payment mode and the like supported by the corresponding resource allocation item. For example, the resource configuration processing rule of the resource configuration item "cloud host" may be: 3 yuan/day, real-time charging.
In some embodiments, the alteration awareness module 201 is configured to: calling a resource configuration item query interface, and obtaining change information of the resource configuration item, change information of the resource configuration processing rule and a corresponding resource payment mode by comparing a configuration template with a result returned by the query interface; the configuration template is used for recording all resource configuration items of historical versions and corresponding resource payment modes thereof.
For example, the configuration template file is stored in the test system, and each time an automatic test case or an updated version is generated, the resource configuration item query interface is called, and the change of the resource configuration item and the resource configuration processing rule is sensed by comparing a result returned by calling with corresponding information recorded in the configuration template.
In some embodiments, the change information of the resource configuration item includes added and/or deleted resource configuration item information; the change information of the resource allocation processing rule comprises the information of the added and/or deleted and/or modified resource allocation processing rule.
For example, the change information of the resource configuration item includes, but is not limited to, information of a resource configuration item (such as a resource type or a tag) added/deleted; for example, a resource configuration item "PCI device" is added to a certain version, and a "low-speed cloud disk" label of a cloud disk is deleted. The change information of the resource allocation processing rule includes, but is not limited to, information of a new/deleted/modified resource allocation processing rule (such as a supported charging mode/unit); for example, a prepayment mode of a cloud host is newly added in a certain version, a real-time charging mode of the PCI equipment is deleted, and a supported charging time unit of 'day/month/year' is modified into 'second/minute/hour'.
In some embodiments, the resource payment schema includes at least any one of: a prepaid mode; and (4) a real-time charging mode.
For example, in the old version, the cloud disk only supports the real-time charging mode, and in the new version, the cloud disk supports the prepaid mode.
In some embodiments, the expected test data calculation method may be selected according to the resource payment mode, and the calculation methods may correspond to the payment modes in a one-to-one manner, and include a prepaid calculation method and/or a real-time billing calculation method. The prepayment calculation method is based on the current state of the resource and directly multiplies the unit price of the charging time and the prepayment time limit to obtain expected test data; assuming that there are 100GB cloud disks, prepaid mode, price 3 yuan/GB/month, prepaid for 1 year, then its expected test data is 100 (cloud disk capacity divided by capacity unit) × 3 (unit price per GB capacity) × 12 (duration of payment divided by time unit). The real-time charging calculation method comprises the steps of continuously calculating resource generation cost by taking a charging time unit as an interval according to the current state of the resource, and accumulating to obtain the total cost generated by the resource; assuming that the initial capacity of the cloud disk is 100GB, the price is 3 yuan/GB/sec, and the capacity of the cloud disk is expanded to 500GB after 3 seconds, the cost generated by the cloud disk within 10 seconds is (100 × 3) + (500 × 3 × 7).
In some embodiments, the apparatus is further configured to: and calculating expected test data according to the resource payment mode. For example, the test system may call a resource configuration item query interface, obtain a resource payment mode supported by the resource configuration item from a result returned by the query interface, and then calculate the cost of the supported resource payment mode in the generated automatic test sample, where if both the prepaid mode and the real-time charging mode are supported, the costs in both modes are calculated.
The data obtaining module 202 obtains the target resource allocation item and the corresponding target resource allocation processing rule thereof according to the change information of the resource allocation item and the change information of the resource allocation processing rule.
For example, by comparing the configuration template with the result returned by the resource configuration item query interface, the change information of the resource configuration item and the change information of the resource configuration processing rule may be obtained, and then the test system may screen out the difference item (i.e., the changed resource configuration item, the target resource configuration item) in the comparison information, and query the corresponding resource configuration processing rule (i.e., the target resource configuration processing rule) through the interface.
And the generating module 203 generates a corresponding automatic test case according to the target resource configuration item, the target resource configuration processing rule and the resource payment mode.
For example, the target resource configuration item and the target resource configuration processing rule are used as basic data for generating an automatic test case, the basic data are transmitted to an interface for generating the automatic test case, the interface returns a text of the automatic test case, and the test system writes the text into a file and stores the file to a specified path of the automatic test case. And subsequently submitting the automatic test case to an automatic test system for execution.
In some embodiments, the contents of the automatic test case include: the target resource configuration item and the target resource configuration processing rule are used as basic data; creating a corresponding resource configuration example according to the target resource configuration item, and adding a charging rule for the resource configuration example according to the target resource configuration processing rule; the back-end system starts charging by processing the resource configuration example; obtaining a test result by comparing the expected test data with bill data generated by the back-end system; and if the expected test data is consistent with the bill data, the test is passed, otherwise, the test is failed.
For example, the automatic test case may be a ". Py file," which may specifically include the following: (1) basic data: the resource allocation items and the resource allocation processing rules are stored in a dictionary format; such as { "resource configuration item": "cloud disk", "processing rule": { "time unit": [ "seconds", "minutes", "hours" ], "resource units": [ "MB", "GB", "TB" ], "pay mode": [ "real-time billing" ] } }. (2) Creating a corresponding resource configuration example according to the resource configuration items in the basic data, and adding a charging price to the resource configuration example according to the resource configuration processing rule; for example, a cloud disk is created, the adding price is 100 yuan/TB/second, and the resource payment mode is a real-time charging mode. (3) Resource configuration instance processing, aiming to generate cost for a back-end system and cover part of the instance change scene; for example, a cloud disk instance in the real-time charging mode is set up to 1TB, and is expanded to 2TB after 10 seconds. (4) Checking the cost, namely obtaining a test result by comparing the expected test data with bill data generated by the back end, wherein if the two data are consistent, the test is passed, and if the two data are inconsistent, the test is failed; for example, the cost of a cloud disk instance within 20 seconds is 3000 yuan, if the back-end generated bill data is 3000 yuan, the test is passed, and if the back-end generated bill data is not 3000 yuan, the test is failed.
In summary, the embodiment of the application realizes automatic generation of the automatic test case for the billing system without manual participation, thereby saving the labor cost for compiling and maintaining the automatic test case of the billing system and avoiding grammatical errors caused by manual compiling of the test case. According to the embodiment of the application, the adding and maintenance cost of the automatic test case of the cloud platform charging system is reduced, and the stability of the automatic test case of the charging system is improved.
Additionally, some portions of the present application may be applied as a computer program product, such as computer program instructions, which, when executed by a computer, may invoke or provide the method and/or solution according to the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. Herein, some embodiments of the present application provide a computing device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the device to perform the methods and/or aspects of the embodiments of the present application as described above.
Furthermore, some embodiments of the present application also provide a computer readable medium, on which computer program instructions are stored, the computer readable instructions being executable by a processor to implement the methods and/or aspects of the foregoing embodiments of the present application.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In some embodiments, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Claims (9)
1. A method for generating an automatic test case for a charging system is provided, wherein the method comprises the following steps:
when a resource configuration item and a resource configuration processing rule in a charging system are changed, obtaining change information of the resource configuration item, change information of the resource configuration processing rule and a corresponding resource payment mode; the method specifically comprises the following steps: calling a resource configuration item query interface, and obtaining change information of the resource configuration item, change information of the resource configuration processing rule and a corresponding resource payment mode by comparing a configuration template with a result returned by the query interface; the configuration template is used for recording all resource configuration items of historical versions and corresponding resource payment modes thereof;
acquiring a target resource configuration item and a target resource configuration processing rule corresponding to the target resource configuration item according to the change information of the resource configuration item and the change information of the resource configuration processing rule;
and generating a corresponding automatic test case according to the target resource configuration item, the target resource configuration processing rule and the resource payment mode.
2. The method of claim 1, wherein the resource configuration processing rule comprises a charging rule for the resource configuration item.
3. The method according to claim 1, wherein the change information of the resource configuration item includes added and/or deleted resource configuration item information; the change information of the resource allocation processing rule comprises the information of the added and/or deleted and/or modified resource allocation processing rule.
4. The method of claim 1, wherein the method further comprises:
and calculating expected test data according to the resource payment mode.
5. The method of claim 4, wherein the contents of the automatic test case comprise:
the target resource allocation item and the target resource allocation processing rule are used as basic data;
creating a corresponding resource configuration example according to the target resource configuration item, and adding a charging rule for the resource configuration example according to the target resource configuration processing rule;
the back-end system starts charging by processing the resource configuration example;
obtaining a test result by comparing the expected test data with the bill data generated by the back-end system;
and if the expected test data is consistent with the bill data, the test is passed, otherwise, the test is failed.
6. The method of any of claims 1 to 5, wherein the resource payment pattern comprises at least any of:
a prepaid mode;
and (4) a real-time charging mode.
7. An apparatus for generating automatic test cases for a billing system, wherein the apparatus comprises:
the change sensing module is used for acquiring change information of the resource configuration item, change information of the resource configuration processing rule and a corresponding resource payment mode when the resource configuration item and the resource configuration processing rule in the charging system are changed; the method specifically comprises the following steps: calling a resource configuration item query interface, and obtaining change information of the resource configuration item, change information of the resource configuration processing rule and a corresponding resource payment mode by comparing a configuration template with a result returned by the query interface; the configuration template is used for recording all resource configuration items of historical versions and corresponding resource payment modes thereof;
the data acquisition module is used for acquiring a target resource configuration item and a target resource configuration processing rule corresponding to the target resource configuration item through the change information of the resource configuration item and the change information of the resource configuration processing rule;
and the generating module is used for generating a corresponding automatic test case according to the target resource configuration item, the target resource configuration processing rule and the resource payment mode.
8. A computing device, wherein the device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the device to perform the method of any of claims 1 to 6.
9. A computer readable medium having stored thereon computer program instructions executable by a processor to implement the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110155847.7A CN112799951B (en) | 2021-02-04 | 2021-02-04 | Method and equipment for generating automatic test case for charging system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110155847.7A CN112799951B (en) | 2021-02-04 | 2021-02-04 | Method and equipment for generating automatic test case for charging system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112799951A CN112799951A (en) | 2021-05-14 |
CN112799951B true CN112799951B (en) | 2023-03-31 |
Family
ID=75814186
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110155847.7A Active CN112799951B (en) | 2021-02-04 | 2021-02-04 | Method and equipment for generating automatic test case for charging system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112799951B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114071391B (en) * | 2022-01-14 | 2022-05-17 | 中兴通讯股份有限公司 | Content charging test method, management device, terminal device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5740353A (en) * | 1995-12-14 | 1998-04-14 | International Business Machines Corporation | Method and apparatus for creating a multiprocessor verification environment |
JP2011113357A (en) * | 2009-11-27 | 2011-06-09 | Canon Inc | Test case management device and method |
CN109871309A (en) * | 2017-12-04 | 2019-06-11 | 中国移动通信集团公司 | A kind of charge system test cases generation method and system |
CN110134582A (en) * | 2019-04-03 | 2019-08-16 | 口碑(上海)信息技术有限公司 | The processing of test case and data processing method and device |
CN110334011A (en) * | 2019-05-31 | 2019-10-15 | 浙江口碑网络技术有限公司 | A kind of method and device of implementation of test cases |
CN111767226A (en) * | 2020-06-30 | 2020-10-13 | 上海云轴信息科技有限公司 | Method, system and equipment for testing cloud computing platform resources |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7299382B2 (en) * | 2002-04-29 | 2007-11-20 | Sun Microsystems, Inc. | System and method for automatic test case generation |
US7873944B2 (en) * | 2006-02-22 | 2011-01-18 | International Business Machines Corporation | System and method for maintaining and testing a software application |
CN106228354A (en) * | 2016-07-18 | 2016-12-14 | 北京首都在线科技股份有限公司 | The charge system of rule-based engine in regulation engine and cloud computing platform |
CN106909510B (en) * | 2017-03-02 | 2020-11-24 | 腾讯科技(深圳)有限公司 | Method for obtaining test case and server |
KR102105753B1 (en) * | 2018-03-27 | 2020-04-29 | 한국과학기술원 | Method and system for automatic configuration test case generation of mobile application |
CN109597759A (en) * | 2018-11-09 | 2019-04-09 | 深圳壹账通智能科技有限公司 | Test method and device, storage medium, the computer equipment of business software |
CN110851159B (en) * | 2019-10-31 | 2023-01-10 | 浙江大搜车软件技术有限公司 | Business rule updating method and device, computer equipment and storage medium |
CN111651345A (en) * | 2020-04-13 | 2020-09-11 | 优刻得科技股份有限公司 | System testing method and device and electronic equipment |
-
2021
- 2021-02-04 CN CN202110155847.7A patent/CN112799951B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5740353A (en) * | 1995-12-14 | 1998-04-14 | International Business Machines Corporation | Method and apparatus for creating a multiprocessor verification environment |
JP2011113357A (en) * | 2009-11-27 | 2011-06-09 | Canon Inc | Test case management device and method |
CN109871309A (en) * | 2017-12-04 | 2019-06-11 | 中国移动通信集团公司 | A kind of charge system test cases generation method and system |
CN110134582A (en) * | 2019-04-03 | 2019-08-16 | 口碑(上海)信息技术有限公司 | The processing of test case and data processing method and device |
CN110334011A (en) * | 2019-05-31 | 2019-10-15 | 浙江口碑网络技术有限公司 | A kind of method and device of implementation of test cases |
CN111767226A (en) * | 2020-06-30 | 2020-10-13 | 上海云轴信息科技有限公司 | Method, system and equipment for testing cloud computing platform resources |
Non-Patent Citations (2)
Title |
---|
Ki-Woong Park.THEMIS: A Mutually Verifiable Billing System for the Cloud Computing Environment.《IEEE Transactions on Services Computing》.2012,6(3),300-313. * |
常轶群.基于OpenStack的UOS计费系统的设计与实现.《中国优秀硕士学位论文全文数据库 (信息科技辑)》.2017,(第undefined期),I138-2047. * |
Also Published As
Publication number | Publication date |
---|---|
CN112799951A (en) | 2021-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6964706B2 (en) | User image processing method, user image processing device, server and storage medium | |
CN105493028A (en) | Data consistency and rollback for cloud analytics | |
CN112799951B (en) | Method and equipment for generating automatic test case for charging system | |
CN117194242A (en) | Log playback method and device for transaction system, electronic equipment and storage medium | |
CN112256544A (en) | Early warning method and device for software problems | |
CN111144987A (en) | Abnormal shopping behavior limiting method, limiting assembly and shopping system | |
CN113836154B (en) | Database switching method and device | |
CN115760273A (en) | Commodity label generating and displaying method, equipment and computer readable medium | |
CN112632211A (en) | Semantic information processing method and equipment for mobile robot | |
CN109783791A (en) | A kind of pre-trial audit statement generation method and device | |
CN111143156A (en) | Large data platform garbage task acquisition system and method and computer system | |
US10032229B1 (en) | Employing spillover tables for data updates | |
CN114327377B (en) | Method and device for generating demand tracking matrix, computer equipment and storage medium | |
CN113190463B (en) | Code testing method, node and system | |
EP4411611A1 (en) | Data audit system and data audit method | |
CN118445293B (en) | Multistage data linkage method, device and storage medium under complex service scene | |
US11416158B1 (en) | Selective data unarchiving | |
CN115511626A (en) | Label dynamic generation method, equipment and computer readable medium | |
CN113485682A (en) | Method and equipment for generating configuration file based on demand information | |
CN117151904A (en) | Accounting method and device and electronic equipment | |
CN118626079A (en) | Method and device for generating product information table, storage medium and electronic equipment | |
CN114490087A (en) | Method and device for acquiring available time of server cluster, electronic equipment and medium | |
CN114329188A (en) | Method, system and computer readable medium for integrating merchant information | |
CN113971295A (en) | Data desensitization method and equipment based on field filtering | |
CN116932347A (en) | Link tracking method, device and computer readable 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 | ||
CP03 | Change of name, title or address |
Address after: Room 502A, dinglou, 555 Dongchuan Road, Minhang District, Shanghai, 200241 Patentee after: Shanghai Yunzhou Technology Co.,Ltd. Country or region after: China Address before: Room 502A, dinglou, 555 Dongchuan Road, Minhang District, Shanghai, 200241 Patentee before: SHANGHAI YUNZHOU INFORMATION TECHNOLOGY CO.,LTD. Country or region before: China |