CN111752769A - Cloud control rule testing method and device, computer storage medium and computing equipment - Google Patents

Cloud control rule testing method and device, computer storage medium and computing equipment Download PDF

Info

Publication number
CN111752769A
CN111752769A CN201910238297.8A CN201910238297A CN111752769A CN 111752769 A CN111752769 A CN 111752769A CN 201910238297 A CN201910238297 A CN 201910238297A CN 111752769 A CN111752769 A CN 111752769A
Authority
CN
China
Prior art keywords
cloud control
rule
test data
model file
control rule
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.)
Pending
Application number
CN201910238297.8A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201910238297.8A priority Critical patent/CN111752769A/en
Publication of CN111752769A publication Critical patent/CN111752769A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2247Verification or detection of system hardware configuration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method and a device for testing cloud control rules, a computer storage medium and computing equipment. The testing method of the cloud control rule comprises the following steps: acquiring a rule model file and a data protocol of a cloud control system; automatically generating test data of the cloud control rule according to the rule model file; analyzing the data protocol, and generating an expected value of the test data issued by a server interface; acquiring an actual value of the test data issued by the server interface under the cloud control rule; comparing the expected value and the actual value; and outputting the comparison result. According to the embodiment of the invention, the test data of the cloud control rule is automatically generated according to the obtained rule model file of the cloud control system, and the validity of the cloud control rule is tested through interface simulation, so that the manpower and equipment required by the test can be saved, and the test efficiency and the coverage rate are improved.

Description

Cloud control rule testing method and device, computer storage medium and computing equipment
Technical Field
The invention relates to the technical field of cloud control, in particular to a cloud control rule testing method, a cloud control rule testing device, a computer storage medium and computing equipment.
Background
Cloud control is also called as a cloud control system, namely, product parameters are controlled at the cloud. The cloud control can acquire data from the cloud through the network when the program runs. When a product runs, a default value is generally required to be set for product parameters at a client, and under the condition of a network, a cloud control is acquired to modify the product parameters so as to control interaction with a user, such as the frequency of popup windows, whether a page is displayed or not, permission guidance and the like. Therefore, targeted experience optimization can be performed by configuring certain cloud control rules.
The implementation effect of the cloud control rule depends on the algorithm of the cloud control platform, and once the algorithm is improper, the cloud control rule cannot be accurately executed, the effect of optimization test is directly influenced, and a correct conclusion cannot be obtained, so that the cloud control rule needs to be tested, and whether the cloud control rule is accurately executed or not is verified. In the prior art, a tester mainly sets a cloud control rule in a cloud control system, and then verifies the cloud control rule by using terminal equipment meeting different rule conditions. In this way, the tester needs to configure various cloud control rules and terminal devices to verify the validity of the rules, the testing efficiency is low, and all terminal devices meeting the requirements cannot be obtained to perform testing.
Therefore, an automatic testing method capable of solving the problems of low testing efficiency of the cloud control rule and equipment dependence is needed.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method for testing a cloud control rule, a device for testing a cloud control rule, a computer storage medium, and a computing apparatus that overcome or at least partially solve the above problems.
According to an aspect of the embodiments of the present invention, a method for testing a cloud control rule is provided, including:
acquiring a rule model file and a data protocol of a cloud control system;
automatically generating test data of the cloud control rule according to the rule model file;
analyzing the data protocol, and generating an expected value of the test data issued by a server interface;
acquiring an actual value of the test data issued by the server interface under the cloud control rule;
comparing the expected value and the actual value;
and outputting the comparison result.
Optionally, the acquiring a rule model file and a data protocol of the cloud control system includes:
and reading the rule model file and the data protocol from a database or a configuration file of the cloud control system.
Optionally, before acquiring the rule model file and the data protocol of the cloud control system, the method further includes:
and generating the rule model file in response to the parameter configuration of the user in the cloud control system.
Optionally, the rule model file includes parameters and corresponding parameter types;
automatically generating test data of the cloud control rule according to the rule model file, wherein the test data comprises the following steps:
analyzing the rule model file to obtain parameters contained in the rule model file and corresponding parameter types;
and automatically generating a plurality of groups of test data consisting of the parameters and a plurality of values of the parameters according to the parameters and the corresponding parameter types.
Optionally, the parameter type comprises a numerical value type;
for a parameter of a numerical type, the generated test data covers valid value boundaries, normal values, and/or abnormal values of the parameter.
Optionally, the data protocol includes an interaction protocol between the cloud control system and the server;
before automatically generating test data of the cloud control rule according to the rule model file, the method further comprises:
compiling the cloud control rule into a rule which can be identified by the server side according to the data protocol;
and the server interface issues the actual value of the test data as the server requests the test data according to the compiled cloud control rule and issues the actual value of the test data through the server interface.
Optionally, comparing the expected value and the actual value comprises:
comparing whether the deviation between the actual value and the expected value is within a predetermined error range;
if yes, judging that the comparison result is consistent;
if not, the comparison result is judged to be inconsistent.
Optionally, outputting the comparison result comprises:
and if the comparison result is inconsistent, outputting the parameters of the cloud control rule associated with the test data and the corresponding parameter values.
Optionally, the cloud control rule is applicable to AB testing of the product.
According to another aspect of the embodiments of the present invention, there is also provided a device for testing a cloud control rule, including:
the cloud control rule acquisition module is suitable for acquiring a rule model file and a data protocol of the cloud control system;
the test data generation module is suitable for automatically generating test data of the cloud control rule according to the rule model file;
the expected value generation module is suitable for analyzing the data protocol and generating an expected value of the test data issued by the server interface;
the actual value acquisition module is suitable for acquiring the actual value of the test data issued by the server interface under the cloud control rule;
a comparison module adapted to compare the expected value and the actual value; and
and the result output module is suitable for outputting the comparison result.
Optionally, the cloud control rule obtaining module is further adapted to:
and reading the rule model file and the data protocol from a database or a configuration file of the cloud control system.
Optionally, the apparatus further comprises:
the cloud control rule generation module is suitable for responding to the parameter configuration of a user in the cloud control system before the cloud control rule acquisition module acquires the rule model file and the data protocol of the cloud control system, and generating the rule model file.
Optionally, the rule model file includes parameters and corresponding parameter types;
the test data generation module is further adapted to:
analyzing the rule model file to obtain parameters contained in the rule model file and corresponding parameter types;
and automatically generating a plurality of groups of test data consisting of the parameters and a plurality of values of the parameters according to the parameters and the corresponding parameter types.
Optionally, the parameter type comprises a numerical value type;
for a parameter of a numerical type, the generated test data covers valid value boundaries, normal values, and/or abnormal values of the parameter.
Optionally, the data protocol includes an interaction protocol between the cloud control system and the server;
the device further comprises:
the rule compiling module is suitable for compiling the cloud control rule into a rule which can be identified by the server side according to the data protocol before the test data generating module automatically generates the test data of the cloud control rule according to the rule model file;
the actual value of the test data issued by the server interface acquired by the actual value acquisition module is the actual value of the test data issued by the server interface after the server requests the test data according to the compiled cloud control rule.
Optionally, the comparison module is further adapted to:
comparing whether the deviation between the actual value and the expected value is within a predetermined error range;
if yes, judging that the comparison result is consistent;
if not, the comparison result is judged to be inconsistent.
Optionally, the result output module is further adapted to:
and if the comparison result is inconsistent, outputting the parameters of the cloud control rule associated with the test data and the corresponding parameter values.
Optionally, the cloud control rule is applicable to AB testing of the product.
According to yet another aspect of the embodiments of the present invention, there is also provided a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to execute a method of testing a cloud control rule according to any one of the above.
According to still another aspect of the embodiments of the present invention, there is also provided a computing device including:
a processor; and
a memory storing computer program code;
the computer program code, when executed by the processor, causes the computing device to perform a method of testing according to a cloud-controlled rule as defined in any one of the preceding.
The method and the device for testing the cloud control rule provided by the embodiment of the invention comprise the steps of firstly obtaining a rule model file and a data protocol of the cloud control system, then automatically generating test data of the cloud control rule according to the rule model file, and generating an expected value of the test data by analyzing the data protocol and issuing the expected value of the test data through a server interface; further, acquiring an actual value of test data issued by the server interface under the cloud control rule; and finally, comparing the actual value sent by the server-side interface with the expected value, and judging the effectiveness of the tested cloud control rule according to the comparison result. By automatically generating test data of the cloud control rule according to the obtained rule model file of the cloud control system and testing the cloud control rule through interface simulation, labor and equipment required by testing can be saved, the testing efficiency and the coverage rate are improved, and the problems that in the prior art, a tester needs to manually configure various cloud control rules and a plurality of terminal devices to verify the validity of the rules, the cloud control rule testing cannot be fully covered, the efficiency is low and the device is depended on are solved. The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flow chart of a method for testing cloud-controlled rules according to an embodiment of the invention;
FIG. 2 is a schematic structural diagram of a cloud control system according to an embodiment of the invention;
FIG. 3 is a schematic structural diagram of a testing apparatus for cloud control rules according to an embodiment of the present invention; and
fig. 4 is a schematic structural diagram of a testing apparatus for cloud control rules according to another embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The cloud control (also called cloud control system, cloud control for short) controls product parameters at the cloud, and can change the presentation form of the client at any time under the condition of not influencing the code of the client through the control of the server side, namely, the front end version can be changed without upgrading. Therefore, the cloud control is widely applied to the functional test of the client, such as an AB test (attest).
The AB test is to make two (A/B) or a plurality of (A/B/n) versions for a Web or App interface or process, randomly access the versions by visitor groups (namely target groups) with the same or similar components in the same time dimension, collect user experience data and service data of each group, analyze and evaluate the best version, and adopt the version formally. Explained in a simplified example, the AB test is two different implementations a and b of the same function of the manufactured product, and after the rule is configured, a part of the clients present the a scheme and another part of the clients present the b scheme. And then, uploading result data correspondingly generated by the schemes a and b to a server, and finally determining whether the scheme a or the scheme b is adopted by a product manager according to the data obtained by the uplink.
When performing such a function test, a cloud control rule needs to be configured to control data issuing and the like. The effectiveness of the cloud control rule directly affects the effect of the function test. However, the validation test of the cloud control rule validity in the prior art has the problems that the cloud control rule test cannot be fully covered, the efficiency is low and equipment is depended on.
In order to solve the above technical problem, an embodiment of the present invention provides a method for testing a cloud control rule. Fig. 1 shows a flowchart of a method for testing cloud control rules according to an embodiment of the present invention. Referring to fig. 1, the method may include at least the following steps S102 to S112.
And S102, acquiring a rule model file and a data protocol of the cloud control system.
And step S104, automatically generating test data of the cloud control rule according to the rule model file.
And step S106, analyzing the data protocol, and generating an expected value of the test data issued by the server interface.
And S108, acquiring an actual value of the test data issued by the server interface under the cloud control rule.
And step S110, comparing the expected value and the actual value of the test data issued by the server interface.
And step S112, outputting the comparison result.
The cloud control rule tested in the embodiment can be applied to AB test of products.
According to the cloud control rule testing method and device provided by the embodiment of the invention, the testing data of the cloud control rule is automatically generated according to the obtained rule model file of the cloud control system, and the cloud control rule is tested through interface simulation, so that the manpower and equipment required by the test can be saved, the test efficiency and the coverage rate are improved, and the problems that in the prior art, a tester needs to manually configure various cloud control rules and a plurality of terminal equipment to verify the validity of the rules, the cloud control rule test cannot be fully covered, the efficiency is low and the equipment is depended on are solved.
In step S102, the rule model file and the data protocol may be read from a database or a configuration file of the cloud control system according to the structure of the cloud control system. The database referred to herein may be, for example, a rule base.
The mentioned rule model files and data protocols are explained below by way of an example. For example, two schemes are designed for the mobile phone guard app to perform function optimization testing, wherein three menu buttons are arranged on the mobile phone guard operation interface under the scheme a, four menu buttons are arranged on the mobile phone guard operation interface under the scheme B, and it is expected that 40% of user clients appear in the scheme a and 60% of user clients appear in the scheme B when the app runs. The rule model file of the cloud control rule is: the 40% user client is the three button a solution, and the 60% user client is the four button B solution. The data protocol can be understood as a rule of interaction between the cloud control system and the server, and is preset by the cloud control system. For the present example, the data protocol may specifically include a representation field of a button, options and parameters of an interface, a percentage representation mechanism of the AB scheme, and the like. For example, percentages may be indicated in brackets, such as [0-40], [40-60], or directly in the form of ratios, such as 4: 6.
Further, before reading the rule model file and the data protocol from the database or the configuration file of the cloud control system, the method can further comprise the step of generating the rule model file in response to the parameter configuration of the user in the cloud control system.
Specifically, a user can select and configure parameters and parameter types in the cloud control system according to an application scene, so that a rule model file of a cloud control rule corresponding to the application scene is generated.
The following describes generation of the rule model file with reference to the schematic structural diagram of the cloud control system shown in fig. 2, and still taking the above example as an example.
Referring to fig. 2, the cloud control system (which may also be understood as a background operating system) may include one or more control types (i.e., application scenarios), for example, in this example, control type 2 is an annual activity scenario of a mobile phone guard, and control type 1 is another discounted promotion scenario of the mobile phone guard. One or more control items are included in each application scenario, each control item may include one or more parameters, which may have their respective parameter types. In this example, for the mobile phone guard's past-year activity scenario, which includes a control item, i.e., a menu button, the parameters of the menu button may include number, percentage of delivery, size, color, and so on. For each application scene, a user selects a control item and configures parameters of the control item to generate a rule model file of the cloud control rule corresponding to the application scene. In this example, the user may configure the number of the menu buttons to 3 and 4, and configure the launch percentages of the 3 button schemes and the 4 button schemes to 40% and 60%, respectively, so as to generate the rule model file of the cloud control rule. During testing, only one cloud control rule of one application scenario is tested in each test, and a black dot before the control type 2 in fig. 2 indicates that the cloud control rule of the perennial activity scenario of the mobile phone guard is currently generated and tested. In addition, it should be noted that the names and the numbers of the control types, the control items and the corresponding parameters in fig. 2 are only illustrative and do not limit the present invention.
In step S104, the acquired rule model file includes parameters of the cloud control rule and corresponding parameter types. Accordingly, step S104 may be further embodied as: firstly, analyzing the obtained rule model file to obtain parameters and corresponding parameter types contained in the rule model file; then, according to the obtained parameters and the corresponding parameter types, a plurality of groups of test data (also called test cases) consisting of the parameters and a plurality of values of the parameters are automatically generated. The parameter types mentioned herein may include, for example, a numerical value type, a character string type, and the like.
Still taking the above example as an example, for the mobile phone guard's perennial activity scene, in the test data automatically generated according to the acquired rule model file, one group of data is the test data of three menu buttons, and the other group of data is the test data of four menu buttons.
Further, the parameter of the value type is generally used to control the amount, the number, etc., and usually has a valid value range. Thus, for a parameter of a numerical type, the generated test data should cover the valid value boundaries, normal values, and/or abnormal values of the parameter, thereby making the test results more efficient and accurate.
In step S106, expected values issued by the server interface are generated for each set of test data according to the data protocol of the cloud control rule.
Still taking the above example as an example, the expected value of the delivered percentage is generated to be 40% for the test data of three menu buttons, and 60% for the test data of four menu buttons.
In step S108, the actual value of the test data issued by the server interface may be obtained by sending an obtaining request to the server interface. For the above example, that is, the server interface issues the actual percentages of the test data for the three menu buttons and the test data for the four menu buttons.
In order to enable the server to correctly perform data issuing according to the cloud control rule, the server code needs to be able to identify the cloud control rule. In an optional embodiment, the data protocol may further include an interaction protocol between the cloud control system and the server. Accordingly, before the step S104 of automatically generating the test data of the cloud control rule is executed, a step of compiling the tested cloud control rule into a rule recognizable by the server according to the data protocol may also be performed. And then, after the server side obtains the compiled cloud control rule, the server side requests test data according to the compiled cloud control rule, and the test data are issued through the server side interface. At this time, the actual value obtained in step S108 is the actual value of the test data that the server requests according to the compiled cloud control rule and issues through the server interface.
In step S110, the actual value sent by the server interface is compared with the expected value, and if the comparison result is consistent, the tested cloud control rule is considered to be valid, or the validity of the cloud control rule meets the requirement. Otherwise, the cloud control rule is considered to be invalid, and adjustment is needed, for example, adjustment of an algorithm.
In an alternative embodiment, the actual value and the expected value may be compared to determine whether the deviation is within a predetermined error range, and if so, the comparison result is determined to be consistent, and if not, the comparison result is determined to be inconsistent.
Still taking the above example as an example, assuming that the actual value of the percentage of test data delivered for the three menu buttons acquired is 39%, the actual value of the percentage of test data delivered for the four menu buttons is 61%, and the predetermined error range is ± 1%, the deviation (-1%) between the actual value (39%) and the desired value (40%) of the percentage of test data delivered for the three menu buttons falls within the predetermined error range (± 1%), and the deviation (1%) between the actual value (61%) and the desired value (60%) of the percentage of test data delivered for the four menu buttons falls within the predetermined error range (± 1%), the comparison result is judged to be consistent.
Further, when the comparison result is inconsistent, step S112 may further be implemented as:
and outputting parameters of the cloud control rule associated with the test data and corresponding parameter values. Therefore, the subsequent analysis and adjustment by a tester are more convenient.
Optionally, if the comparison result is consistent, after the cloud control rule is determined to be valid, a subsequent function optimization test may be performed based on the issued test data. Specifically, for the above example, the delivered three-menu-button scheme and the four-menu-button scheme may be executed at the same time for a specified time, the retained data of the two schemes are counted and uplink to the server, and finally, the advantages and disadvantages of the two schemes are measured according to the retained data.
Various implementations of the various elements of the embodiment shown in fig. 1 are described above. It should be noted that, in practical applications, all the above optional embodiments may be combined in a combined manner at will to form an optional embodiment of the present invention, and details are not described here any more.
Based on the same inventive concept, the embodiment of the present invention further provides a testing apparatus for cloud control rules, which is used to support the testing method for cloud control rules provided by any one of the above embodiments or a combination thereof. Fig. 3 is a schematic structural diagram of a testing apparatus 300 for cloud control rules according to an embodiment of the present invention. Referring to fig. 3, the apparatus 300 may include at least: the cloud control rule obtaining module 310, the test data generating module 320, the expected value generating module 330, the actual value obtaining module 340, the comparing module 350, and the result outputting module 360.
Now, the functions of the components or devices of the cloud control rule testing apparatus 300 according to the embodiment of the present invention and the connection relationship between the components will be described:
the cloud control rule obtaining module 310 is adapted to obtain a rule model file and a data protocol of the cloud control system.
The test data generation module 320 is connected with the cloud control rule acquisition module 310 and is adapted to automatically generate the test data of the cloud control rule according to the rule model file.
And the expected value generation module 330 is connected with the cloud control rule acquisition module 310 and is suitable for analyzing a data protocol and generating an expected value of test data issued by the server interface.
The actual value obtaining module 340 is adapted to obtain an actual value of the test data issued by the server interface under the cloud control rule.
The comparison module 350 is connected to the expected value generation module 330 and the actual value acquisition module 340, and is adapted to compare the expected value and the actual value of the test data issued by the server interface.
And the result output module 360 is connected with the comparison module 350 and is suitable for outputting the comparison result.
In an optional embodiment of the present invention, the cloud control rule obtaining module 310 is further adapted to:
and reading the rule model file and the data protocol from a database or a configuration file of the cloud control system.
In an optional embodiment of the present invention, as shown in fig. 4, the apparatus 300 may further include a cloud control rule generating module 370. The cloud control rule generating module 370 may be connected to the cloud control rule obtaining module 310, and is adapted to generate the rule model file in response to the parameter configuration of the user in the cloud control system before the cloud control rule obtaining module 310 obtains the rule model file and the data protocol of the cloud control system.
In an alternative embodiment of the invention, the rule model file contains parameters and corresponding parameter types. Accordingly, the test data generation module 320 is further adapted to:
analyzing the rule model file to obtain parameters contained in the rule model file and corresponding parameter types;
and automatically generating a plurality of groups of test data consisting of the parameters and a plurality of values of the parameters according to the obtained parameters and the corresponding parameter types.
Further, the parameter type includes a numerical value type. At this time, for a parameter of a numerical type, the generated test data needs to cover the valid value boundary, normal value, and/or abnormal value of the parameter.
In an optional embodiment of the invention, the data protocol comprises an interaction protocol between the cloud control system and the server. Accordingly, still referring to FIG. 4, the apparatus 300 may further include a rule compilation module 380. The rule compiling module 380 may be connected to the cloud control rule obtaining module 310 and the test data generating module 320, respectively, and is adapted to compile the cloud control rule into a rule recognizable by the server according to a data protocol before the test data generating module 320 automatically generates the test data of the cloud control rule according to the rule model file. At this time, the actual value of the test data issued by the server interface, which is acquired by the actual value acquisition module 340, is the actual value of the test data issued by the server interface after the server requests the test data according to the compiled cloud control rule.
In an alternative embodiment of the invention, the comparison module 350 is further adapted to:
comparing whether the deviation between the actual value and the expected value of the test data issued by the server interface is within a preset error range;
if yes, judging that the comparison result is consistent;
if not, the comparison result is judged to be inconsistent.
In an optional embodiment of the invention, the result output module 360 is further adapted to:
and if the comparison result is inconsistent, outputting the parameters of the cloud control rule associated with the test data and the corresponding parameter values.
In an optional embodiment of the invention, the tested cloud control rule can be applied to AB testing of products.
Based on the same inventive concept, the embodiment of the invention also provides a computer storage medium. The computer storage medium stores computer program code which, when run on a computing device, causes the computing device to execute a method of testing a cloud control rule according to any one of the above embodiments or a combination thereof.
Based on the same inventive concept, the embodiment of the invention also provides the computing equipment. The computing device may include:
a processor; and
a memory storing computer program code;
the computer program code, when executed by a processor, causes the computing device to perform a method of testing a cloud-controlled rule according to any one of the above embodiments or a combination thereof.
According to any one or a combination of multiple optional embodiments, the embodiment of the present invention can achieve the following advantages:
the method and the device for testing the cloud control rule provided by the embodiment of the invention comprise the steps of firstly obtaining a rule model file and a data protocol of the cloud control system, then automatically generating test data of the cloud control rule according to the rule model file, and generating an expected value of the test data by analyzing the data protocol and issuing the expected value of the test data through a server interface; further, acquiring an actual value of test data issued by the server interface under the cloud control rule; and finally, comparing the actual value sent by the server-side interface with the expected value, and judging the effectiveness of the tested cloud control rule according to the comparison result. By automatically generating test data of the cloud control rule according to the obtained rule model file of the cloud control system and testing the cloud control rule through interface simulation, labor and equipment required by testing can be saved, the testing efficiency and the coverage rate are improved, and the problems that in the prior art, a tester needs to manually configure various cloud control rules and a plurality of terminal devices to verify the validity of the rules, the cloud control rule testing cannot be fully covered, the efficiency is low and the device is depended on are solved.
It is clear to those skilled in the art that the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and for the sake of brevity, further description is omitted here.
In addition, the functional units in the embodiments of the present invention may be physically independent of each other, two or more functional units may be integrated together, or all the functional units may be integrated in one processing unit. The integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
Those of ordinary skill in the art will understand that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computing device (e.g., a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: u disk, removable hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and other various media capable of storing program code.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a computing device, e.g., a personal computer, a server, or a network device) associated with program instructions, which may be stored in a computer-readable storage medium, and when the program instructions are executed by a processor of the computing device, the computing device executes all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments can be modified or some or all of the technical features can be equivalently replaced within the spirit and principle of the present invention; such modifications or substitutions do not depart from the scope of the present invention.
According to an aspect of the embodiments of the present invention, a1. a method for testing a cloud control rule is provided, including:
acquiring a rule model file and a data protocol of a cloud control system;
automatically generating test data of the cloud control rule according to the rule model file;
analyzing the data protocol, and generating an expected value of the test data issued by a server interface;
acquiring an actual value of the test data issued by the server interface under the cloud control rule;
comparing the expected value and the actual value;
and outputting the comparison result.
A2. The method according to A1, wherein acquiring a rule model file and a data protocol of a cloud control system comprises:
and reading the rule model file and the data protocol from a database or a configuration file of the cloud control system.
A3. The method according to a2, wherein before acquiring the rule model file and the data protocol of the cloud control system, the method further comprises:
and generating the rule model file in response to the parameter configuration of the user in the cloud control system.
A4. The method according to A1, wherein the rule model file contains parameters and corresponding parameter types;
automatically generating test data of the cloud control rule according to the rule model file, wherein the test data comprises the following steps:
analyzing the rule model file to obtain parameters contained in the rule model file and corresponding parameter types;
and automatically generating a plurality of groups of test data consisting of the parameters and a plurality of values of the parameters according to the parameters and the corresponding parameter types.
A5. The method of a4, wherein the parameter types include a value type;
for a parameter of a numerical type, the generated test data covers valid value boundaries, normal values, and/or abnormal values of the parameter.
A6. The method according to A1, wherein the data protocol comprises an interaction protocol between the cloud control system and the server;
before automatically generating test data of the cloud control rule according to the rule model file, the method further comprises the following steps:
compiling the cloud control rule into a rule which can be identified by the server side according to the data protocol;
and the server interface issues the actual value of the test data as the server requests the test data according to the compiled cloud control rule and issues the actual value of the test data through the server interface.
A7. The method of a1, wherein comparing the expected value and the actual value comprises:
comparing whether the deviation between the actual value and the expected value is within a predetermined error range;
if yes, judging that the comparison result is consistent;
if not, the comparison result is judged to be inconsistent.
A8. The method of a7, wherein outputting the comparison result includes:
and if the comparison result is inconsistent, outputting the parameters of the cloud control rule associated with the test data and the corresponding parameter values.
A9. The method of any one of a1-A8, wherein the cloud control rules apply to AB testing of a product.
According to another aspect of the embodiments of the present invention, there is also provided a b10. a testing apparatus for cloud control rules, including:
the cloud control rule acquisition module is suitable for acquiring a rule model file and a data protocol of the cloud control system;
the test data generation module is suitable for automatically generating test data of the cloud control rule according to the rule model file;
the expected value generation module is suitable for analyzing the data protocol and generating an expected value of the test data issued by the server interface;
the actual value acquisition module is suitable for acquiring the actual value of the test data issued by the server interface under the cloud control rule;
a comparison module adapted to compare the expected value and the actual value; and
and the result output module is suitable for outputting the comparison result.
B11. The apparatus of B10, wherein the cloud control rule acquisition module is further adapted to:
and reading the rule model file and the data protocol from a database or a configuration file of the cloud control system.
B12. The apparatus of B11, further comprising:
the cloud control rule generation module is suitable for responding to the parameter configuration of a user in the cloud control system before the cloud control rule acquisition module acquires the rule model file and the data protocol of the cloud control system, and generating the rule model file.
B13. The device according to B10, wherein the rule model file contains parameters and corresponding parameter types;
the test data generation module is further adapted to:
analyzing the rule model file to obtain parameters contained in the rule model file and corresponding parameter types;
and automatically generating a plurality of groups of test data consisting of the parameters and a plurality of values of the parameters according to the parameters and the corresponding parameter types.
B14. The apparatus of B13, wherein the parameter type includes a value type;
for a parameter of a numerical type, the generated test data covers valid value boundaries, normal values, and/or abnormal values of the parameter.
B15. The device according to B10, wherein the data protocol includes an interaction protocol between the cloud control system and the server;
the device further comprises:
the rule compiling module is suitable for compiling the cloud control rule into a rule which can be identified by the server side according to the data protocol before the test data generating module automatically generates the test data of the cloud control rule according to the rule model file;
the actual value of the test data issued by the server interface acquired by the actual value acquisition module is the actual value of the test data issued by the server interface after the server requests the test data according to the compiled cloud control rule.
B16. The apparatus of B10, wherein the comparison module is further adapted to:
comparing whether the deviation between the actual value and the expected value is within a predetermined error range;
if yes, judging that the comparison result is consistent;
if not, the comparison result is judged to be inconsistent.
B17. The apparatus of B16, wherein the result output module is further adapted to:
and if the comparison result is inconsistent, outputting the parameters of the cloud control rule associated with the test data and the corresponding parameter values.
B18. The apparatus of any one of B10-B17, wherein the cloud control rules apply to AB testing of a product.
There is also provided, in accordance with yet another aspect of an embodiment of the present invention, a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform a method of testing a cloud control rule in accordance with any one of a1-a 9.
There is also provided, in accordance with yet another aspect of an embodiment of the present invention, apparatus for computing, including:
a processor; and
a memory storing computer program code;
the computer program code, when executed by the processor, causes the computing device to perform a method of testing the cloud control rule according to any one of a1-a 9.

Claims (10)

1. A testing method of cloud control rules comprises the following steps:
acquiring a rule model file and a data protocol of a cloud control system;
automatically generating test data of the cloud control rule according to the rule model file;
analyzing the data protocol, and generating an expected value of the test data issued by a server interface;
acquiring an actual value of the test data issued by the server interface under the cloud control rule;
comparing the expected value and the actual value;
and outputting the comparison result.
2. The method of claim 1, wherein obtaining the rule model file and the data protocol of the cloud control system comprises:
and reading the rule model file and the data protocol from a database or a configuration file of the cloud control system.
3. The method of claim 2, wherein before acquiring the rule model file and the data protocol of the cloud control system, further comprising:
and generating the rule model file in response to the parameter configuration of the user in the cloud control system.
4. The method of claim 1, wherein the rule model file contains parameters and corresponding parameter types;
automatically generating test data of the cloud control rule according to the rule model file, wherein the test data comprises the following steps:
analyzing the rule model file to obtain parameters contained in the rule model file and corresponding parameter types;
and automatically generating a plurality of groups of test data consisting of the parameters and a plurality of values of the parameters according to the parameters and the corresponding parameter types.
5. The method of claim 4, wherein the parameter type comprises a numerical type;
for a parameter of a numerical type, the generated test data covers valid value boundaries, normal values, and/or abnormal values of the parameter.
6. The method of claim 1, wherein the data protocol comprises an interaction protocol between the cloud control system and the server;
before automatically generating test data of the cloud control rule according to the rule model file, the method further comprises the following steps:
compiling the cloud control rule into a rule which can be identified by the server side according to the data protocol;
and the server interface issues the actual value of the test data as the server requests the test data according to the compiled cloud control rule and issues the actual value of the test data through the server interface.
7. The method of claim 1, wherein comparing the expected value and the actual value comprises:
comparing whether the deviation between the actual value and the expected value is within a predetermined error range;
if yes, judging that the comparison result is consistent;
if not, the comparison result is judged to be inconsistent.
8. A testing device for cloud control rules comprises:
the cloud control rule acquisition module is suitable for acquiring a rule model file and a data protocol of the cloud control system;
the test data generation module is suitable for automatically generating test data of the cloud control rule according to the rule model file;
the expected value generation module is suitable for analyzing the data protocol and generating an expected value of the test data issued by the server interface;
the actual value acquisition module is suitable for acquiring the actual value of the test data issued by the server interface under the cloud control rule;
a comparison module adapted to compare the expected value and the actual value; and
and the result output module is suitable for outputting the comparison result.
9. A computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform a method of testing a cloud-controlled rule according to any one of claims 1-7.
10. A computing device, comprising:
a processor; and
a memory storing computer program code;
the computer program code, when executed by the processor, causes the computing device to perform a method of testing a cloud-controlled rule according to any of claims 1-7.
CN201910238297.8A 2019-03-27 2019-03-27 Cloud control rule testing method and device, computer storage medium and computing equipment Pending CN111752769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910238297.8A CN111752769A (en) 2019-03-27 2019-03-27 Cloud control rule testing method and device, computer storage medium and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910238297.8A CN111752769A (en) 2019-03-27 2019-03-27 Cloud control rule testing method and device, computer storage medium and computing equipment

Publications (1)

Publication Number Publication Date
CN111752769A true CN111752769A (en) 2020-10-09

Family

ID=72672109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910238297.8A Pending CN111752769A (en) 2019-03-27 2019-03-27 Cloud control rule testing method and device, computer storage medium and computing equipment

Country Status (1)

Country Link
CN (1) CN111752769A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631246A (en) * 2020-12-11 2021-04-09 国汽(北京)智能网联汽车研究院有限公司 Test evaluation information determination method, device, equipment and computer storage medium
CN116089313A (en) * 2023-03-07 2023-05-09 北京路凯智行科技有限公司 Vehicle cloud interaction function test system, method and storage medium
CN117596174A (en) * 2023-12-11 2024-02-23 中国铁塔股份有限公司北京市分公司 Iron tower video data cloud transmission adjustment and measurement method, system and medium
CN117852521A (en) * 2024-03-07 2024-04-09 成都中科合迅科技有限公司 Data calculation result file comparison method, system and comparison configuration system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631246A (en) * 2020-12-11 2021-04-09 国汽(北京)智能网联汽车研究院有限公司 Test evaluation information determination method, device, equipment and computer storage medium
CN112631246B (en) * 2020-12-11 2022-03-04 国汽(北京)智能网联汽车研究院有限公司 Test evaluation information determination method, device, equipment and computer storage medium
CN116089313A (en) * 2023-03-07 2023-05-09 北京路凯智行科技有限公司 Vehicle cloud interaction function test system, method and storage medium
CN117596174A (en) * 2023-12-11 2024-02-23 中国铁塔股份有限公司北京市分公司 Iron tower video data cloud transmission adjustment and measurement method, system and medium
CN117596174B (en) * 2023-12-11 2024-05-14 中国铁塔股份有限公司北京市分公司 Iron tower video data cloud transmission adjustment and measurement method, system and medium
CN117852521A (en) * 2024-03-07 2024-04-09 成都中科合迅科技有限公司 Data calculation result file comparison method, system and comparison configuration system
CN117852521B (en) * 2024-03-07 2024-06-07 成都中科合迅科技有限公司 Data calculation result file comparison method, system and comparison configuration system

Similar Documents

Publication Publication Date Title
CN111752769A (en) Cloud control rule testing method and device, computer storage medium and computing equipment
US9749064B2 (en) Automated radio frequency testing management system
CN110149298B (en) Hijacking detection method and device
CN111371638A (en) Intelligent equipment testing method and device, server and storage medium
CN110119350B (en) Software development kit testing method, device and equipment and computer storage medium
CN109656633A (en) Instrument calibration method, device, system, terminal device and readable storage medium storing program for executing
CN106487602B (en) Application program release version monitoring method and monitoring device
CN105589714B (en) The method and apparatus for using application behavior for analyzing user
CN116431379A (en) Data verification method and system
CN107430590B (en) System and method for data comparison
CN112507041A (en) Equipment model identification method and device, electronic equipment and storage medium
CN108197086B (en) Passive element parameter analysis method and device
CN111784425B (en) Order number generation method, exception handling method and device
CN110197388B (en) Method and device for displaying data, storage medium and electronic device
CN110825404A (en) Multi-version firmware upgrading method and device and networking equipment
CN107025294B (en) Information acquisition method and device
US11936532B2 (en) Dynamic IoT device definition and visualization
CN113452533B (en) Charging self-inspection and self-healing method and device, computer equipment and storage medium
CN114630363A (en) WiFi assembly performance test method and device, storage medium and test equipment
CN114254991A (en) Target object reporting method, device and equipment
CN113468237A (en) Business data processing model generation method, system construction method and device
CN114840407A (en) Mock testing method and related equipment
CN113286323A (en) 5G base station electromagnetic radiation monitoring method and device
CN113656318A (en) Software version testing method and device and computer equipment
CN111880754A (en) Automatic test method, medium, computer device and system for printing device

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