CN111737073B - Automatic testing method, device, equipment and medium - Google Patents

Automatic testing method, device, equipment and medium Download PDF

Info

Publication number
CN111737073B
CN111737073B CN202010867611.1A CN202010867611A CN111737073B CN 111737073 B CN111737073 B CN 111737073B CN 202010867611 A CN202010867611 A CN 202010867611A CN 111737073 B CN111737073 B CN 111737073B
Authority
CN
China
Prior art keywords
test
component
target
package
preset
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
CN202010867611.1A
Other languages
Chinese (zh)
Other versions
CN111737073A (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.)
Peng Cheng Laboratory
Original Assignee
Peng Cheng Laboratory
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 Peng Cheng Laboratory filed Critical Peng Cheng Laboratory
Priority to CN202010867611.1A priority Critical patent/CN111737073B/en
Publication of CN111737073A publication Critical patent/CN111737073A/en
Application granted granted Critical
Publication of CN111737073B publication Critical patent/CN111737073B/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/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses an automatic testing method, a device, equipment and a medium, wherein the method comprises the following steps: when an automatic test instruction is received, test flow information carried in the automatic test instruction is obtained; acquiring a target test component from a preset test component set area based on the test flow information, and acquiring combination sequence information of the target test component; based on the combination sequence information, carrying out initialization processing and combination processing on the target test assembly to obtain a target test script; and executing a target test flow corresponding to the automatic test instruction based on the target test script. The application solves the technical problem that in the existing test process, non-professional performance testers are difficult to quickly realize performance test on the server, and further the test efficiency is low.

Description

Automatic testing method, device, equipment and medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to an automated testing method, apparatus, device, and medium.
Background
With the continuous development of the internet, more and more scientific technologies are applied to the internet field, but the internet field also puts higher requirements on the technology, such as higher requirements on the performance test of the server.
At present, a plurality of methods for testing the performance of a server exist, the configuration requirements of the test environment required by the test are different, the adopted test script is changed frequently due to the upgrade of software or hardware, in the process of testing the performance of the existing server, professional performance testers often build a test frame manually, the components to be tested are tested, and the performance test of the server is difficult to realize quickly for non-professional performance testers, so that the test efficiency is reduced.
Disclosure of Invention
The application mainly aims to provide an automatic testing method, device, equipment and medium, and aims to solve the technical problem that in the existing testing process, non-professional performance testers cannot quickly test the performance of a server, and further the testing efficiency is low.
In order to achieve the above object, the present application provides an automated testing method, including:
when an automatic test instruction is received, test flow information carried in the automatic test instruction is obtained;
acquiring a target test component from a preset test component set area based on the test flow information, and acquiring combination sequence information of the target test component;
based on the combination sequence information, carrying out initialization processing and combination processing on the target test assembly to obtain a target test script;
and executing a target test flow corresponding to the automatic test instruction based on the target test script. Optionally, the step of performing initialization processing and combination processing on the target test component based on the combination sequence information to obtain a target test script includes:
based on the combination sequence information, carrying out initialization processing and combination processing on the target test assembly to obtain a first assembly package;
receiving a component keyed value, updating the first component package according to the component keyed value, and converting the updated first component package into a code component package;
and generating a target test script based on the code component package.
Optionally, the step of receiving a component-entered value, updating the first component package according to the component-entered value, and converting the updated first component package into a code component package includes:
receiving a component keyed value, updating the first component package according to the component keyed value, and determining a key test component according to the component keyed value;
and converting the updated first component package into a code component package, and performing identification processing of key test components in the code component package.
Optionally, the target test component includes a BIOS verification input component, and the step of executing the test flow corresponding to the automated test instruction based on the target test script includes:
uploading the target test script to a preset designated server so as to run the target test script on the preset designated server;
in the process of running the target test script, judging whether a running BIOS value of a BIOS verification input component is consistent with a preset input verification parameter or not;
if the test flow is inconsistent with the automatic test instruction, outputting error alarm information, and interrupting the execution of the test flow corresponding to the automatic test instruction;
and if the test flow is consistent with the test flow, executing the test flow corresponding to the automatic test instruction.
Optionally, the step of obtaining the target test component from a preset test component set area based on the test flow information includes:
acquiring a test scene component from a preset test component set area based on the test flow information;
determining whether a target test component sub-package of the test flow information exists in the preset test component set region;
and if the sub-package of the target testing component exists, taking the sub-package of the target testing component and the testing scene component as the target testing component.
Optionally, the step of determining whether a target test component sub-packet of the test flow information exists in the preset test component set region includes:
determining target parameters of other components except the test scene component based on the test flow information;
constructing a parameter representation matrix based on the target parameters and the sub-package parameters of the sub-packages of the test components in the preset test component set area;
determining the similarity between the target parameter and each sub-package parameter based on the parameter representation matrix to obtain a similarity representation vector;
and determining whether a target test component sub-package of the test flow information exists in the preset test component set region or not based on the similarity representation vector.
Optionally, the step of determining whether a target test component sub-packet of the test flow information exists in the preset test component set region based on the similarity representation vector includes:
selecting a target expression vector with highest similarity from the similarity expression vectors;
determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
and if the similarity value of the target expression vector is larger than or equal to a preset similarity value, determining a target test assembly sub-package with the test flow information in the preset test assembly set area.
The application also provides an automatic testing device, the automatic testing device includes:
the system comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring test flow information carried in an automatic test instruction when the automatic test instruction is received;
the second acquisition module is used for acquiring a target test component from a preset test component set area based on the test flow information and acquiring combination sequence information of the target test component;
the third acquisition module is used for carrying out initialization processing and combination processing on the target test assembly based on the combination sequence information to obtain a target test script;
and the execution module is used for executing the target test flow corresponding to the automatic test instruction based on the target test script.
Optionally, the third obtaining module includes:
the processing unit is used for carrying out initialization processing and combination processing on the target test assembly based on the combination sequence information to obtain a first assembly package;
a receiving unit, configured to receive a component key value, update the first component package according to the component key value, and convert the updated first component package into a code component package;
and the generating unit is used for generating a target test script based on the code component package.
Optionally, the receiving unit includes:
the receiving subunit is used for receiving the component key-in value, updating the first component package according to the component key-in value and determining a key test component according to the component key-in value;
and the identification subunit is used for converting the updated first component package into a code component package and performing identification processing of key test components in the code component package.
Optionally, the target test component includes a BIOS verification input component, and the execution module includes:
the running unit is used for uploading the target test script to a preset specified server so as to run the target test script on the preset specified server;
the judging unit is used for judging whether the running BIOS value of the BIOS verification input component is consistent with the preset input verification parameter or not in the process of running the target test script;
the interruption unit is used for outputting error alarm information and interrupting the execution of the test flow corresponding to the automatic test instruction if the automatic test instruction is inconsistent with the automatic test instruction;
and the execution unit is used for executing the test flow corresponding to the automatic test instruction if the test flow is consistent with the test flow.
Optionally, the second obtaining module includes:
the acquisition unit is used for acquiring a test scene component from a preset test component set area based on the test flow information;
a determining unit, configured to determine whether a target test component sub-packet of the test flow information exists in the preset test component collection area;
and the setting unit is used for taking the sub-package of the target testing component and the testing scene component as the target testing component if the sub-package of the target testing component exists.
Optionally, the determining unit includes:
the first determining subunit is used for determining target parameters of other components except the test scene component based on the test flow information;
the construction subunit is used for constructing a parameter representation matrix based on the target parameters and the sub-package parameters of the sub-packages of the test components in the preset test component set area;
a second determining subunit, configured to determine, based on the parameter representation matrix, similarities between the target parameter and each of the subpacket parameters, and obtain a similarity representation vector;
and the third determining subunit is configured to determine, based on the similarity representation vector, whether a sub-packet of the target test component of the test flow information exists in the preset test component set region.
Optionally, the third determining subunit is configured to implement:
selecting a target expression vector with highest similarity from the similarity expression vectors;
determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
and if the similarity value of the target expression vector is larger than or equal to a preset similarity value, determining a target test assembly sub-package with the test flow information in the preset test assembly set area.
The application also provides an automatic test equipment, automatic test equipment is entity equipment, automatic test equipment includes: a memory, a processor and a program of the automated testing method stored on the memory and executable on the processor, the program of the automated testing method when executed by the processor implementing the steps of the automated testing method as described above.
The present application also provides a medium having a program stored thereon for implementing the above-described automated testing method, wherein the program for implementing the automated testing method, when executed by a processor, implements the steps of the above-described automated testing method.
According to the method, when an automatic test instruction is received, test flow information carried in the automatic test instruction is obtained; acquiring a target test component from a preset test component set area based on the test flow information, and acquiring combination sequence information of the target test component; based on the combination sequence information, carrying out initialization processing and combination processing on the target test assembly to obtain a target test script; and executing a target test flow corresponding to the automatic test instruction based on the target test script. In the application, based on the test flow, the target test assembly is obtained from the preset test assembly set area, after initialization and combination processing, the target test script is obtained, and automatic testing is performed, compared with the prior art that professional performance testers are needed, a test frame is manually set up, and testing is performed on the assembly to be tested.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic flow chart of a first embodiment of an automated testing method of the present application;
fig. 2 is a flowchart illustrating a detailed procedure of steps of initializing and combining the target test components based on the combination order information to obtain a target test script according to the automated testing method of the present application in the first embodiment;
fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In a first embodiment of the automated testing method, referring to fig. 1, the automated testing method includes:
step S10, when receiving an automatic test instruction, acquiring test flow information carried in the automatic test instruction;
step S20, acquiring a target test component from a preset test component set area based on the test flow information, and acquiring the combination sequence information of the target test component;
step S30, based on the combination sequence information, carrying out initialization processing and combination processing on the target test assembly to obtain a target test script;
and step S40, based on the target test script, executing the target test flow corresponding to the automatic test instruction.
The method comprises the following specific steps:
step S10, when receiving an automatic test instruction, acquiring test flow information carried in the automatic test instruction;
at present, more and more frequently, the test scene is different, the test environment configuration demand that the server performance test needs also respectively differs, and in the test process, the test script that adopts also often can change because of the upgrading of software or hardware, that is, it is complicated changeable to the server performance test, in the current server performance test process, often professional performance testing personnel, to a certain test scene, after building the test frame manually, test the subassembly that awaits measuring, and the upgrading of software or hardware is frequent, build the test frame manually through the manual work at every turn, test the subassembly that awaits measuring, often can cause the too much consumption of manpower and materials resource, and lead to the test efficiency low.
In this embodiment, a flexible automated testing framework is provided, where the automated testing framework is correspondingly provided with a preset testing component assembly area, in the preset testing component assembly area, professional hardware and software testers design module assemblies according to specific formats (modules designed according to specific formats can change testing parameters), other users can select defined or designed module assemblies according to actual testing needs, perform combination and collocation (combination configuration module, testing tool module, etc.) to obtain scenario sets or testing sets required by each testing scenario, sequentially load the selected configuration module and testing tool module (scenario set) into a testing queue, and generate an executable automated testing shell script according to the component sequence of the configuration module and testing tool module for server performance testing, the target test assembly is only required to be obtained from the preset test assembly set area, the appropriate test module can be selected to generate different test scripts according to the actual test scene of the user, and the parameter data filled by the tool module and the like can be changed at any time, so that different test requirements can be met, the development time and the maintenance cost are reduced, and obviously, the requirement on the professional skill of a tester is lower due to the automatic production of the target test script and the automatic test, so the human training resources are saved, and the test efficiency is improved due to the fact that the test is automatic and a test frame does not need to be manually set up.
In this embodiment, it should be noted that hardware and software testers sequentially create at least 5 kinds of module components according to the characteristics of the server device: the version information Input component, the BIOS (Basic Input Output System) verification Input component, the environment variable Input component, the test tool Input component(s), and the test report Output component, it should be noted that hardware and software testers also provide default values of necessary fields according to the characteristics of the server device, and the like.
After a professional hardware and software tester designs a module assembly according to a specific format, the designed module assembly is placed in a preset test assembly set area, a user can define a test flow aiming at a specific test scene according to the test requirement of the user and the preset test assembly set area, in the test flow, the user can input the specific content of test parameters in the module according to an actual application scene, after the input is finished, an executable shell script is generated, and the executable shell script is transmitted to a server for testing to obtain a test result report.
Specifically, the method for the automated testing is applied to an automated testing system, the automated testing system belongs to an automated testing device, and when receiving an automated testing instruction, test flow information carried in the automated testing instruction is obtained, wherein the automated testing instruction is triggered manually or automatically on a testing interface, before the automated testing instruction, a tester creates a test flow to obtain the test flow information, specifically, the tester creates the test flow based on version information so that the automated testing system corresponding to the automated testing method obtains the test flow information from the automated testing instruction, wherein the method for the automated testing system corresponding to the automated testing method to obtain the test flow information from the automated testing instruction includes:
the first method is as follows: the method comprises the following steps that a tester creates a test stream through a configuration file mode (the version information is placed in a configuration file for reading) based on version information, so that the test stream information is obtained from an automatic test instruction by an automatic test method corresponding to an automatic test system;
the second method comprises the following steps: the tester creates a test flow in a dragging or inputting (version information) path mode so that the test flow information is obtained from the automatic test instruction by the automatic test method corresponding to the automatic test system.
Step S20, acquiring a target test component from a preset test component set area based on the test flow information, and acquiring the combination sequence information of the target test component;
after obtaining the test flow information, based on the test flow information (including the component type and the flow sequence of the component), obtaining a target test component from a preset test component set area, where the target test component includes a version information input component, a BIOS verification input component, a test tool input component, an environment variable input component, and a test report output component, and obtaining combination sequence information of the target test component, where the combination sequence information includes: the method comprises the steps of firstly combining version information input components, then combining BIOS verification input components, then combining environment variable input components, then combining test tool input components, and finally testing report output components.
Step S30, based on the combination sequence information, carrying out initialization processing and combination processing on the target test assembly to obtain a target test script;
and initializing the target test assembly according to an initialization sequence based on the combination sequence information, and combining the target test assembly according to a combination sequence based on the combination sequence information to obtain a target test script.
Specifically, the initializing the target test component based on the combination sequence information includes: based on the combination sequence information, initializing the version information input component, then initializing the BIOS verification input component, then initializing the environment variable input component, then initializing the test tool input component, and finally initializing the test report output component. After initializing the version information component, receiving input version information data, the input version information data including tool version information, environment compiler version information, etc. used by the test stream, and initializing the BIOS configuration verification component, after initializing the BIOS configuration verification component, receiving an input BIOS parameter value to be verified, and comparing the BIOS parameter value to be verified with BIOS information derived from a BMC (baseboard management control system) or pre-stored BIOS information, if the comparison passes, initializing the environment configuration input group, after initializing the environment configuration input component, receiving input environment configuration input component data, the environment configuration input component data may determine different input modes according to the number of environment variables, that is, the environment configuration input component data is received through different receiving modes by the automated test system, specifically, for a small number of environment variables, the environment variable for obtaining input may be directly specified from a commandline (command line) field, such as environment variable yes obtained through export hue _ more = yes, and in addition, all configuration information may be directly obtained and run in batch by reading a configuration file. After receiving input environment configuration input component data, initializing a test tool component, and after initializing the test tool component, sequentially loading the complete machine performance test tool component of the server, wherein the complete machine performance test tool component comprises a command line option for specifying a command line option to be transmitted to a client installation program, an installation path, a configuration file option, a log file path, a name and the like, wherein the command line option, the installation path, the configuration file option, the log file path, the name and the like comprise required items, all the required items are pre-stored with default values, it needs to be noted that the open source test tool can be installed directly from a specified software source, and a tool requiring license (certificate) needs to be downloaded from a specified server to be locally installed and then operated.
The complete machine performance testing tool component comprises a CPU performance testing component, a memory bandwidth testing component, a memory delay testing component, a disk IO testing component, a network card performance testing component and the like. The CPU performance testing component is used for measuring integer and floating point computing power of the CPU, including throughput of the CPU and computing response time of the CPU. The memory bandwidth testing component can adopt stream to test the memory access bandwidth of the CPU by operations such as copy (copy), scale (shrink), add (add), trial and the like on the array; the memory delay testing component can adopt Lmbench (portable) lat _ mem _ rd to test the access delay of each level of storage of the CPU; the disk IO test component can adopt a Fio tool to test the disk IO performance, and the Fio can test bare equipment, block equipment and equipment with a file system, and investigate the bandwidth, IOPS, delay and the like of a disk; the network card performance testing component can adopt an iperf tool to test the network throughput rate of TCP and the delay and packet loss rate of UDP (user data packet protocol).
In this embodiment, the test report output component is initialized, and after the test report output component is initialized, a report storage path is provided, where the report storage path may specifically be to integrate or record the related information of the other components.
In this embodiment, after the target test component is initialized, the target test component after the data input is combined according to the combination order to obtain the target test script, and specifically, after the component combination is completed, the generation code is clicked to generate the shell script.
And step S40, based on the target test script, executing the target test flow corresponding to the automatic test instruction.
And executing a target test flow corresponding to the automatic test instruction based on the target test script, namely executing the test flow in the running test flow.
The step of executing the test flow corresponding to the automated test instruction based on the target test script comprises the following steps:
step S41, uploading the target test script to a preset designated server so as to run the target test script on the preset designated server;
in this embodiment, after a target test script is obtained, the target test script is uploaded to a preset specified server, so that the target test script is run on the preset specified server.
Step S42, in the process of running the target test script, judging whether the running BIOS value of the BIOS verification input component is consistent with the preset input verification parameter;
in the process of running the target test script, judging whether the running BIOS value of the BIOS verification input component is consistent with the preset input verification parameter, wherein the reason why whether the running BIOS value of the BIOS verification input component is consistent with the preset input verification parameter needs to be determined is as follows: the resource consumption caused by insufficient preparation of the test environment for testing is avoided.
Step S43, if not, outputting error alarm information, and interrupting the execution of the test flow corresponding to the automatic test instruction;
and step S44, if the test flow is consistent, executing the test flow corresponding to the automatic test instruction.
If the operating BIOS value of the BIOS verification input element is determined to be inconsistent with the preset input verification parameter, the test execution is interrupted, that is, the test flow corresponding to the automatic test instruction is interrupted, and an error alarm message is output. And if the test flow is consistent with the test flow, executing the test flow corresponding to the automatic test instruction.
After the step of generating a target test script based on the code component package, the method includes:
step S50, judging whether the installation execution of the corresponding test tool of the automatic test passes;
in this embodiment, after the step of generating the target test script based on the code component package, it is further required to determine whether the installation execution of the test tool corresponding to the automatic test passes, and if the installation execution of the test tool corresponding to the automatic test does not pass, generate a reminding message.
And step S60, if the installation and execution of the test tool pass, obtaining a test result and outputting a test report.
In this embodiment, it is further determined whether the installation execution of the test tool corresponding to the automated test passes, and if the installation execution of the test tool passes, the test result is obtained, and a test report is output.
According to the method, when an automatic test instruction is received, test flow information carried in the automatic test instruction is obtained; acquiring a target test component from a preset test component set area based on the test flow information, and acquiring combination sequence information of the target test component; based on the combination sequence information, carrying out initialization processing and combination processing on the target test assembly to obtain a target test script; and executing a target test flow corresponding to the automatic test instruction based on the target test script. In the application, based on the test flow, the target test assembly is obtained from the preset test assembly set area, after initialization and combination processing, the target test script is obtained, and automatic testing is performed, compared with the prior art that professional performance testers are needed, a test frame is manually set up, and testing is performed on the assembly to be tested.
Referring to fig. 2, in another embodiment of the automated testing method of the present application, the step of performing initialization processing and combination processing on the target test component based on the combination sequence information to obtain a target test script includes:
step S31, based on the combination sequence information, performing initialization processing and combination processing on the target test assembly to obtain a first assembly package;
step S32, receiving a component key value, updating the first component package according to the component key value, and converting the updated first component package into a code component package;
in this embodiment, based on the combination sequence information, the target test component is initialized and combined to obtain a first component package, after the first component package is obtained, a component key-in value is also uniformly received, the first component package is updated according to the component key-in value, specifically, a component corresponding to the key-in value in the first component package is updated according to the component key-in value, and the updated first component package is converted into a code component package.
The step of receiving a component-entered value, updating the first component package according to the component-entered value, and converting the updated first component package into a code component package, includes:
step A1, receiving a component key value, updating the first component package according to the component key value, and determining a key test component according to the component key value;
in this embodiment, after receiving the component-entered value, the critical test component is determined based on the component-entered value, e.g., if the a1 parameter value for the a test component is modified, then the a test component is the critical test component.
Step A2, converting the updated first component package into a code component package, and performing identification processing of key test components in the code component package.
And converting the updated first component package into a code component package, and performing identification processing of key testing on the key testing components in the code component package so as to perform key testing on the key testing components, specifically, performing full-flow key testing processing on the key testing components.
And step S33, generating a target test script based on the code component package.
And performing code conversion processing based on the code component package to generate a target test script.
In this embodiment, a first component package is obtained by performing initialization processing and combination processing on the target test component based on the combination sequence information; receiving a component keyed value, updating the first component package according to the component keyed value, and converting the updated first component package into a code component package; and generating a target test script based on the code component package. In this embodiment, the key test component is subjected to the key test.
In another embodiment of the present application, the step of obtaining a target test component from a preset test component set area based on the test flow information includes:
step S21, acquiring a test scene component from a preset test component set area based on the test flow information;
in this embodiment, based on the test flow information, a test scenario component is obtained from a preset test component set region, where the test scenario component may refer to a version information component and different test scenarios, and the test scenario components are different.
Step S22, determining whether a target test component sub-package of the test flow information exists in the preset test component set region;
and determining whether a target test assembly sub-packet of the test flow information exists in the preset test assembly set region, wherein the target test assembly sub-packet is a sub-packet capable of being repeatedly loaded, a plurality of sets of sub-packets capable of being repeatedly loaded can be preset according to different test environments and functions, and whether the target test assembly sub-packet of the test flow information exists in the preset test assembly set region is determined based on the target test environment and the target test function of the test flow information.
Step S23, if a sub-package of the target test component exists, the sub-package of the target test component and the test scenario component are used as the target test component.
And if the sub-package of the target testing component exists, taking the sub-package of the target testing component and the testing scene component as the target testing component, and if the sub-package of the target testing component does not exist, acquiring the target testing component from a preset testing component set region based on the testing flow information.
In the embodiment, a test scene component is acquired from a preset test component set area based on the test flow information; determining whether a target test component sub-package of the test flow information exists in the preset test component set region; and if the sub-package of the target testing component exists, taking the sub-package of the target testing component and the testing scene component as the target testing component. In this embodiment, the target test component is obtained by fast combination.
In another embodiment of the present application, the step of determining whether a sub-packet of a target test component of the test flow information exists in the preset test component set region includes:
step B1, determining target parameters of other components except the test scene components based on the test flow information;
step B2, constructing a parameter representation matrix based on the target parameters and the sub-package parameters of the sub-packages of the test components in the preset test component set area;
step B3, based on the parameter representation matrix, determining the similarity between the target parameter and each sub-packet parameter to obtain a similarity representation vector;
step B4, determining whether a target test component sub-packet of the test flow information exists in the preset test component set region based on the similarity representation vector.
In this embodiment, specifically, based on the test flow information, determining target parameters of other components outside the test scenario component, and based on the target parameters and sub-packet parameters of sub-packets of each test component in the preset test component set region, constructing a parameter representation matrix, where each column of the parameter representation matrix corresponds to one target parameter or sub-packet parameter, and the parameter represents characteristics of the target parameter or sub-packet parameter corresponding to each row of the matrix, the method for constructing the parameter representation matrix includes one-hot encoding and the like, further inputting the parameter representation matrix into a preset similarity calculation model, calculating similarity between each sub-packet parameter and the target parameter, and obtaining a similarity representation vector, where the similarity representation vector includes one or more similarity values, where the similarity value represents a degree of similarity between the sub-packet parameter and the target parameter, and then determining whether a target test component sub-package of the test flow information exists in the preset test component set region or not based on the similarity representation vector.
Wherein the step of determining whether a target test component sub-packet of the test flow information exists in the preset test component set region based on the similarity representation vector comprises:
step C1, selecting a target expression vector with highest similarity from the similarity expression vectors;
step C2, determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
step C3, if the similarity value of the target expression vector is greater than or equal to a preset similarity value, determining that a target test component sub-package of the test flow information exists in the preset test component set region.
In this embodiment, a target expression vector with the highest similarity is selected from the similarity expression vectors, and whether the similarity value of the target expression vector is greater than or equal to a preset similarity value is determined; and if the similarity value of the target expression vector is larger than or equal to a preset similarity value, determining that a target test assembly sub-packet of the test flow information exists in the preset test assembly set region, and if the similarity value of the target expression vector is smaller than the preset similarity value, determining that the target test assembly sub-packet of the test flow information does not exist in the preset test assembly set region. In this embodiment, it is further determined whether the similarity value of the target representation vector is greater than or equal to a preset similarity value, so as to accurately determine whether a target test component sub-packet of the test flow information exists in a preset test component set region.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 3, the automated test equipment may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
Optionally, the automated testing equipment may further include a rectangular main car interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. The rectangular vehicle owner interface may include a Display screen (Display), an input sub-module such as a Keyboard (Keyboard), and the optional rectangular vehicle owner interface may further include a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the automated test equipment configuration shown in FIG. 3 does not constitute a limitation of automated test equipment, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is one type of computer medium, may include an operating system, a network communication module, and an automation test program. An operating system is a program that manages and controls the hardware and software resources of an automated test equipment, supporting the operation of automated test programs as well as other software and/or programs. The network communication module is used for communication among the components in the memory 1005 and with other hardware and software in the automated test system.
In the automated test equipment shown in fig. 3, the processor 1001 is configured to execute an automated test program stored in the memory 1005 to implement the steps of any one of the automated test methods described above.
The specific implementation of the automated testing device of the present application is substantially the same as the embodiments of the automated testing method, and is not described herein again.
The application also provides an automatic testing device, the automatic testing device includes:
the system comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring test flow information carried in an automatic test instruction when the automatic test instruction is received;
the second acquisition module is used for acquiring a target test component from a preset test component set area based on the test flow information and acquiring combination sequence information of the target test component;
the third acquisition module is used for carrying out initialization processing and combination processing on the target test assembly based on the combination sequence information to obtain a target test script;
and the execution module is used for executing the target test flow corresponding to the automatic test instruction based on the target test script.
Optionally, the third obtaining module includes:
the processing unit is used for carrying out initialization processing and combination processing on the target test assembly based on the combination sequence information to obtain a first assembly package;
a receiving unit, configured to receive a component key value, update the first component package according to the component key value, and convert the updated first component package into a code component package;
and the generating unit is used for generating a target test script based on the code component package.
Optionally, the receiving unit includes:
the receiving subunit is used for receiving the component key-in value, updating the first component package according to the component key-in value and determining a key test component according to the component key-in value;
and the identification subunit is used for converting the updated first component package into a code component package and performing identification processing of key test components in the code component package.
Optionally, the target test component includes a BIOS verification input component, and the execution module includes:
the running unit is used for uploading the target test script to a preset specified server so as to run the target test script on the preset specified server;
the judging unit is used for judging whether the running BIOS value of the BIOS verification input component is consistent with the preset input verification parameter or not in the process of running the target test script;
the interruption unit is used for outputting error alarm information and interrupting the execution of the test flow corresponding to the automatic test instruction if the automatic test instruction is inconsistent with the automatic test instruction;
and the execution unit is used for executing the test flow corresponding to the automatic test instruction if the test flow is consistent with the test flow.
Optionally, the second obtaining module includes:
the acquisition unit is used for acquiring a test scene component from a preset test component set area based on the test flow information;
a determining unit, configured to determine whether a target test component sub-packet of the test flow information exists in the preset test component collection area;
and the setting unit is used for taking the sub-package of the target testing component and the testing scene component as the target testing component if the sub-package of the target testing component exists.
Optionally, the determining unit includes:
the first determining subunit is used for determining target parameters of other components except the test scene component based on the test flow information;
the construction subunit is used for constructing a parameter representation matrix based on the target parameters and the sub-package parameters of the sub-packages of the test components in the preset test component set area;
a second determining subunit, configured to determine, based on the parameter representation matrix, similarities between the target parameter and each of the subpacket parameters, and obtain a similarity representation vector;
and the third determining subunit is configured to determine, based on the similarity representation vector, whether a sub-packet of the target test component of the test flow information exists in the preset test component set region.
Optionally, the third determining subunit is configured to implement:
selecting a target expression vector with highest similarity from the similarity expression vectors;
determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
and if the similarity value of the target expression vector is larger than or equal to a preset similarity value, determining a target test assembly sub-package with the test flow information in the preset test assembly set area.
The specific implementation of the automated testing apparatus of the present application is substantially the same as that of the above-mentioned automated testing method, and is not described herein again.
The present embodiments provide a medium, and the medium stores one or more programs, which may also be executed by one or more processors for implementing the steps of any one of the above described automated testing methods.
The specific implementation of the medium of the present application is substantially the same as the embodiments of the automated testing method, and is not described herein again.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (9)

1. An automated testing method, comprising:
when an automatic test instruction is received, test flow information carried in the automatic test instruction is obtained;
acquiring a target test component from a preset test component set area based on the test flow information, and acquiring combination sequence information of the target test component;
based on the combination sequence information, carrying out initialization processing and combination processing on the target test assembly to obtain a first assembly package;
receiving a component keyed value, updating the first component package according to the component keyed value, and converting the updated first component package into a code component package;
generating a target test script based on the code component package;
and executing a target test flow corresponding to the automatic test instruction based on the target test script.
2. The automated testing method of claim 1, wherein the steps of receiving a component entered value, updating the first package of components based on the component entered value, and converting the updated first package of components into a code package of components comprises:
receiving a component keyed value, updating the first component package according to the component keyed value, and determining a key test component according to the component keyed value;
and converting the updated first component package into a code component package, and performing identification processing of key test components in the code component package.
3. The automated testing method of claim 1, wherein the target test component comprises a BIOS verification input component, and wherein executing the automated test instructions corresponding to the test flow based on the target test script comprises:
uploading the target test script to a preset designated server so as to run the target test script on the preset designated server;
in the process of running the target test script, judging whether a running BIOS value of a BIOS verification input component is consistent with a preset input verification parameter or not;
if the test flow is inconsistent with the automatic test instruction, outputting error alarm information, and interrupting the execution of the test flow corresponding to the automatic test instruction;
and if the test flow is consistent with the test flow, executing the test flow corresponding to the automatic test instruction.
4. The automated testing method of claim 1, wherein the step of obtaining a target test component from a predetermined test component collection area based on the test flow information comprises:
acquiring a test scene component from a preset test component set area based on the test flow information;
determining whether a target test component sub-package of the test flow information exists in the preset test component set region;
and if the sub-package of the target testing component exists, taking the sub-package of the target testing component and the testing scene component as the target testing component.
5. The automated testing method of claim 4, wherein the step of determining whether a sub-packet of the target test component of the test flow information exists in the preset test component set area comprises:
determining target parameters of other components except the test scene component based on the test flow information;
constructing a parameter representation matrix based on the target parameters and the sub-package parameters of the sub-packages of the test components in the preset test component set area;
determining the similarity between the target parameter and each sub-package parameter based on the parameter representation matrix to obtain a similarity representation vector;
and determining whether a target test component sub-package of the test flow information exists in the preset test component set region or not based on the similarity representation vector.
6. The automated testing method of claim 5, wherein said step of determining whether a target test component sub-packet of the test flow information exists in the preset test component set region based on the similarity representation vector comprises:
selecting a target expression vector with highest similarity from the similarity expression vectors;
determining whether the similarity value of the target expression vector is greater than or equal to a preset similarity value;
and if the similarity value of the target expression vector is larger than or equal to a preset similarity value, determining a target test assembly sub-package with the test flow information in the preset test assembly set area.
7. The automated testing method of claim 1, wherein after the step of generating a target test script based on the code component package, the method comprises:
judging whether the installation execution of the corresponding test tool of the automatic test passes or not;
and if the installation execution of the test tool passes, obtaining a test result and outputting a test report.
8. An automated test equipment, comprising: a memory, a processor, and a program stored on the memory for implementing the automated testing method,
the memory is used for storing a program for realizing the automatic test method;
the processor is configured to execute a program implementing the automated testing method to implement the steps of the automated testing method according to any one of claims 1 to 7.
9. A storage medium having stored thereon a program for implementing an automated testing method, the program being executable by a processor to implement the steps of the automated testing method according to any one of claims 1 to 7.
CN202010867611.1A 2020-08-26 2020-08-26 Automatic testing method, device, equipment and medium Active CN111737073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010867611.1A CN111737073B (en) 2020-08-26 2020-08-26 Automatic testing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010867611.1A CN111737073B (en) 2020-08-26 2020-08-26 Automatic testing method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111737073A CN111737073A (en) 2020-10-02
CN111737073B true CN111737073B (en) 2020-12-04

Family

ID=72658823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010867611.1A Active CN111737073B (en) 2020-08-26 2020-08-26 Automatic testing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111737073B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486544A (en) * 2020-12-16 2021-03-12 网宿科技股份有限公司 Software upgrading method and device
CN112748300A (en) * 2020-12-24 2021-05-04 西安航空电子科技有限公司 Test method, test device and test system for microwave equipment
CN113392002B (en) * 2021-06-15 2024-04-12 北京京东振世信息技术有限公司 Test system construction method, device, equipment and storage medium
CN114390574B (en) * 2022-01-19 2023-12-19 Tcl通讯科技(成都)有限公司 Wireless network throughput test method, device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110232014A (en) * 2019-02-25 2019-09-13 上海蔚来汽车有限公司 Operation flow automated testing method, device, controller and medium
CN110275826A (en) * 2019-05-20 2019-09-24 平安普惠企业管理有限公司 Automated testing method, device and computer readable storage medium
US10565095B2 (en) * 2016-12-15 2020-02-18 Syntel, Inc. Hybrid testing automation engine
CN111198787A (en) * 2018-11-16 2020-05-26 长鑫存储技术有限公司 Test program generation method, test program generation device, storage medium and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446860B (en) * 2015-11-11 2017-12-15 上海欣方智能***有限公司 Pressure testing system and method for testing based on asynchronism and concurrency mechanism

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10565095B2 (en) * 2016-12-15 2020-02-18 Syntel, Inc. Hybrid testing automation engine
CN111198787A (en) * 2018-11-16 2020-05-26 长鑫存储技术有限公司 Test program generation method, test program generation device, storage medium and electronic equipment
CN110232014A (en) * 2019-02-25 2019-09-13 上海蔚来汽车有限公司 Operation flow automated testing method, device, controller and medium
CN110275826A (en) * 2019-05-20 2019-09-24 平安普惠企业管理有限公司 Automated testing method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN111737073A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN111737073B (en) Automatic testing method, device, equipment and medium
CN109302522B (en) Test method, test device, computer system, and computer medium
CN108959068B (en) Software interface testing method, device and storage medium
CN111083225A (en) Data processing method and device in Internet of things platform and Internet of things platform
CN111159049A (en) Automatic interface testing method and system
CN108563579B (en) White box testing method, device and system and storage medium
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN110647332A (en) Software deployment method and device based on container cloud
CN107045475B (en) Test method and device
CN112069068A (en) Automatic test data processing method, device, equipment and readable storage medium
CN112639734A (en) Simulation task scheduling method, execution method, simulation implementation method and device
CN111813686A (en) Game testing method and device, testing terminal and storage medium
CN112527676A (en) Model automation test method, device and storage medium
CN115391219A (en) Test case generation method and device, electronic equipment and storage medium
CN105760300B (en) A kind of automated testing method and test macro of STK/UTK business
CN108717357B (en) Page display code conversion method, device, equipment and computer storage medium
CN113204495A (en) Automatic testing method and device based on B/S architecture, storage medium and equipment
CN110717315B (en) System data batch modification method and device, storage medium and electronic equipment
CN117235527A (en) End-to-end containerized big data model construction method, device, equipment and medium
CN112770108A (en) Performance test method, device and system and computer readable storage medium
CN115220707B (en) Software development management method and system based on block chain
CN112181822A (en) Test method and test method for starting time consumption of application program
CN109120473B (en) Interface request frame implementation method, interface test method and corresponding device
CN115437627A (en) Method, device and equipment for developing learning object and storage medium
CN110231812B (en) Industrial Internet of things linkage and execution method and device, intelligent equipment and system

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