CN112799951A - 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 PDF

Info

Publication number
CN112799951A
CN112799951A CN202110155847.7A CN202110155847A CN112799951A CN 112799951 A CN112799951 A CN 112799951A CN 202110155847 A CN202110155847 A CN 202110155847A CN 112799951 A CN112799951 A CN 112799951A
Authority
CN
China
Prior art keywords
resource configuration
processing rule
resource
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.)
Granted
Application number
CN202110155847.7A
Other languages
Chinese (zh)
Other versions
CN112799951B (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.)
Shanghai Zstack Information Technology Co ltd
Original Assignee
Shanghai Zstack Information Technology 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 Shanghai Zstack Information Technology Co ltd filed Critical Shanghai Zstack Information Technology Co ltd
Priority to CN202110155847.7A priority Critical patent/CN112799951B/en
Publication of CN112799951A publication Critical patent/CN112799951A/en
Application granted granted Critical
Publication of CN112799951B publication Critical patent/CN112799951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

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)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (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

Method and equipment for generating automatic test case for charging system
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 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 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, program means, 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 made up of a large number of hosts or web 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 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 a 100GB cloud disk, with a prepaid model, a price of 3 yuan/GB/month, and a prepaid of 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/second, and the capacity of the cloud disk expands to 500GB after 3 seconds, the cost of the cloud disk in 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 both the prepaid mode and the real-time charging mode are 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, the size of a cloud disk instance in the real-time charging mode is 1TB when the cloud disk instance is created, and the cloud disk instance 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 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.
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 change awareness module 201, a data acquisition module 202, and a generation 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.
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 a 100GB cloud disk, with a prepaid model, a price of 3 yuan/GB/month, and a prepaid of 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/second, and the capacity of the cloud disk expands to 500GB after 3 seconds, the cost of the cloud disk in 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 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, the size of a cloud disk instance in the real-time charging mode is 1TB when the cloud disk instance is created, and the cloud disk instance 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 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.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with 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, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. 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 present 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 (10)

1. A method for generating an automatic test case for a charging system, 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.
2. The method of claim 1, wherein the resource configuration processing rule comprises a charging rule for the resource configuration item.
3. The method of claim 1, wherein 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 comprises:
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.
4. 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.
5. The method of claim 1, wherein the method further comprises:
and calculating expected test data according to the resource payment mode.
6. The method of claim 5, 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.
7. The method of any of claims 1-6, wherein the resource payment schema includes at least any of:
a prepaid mode;
and (4) a real-time charging mode.
8. 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 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.
9. 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 7.
10. 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 7.
CN202110155847.7A 2021-02-04 2021-02-04 Method and equipment for generating automatic test case for charging system Active CN112799951B (en)

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 true CN112799951A (en) 2021-05-14
CN112799951B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114071391A (en) * 2022-01-14 2022-02-18 中兴通讯股份有限公司 Content charging test method, management device, terminal device and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
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
US20030204784A1 (en) * 2002-04-29 2003-10-30 Jorapur Gopal P. System and method for automatic test case generation
US20070240116A1 (en) * 2006-02-22 2007-10-11 International Business Machines Corporation System and method for maintaining and testing a software application
JP2011113357A (en) * 2009-11-27 2011-06-09 Canon Inc Test case management device and method
CN106228354A (en) * 2016-07-18 2016-12-14 北京首都在线科技股份有限公司 The charge system of rule-based engine in regulation engine and cloud computing platform
CN106909510A (en) * 2017-03-02 2017-06-30 腾讯科技(深圳)有限公司 A kind of method and server for obtaining test case
CN109597759A (en) * 2018-11-09 2019-04-09 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of business software
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
KR20190113050A (en) * 2018-03-27 2019-10-08 한국과학기술원 Method and system for automatic configuration test case generation of mobile application
CN110334011A (en) * 2019-05-31 2019-10-15 浙江口碑网络技术有限公司 A kind of method and device of implementation of test cases
CN110851159A (en) * 2019-10-31 2020-02-28 浙江大搜车软件技术有限公司 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
CN111767226A (en) * 2020-06-30 2020-10-13 上海云轴信息科技有限公司 Method, system and equipment for testing cloud computing platform resources

Patent Citations (14)

* Cited by examiner, † Cited by third party
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
US20030204784A1 (en) * 2002-04-29 2003-10-30 Jorapur Gopal P. System and method for automatic test case generation
US20070240116A1 (en) * 2006-02-22 2007-10-11 International Business Machines Corporation System and method for maintaining and testing a software application
JP2011113357A (en) * 2009-11-27 2011-06-09 Canon Inc Test case management device and method
CN106228354A (en) * 2016-07-18 2016-12-14 北京首都在线科技股份有限公司 The charge system of rule-based engine in regulation engine and cloud computing platform
CN106909510A (en) * 2017-03-02 2017-06-30 腾讯科技(深圳)有限公司 A kind of method and server for obtaining test case
CN109871309A (en) * 2017-12-04 2019-06-11 中国移动通信集团公司 A kind of charge system test cases generation method and system
KR20190113050A (en) * 2018-03-27 2019-10-08 한국과학기술원 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
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
CN110851159A (en) * 2019-10-31 2020-02-28 浙江大搜车软件技术有限公司 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
CN111767226A (en) * 2020-06-30 2020-10-13 上海云轴信息科技有限公司 Method, system and equipment for testing cloud computing platform resources

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KI-WOONG PARK: "THEMIS: A Mutually Verifiable Billing System for the Cloud Computing Environment" *
常轶群: "基于OpenStack的UOS计费系统的设计与实现" *
胡军: "云计算环境下计费系统的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114071391A (en) * 2022-01-14 2022-02-18 中兴通讯股份有限公司 Content charging test method, management device, terminal device and storage medium
CN114071391B (en) * 2022-01-14 2022-05-17 中兴通讯股份有限公司 Content charging test method, management device, terminal device and storage medium
WO2023134312A1 (en) * 2022-01-14 2023-07-20 中兴通讯股份有限公司 Content charging test method, management device, terminal device and storage medium

Also Published As

Publication number Publication date
CN112799951B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN105493028A (en) Data consistency and rollback for cloud analytics
JP6964706B2 (en) User image processing method, user image processing device, server and storage medium
CN112799951B (en) Method and equipment for generating automatic test case for charging system
CN113688396A (en) Automobile information safety risk assessment automation system
CN112711398A (en) Method, device and equipment for generating buried point file and storage medium
CN114462885A (en) Data ranking method and device based on service information, medium and equipment
CN113282583A (en) Data storage method, device, equipment and storage medium
CN111144987A (en) Abnormal shopping behavior limiting method, limiting assembly and shopping system
CN111737344A (en) Data synchronization method and device for label type weighing equipment
CN109933759B (en) Statistical data table generation method and device
CN116127932A (en) Business report generation method, equipment and medium
CN111143156B (en) Big data platform garbage task acquisition system, method and computer system
CN112256544A (en) Early warning method and device for software problems
CN112632211A (en) Semantic information processing method and equipment for mobile robot
CN113064895A (en) Incremental updating method, device and system for map
CN112307041A (en) Index dimension modeling method and device and computer readable medium
CN110750569A (en) Data extraction method, device, equipment and storage medium
US11416158B1 (en) Selective data unarchiving
CN113485682A (en) Method and equipment for generating configuration file based on demand information
CN115511626A (en) Label dynamic generation method, equipment and computer readable medium
CN114490087A (en) Method and device for acquiring available time of server cluster, electronic equipment and medium
CN113971295A (en) Data desensitization method and equipment based on field filtering
CN115760273A (en) Commodity label generating and displaying method, equipment and computer readable medium
CN110825809A (en) Storage method and device for drug response information
CN113971184A (en) Method and equipment for managing operation and maintenance operation based on database proxy server

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