CN111897724B - Automatic testing method and device suitable for cloud platform - Google Patents

Automatic testing method and device suitable for cloud platform Download PDF

Info

Publication number
CN111897724B
CN111897724B CN202010708199.9A CN202010708199A CN111897724B CN 111897724 B CN111897724 B CN 111897724B CN 202010708199 A CN202010708199 A CN 202010708199A CN 111897724 B CN111897724 B CN 111897724B
Authority
CN
China
Prior art keywords
test
cloud platform
role
automatic
testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010708199.9A
Other languages
Chinese (zh)
Other versions
CN111897724A (en
Inventor
张志江
莫展鹏
季统凯
贺忠堂
姚文俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud 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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN202010708199.9A priority Critical patent/CN111897724B/en
Publication of CN111897724A publication Critical patent/CN111897724A/en
Priority to PCT/CN2021/073877 priority patent/WO2022016847A1/en
Application granted granted Critical
Publication of CN111897724B publication Critical patent/CN111897724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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 embodiment of the application discloses an automatic testing method and device suitable for a cloud platform. According to the technical scheme, the roles and the corresponding test methods are configured on the cloud platform, the test system generates the corresponding test cases by reading the roles and the corresponding test methods, and the corresponding test cases are operated to carry out automatic test on the business system. The embodiment of the application can realize comprehensive and automatic test on the cloud platform. The problem that whether the operation of the traditional cloud platform cannot be accurately judged by only an automatic test interface is successful is solved, and meanwhile, the automatic test can be passed, the labor cost is reduced, and the test errors caused by human factors are reduced. The scheme of the embodiment of the application can be used for detecting the actual change of the bottom layer resources of the cloud platform system.

Description

Automatic testing method and device suitable for cloud platform
Technical Field
The embodiment of the application relates to the technical field of interface testing, in particular to an automatic testing method and device suitable for a cloud platform.
Background
Currently, the automatic testing of software is to perform parameter range entering and parameter checking on an interface, a function and a method, or to perform joint testing on a plurality of interfaces. The traditional test method can meet the requirement for the traditional service system test. But for cloud platforms, the interface often affects the underlying resources, in this case. The return of the interface or the query operation of other interfaces reflects that resources such as a database or a cache and the like cannot reflect the real conditions of a physical machine, a virtual machine and a disk. Therefore, it is a technical problem to be urgently solved by those skilled in the art to design a scheme capable of implementing a full-scale automated test on a cloud platform.
Disclosure of Invention
The embodiment of the application provides an automatic testing method and device suitable for a cloud platform, which can distinguish roles of the cloud platform and configure a corresponding testing method based on the roles, so that the scheme of the embodiment of the application can not only carry out interface calling testing but also carry out a more comprehensive testing mode during specific implementation.
In a first aspect, an embodiment of the present application provides an automated testing method suitable for a cloud platform, including:
configuring test information required by a case in a cloud platform, wherein the test information comprises roles and test methods;
reading roles and test methods configured in the cloud platform through an automatic test system to generate test cases for detection;
and executing the automatic test aiming at the cloud platform according to the test case to obtain a calling result.
Further, the roles include one or more of a business function role, a physical machine role, a virtual machine role, a middleware role and a database role;
the executing of the automated test for the cloud platform according to the test case comprises:
sending a function request interface test according to the service function role to carry out an automatic test; or the like, or, alternatively,
automatically generating a sending code logic of a message queue according to the role of the physical machine;
sending the test case to an agent service of the test system on a physical machine according to the sending code logic so as to execute a corresponding automatic test on the physical machine; or the like, or a combination thereof,
the virtual machine generates and sends message logic to the physical machine, and calls the virtual machine agent to check the changed test case logic of the virtual machine so as to carry out automatic test.
Further, the cloud platform comprises a service function, a control node, a middleware, a physical node and a cloud server; and the control node, the middleware, the physical node and the cloud server are in communication connection with the automatic test system.
Further, configuring test information required by a use case in the cloud platform, where the test information includes a role and a test method, and then:
carrying out access parameter configuration on a cloud platform interface, and generating an access parameter range and an access parameter verification according to the access parameter configuration;
correspondingly, the automated testing for the cloud platform includes:
and carrying out automatic testing on the cloud platform interface according to the parameter entering range and the parameter exiting verification.
Further, the test information further includes a test function;
the test case for generating detection comprises the following steps:
automatically generating a test case for all roles associated with the test function;
after the automatic test for the cloud platform is executed according to the test case to obtain a calling result, the method further includes:
and acquiring the calling result, and analyzing and processing the calling result to generate a test result report.
Further, the executing the automated test for the cloud platform according to the test case to obtain a call result includes:
and executing automatic tests aiming at a cloud platform interface, a physical machine, a virtual machine, a database and middleware according to the test case to obtain a calling result.
Further, the reading, by the automated testing system, the role and the testing method configured in the cloud platform to generate the testing case for detection includes:
reading the roles and the test methods configured in the cloud platform through an automatic test system;
reading a code data packet of a test method corresponding to the role;
extracting a plurality of input type parameter variables and return values contained in the test method;
searching a variable value range corresponding to each input parameter type variable from a preset rule file;
and generating a corresponding test case according to the plurality of input type parameter variables, the corresponding value range of each input type parameter variable, the return value and the code data packet.
In a second aspect, an embodiment of the present application provides an automated testing apparatus suitable for a cloud platform, including:
a configuration module: the method comprises the steps that test information needed by a use case is configured in a cloud platform, wherein the test information comprises roles and test methods;
a generation module: the automatic testing system is used for reading the roles and the testing methods configured in the cloud platform to generate testing cases for detection;
a test module: and the automatic test system is used for executing the automatic test aiming at the cloud platform according to the test case to obtain a calling result.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, the one or more programs cause the one or more processors to implement the automated testing method for cloud platforms as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium containing computer-executable instructions for performing the automated testing method for cloud platforms as described in the first aspect when executed by a computer processor.
According to the embodiment of the application, roles and corresponding test methods are configured in the service system, the test system generates corresponding test cases by reading the roles and the corresponding test methods, and automatic test aiming at the service system is performed by running the corresponding test cases. The embodiment of the application can realize comprehensive and automatic test on the cloud platform. The problem of whether the traditional cloud platform operation which cannot be accurately judged by only an automatic test interface is successful or not is solved, meanwhile, the automatic test can be passed, the labor cost is reduced, and the test errors caused by human factors are reduced. The scheme of the embodiment of the application can be used for detecting the actual change of the bottom layer resources of the cloud platform system.
Drawings
Fig. 1 is a flowchart of an automated testing method applied to a cloud platform according to an embodiment of the present disclosure;
FIG. 2 is a schematic flowchart of a specific process for generating a test case according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of a physical machine test provided in an embodiment of the present application;
FIG. 4 is a schematic connection diagram of a service system and a test system provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an automated testing apparatus suitable for a cloud platform according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The traditional test method can meet the requirement for the traditional service system test. But for cloud platforms, the interface often affects the underlying resources, in this case. The return of the interface or the query operation of other interfaces reflects resources such as a database or a cache, and cannot reflect the real conditions of a physical machine, a virtual machine and a disk. Based on this, the role and the corresponding test method are configured in the service system, the test system generates the corresponding test case by reading the role and the corresponding test method, and the automatic test for the service system is performed by running the corresponding test case. The embodiment of the application can realize comprehensive and automatic test on the cloud platform. The problem of whether the traditional cloud platform operation which cannot be accurately judged by only an automatic test interface is successful or not is solved, meanwhile, the automatic test can be passed, the labor cost is reduced, and the test errors caused by human factors are reduced. The scheme of the embodiment of the application can be used for detecting the actual change of the bottom layer resources of the cloud platform system.
Fig. 1 shows a flowchart of an automated testing method applicable to a cloud platform according to an embodiment of the present disclosure, where the automated testing method applicable to the cloud platform provided in this embodiment may be executed by an automated testing device applicable to the cloud platform, the automated testing device applicable to the cloud platform may be implemented in a software and/or hardware manner, and the automated testing device applicable to the cloud platform may be formed by two or more physical entities or may be formed by one physical entity. Generally, the automatic test equipment suitable for the cloud platform can be a computer, a mobile phone, a tablet or a server.
The following description will be given by taking a server as an example of a device for executing an automated testing method suitable for a cloud platform. Referring to fig. 1, the automated testing method suitable for the cloud platform specifically includes:
s101: and configuring test information required by a use case in a service system, wherein the test information comprises roles and test methods.
The existing method generally aims at the content of testing an interface, so that only the interface url needs to be tested when the interface url is tested; the above situation can satisfy most test situations, but it is true that interface detection is performed and physical machines, virtual machines and disks cannot be reflected in the cloud platform. Therefore, the cloud platform cannot be fully tested, and therefore, the role and the test method need to be configured according to the actual situation of the service system in this step. The service system in the embodiment of the application refers to a cloud platform.
Specifically, the roles that need to be involved by analyzing the use case, such as a business system, a database, a physical machine, a virtual machine, or other middleware. And then configuring roles used by the use case and corresponding test methods to be used in functions to be tested, wherein the test methods and the roles have a corresponding relation, and when corresponding roles exist, corresponding test methods are also configured correspondingly, for example, the interface return needs to be checked, the configuration of physical machine detection needs to be checked, the attribute of a file in a virtual machine needs to be checked, or a detection script needs to be executed. By encapsulating the corresponding test methods for different roles.
More preferably, the roles include one or more of a business function role, a physical machine role, a virtual machine role, a middleware role, and a database role. Specific role division is performed according to the cloud platform, and a corresponding detection method is packaged for the roles as well. The business function role of this embodiment refers to the role of order management and resource allocation provided by the cloud platform portal in time.
The implementation method is different for different roles. The business function role directly sends a function request interface test; the virtual machine generates a sending message to the physical machine, and calls a virtual machine agent to check the test case logic of the change of the virtual machine; and generating corresponding test logics by the service logics which cannot be reacted by other interfaces.
More preferably, after the test information required by the configuration case in the service system includes the roles and the test methods, the method further includes:
carrying out access parameter configuration on a service system interface, and generating an access parameter range and an access parameter check according to the access parameter configuration;
correspondingly, the automated testing for the business system includes:
and automatically testing the service system interface according to the participation range and the participation verification.
That is, in addition to the detection content of the lower layer in the service system, the corresponding detection needs to be performed for the interface of the service system, so as to achieve the purpose of comprehensive detection.
S102: and reading the roles and the test methods configured in the service system through an automatic test system to generate test cases for detection.
The role and the corresponding test method are configured in the service system, and in the step, the role and the test method in the service system are read through the automatic test system and are packaged and combined to generate a corresponding test case according to a preset template to carry out specific detection operation.
Specifically, test cases are automatically produced according to roles and test methods configured in the business system. Since roles involve a variety of situations, such as detection of interfaces, detection of physical machines, detection of virtual machines, and so on. During specific detection, a single role can be directly and randomly detected, and all roles can be sequentially detected one by one according to the sequence.
Specifically, firstly, for the configuration of the business system interface for entering and exiting, the entering and exiting ranges and the exiting and exiting checks are automatically produced to detect the interface.
And automatically generating sending code logic of a message queue for testing the role of the configured physical machine, sending the tested scheme to an agent service of the test system on the physical machine, and executing corresponding check on the physical machine.
And for the role of the virtual machine, generating a message to be sent to the physical machine, and calling the virtual machine agent to check the changed test case logic of the virtual machine.
For some business logic that the interface can not react to, such as automatic change of database, change of middleware. Generating corresponding test logic at the same time, and automatically producing test cases for all roles related to one function.
More preferably, fig. 4 is a schematic connection diagram of a service system and a test system provided in the embodiment of the present application, and as shown in fig. 4, the service system includes a service function, a control node, middleware, a physical node, and a cloud server; and the service function, the control node, the middleware, the physical node and the cloud server are in communication connection with the automatic test system. And the automatic test system is in communication connection with all roles in the service system to realize test operation.
More preferably, the test information further includes a test function;
the test case for generating detection comprises the following steps:
automatically generating a test case for all roles associated with the test function;
that is, not only the specific role needs to be tested, but also some function change contents related to the role are generated to be tested by corresponding test cases. For example, when data in the related database changes, corresponding test cases also need to be generated for the content corresponding to the changes to perform detection, so as to achieve the purpose of comprehensive detection.
Further, fig. 2 is a schematic specific flow chart of generating a test case provided in the embodiment of the present application, and as shown in fig. 2, the reading, by the automated testing system, the role and the testing method configured in the business system to generate the test case for detection includes:
s1021: reading the roles and the test methods configured in the service system through an automatic test system;
s1022: reading a code data packet of a test method corresponding to the role;
s1023: extracting a plurality of input type parameter variables and return values contained in the test method;
s1024: searching a variable value range corresponding to each input parameter type variable from a preset rule file;
s1025: and generating a corresponding test case according to the plurality of input type parameter variables, the corresponding value range of each input type parameter variable, the return value and the code data packet.
The corresponding test cases are automatically generated through the steps, corresponding testers do not need to program a large number of test codes by themselves through the steps, labor cost is greatly saved, and the coverage rate of the codes of the generated test cases is high.
S103: and executing the automatic test aiming at the service system according to the test case to obtain a calling result.
The steps are mainly used for realizing specific automatic test contents. Specifically, as shown in fig. 3, fig. 3 is a schematic flowchart of a physical machine test provided in the embodiment of the present application, where the executing an automated test for the business system according to the test case includes:
s1031: automatically generating a sending code logic of a message queue according to the role of the physical machine;
s1032: and sending the test case to an agent service of the test system on the physical machine according to the sending code logic so as to execute the corresponding automatic test on the physical machine.
The above-mentioned contents of the specific test for the physical machine may be a mode of performing detection for the virtual machine and the service system interface, in addition to a mode of performing a test for the physical machine.
More preferably, the executing the automated test for the service system according to the test case to obtain a calling result includes:
and executing automatic tests aiming at the service system interface, the physical machine, the virtual machine, the database and the middleware according to the test case to obtain a calling result. That is, in the embodiment of the present application, not only a specific detection is performed on a certain module, but also all the constructed role modules are subjected to corresponding test detection.
Specifically, according to the test case generated in step S102, a call is automatically initiated to a service system interface, a remote physical machine, a remote virtual machine, a remote database, and a remote middleware, and a call result is obtained, so that the automatic monitoring of each module in the service system can be completed by running the corresponding test case. In the application embodiment, specific automatic test contents are described by testing the mounted disk function. Specifically, for the function of mounting the disk, besides the traditional check whether the interface of the mounted disk is successfully called and whether the task of mounting the disk is finally completed, the physical machine where the virtual machine is located can be used to detect the configuration file of the virtual machine to see whether the disk is configured. And calling the virtual machine through the agent to acquire the real disk condition in the virtual machine and detect whether the disk is really configured. Ensuring that the mounted disk function is actually performed successfully. When the above contents are run, the corresponding calling result can be known.
More preferably, after the executing the automated test for the service system according to the test case to obtain a call result, the method further includes:
and acquiring the calling result, and analyzing and processing the calling result to generate a test result report.
I.e. not only the corresponding call result needs to be obtained. The specific calling result also needs to be analyzed, and a corresponding test result report can be generated according to the obtained calling result, so that a tester can watch and use the test result report. Specifically, in this application embodiment not only singly examine automatic test to the cloud platform, still carry out the show of test result to it, through to the calling result that obtains and in the test result report is arranged in order to the result of predetermineeing to the result, can be more comprehensive, the more convenient result content that shows this automatic test for the tester can know the concrete operational aspect of whole cloud platform, makes things convenient for tester and the technical staff who corresponds to know the circumstances that appears in the cloud platform operation and in time adjust.
The scheme of the embodiment of the application focuses on the test of a deviation interface different from the traditional automatic test; but provides a comprehensive automatic test method which better meets the actual requirements of the cloud platform. The scheme of the embodiment of the application can detect the resources related to the cloud platform. Including business system interfaces, physical machines, virtual machines, databases, and other middleware, such as redis; and automatically generating all test case codes, including the traditional simple interfaces such as access test codes and complex codes of complex physical machine communication and virtual machine communication, and finally realizing the test of modules such as a physical machine, a virtual machine and the like by running the codes.
According to the embodiment of the application, roles and corresponding test methods are configured in the service system, the test system generates corresponding test cases by reading the roles and the corresponding test methods, and automatic test aiming at the service system is performed by running the corresponding test cases. The embodiment of the application can realize comprehensive and automatic test on the cloud platform. The problem of whether the traditional cloud platform operation which cannot be accurately judged by only an automatic test interface is successful or not is solved, meanwhile, the automatic test can be passed, the labor cost is reduced, and the test errors caused by human factors are reduced. The scheme of the embodiment of the application can be used for detecting the actual change of the bottom layer resources of the cloud platform system.
On the basis of the foregoing embodiments, fig. 5 is a schematic structural diagram of an automated testing apparatus suitable for a cloud platform according to an embodiment of the present application. Referring to fig. 5, the automated testing apparatus suitable for a cloud platform provided in this embodiment specifically includes:
the configuration module 21: the method comprises the steps that test information needed by a configuration case is used in a business system, and the test information comprises roles and test methods;
the generation module 22: the automatic testing system is used for reading the roles and the testing methods configured in the business system to generate testing cases for detection;
the test module 23: and the automatic test system is used for executing the automatic test aiming at the service system according to the test case to obtain a calling result.
More preferably, the generating module includes:
configuring a reading module: the automatic testing system is used for reading the roles and the testing methods configured in the business system;
a code reading module: a code data packet for reading a test method corresponding to the role;
an extraction module: the test method is used for extracting a plurality of input type parameter variables and return values contained in the test method;
a searching step: the variable value range corresponding to each input parameter type variable is searched from a preset rule file;
a combination generation module: and the test case generating module is used for generating a corresponding test case according to the plurality of input type parameter variables, the corresponding value range and the return value of each input type parameter variable and the code data packet.
According to the embodiment of the application, roles and corresponding test methods are configured in the service system, the test system generates corresponding test cases by reading the roles and the corresponding test methods, and automatic test aiming at the service system is performed by running the corresponding test cases. The embodiment of the application can realize comprehensive and automatic test on the cloud platform. The problem that whether the operation of the traditional cloud platform cannot be accurately judged by only an automatic test interface is successful is solved, and meanwhile, the automatic test can be passed, the labor cost is reduced, and the test errors caused by human factors are reduced. The scheme of the embodiment of the application can be used for detecting the actual change of the bottom layer resources of the cloud platform system.
The automatic testing device suitable for the cloud platform provided by the embodiment of the application can be used for executing the automatic testing method suitable for the cloud platform provided by the embodiment of the application, and has corresponding functions and beneficial effects.
Fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, and referring to fig. 6, the electronic device includes: a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The number of processors 31 in the electronic device may be one or more, and the number of memories 32 in the electronic device may be one or more. The processor 31, the memory 32, the communication module 33, the input device 34 and the output device 35 of the electronic apparatus may be connected by a bus or other means.
The memory 32 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the automated testing method for a cloud platform according to any embodiment of the present application (for example, the configuration module 21, the generation module 22, and the testing module 23 in the automated testing apparatus for a cloud platform). The memory 32 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The communication module 33 is used for data transmission.
The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 32, that is, the above-described automated testing method suitable for the cloud platform is implemented.
The input device 34 may be used to receive entered numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 35 may include a display device such as a display screen.
The electronic device provided by the embodiment can be used for executing the automatic testing method suitable for the cloud platform, and has corresponding functions and beneficial effects.
Embodiments of the present application further provide a storage medium containing computer-executable instructions, which when executed by the computer processor 31, are configured to perform an automated testing method applicable to a cloud platform, where the automated testing method applicable to the cloud platform includes:
configuring test information required by a case in a service system, wherein the test information comprises roles and test methods;
reading roles and test methods configured in the service system through an automatic test system to generate test cases for detection;
and executing the automatic test aiming at the service system according to the test case to obtain a calling result.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations, e.g., in different computer systems connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors 31.
Of course, the storage medium provided in the embodiments of the present application and containing computer-executable instructions is not limited to the above-described automated testing method suitable for a cloud platform, and may also perform related operations in the automated testing method suitable for a cloud platform provided in any embodiment of the present application.
The automated testing apparatus, the storage medium, and the electronic device for a cloud platform provided in the above embodiments may execute the automated testing method for a cloud platform provided in any embodiment of the present application, and refer to the automated testing method for a cloud platform provided in any embodiment of the present application without detailed technical details described in the above embodiments.
The foregoing is considered as illustrative only of the preferred embodiments of the invention and the principles of the technology employed. The present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.

Claims (8)

1. An automated testing method suitable for a cloud platform is characterized by comprising the following steps:
configuring test information required by a use case in a cloud platform, wherein the test information comprises roles and a test method, and the roles comprise one or more of a business function role, a physical machine role, a virtual machine role, a middleware role and a database role;
reading the roles and the testing methods configured in the cloud platform through an automatic testing system to generate a testing case for detection, wherein the testing case comprises the following steps: reading the roles and the test methods configured in the cloud platform through an automatic test system;
reading a code data packet of a test method corresponding to the role;
extracting a plurality of input type parameter variables and return values contained in the test method;
searching a variable value range corresponding to each input type parameter variable from a preset rule file;
generating a corresponding test case according to the plurality of input type parameter variables, the corresponding value range and the return value of each input type parameter variable and the code data packet, wherein the test case comprises a test on a specific role and a test on functional content associated with the role;
executing the automated test aiming at the cloud platform according to the test case to obtain a calling result, wherein the calling result comprises the following steps: sending a function request interface test according to the service function role to carry out an automatic test; or the like, or, alternatively,
automatically generating a sending code logic of a message queue according to the role of the physical machine;
sending the test case to an agent service of the test system on the physical machine according to the sending code logic so as to execute a corresponding automatic test on the physical machine; or the like, or, alternatively,
the virtual machine generates a test case for sending message logic to the physical machine and calling the virtual machine agent to check the change of the virtual machine so as to carry out automatic test.
2. The automated testing method suitable for the cloud platform according to claim 1, wherein the cloud platform comprises a business function, a control node, middleware, a physical node and a cloud server; and the service function, the control node, the middleware, the physical node and the cloud server are in communication connection with the automatic test system.
3. The automated testing method applied to the cloud platform according to claim 1, wherein after configuring test information required by a use case in the cloud platform, the test information includes a role and a testing method, the method further includes:
carrying out access parameter configuration on a cloud platform interface, and generating an access parameter range and an access parameter verification according to the access parameter configuration;
correspondingly, the automated testing for the cloud platform includes:
and carrying out automatic testing on the cloud platform interface according to the parameter entering range and the parameter exiting verification.
4. The automated testing method suitable for the cloud platform according to claim 1, wherein the test information further includes a test function;
the test case for generating detection comprises the following steps:
automatically generating a test case for all roles associated with the test function;
after the automatic test for the cloud platform is executed according to the test case to obtain a calling result, the method further includes:
and acquiring the calling result, and analyzing and processing the calling result to generate a test result report.
5. The automated testing method applicable to the cloud platform according to claim 1, wherein the performing the automated test for the cloud platform according to the test case to obtain a call result includes:
and executing automatic tests aiming at a cloud platform interface, a physical machine, a virtual machine, a database and middleware according to the test case to obtain a calling result.
6. An automated testing device suitable for a cloud platform, comprising:
a configuration module: the method comprises the steps that test information needed by a use case is configured in a cloud platform, wherein the test information comprises roles and a test method, and the roles comprise one or more of a business function role, a physical machine role, a virtual machine role, a middleware role and a database role;
a generation module: the automatic testing system is used for reading the roles and the testing methods configured in the cloud platform to generate testing cases for detection;
a test module: the cloud platform automatic testing system is used for executing automatic testing aiming at the cloud platform according to the test case to obtain a calling result, and is particularly used for sending a function request interface test according to a service function role to carry out automatic testing; or, automatically generating a sending code logic of the message queue according to the physical machine role; sending the test case to an agent service of the test system on the physical machine according to the sending code logic so as to execute a corresponding automatic test on the physical machine; or the virtual machine generates a message sending logic to the physical machine and calls a virtual machine agent to check a test case of the virtual machine change so as to carry out automatic test, wherein the test case comprises a test on a specific role and a test on functional content related to the role;
a configuration reading module: the automatic testing system is used for reading the roles and the testing methods configured in the business system;
a code reading module: a code data packet for reading a test method corresponding to the role;
an extraction module: the test method is used for extracting a plurality of input type parameter variables and return values contained in the test method;
a searching step: the input type parameter variable acquisition module is used for searching a variable value range corresponding to each input type parameter variable from a preset rule file;
a combination generation module: and generating a corresponding test case according to the plurality of input type parameter variables, the corresponding value range and the return value of each input type parameter variable and the code data packet.
7. An electronic device, comprising:
a memory and one or more processors;
the memory to store one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the automated testing method for cloud platforms of any of claims 1-5.
8. A storage medium containing computer-executable instructions for performing the automated testing method for cloud platforms of any of claims 1-5 when executed by a computer processor.
CN202010708199.9A 2020-07-21 2020-07-21 Automatic testing method and device suitable for cloud platform Active CN111897724B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010708199.9A CN111897724B (en) 2020-07-21 2020-07-21 Automatic testing method and device suitable for cloud platform
PCT/CN2021/073877 WO2022016847A1 (en) 2020-07-21 2021-01-27 Automatic test method and device applied to cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010708199.9A CN111897724B (en) 2020-07-21 2020-07-21 Automatic testing method and device suitable for cloud platform

Publications (2)

Publication Number Publication Date
CN111897724A CN111897724A (en) 2020-11-06
CN111897724B true CN111897724B (en) 2022-12-06

Family

ID=73189799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010708199.9A Active CN111897724B (en) 2020-07-21 2020-07-21 Automatic testing method and device suitable for cloud platform

Country Status (2)

Country Link
CN (1) CN111897724B (en)
WO (1) WO2022016847A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897724B (en) * 2020-07-21 2022-12-06 国云科技股份有限公司 Automatic testing method and device suitable for cloud platform
CN115080419A (en) * 2022-06-27 2022-09-20 康键信息技术(深圳)有限公司 Automatic testing method and device, storage medium and computer equipment
CN114816894B (en) * 2022-06-30 2022-12-02 苏州浪潮智能科技有限公司 Chip testing system, method, equipment and medium
CN115277486B (en) * 2022-08-01 2024-05-07 广域铭岛数字科技有限公司 Automatic testing method, device and medium based on industrial Internet
CN116974908B (en) * 2023-06-12 2024-06-14 中科软件测评(广州)有限公司 Cloud platform-based software compatibility testing method and system
CN117234826B (en) * 2023-11-10 2024-04-05 深圳市领德创科技有限公司 Solid state disk reliability verification interference-free test platform and working method
CN117596174B (en) * 2023-12-11 2024-05-14 中国铁塔股份有限公司北京市分公司 Iron tower video data cloud transmission adjustment and measurement method, system and medium
CN117421255B (en) * 2023-12-19 2024-04-09 北京博点智合科技有限公司 Automatic inspection method, device and equipment for interface and storage medium
CN118400305A (en) * 2024-05-20 2024-07-26 锐盈云科技(天津)有限公司 Automatic test method, device and related equipment
CN118410095B (en) * 2024-07-02 2024-08-20 济南浪潮数据技术有限公司 Service request processing method, computer device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108459964A (en) * 2018-03-06 2018-08-28 平安科技(深圳)有限公司 Test cases selection method, apparatus, equipment and computer readable storage medium
CN110543429A (en) * 2019-09-10 2019-12-06 深圳前海微众银行股份有限公司 Test case debugging method and device and storage medium
CN111045921A (en) * 2019-10-12 2020-04-21 平安普惠企业管理有限公司 Automatic interface testing method and device, computer equipment and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150026664A1 (en) * 2013-07-17 2015-01-22 International Business Machines Corporation Method and system for automated test case selection
CN103605609A (en) * 2013-12-10 2014-02-26 浪潮电子信息产业股份有限公司 Automatic test framework applicable to cloud computing
IN2015DE01395A (en) * 2015-05-18 2015-06-26 Hcl Technologies Ltd
US20170052884A1 (en) * 2015-08-20 2017-02-23 Ca, Inc. Generic test automation for restful web services applications
KR101989802B1 (en) * 2017-02-28 2019-06-18 주식회사 스패로우 Method for performing test using test case and apparatus for the same
CN107506303A (en) * 2017-08-24 2017-12-22 航天中认软件测评科技(北京)有限责任公司 Method, apparatus and system for automatic test
CN107704395B (en) * 2017-10-24 2020-07-07 武大吉奥信息技术有限公司 Cloud platform automation test implementation method and system based on Openstack
US10496530B1 (en) * 2018-06-06 2019-12-03 Sap Se Regression testing of cloud-based services
CN111124867B (en) * 2018-10-30 2022-12-16 中移(苏州)软件技术有限公司 OpenStack testing method and device
CN109933522B (en) * 2019-01-25 2022-04-22 畅捷通信息技术股份有限公司 Test method, test system and storage medium for automatic case
CN109783392A (en) * 2019-01-28 2019-05-21 新华三云计算技术有限公司 Cloud net fusion architecture system detection method and device
CN110597730B (en) * 2019-09-20 2023-08-22 中国工商银行股份有限公司 Automatic test case generation method and system based on scene method
CN111352844B (en) * 2020-03-04 2021-08-17 腾讯科技(深圳)有限公司 Test method and related device
CN111897724B (en) * 2020-07-21 2022-12-06 国云科技股份有限公司 Automatic testing method and device suitable for cloud platform

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108459964A (en) * 2018-03-06 2018-08-28 平安科技(深圳)有限公司 Test cases selection method, apparatus, equipment and computer readable storage medium
CN110543429A (en) * 2019-09-10 2019-12-06 深圳前海微众银行股份有限公司 Test case debugging method and device and storage medium
CN111045921A (en) * 2019-10-12 2020-04-21 平安普惠企业管理有限公司 Automatic interface testing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111897724A (en) 2020-11-06
WO2022016847A1 (en) 2022-01-27

Similar Documents

Publication Publication Date Title
CN111897724B (en) Automatic testing method and device suitable for cloud platform
CN109302522B (en) Test method, test device, computer system, and computer medium
CN107122258B (en) Method and equipment for checking state code of test interface
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN110879781B (en) Program debugging method, device, electronic equipment and computer readable storage medium
CN111198797B (en) Operation monitoring method and device and operation analysis method and device
US11681511B2 (en) Systems and methods for building and deploying machine learning applications
CN112650688A (en) Automated regression testing method, associated device and computer program product
CN114564374A (en) Operator performance evaluation method and device, electronic equipment and storage medium
CN112948272A (en) Production environment-based data test system function method and device and related equipment
CN112559525A (en) Data checking system, method, device and server
CN110838929B (en) System error checking method and system error checking device
CN113220597B (en) Test method, test device, electronic equipment and storage medium
CN115221033A (en) Interface protocol testing method and device, computer readable medium and electronic equipment
CN111400171A (en) Interface testing method, system, device and readable storage medium
CN108255715B (en) Test result processing method and terminal equipment
CN106656684B (en) Grid resource reliability monitoring method and device
CN115168124A (en) Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium
CN110618943B (en) Security service test method and device, electronic equipment and readable storage medium
CN114238140A (en) Access test method and device
CN114090357A (en) Hard disk performance test method and device, electronic equipment and storage medium
CN114356344A (en) Application deployment method and device, electronic equipment and storage medium
CN116974910A (en) Continuous delivery method and device of blockchain SDK, storage medium and electronic equipment
CN117806943A (en) Test method, test device and storage medium

Legal Events

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