CN114817073A - Automated testing method, apparatus, device, medium, and program product - Google Patents

Automated testing method, apparatus, device, medium, and program product Download PDF

Info

Publication number
CN114817073A
CN114817073A CN202210612179.0A CN202210612179A CN114817073A CN 114817073 A CN114817073 A CN 114817073A CN 202210612179 A CN202210612179 A CN 202210612179A CN 114817073 A CN114817073 A CN 114817073A
Authority
CN
China
Prior art keywords
product
parameter
case
information
full
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
CN202210612179.0A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210612179.0A priority Critical patent/CN114817073A/en
Publication of CN114817073A publication Critical patent/CN114817073A/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/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
    • 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/3676Test management for coverage analysis
    • 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/3688Test management for test execution, e.g. scheduling of test suites

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)

Abstract

The disclosure provides an automatic testing method which can be applied to the technical field of software testing or the financial field. The automatic test method comprises the following steps: acquiring product basic information, wherein the product basic information comprises parameter information related to a product to be tested; generating a full-volume service combination case based on the product basic information and a pre-configured parameter association control rule; generating a service composition automation script based on the full service composition case and a pre-configured general automation script; and executing the service combination automation script, and acquiring and checking an automation test result. The present disclosure also provides an automated testing apparatus, a device, a storage medium, and a program product.

Description

Automated testing method, apparatus, device, medium, and program product
Technical Field
The present disclosure relates to the field of software testing, and in particular, to an automated testing method, apparatus, device, medium, and program product.
Background
With the increasing of system control parameters and the increasing complexity of product design, it is common practice to migrate the data of old system inventory to new system or new table. For the system transformation, the industry mainly adopts a test method of comparing and verifying original functions before and after migration of source data and target data at present. The existing testing method is only suitable for the condition that the new and old data have definite mapping relation or the function scene cases are few. For flexibly configured products, a large number of system control fields are added to the stock parameters while the stock parameter data are migrated. Due to the lack of source data, the mapping relation cannot be established, and each new datum is difficult to compare; when the migration data is in the tens of millions, too many functional scenes need to be covered, and the designed functional test case is difficult to ensure to realize the original functional full-coverage verification; the program is repeatedly modified, so that a large number of function test cases are repeatedly executed, and the test workload is huge.
Disclosure of Invention
In view of the above, the present disclosure provides an automated testing method, apparatus, device, medium, and program product capable of automatically generating a full number of test cases and completing verification of test results.
According to a first aspect of the present disclosure, there is provided an automated testing method comprising: acquiring product basic information, wherein the product basic information comprises parameter information related to a product to be tested; generating a full-volume service combination case based on the product basic information and a pre-configured parameter association control rule; generating a service composition automation script based on the full service composition case and a pre-configured general automation script; and executing the service combination automation script, and acquiring and checking an automation test result.
According to an embodiment of the present disclosure, the preconfigured parameter association control rules include a case design including error reporting cases associated with product parameters and business scenarios.
According to an embodiment of the present disclosure, the product basic information includes product parameters and parameter conditions, and the generating a full-volume service composition case based on the product basic information and preconfigured parameter association control rules includes: and arranging and combining the product parameters and the parameter conditions, and generating the full-service combination case by taking the pre-configured parameter association control rule as a limiting condition, wherein the full-service combination case comprises an expected success case and an expected failure case.
According to an embodiment of the present disclosure, the product parameter, the parameter condition and the preconfigured parameter association control rule are all variable data.
According to an embodiment of the present disclosure, the universal automation script includes data recovery information, a program call message, and assertion information, wherein the program call message includes a message information field, and the message information field is associated with the product basic information; and/or the assertion information comprises a check parameter control result and a check business processing result.
According to an embodiment of the present disclosure, the acquiring and checking the automated test result includes: and acquiring and checking a script execution result and an assertion checking result.
A second aspect of the present disclosure provides an automated testing apparatus, comprising: the system comprises an information acquisition module, a parameter acquisition module and a parameter analysis module, wherein the information acquisition module is configured to acquire product basic information, and the product basic information comprises parameter information related to a product to be tested; the case combination module is configured to generate a full-volume service combination case based on the product basic information and a pre-configured parameter association control rule; a script generation module configured to generate a service composition automation script based on the full service composition case and a pre-configured generic automation script; and the script execution module is configured to execute the service combination automation script, and acquire and check the automation test result.
According to an embodiment of the present disclosure, the product basic information includes product parameters and parameter conditions, and the case combination module may further include a calculation unit. The calculation unit is configured to arrange and combine the product parameters and the parameter conditions, and generate the full-volume service combination case by using the preconfigured parameter associated control rule as a limiting condition, wherein the full-volume service combination case comprises an expected success case and an expected failure case.
According to an embodiment of the present disclosure, the script execution module may further include a collation unit. Wherein the collation unit is configured to acquire and collate the script execution result and the assertion collation result.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the automated testing method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the automated testing method described above.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the automated testing method described above.
The method provided by the embodiment of the disclosure generates the full service combination case based on the product associated parameter information and the preconfigured parameter associated control rule, further forms the full service combination automatic test script based on the full service combination case, and automatically checks the test result. Through the coverage test of the full-service combined case, the full-coverage verification of the functional test is realized, and the labor consumption is reduced.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an application scenario diagram of an automated testing method, apparatus, device, medium, and program product according to embodiments of the disclosure.
FIG. 2 schematically shows a flow diagram of an automated testing method according to an embodiment of the disclosure.
Fig. 3 schematically shows a flowchart of a method of generating a full traffic composition case based on the product basis information and preconfigured parameter association control rules, according to an embodiment of the present disclosure.
FIG. 4 schematically illustrates a flow chart of a method of obtaining and collating the automated test results according to an embodiment of the present disclosure.
Fig. 5 schematically shows a block diagram of an automated testing apparatus according to an embodiment of the present disclosure.
Fig. 6 schematically shows a block diagram of a structure of a case combination module according to an embodiment of the present disclosure.
Fig. 7 schematically shows a block diagram of a structure of a script execution module according to an embodiment of the present disclosure.
FIG. 8 schematically illustrates a block diagram of an electronic device suitable for implementing an automated testing method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
With the development of systems, system control parameters are continuously increased, product design is increasingly complex, and the method often migrates old system inventory data to a new system or a new table. For the system transformation, the industry mainly adopts a test method of comparing and verifying original functions before and after migration of source data and target data at present. The existing testing method is only suitable for the condition that the new and old data have definite mapping relation or the function scene cases are few. In order to realize the flexible parameter acquisition and control of the system and the high multiplexing of codes, the parameter setting and stock parameters of flexibly configured products have obvious difference, and two testing difficulties exist: 1. the new parameter table comprises products, product conditions, composite conditions, a cost additional information table and the like, and a great amount of field information is added in the table, and a developer writes a migration parameter script according to the production service condition description provided by service personnel. The comparison of the moving parameter script without the data source cannot ensure whether the full moving parameter meets the service requirement. 2. The data volume of the migration parameters and the migration results is large, the service scenes are flexible and various, and the workload of verifying the migration parameters, the migration programs and the service functions is large. Due to the lack of source data, the mapping relation cannot be established, and each new datum is difficult to compare; when the migration data is in the tens of millions, too many functional scenes need to be covered, and the designed functional test case is difficult to ensure to realize the original functional full-coverage verification; the program is repeatedly modified, so that a large number of function test cases are repeatedly executed, and the test workload is huge.
The embodiment of the disclosure provides an automatic testing method, which includes: acquiring product basic information, wherein the product basic information comprises parameter information related to a product to be tested; generating a full-volume service combination case based on the product basic information and a pre-configured parameter association control rule; generating a service composition automation script based on the full service composition case and a pre-configured general automation script; and executing the service combination automation script, and acquiring and checking an automation test result. The method provided by the embodiment of the disclosure generates the full service combination case based on the product associated parameter information and the preconfigured parameter associated control rule, further forms the full service combination automatic test script based on the full service combination case, and automatically checks the test result. The full service composition case may cover all service case possibilities. Furthermore, the full-service combined automatic test script can perform full-service effective coverage verification, so that all service transactions can be guaranteed to be normal after production, full-coverage verification of functional tests is realized, labor consumption is reduced, and the coverage and accuracy of test verification are improved. The method provided by the embodiment of the disclosure is particularly suitable for the automatic test task of flexibly configuring the product.
It should be noted that the automated testing method, apparatus, device, medium, and program product provided in the embodiments of the present disclosure may be applied to software testing technologies in automated testing related aspects, and may also be applied to various fields other than software testing technologies, such as financial fields. The application fields of the automated testing method, the automated testing device, the automated testing equipment, the automated testing medium and the automated testing program product provided by the embodiment of the disclosure are not limited.
The above-described operations for carrying out at least one of the objects of the present disclosure will be described with reference to the accompanying drawings and description thereof.
Fig. 1 schematically illustrates an application scenario diagram of an automated testing method, apparatus, device, medium, and program product according to embodiments of the disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like, e.g. to send test requests. The terminal devices 101, 102, 103 may also have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing or client browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the test data preparation method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the test data preparation apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The test data preparation method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the test data preparation apparatus provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The automated testing method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 4 based on the scenario described in fig. 1.
FIG. 2 schematically shows a flow diagram of an automated testing method according to an embodiment of the disclosure.
As shown in fig. 2, the automated testing method of this embodiment includes operations S210 to S240, and the transaction processing method may be executed by a processor, or may be executed by any electronic device including a processor.
In operation S210, product basic information is acquired, where the product basic information includes parameter information associated with a product to be tested.
In operation S220, a full-volume service composition case is generated based on the product basic information and a pre-configured parameter association control rule.
In operation S230, a service composition automation script is generated based on the full service composition case and the pre-configured generic automation script.
In operation S240, the service composition automation script is executed, and an automation test result is obtained and checked.
According to embodiments of the present disclosure, it is understood that parameter information associated with a product to be tested may be used to provide basic information of the product to be tested, which is a basic unit for constructing a test case. In some specific embodiments, the product basis information includes product parameters and parameter conditions. Wherein the product parameter is a necessary parameter for building the product. Taking a bank deposit product as an example, the product parameters may include currency, account opening amount, deposit duration, interest rate variation mode, reference interest rate type, and the like. The parameter condition may be a process condition corresponding to each product parameter. For example, the account opening amount may include two processing conditions of 0-50W and 50-1000W; the benchmark interest rate category may include both listing interest rate and market interest rate types.
In a specific example, taking a regular product for a public unit as an example, the logging operation may include 15 product parameters and corresponding parameter conditions, which together constitute the basic information of the product, as shown in table 1.
TABLE 1 periodic product basis information for the public
Figure BDA0003671215710000071
(continuation table 1)
Figure BDA0003671215710000081
It is understood that after the product basic information is obtained, a full traffic composition case may be generated based on the product basic information and the control rule associated with the preconfigured parameters. The pre-configured parameter association control rule can be used for configuring the association relationship among the product parameters, so that after the association relationship among the product basic information composition elements and the parameters is known, a full service combination case which is related to the product basic information and can cover all services to be tested can be constructed.
Further, the tester may pre-configure the generic automation test script, so that the service composition automation script may be generated according to the full service composition case and the pre-configured generic automation script. The universal automation script is used for automatically filling product parameters and parameter condition elements in the full-service combination case into corresponding message information so as to realize automatic test operation. When the service combination automation script is executed, an automation test result can be checked so as to synchronously verify the correctness of the product parameter data setting and the service execution result.
According to the embodiment of the disclosure, the full-service combination case is generated by using the product basic information and the preconfigured parameter association control rule, the case does not need to be selected according to the experience of the tester, the case editing accuracy is improved, and the labor cost is reduced. The method of the embodiment of the disclosure can not only ensure effective coverage verification of all possible services of all parameters, but also reduce the test cost of comprehensive coverage. On the other hand, the compiling workload of the universal automation script is less, and the full-service combination automation script is automatically generated through the service combination case and the universal automation script, so that the compiling cost of the script is greatly reduced. On the other hand, the correctness of the product parameter data setting and the service execution result can be synchronously verified at one time based on the checking of the automatic test result, and the repeated test work in different test objects is reduced.
According to an embodiment of the present disclosure, the preconfigured parameter association control rules include a case design including error reporting cases associated with product parameters and business scenarios. And (4) the default of the configurable case result is success, and the error case report scene is input. For example, it can be configured under the specific condition of a certain product parameter-a certain scenario association, i.e. an error case is reported; for another example, according to the judgment of the correlation between the product parameters, the values of other product parameters are checked on the premise of a certain product parameter-a certain scene, and an error report is generated in a specified scene.
In the above example of a public unit periodic product, for example, with a logging operation, a parameter association control rule may be preconfigured as shown in table 2.
TABLE 2 correlation control rules for regular product deposit in the public unit
Product parameters Scene Control rules Expected result
Amount of account opening 0~50W Case design Error reporting
Agreement interest rate 3%~99% Case design Error report
Floating rate due 10%~50% Case design Error report
Interest rate changing methodFormula (II) Fixed interest rate Case design Error reporting, no support for entering 'agreement interest rate' condition
Interest rate variation mode Variable interest rate Case design Error reporting, no support for entering 'agreement interest rate' condition
Interest rate variation mode Agreement interest rate Case design Error reporting, no support for entering' interest rate floating mode
Interest rate variation mode Agreement interest rate Case design Error reporting, no support for entering the condition of "automatic transfer of interest rate floating mode
Interest rate variation mode Agreement interest rate Case design Error reporting, not supporting "optional interest rate" condition
Interest rate variation mode Agreement interest rate Case design Error reporting, not supporting 'floating rate due' condition
Interest rate floating mode Not floating Case design Error reporting, not supporting 'floating rate due' condition
Interest rate floating mode Number of floating points Case design Error reporting, not supporting 'floating rate due' condition
Automatic unloading interest rate floating mode Not floating Case design Error reporting, not supporting 'floating rate due' condition
Automatic unloading interest rate floating mode Number of floating points Case design Error reporting, not supporting 'floating rate due' condition
Reference interest rate category Interest rate of hanging card Case design Error reporting, not supporting "optional interest rate" A, B
Reference interest rate category Market interest rate Case design Error reporting, not supporting 'optional interest rate' B, C
Reference interest rate category Rate of reduction of blood flow Case design Error reporting, not supporting "optional interest rate" A, C
Rest mode Medicine for benefiting essential Case design Error reporting, no support of "rest period" conditions
Rest mode Fetch and store books Case design Error reporting, no support of "rest period" conditions
Mode of rest Interest coming into the book Case design Error reporting, no support of "rest period" conditions
According to an embodiment of the present disclosure, the product basis information may include product parameters and parameter conditions.
Fig. 3 schematically shows a flowchart of a method of generating a full traffic composition case based on the product basis information and preconfigured parameter association control rules, according to an embodiment of the present disclosure.
As shown in fig. 3, the method of generating a full traffic composition case based on the product basic information and the preconfigured parameter association control rule of this embodiment includes operation S310.
In operation S310, the product parameters and the parameter conditions are arranged and combined, and the full-volume service composition case is generated with the preconfigured parameter-associated control rule as a limiting condition, where the full-volume service composition case includes an expected success case and an expected failure case.
In the embodiment of the disclosure, the condition-by-condition and data arrangement combination is performed on the input product parameters and parameter conditions, and the design of the error reporting case in the parameter association control rule is combined, so that a full-scale service combination case can be generated, and an expected result including an expected success case and an expected failure case is automatically generated for the combined case.
In the above example of regular products of public units, for example, a business portfolio plan can be generated as shown in table 3.
TABLE 3 case of regular product deposit operation business combination for public unit
Figure BDA0003671215710000101
(continuation table 3)
Figure BDA0003671215710000111
In table 3, a service composition case generated in part by combining parameter condition elements of the automatic unloading interest rate floating manner and the due floating rate is exemplarily listed. After various parameter conditions of all product parameters are combined according to the mode shown in table 3, a full-service combination case can be generated.
According to an embodiment of the present disclosure, the product parameter, the parameter condition and the preconfigured parameter association control rule are all variable data. Therefore, with the product association relation, the product parameter increase and decrease and the function change, the corresponding product parameters, the parameter conditions and the pre-configured parameter association control rules are modified, the updated full-volume service combination case can be obtained, and the service combination automation script can be further updated. Embodiments of the present disclosure can analyze assets in a round-robin fashion without manually changing large amounts of data assets such as cases, scripts, etc.
According to an embodiment of the present disclosure, the generic automation script includes a base automation test case written for a program using product conditions. The method comprises data recovery information, a program calling message and assertion information, wherein the program calling message comprises a message information field, and the message information field is associated with the product basic information; and/or the assertion information comprises a check parameter control result and a check business processing result. Wherein the data recovery information includes data recovery before service initiation. In the above example of the regular product of public unit, for example, the data recovery information includes an account for public house and an account for public unit; the availability is ensured, the money amount is enough, and the unit can be regularly deposited for business. The program calling message contains fields related to product parameters and/or parameter conditions, including currency type, account opening amount, deposit period, whether to expire for automatic transfer, change the storage period when to transfer, the floating rate when to expire, the floating rate when to transfer (using the floating rate condition), interest rate change mode, interest rate code after transfer (using the interest rate code condition), interest rate floating mode, whether to specify the expiration date, reference interest rate type, automatic transfer interest rate floating mode, interest bearing period and protocol interest rate. In the assertion information, the following are included: 1. checking a transaction return result: success/failure; 2. and (4) checking the service condition: deposit and deposit conditions after successful transaction; the deposit is not deposited after the transaction fails. For the condition of checking deposit and deposit, when the transaction is successful, the field information of the combined case is parameterized, and the successful transaction case is subjected to one-to-one field check of a deposit list, a detail list and a log list; when the transaction fails, the account table, the deposit table, the detail table and the log table are checked to have no new addition or change.
FIG. 4 schematically illustrates a flow chart of a method of obtaining and collating the automated test results according to an embodiment of the present disclosure.
As shown in fig. 4, the method of acquiring and collating the automated test result of this embodiment includes operation S410.
In operation S410, a script execution result and an assertion check result are acquired and checked. Therefore, the migration parameters, the migration program and the business functions can be verified at one time. If any link has problems, the problems can be found when the script execution result is checked and the checking result is asserted, so that the problems of multiple business scenes, product condition migration and no data source core caused by flexible product configuration can be effectively solved.
Based on the automatic testing method, the disclosure also provides an automatic testing device. The apparatus will be described in detail below with reference to fig. 5.
Fig. 5 schematically shows a block diagram of an automated testing apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the automated testing apparatus 500 of this embodiment includes an information acquisition module 510, a case combination module 520, a script generation module 530, and a script execution module 540.
Wherein, the information obtaining module 510 is configured to obtain product basic information, which contains parameter information associated with the product to be tested.
Case combining module 520 is configured to generate a full volume business combination case based on the product base information and pre-configured parameter association control rules.
The script generation module 530 is configured to generate a service composition automation script based on the full service composition case and the pre-configured generic automation script.
The script execution module 540 is configured to execute the service composition automation script, and obtain and check the automation test result.
According to an embodiment of the present disclosure, the product basic information includes product parameters and parameter conditions, and the case combination module may further include a calculation unit.
Fig. 6 schematically shows a block diagram of a structure of a case combination module according to an embodiment of the present disclosure.
As shown in fig. 6, the case combination module 520 of this embodiment includes a calculation unit 5201.
Wherein the computing unit 5201 is configured to arrange and combine the product parameters and the parameter conditions, and generate the full-volume service composition case with the preconfigured parameter-associated control rules as limiting conditions, where the full-volume service composition case includes an expected success case and an expected failure case.
According to an embodiment of the present disclosure, the script execution module may further include a collation unit.
Fig. 7 schematically shows a block diagram of a structure of a script execution module according to an embodiment of the present disclosure.
As shown in fig. 7, the script execution module 540 of this embodiment includes a collation unit 5401.
Wherein the collation unit 5401 is configured to acquire and collate a script execution result and an assertion collation result.
According to an embodiment of the present disclosure, any plurality of the acquisition module 510, the case combination module 520, the script generation module 530, the script execution module 540, the calculation unit 5201 and the collation unit 5401 may be combined in one module to be implemented, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module 510, the case combination module 520, the scenario generation module 530, the scenario execution module 540, the calculation unit 5201 and the checking unit 5401 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or by any one of three implementations of software, hardware and firmware, or by a suitable combination of any several of them. Alternatively, at least one of the obtaining module 510, the case combination module 520, the script generating module 530, the script executing module 540, the calculating unit 5201 and the collating unit 5401 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
FIG. 8 schematically illustrates a block diagram of an electronic device suitable for implementing an automated testing method according to an embodiment of the disclosure.
As shown in fig. 8, an electronic apparatus 900 according to an embodiment of the present disclosure includes a processor 901 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 901 may also include on-board memory for caching purposes. The processor 901 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are stored. The processor 901, the ROM902, and the RAM 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM902 and/or the RAM 903. Note that the programs may also be stored in one or more memories other than the ROM902 and the RAM 903. The processor 901 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 900 may also include input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM902 and/or the RAM 903 described above and/or one or more memories other than the ROM902 and the RAM 903.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 901. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal over a network medium, distributed, and downloaded and installed via the communication section 909 and/or installed from the removable medium 911. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. An automated testing method, comprising:
acquiring product basic information, wherein the product basic information comprises parameter information related to a product to be tested;
generating a full service combination case based on the product basic information and a pre-configured parameter association control rule;
generating a service composition automation script based on the full service composition case and a pre-configured general automation script;
and executing the service combination automation script, and acquiring and checking an automation test result.
2. The automated testing method of claim 1, wherein the preconfigured parameter-associated control rules comprise a case design comprising error reporting cases associated with product parameters and business scenarios.
3. The automated testing method of claim 1 or 2, wherein the product basis information comprises product parameters and parameter conditions, and the generating a full-volume service composition case based on the product basis information and preconfigured parameter associated control rules comprises:
and arranging and combining the product parameters and the parameter conditions, and generating the full-service combination case by taking the pre-configured parameter association control rule as a limiting condition, wherein the full-service combination case comprises an expected success case and an expected failure case.
4. The automated testing method of claim 3, wherein the product parameters, the parameter conditions, and the preconfigured parameter-associated control rules are all variable data.
5. The automated testing method of claim 1, wherein the generic automation script comprises data recovery information, a procedure call message, and assertion information, wherein the procedure call message comprises a message information field, the message information field associated with the product base information; and/or the assertion information comprises a check parameter control result and a check business processing result.
6. The automated testing method of claim 5, wherein said obtaining and collating the automated test results comprises: and acquiring and checking a script execution result and an assertion checking result.
7. An automated testing apparatus, comprising:
the system comprises an information acquisition module, a parameter acquisition module and a parameter analysis module, wherein the information acquisition module is configured to acquire product basic information, and the product basic information comprises parameter information related to a product to be tested;
the case combination module is configured to generate a full-volume service combination case based on the product basic information and a pre-configured parameter association control rule;
a script generation module configured to generate a service composition automation script based on the full service composition case and a pre-configured generic automation script; and
and the script execution module is configured to execute the service combination automation script, and acquire and check the automation test result.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-6.
9. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of claims 1 to 6.
CN202210612179.0A 2022-05-31 2022-05-31 Automated testing method, apparatus, device, medium, and program product Pending CN114817073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210612179.0A CN114817073A (en) 2022-05-31 2022-05-31 Automated testing method, apparatus, device, medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210612179.0A CN114817073A (en) 2022-05-31 2022-05-31 Automated testing method, apparatus, device, medium, and program product

Publications (1)

Publication Number Publication Date
CN114817073A true CN114817073A (en) 2022-07-29

Family

ID=82518983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210612179.0A Pending CN114817073A (en) 2022-05-31 2022-05-31 Automated testing method, apparatus, device, medium, and program product

Country Status (1)

Country Link
CN (1) CN114817073A (en)

Similar Documents

Publication Publication Date Title
WO2015195590A1 (en) Tenant provisioning for testing a production multi-tenant service
CN112711640A (en) Method and device for configuring business handling process
US20130311220A1 (en) Evaluating deployment readiness in delivery centers through collaborative requirements gathering
CN113515271A (en) Service code generation method and device, electronic equipment and readable storage medium
CN113495498B (en) Simulation method, simulator, device and medium for hardware device
US10176062B2 (en) Cloud servers and methods for handling dysfunctional cloud services
CN115760013A (en) Operation and maintenance model construction method and device, electronic equipment and storage medium
CN113032256B (en) Automated testing method, apparatus, computer system, and readable storage medium
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN114035864A (en) Interface processing method, interface processing device, electronic device, and storage medium
CN114817073A (en) Automated testing method, apparatus, device, medium, and program product
CN114253599A (en) Version deployment method, version deployment device, electronic device and storage medium
CN114237821A (en) Self-discovery method and device for Kubernetes container cluster, electronic device and storage medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN112783753B (en) Testing method and device for stream data processing system
CN114266547A (en) Method, device, equipment, medium and program product for identifying business processing strategy
CN114066407A (en) Service processing method, processing device, electronic equipment and readable storage medium
CN116414600A (en) Data automatic checking method, device, equipment and storage medium
CN113568838A (en) Test data generation method, device, equipment, storage medium and program product
CN113360417A (en) Test method, session modifier, electronic device, and medium
US9942352B2 (en) Method and system for a crowd service store
CN115423448A (en) Service processing method and device, electronic equipment and storage medium
CN115639990A (en) Offline package access method, system, device, equipment and storage medium
CN115080434A (en) Case execution method, device, equipment and medium
CN114253852A (en) Automatic testing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination