CN111597112B - Automatic test method and device and electronic equipment - Google Patents

Automatic test method and device and electronic equipment Download PDF

Info

Publication number
CN111597112B
CN111597112B CN202010366922.XA CN202010366922A CN111597112B CN 111597112 B CN111597112 B CN 111597112B CN 202010366922 A CN202010366922 A CN 202010366922A CN 111597112 B CN111597112 B CN 111597112B
Authority
CN
China
Prior art keywords
target
test
machine room
configuration information
acquiring
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
CN202010366922.XA
Other languages
Chinese (zh)
Other versions
CN111597112A (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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010366922.XA priority Critical patent/CN111597112B/en
Publication of CN111597112A publication Critical patent/CN111597112A/en
Application granted granted Critical
Publication of CN111597112B publication Critical patent/CN111597112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The disclosure relates to an automatic test method, an automatic test device and electronic equipment. The method comprises the following steps: acquiring a URL address of a machine room; acquiring configuration information of a machine room according to the URL address, wherein the configuration information comprises at least one of a security group ID, a subnet ID and a cluster attribute corresponding to the machine room; acquiring target parameters for testing based on preset rules according to the configuration information; and writing the target parameters into configuration files corresponding to the machine room, wherein the configuration files are used for being read by the test program to transfer the target parameters. According to the method, the test code updating parameters do not need to be manually modified, so that the labor cost is reduced and the processing efficiency is improved.

Description

Automatic test method and device and electronic equipment
Technical Field
The present disclosure relates to the field of automatic testing, and more particularly, to an automatic testing method, an automatic testing apparatus, and an electronic device.
Background
In the field of information technology, a machine room generally refers to a place where telecommunication, network communication, mobile, two-wire, electric, government, business, etc. type bodies are used to store servers and provide information technology services for users and employees. Different machine rooms have respective configuration information, and supported machine types may be different.
In the existing test work, the code for automatic test is still mainly manually programmed by a tester. The test codes corresponding to different machine rooms are typically different. The preparation work of the current automatic test is basically that a set of test codes is written for each machine room by people and corresponding configuration files are written, and each machine room is tested in combination with a specific test framework.
The method is completely dependent on manual operation, the repeatability among various sets of test codes in different machine rooms is high, a large amount of redundant work is realized, the configuration information can not be automatically updated, and manual modification is needed. If the configuration of the machine room changes, the machine room cannot be immediately synchronized, and the test code may fail to run, so that problems are caused, and the investigation further brings about waste of labor cost and time cost.
Therefore, a new technical solution for performing automatic testing is necessary.
Disclosure of Invention
It is an object of the present disclosure to provide a new solution for performing automatic testing.
According to a first aspect of the present disclosure, there is provided an automatic test method comprising:
acquiring a URL address of a machine room;
acquiring configuration information of the machine room according to the URL address, wherein the configuration information comprises at least one of a security group ID, a subnet ID and a cluster attribute corresponding to the machine room;
acquiring target parameters for testing based on a preset rule according to the configuration information;
and writing the target parameters into configuration files corresponding to the machine room, wherein the configuration files are used for being read by a test program to transfer the target parameters.
Optionally, after the target parameters for testing are obtained based on the preset rule, the method further includes:
determining a target test case from a test case library according to the target parameter;
writing the target test case into a test file, wherein the test file is used for realizing the test program.
Optionally, the acquiring the configuration information of the machine room according to the URL address includes at least one of the following:
sending a first query instruction to a Nova component and receiving cluster attributes of the machine room returned by the Nova component, wherein the first query instruction comprises the URL address,
sending a second query instruction to a Neutron component and receiving a security group ID of the machine room returned by the Neutron component, wherein the second query instruction comprises the URL address;
and sending a third query instruction to a Neutron component and receiving a subnet ID of the machine room returned by the Neutron component, wherein the third query instruction comprises the URL address.
Optionally, the acquiring, according to the configuration information, the target parameters for testing based on a preset rule includes at least one of the following:
acquiring cluster attributes with highest occurrence times from the configuration information as target cluster attributes;
acquiring a first security group ID from the configuration information as a target security group ID;
and acquiring the subnet ID belonging to the same virtual private cloud with the target security group ID from the configuration information, and taking the subnet ID as a target subnet ID.
Optionally, the acquiring, according to the configuration information, the target parameters for testing based on a preset rule further includes:
and acquiring the instruction set corresponding to the target cluster attribute according to the corresponding relation of the instruction set and the cluster attribute, and taking the instruction set as the target instruction set.
Optionally, writing the target parameter into a configuration file corresponding to the machine room includes:
comparing whether each target parameter is the same as the corresponding initial parameter in the configuration file;
and if the initial parameters are different, modifying the initial parameters into the target parameters.
According to a second aspect of the present disclosure, there is provided an automatic test method comprising:
obtaining a test file, wherein the test file comprises at least one test case;
and executing the test case according to the test file, wherein when the test case is executed, reading target parameters in a configuration file as test parameters, wherein the configuration file is obtained based on the method of the first aspect of the disclosure.
According to a third aspect of the present disclosure, there is provided an automatic test equipment comprising:
the first acquisition module is used for acquiring the URL address of the machine room;
the second acquisition module is used for acquiring configuration information of the machine room according to the URL address, wherein the configuration information comprises at least one of a security group ID, a subnet ID and a cluster attribute corresponding to the machine room;
the third acquisition module is used for acquiring target parameters for testing based on a preset rule according to the configuration information;
and the writing module is used for writing the target parameters into configuration files corresponding to the machine room, wherein the configuration files are used for being read by a test program to transfer the target parameters.
According to a fourth aspect of the present disclosure, there is provided an automatic test equipment comprising:
the test file acquisition module is used for acquiring a test file, wherein the test file comprises at least one test case;
and the test execution module is used for executing the test case according to the test file, wherein when the test case is executed, the target parameter in the configuration file is read as the test parameter, and the configuration file is obtained based on the method of the first aspect of the disclosure.
According to a fifth aspect of the present disclosure there is provided an electronic device comprising a processor and a memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the method of the first aspect of the present disclosure.
According to the testing method provided by the embodiment, the configuration information of the machine room is obtained according to the URL address of the machine room, the target parameters are obtained according to the configuration information and written into the configuration file, the testing program can read the configuration file to obtain the target parameters, the updating parameters of the testing code do not need to be modified manually, the labor cost is reduced, and the processing efficiency is improved. In addition, the method can update the configuration file in time after the configuration of the machine room is changed, so that test faults caused by the fact that the test parameters are not consistent with the actual configuration are prevented, and waste of manpower and time caused by fault detection is avoided.
Other features of the present disclosure and its advantages will become apparent from the following detailed description of exemplary embodiments of the disclosure, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram of an electronic device that may be used to implement embodiments of the present disclosure.
Fig. 2 is a flow chart of an automatic test method according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and apparatus should be considered part of the specification.
In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
< hardware configuration >
Fig. 1 illustrates a hardware configuration of an electronic device that may be used to implement embodiments of the present disclosure.
Referring to fig. 1, the electronic apparatus 1000 includes a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, and an input device 1600. The processor 1100 may be, for example, a central processing unit CPU, a micro control unit MCU, or the like. The memory 1200 includes, for example, ROM (read only memory), RAM (random access memory), nonvolatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a serial interface, and the like. The communication device 1400 is, for example, a wired network card or a wireless network card. The display device 1500 is, for example, a liquid crystal display. The input device 1600 includes, for example, a touch screen, keyboard, mouse, microphone, etc.
In an embodiment applied to this description, the memory 1200 of the electronic device 1000 is used to store instructions for controlling the processor 1100 to operate in support of implementing a method according to any embodiment of this description. The skilled person can design instructions according to the solution disclosed in the present specification. How the instructions control the processor to operate is well known in the art and will not be described in detail here.
It will be appreciated by those skilled in the art that although a plurality of devices of the electronic apparatus 1000 are shown in fig. 1, the electronic apparatus 1000 of the embodiment of the present description may relate to only some of the devices thereof, for example, only the processor 1100, the memory 1200, and the communication device 1400.
In this embodiment, the electronic device 1000 is, for example, a terminal device for testing.
The hardware configuration shown in fig. 1 is merely illustrative and is in no way intended to limit the disclosure, its application, or uses.
< method example >
The present embodiment provides an automatic test method, which is implemented, for example, by the electronic device 1100 shown in fig. 1. In this embodiment, a special test account may be logged in the cloud storage system through the electronic device 1100, and a test is performed through the test account.
As shown in fig. 2, the method includes the following steps S1100-S1400.
In step S1100, the URL address of the machine room is acquired.
In this embodiment, the machine room refers to a place for storing equipment and providing information technology services. In one example of providing cloud services to users, one or more rooms are provided in each city, and the cloud services are supported in units of all devices in each room.
In this embodiment, the automatic test object is the support of the cloud service function of the virtual machine by the physical machine cluster in the machine room, and the basic function of the virtual machine itself.
In this embodiment, each machine room has a corresponding URL (uniform resource locator) address, and each machine room corresponds to one or more clusters.
In this embodiment, the URL address is obtained, for example, by obtaining a URL address input by the user through the interactive interface, and also, for example, by obtaining a document recorded with the URL address uploaded by the user.
In step S1200, configuration information of the machine room is obtained according to the URL address, where the configuration information includes at least one of a security group ID, a subnet ID, and a cluster attribute corresponding to the machine room.
In this embodiment, the configuration information of the machine room includes at least one of a security group ID (identity document) corresponding to the machine room, a subnet ID (identity document), and a cluster attribute. The security group ID corresponding to the machine room refers to the identity of one or more security groups created in the machine room by the current test account. The subnet ID corresponding to the machine room refers to the identity of one of the latter multiple subnets corresponding to the current account number. The cluster attribute corresponding to the machine room refers to the cluster attribute of each device in the machine room.
In this embodiment, the configuration information of the machine room is obtained according to the URL address of the machine room, and the implementation manner thereof includes at least one of the following: sending a first query instruction to the Nova component and receiving cluster attributes of a machine room returned by the Nova component, wherein the first query instruction comprises a URL address, sending a second query instruction to the Neutron component and receiving a security group ID of the machine room returned by the Neutron component, and the second query instruction comprises the URL address; and sending a third query instruction to the Neutron component and receiving the subnet ID of the machine room returned by the Neutron component, wherein the third query instruction comprises a URL address.
The cloud service system in this embodiment may employ an OpenStack cloud computing platform. The Neutron component is a functional component in the OpenStack cloud computing platform, and can be used for providing virtual network functions in a cloud computing environment. The Nova component is also a functional component in the OpenStack cloud computing platform, and is responsible for managing and maintaining computing resources of the cloud computing environment and managing the life cycle of the virtual machine of the whole cloud environment.
In one example, after all cluster information in the machine room is obtained by using the interface for querying cluster information in the Nova component, the value of the cluster field can be extracted from the cluster information, and a map data structure is used to store all the cluster values, and meanwhile, the value in the map is used to record the number of times the cluster appears.
The cluster fields are, for example, C1-en, C2, C3-Local, e1, e2, N3-Large, N3-xLarge, etc. Wherein, fields such as C1, C1-en, C2, C3-Local and the like indicate that the host type is SSD (Local disk) type, and fields such as e1, e2, N3-Larget, N3-xLarget and the like indicate that the host type is EBS (cloud disk) type. The SSD and the EBS types are aimed at the virtual machines, and different cluster labels correspond to different virtual machine types respectively.
In step S1300, target parameters for testing are acquired based on preset rules according to the configuration information.
In one example, step S1300 includes at least one of: obtaining the cluster attribute with the highest occurrence number from the configuration information as a target cluster attribute; acquiring a first security group ID from the configuration information as a target security group ID; and acquiring the subnet ID belonging to the same virtual private cloud as the target security group ID from the configuration information, and taking the subnet ID as the target subnet ID.
In the above example, the process of obtaining the target cluster attribute further includes: and selecting a cluster attribute with the largest occurrence number as a target cluster attribute according to the SSD type and the EBS type. For this purpose, the cluster attribute with the largest occurrence number can be determined according to the value in the map data structure.
In one example, the target parameters further include a target instruction set, the acquisition process of which is: and acquiring the instruction set corresponding to the target cluster attribute according to the corresponding relation of the instruction set and the cluster attribute, and taking the instruction set as the target instruction set. The instruction set refers to a CPU instruction set corresponding to equipment in a machine room.
The correspondence of the instruction set and the cluster attribute is that, for example, the cluster attribute C1/e1 corresponds to the instruction set 2, the cluster attribute C2/e2 corresponds to the instruction set 3, and the cluster attribute C3-Local/N3-Large/N3-xLarge corresponds to the instruction set 4.
In step S1400, the target parameters are written into the configuration files corresponding to the machine room, wherein the configuration files are used for the test program to read so as to transfer the target parameters.
In this embodiment, the test may be performed based on the TestNG test framework. The TestNG provides complete test case management function, and can conveniently realize automatic test. The test cases described above refer to a particular set of input data, operational or various environmental settings, and desired results provided to the system under test for the purpose of performing the test.
When automatic testing is performed based on TestNG, test cases may be managed by Xml files, for example, by specifying the name of the test case by a code shaped as < testname= "case 1". The Xml file described above may also be referred to as a test file. Corresponding test programs can be executed according to the Xml file in the TestNG test framework.
When the test program is executed, parameters required for the test, i.e., test parameters, such as cluster attributes, are required to be obtained. In this embodiment, the test program reads the configuration file to obtain the target parameter, and uses the target parameter as the test parameter, so as to perform the automatic test.
In one example, step S1400 includes: comparing whether each target parameter is the same as the corresponding initial parameter in the configuration file; if the initial parameters are different, the initial parameters are modified into target parameters. The initial configuration file may be an original configuration file of the machine room, or may be a configuration file of other machine rooms. In this way, frequent updating of the configuration file can be prevented, and the influence on the test efficiency is avoided.
According to the testing method provided by the embodiment, the configuration information of the machine room is obtained according to the URL address of the machine room, the target parameters are obtained according to the configuration information and written into the configuration file, the testing program can read the configuration file to obtain the target parameters, the updating parameters of the testing code do not need to be modified manually, the labor cost is reduced, and the processing efficiency is improved. In addition, the method can update the configuration file in time after the configuration of the machine room is changed, so that test faults caused by the fact that the test parameters are not consistent with the actual configuration are prevented, and waste of manpower and time caused by fault detection is avoided.
In one example, after obtaining the target parameters for the test based on the preset rule, the method further includes: determining a target test case from the test case library according to the target parameters; and writing the target test case into a test file, wherein the test file is used for realizing a test program.
In the above example, the test case library includes a plurality of selectable test cases. The target test case can be determined according to the target cluster attribute, for example, if the target cluster attribute corresponds to an SSD model, the SSD test case is selected from the test case library, and the name of the SSD test case is written into the Xml file; selecting an EBS test case and writing the name of the EBS test case into an Xml file when the target cluster attribute corresponds to the EBS model; if the machine room comprises both an SSD model and an EBS model, two test cases are selected simultaneously, and the test case names are written into an xml file in sequence.
In one example, test cases are automatically generated for automated testing based on different configurations of different rooms, i.e., the initial test file is from a room other than the target room.
In one example, it may be determined whether to perform the update of the configuration file by a specific parameter. If the parameter is true, entering a flow of automatically acquiring configuration information and updating the configuration file, and if false, reserving the original configuration file.
In one example, the configuration information of the machine room further includes information of each physical machine under the machine room. The test method can be applied to the scenes such as machine room acceptance, and the like, and the test of each physical machine in the machine room is realized.
The embodiment also provides a testing method, which comprises the following steps S2100-S2200.
In step S2100, a test file is obtained, the test file including at least one test case.
The test file is, for example, an Xml file in TestNG.
In step S2200, a test case is executed according to the test file, where, when the test case is executed, a target parameter in the configuration file is read as a test parameter, and the configuration file is obtained by the foregoing method.
It is easy to understand that the automatic test method in this embodiment can also achieve the technical effects of the foregoing method, and will not be described herein again.
< device example >
The embodiment provides an automatic testing device, which comprises a first acquisition module, a second acquisition module, a third acquisition module and a writing module.
The first acquisition module is used for acquiring the URL address of the machine room.
The second obtaining module is used for obtaining configuration information of the machine room according to the URL address, wherein the configuration information comprises at least one of a security group ID, a subnet ID and a cluster attribute corresponding to the machine room.
And the third acquisition module is used for acquiring target parameters for testing based on a preset rule according to the configuration information.
And the writing module is used for writing the target parameters into configuration files corresponding to the machine room, wherein the configuration files are used for being read by the test program to transfer the target parameters.
In one example, the method further comprises a test case writing module for: determining a target test case from the test case library according to the target parameters; and writing the target test case into a test file, wherein the test file is used for realizing a test program.
In one example, the second acquisition module is to perform at least one of: sending a first query instruction to the Nova component and receiving cluster attributes of a machine room returned by the Nova component, wherein the first query instruction comprises a URL address, sending a second query instruction to the Neutron component and receiving a security group ID of the machine room returned by the Neutron component, and the second query instruction comprises the URL address; and sending a third query instruction to the Neutron component and receiving the subnet ID of the machine room returned by the Neutron component, wherein the third query instruction comprises a URL address.
In one example, the third acquisition module is to perform at least one of: obtaining the cluster attribute with the highest occurrence number from the configuration information as a target cluster attribute; acquiring a first security group ID from the configuration information as a target security group ID; and acquiring the subnet ID belonging to the same virtual private cloud as the target security group ID from the configuration information, and taking the subnet ID as the target subnet ID.
In one example, the third acquisition module is further to: and acquiring the instruction set corresponding to the target cluster attribute according to the corresponding relation of the instruction set and the cluster attribute, and taking the instruction set as the target instruction set.
In one example, the write module is to: comparing whether each target parameter is the same as the corresponding initial parameter in the configuration file; if the initial parameters are different, the initial parameters are modified into target parameters.
The embodiment also provides an automatic testing device, which comprises a testing file acquisition module and a testing execution module.
The test file acquisition module is used for acquiring a test file, wherein the test file comprises at least one test case.
The test execution module is used for executing the test case according to the test file, wherein when the test case is executed, the target parameter in the configuration file is read as the test parameter, and the configuration file is obtained based on the method described in the embodiment of the method disclosed by the invention.
< electronic device embodiment >
The present embodiment provides an electronic device including a processor and a memory storing machine-executable instructions capable of being executed by the processor, the processor executing the machine-executable instructions to implement the automatic test method described in the method embodiments of the present disclosure.
The present disclosure may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The computer readable program instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
Computer program instructions for performing the operations of the present disclosure can be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, c++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts 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 instructions, which comprises one or more executable instructions for implementing the specified logical function(s). 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
The foregoing description of the embodiments of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvements in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims (8)

1. An automatic test method, comprising:
acquiring a URL address of a machine room;
acquiring configuration information of the machine room according to the URL address, wherein the configuration information comprises at least one of a security group ID, a subnet ID and a cluster attribute corresponding to the machine room;
acquiring target parameters for testing based on a preset rule according to the configuration information;
writing the target parameters into configuration files corresponding to the machine room, wherein the configuration files are used for being read by a test program to transfer the target parameters;
the method comprises the steps of obtaining target parameters for testing based on preset rules according to the configuration information, wherein the target parameters comprise at least one of the following:
acquiring cluster attributes with highest occurrence times from the configuration information as target cluster attributes;
acquiring a first security group ID from the configuration information as a target security group ID;
acquiring a subnet ID belonging to the same virtual private cloud as the target security group ID from the configuration information, and taking the subnet ID as a target subnet ID;
and acquiring the instruction set corresponding to the target cluster attribute according to the corresponding relation of the instruction set and the cluster attribute, and taking the instruction set as the target instruction set.
2. The method according to claim 1, further comprising, after the target parameters for testing are obtained based on the preset rule:
determining a target test case from a test case library according to the target parameter;
writing the target test case into a test file, wherein the test file is used for realizing the test program.
3. The method of claim 1, wherein the obtaining the configuration information of the machine room according to the URL address includes at least one of:
sending a first query instruction to a Nova component and receiving cluster attributes of the machine room returned by the Nova component, wherein the first query instruction comprises the URL address,
sending a second query instruction to a Neutron component and receiving a security group ID of the machine room returned by the Neutron component, wherein the second query instruction comprises the URL address;
and sending a third query instruction to a Neutron component and receiving a subnet ID of the machine room returned by the Neutron component, wherein the third query instruction comprises the URL address.
4. The method of claim 1, wherein the writing the target parameter into the configuration file corresponding to the machine room comprises:
comparing whether each target parameter is the same as the corresponding initial parameter in the configuration file;
and if the initial parameters are different, modifying the initial parameters into the target parameters.
5. An automatic test method, comprising:
obtaining a test file, wherein the test file comprises at least one test case;
and executing the test case according to the test file, wherein the target parameters in a configuration file are read as the test parameters when the test case is executed, and the configuration file is obtained based on the method of any one of claims 1-4.
6. An automatic test equipment, comprising:
the first acquisition module is used for acquiring the URL address of the machine room;
the second acquisition module is used for acquiring configuration information of the machine room according to the URL address, wherein the configuration information comprises at least one of a security group ID, a subnet ID and a cluster attribute corresponding to the machine room;
the third obtaining module is configured to obtain, according to the configuration information, a target parameter for testing based on a preset rule, where the obtaining, according to the configuration information, the target parameter for testing based on the preset rule includes at least one of: acquiring cluster attributes with highest occurrence times from the configuration information as target cluster attributes; acquiring a first security group ID from the configuration information as a target security group ID; acquiring a subnet ID belonging to the same virtual private cloud as the target security group ID from the configuration information, and taking the subnet ID as a target subnet ID; acquiring an instruction set corresponding to the target cluster attribute according to the corresponding relation of the instruction set and the cluster attribute, and taking the instruction set as a target instruction set;
and the writing module is used for writing the target parameters into configuration files corresponding to the machine room, wherein the configuration files are used for being read by a test program to transfer the target parameters.
7. An automatic test equipment, comprising:
the test file acquisition module is used for acquiring a test file, wherein the test file comprises at least one test case;
the test execution module is used for executing the test case according to the test file, wherein the target parameters in the configuration file are read as the test parameters when the test case is executed, and the configuration file is obtained based on the method of any one of claims 1-4.
8. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the method of any one of claims 1 to 4.
CN202010366922.XA 2020-04-30 2020-04-30 Automatic test method and device and electronic equipment Active CN111597112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010366922.XA CN111597112B (en) 2020-04-30 2020-04-30 Automatic test method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010366922.XA CN111597112B (en) 2020-04-30 2020-04-30 Automatic test method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111597112A CN111597112A (en) 2020-08-28
CN111597112B true CN111597112B (en) 2023-08-08

Family

ID=72191028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010366922.XA Active CN111597112B (en) 2020-04-30 2020-04-30 Automatic test method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111597112B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214413B (en) * 2020-10-27 2024-01-16 北京字节跳动网络技术有限公司 Application program testing method, device, equipment and storage medium
CN113282483A (en) * 2021-02-07 2021-08-20 北京大米科技有限公司 Test method, related device and computer medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016133885A (en) * 2015-01-16 2016-07-25 日本電信電話株式会社 Virtual apparatus testing device, virtual apparatus testing method, and virtual apparatus testing program
CN105868058A (en) * 2015-12-14 2016-08-17 乐视网信息技术(北京)股份有限公司 Cross-machine room test method and apparatus
CN107769938A (en) * 2016-08-16 2018-03-06 北京金山云网络技术有限公司 The system and method that a kind of Openstack platforms support Multi net voting region
CN108055327A (en) * 2017-12-15 2018-05-18 佛山三维二次方科技有限公司 Cloud computing experiment porch based on OpenStack
CN109783359A (en) * 2018-12-14 2019-05-21 深圳壹账通智能科技有限公司 The method, apparatus and computer equipment that automatic detection interface effectively identifies
CN109901985A (en) * 2017-12-08 2019-06-18 北京京东尚科信息技术有限公司 Distribution testing device and method, storage medium and electronic equipment
TW202103004A (en) * 2019-07-05 2021-01-16 英業達股份有限公司 Automatic test system and method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867990A (en) * 2015-11-20 2016-08-17 乐视云计算有限公司 Software development integration method and device thereof
US10268570B2 (en) * 2016-05-05 2019-04-23 Oracle International Corporation Methods, systems, and computer readable media for automated generation of test files and testing network equipment using same
US10936477B2 (en) * 2018-01-31 2021-03-02 Salesforce.Com, Inc. End-to-end user interface component testing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016133885A (en) * 2015-01-16 2016-07-25 日本電信電話株式会社 Virtual apparatus testing device, virtual apparatus testing method, and virtual apparatus testing program
CN105868058A (en) * 2015-12-14 2016-08-17 乐视网信息技术(北京)股份有限公司 Cross-machine room test method and apparatus
CN107769938A (en) * 2016-08-16 2018-03-06 北京金山云网络技术有限公司 The system and method that a kind of Openstack platforms support Multi net voting region
CN109901985A (en) * 2017-12-08 2019-06-18 北京京东尚科信息技术有限公司 Distribution testing device and method, storage medium and electronic equipment
CN108055327A (en) * 2017-12-15 2018-05-18 佛山三维二次方科技有限公司 Cloud computing experiment porch based on OpenStack
CN109783359A (en) * 2018-12-14 2019-05-21 深圳壹账通智能科技有限公司 The method, apparatus and computer equipment that automatic detection interface effectively identifies
TW202103004A (en) * 2019-07-05 2021-01-16 英業達股份有限公司 Automatic test system and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
毛军礼 ; .OpenStack之Nova服务.计算机与网络.(第03期), *

Also Published As

Publication number Publication date
CN111597112A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN107861655B (en) Control matching method and device, computer equipment and storage medium
US20140081615A1 (en) Virtual systems testing
CN105930330A (en) Portal system page display method and apparatus
CN111597112B (en) Automatic test method and device and electronic equipment
US10152405B2 (en) Application testing system and method
CN110704062A (en) Dependency management method, data acquisition method, device and equipment
US11741002B2 (en) Test automation systems and methods using logical identifiers
CN108108986B (en) Design method and device of customer relationship management system and electronic equipment
US11422783B2 (en) Auto-deployment of applications
CN108363684A (en) List creation method, device and server
CN110968314B (en) Page generation method and device
CN108460161B (en) Hierarchical sampling method and device and computer equipment
CN115048254B (en) Simulation test method, system, equipment and readable medium for data distribution strategy
CN111309624B (en) Test method, test device, test equipment and storage medium
CN110941547B (en) Automatic test case library management method, device, medium and electronic equipment
US10754822B1 (en) Systems and methods for ontology migration
CN105468776A (en) Method, device and system for operating database
CN117493158A (en) Test method and device, electronic equipment and storage medium
CN113886221B (en) Test script generation method and device, storage medium and electronic equipment
US11640281B2 (en) Tool for introspection in object-oriented source code
CN107766386B (en) Solr data migration method and device
CN112948264A (en) Test task execution method, device, system, storage medium and electronic device
CN111061625A (en) Automatic testing method and device applied to out-of-order password keyboard
CN112115134A (en) Data storage method and device, electronic equipment and storage medium
CN112749159A (en) Form generation method and device, electronic equipment 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