CN115878400A - Test method, test apparatus, computer device, storage medium, and program product - Google Patents

Test method, test apparatus, computer device, storage medium, and program product Download PDF

Info

Publication number
CN115878400A
CN115878400A CN202211624892.3A CN202211624892A CN115878400A CN 115878400 A CN115878400 A CN 115878400A CN 202211624892 A CN202211624892 A CN 202211624892A CN 115878400 A CN115878400 A CN 115878400A
Authority
CN
China
Prior art keywords
test
function
tested
server
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211624892.3A
Other languages
Chinese (zh)
Inventor
蔡莹莹
胡瑞宇
姜承硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dawning Information Industry Beijing Co Ltd
Original Assignee
Dawning Information Industry Beijing 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 Dawning Information Industry Beijing Co Ltd filed Critical Dawning Information Industry Beijing Co Ltd
Priority to CN202211624892.3A priority Critical patent/CN115878400A/en
Publication of CN115878400A publication Critical patent/CN115878400A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application relates to a testing method, a testing apparatus, a computer device, a storage medium and a program product. The method comprises the steps of classifying test schemes of target users to obtain test contents corresponding to all classified test functions, running all test cases to perform function test on a server to obtain and display function test information of all functions to be tested on a test interface of the server, and determining test results of all functions to be tested according to the function test information of all functions to be tested and corresponding expected test results. The test method realizes an automatic test scheme integrating a test scheme, a test interface and a test result, and does not need to intervene any manual operation, thereby greatly improving the test efficiency.

Description

Test method, test apparatus, computer device, storage medium, and program product
Technical Field
The present application relates to the field of server testing technologies, and in particular, to a testing method, an apparatus, a computer device, a storage medium, and a program product.
Background
With the continuous development of internet technology, more and more servers are applied to the internet and play different roles, and in order to ensure the normal and stable operation of the servers, all functions of the servers need to be comprehensively tested before the servers are constructed.
In an existing automatic function testing method for a server, different users have different requirements for function testing due to the fact that different functions are used, and the same user also has very detailed requirements for different functions, for example, historical power consumption in a specific time needs to be inquired, or different checking requirements for information of each part of the server need to be met.
However, the above methods require a large amount of manual intervention, resulting in an extremely low test efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide a testing method, an apparatus, a computer device, a storage medium, and a program product capable of improving the efficiency of server function testing.
In a first aspect, the present application provides a test method. The method comprises the following steps:
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
running each test case to perform function test on the server to obtain and display function test information of each function to be tested on a test interface of the server;
and determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
The test method provided by the embodiment realizes an automatic test scheme integrating a test scheme, a test interface and a test result, and does not need to intervene any manual operation, so that the test efficiency is greatly improved. In addition, the test method can be combined with test schemes of different target users to carry out automatic test, so that the function test of different user requirements can be met, the customized function test of the server is realized, and compared with the traditional test method which can only carry out single function through a test script or based on a test command, the test method provided by the scheme has extremely low time cost and labor cost.
In one embodiment, classifying the test schemes of the target users to obtain test contents corresponding to each function to be tested of the server includes:
and summarizing and classifying the contents of the test scheme according to the types of different functions to be tested to obtain the test contents corresponding to each function to be tested.
According to the embodiment, the test content corresponding to each function to be tested is obtained by classifying the test scheme, so that the server can simultaneously test different functions to be tested according to test cases corresponding to different functions to be tested, and the test speed can be greatly improved while different function test requirements of users are met.
In one embodiment, the method further includes:
formatting the test scheme according to a preset format to obtain a processed test scheme;
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server, wherein the test contents comprise:
and classifying the processed test schemes to obtain test contents corresponding to each function to be tested of the server.
According to the embodiment, the test scheme is formatted and then classified, so that the classification accuracy can be improved, and the test efficiency according to the classified test scheme at the later stage is improved.
In one embodiment, determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result includes:
comparing and analyzing the function test information of each function to be tested with the corresponding expected test result;
if the function information of the function to be tested is consistent with the corresponding expected test result, determining that the test result is that the function to be tested passes the verification;
and if the function information of the function to be tested is inconsistent with the corresponding expected test result, determining that the test result is that the function to be tested is not verified.
According to the embodiment, the test result is determined by directly comparing the function information of each function to be tested with the corresponding expected test result, so that efficient information verification can be realized, and the test efficiency is improved.
In one embodiment, the method further includes:
and displaying the test result on the test interface, and displaying the function information of the function to be tested which is not verified and the corresponding expected test result under the condition that the test result is that the function to be tested is not verified.
According to the embodiment, the test result, the function information and the expected test result are displayed on the test interface, so that a user can directly check the test information with errors, the error reasons can be analyzed, and the test experience of the user is improved.
In one embodiment, the method further includes:
quantizing the test results corresponding to all functions to be tested according to the test requirements of the target user to obtain the quantized result of the server;
and displaying the quantification result on a test interface.
The embodiment directly shows the quantitative result of the test result, so that the target user can directly check the test result on the test interface, and visually determine whether the server passes the test or not, or whether the server meets the test requirement of the target user.
In a second aspect, the present application further provides a testing device. The device comprises:
the classification module is used for classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
the test module is used for running each test case to perform functional test on the server to obtain and display functional test information of each function to be tested on a test interface of the server;
and the determining module is used for determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
In a third aspect, the application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
running each test case to perform function test on the server to obtain and display function test information of each function to be tested on a test interface of the server;
and determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
running each test case to perform function test on the server to obtain and display function test information of each function to be tested on a test interface of the server;
and determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
running each test case to perform function test on the server to obtain and display function test information of each function to be tested on a test interface of the server;
and determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
According to the test method, the test device, the computer equipment, the storage medium and the program product, the test contents corresponding to the classified test functions are obtained by classifying the test scheme of the target user, the function test cases are operated to carry out the function test on the server, the function test information of each function to be tested is obtained and displayed on the test interface of the server, and the test result of each function to be tested is determined according to the function test information of each function to be tested and the corresponding expected test result. The test method realizes an automatic test scheme integrating a test scheme, a test interface and a test result, and does not need to intervene any manual operation, thereby greatly improving the test efficiency. In addition, the test method can be combined with test schemes of different target users to carry out automatic test, so that the function test of different user requirements can be met, the customized function test of the server is realized, and compared with the traditional test method which can only carry out single function through a test script or based on a test command, the test method provided by the scheme has extremely low time cost and labor cost.
Drawings
FIG. 1 is a diagram of the internal structure of a server in one embodiment;
FIG. 2 is a schematic flow chart of a test method in one embodiment;
FIG. 3 is a schematic flow chart of a test method in another embodiment;
FIG. 4 is a flowchart illustrating an implementation manner of S203 in the embodiment of FIG. 2;
FIG. 5 is a schematic flow chart of a testing method in another embodiment;
FIG. 6 is a schematic flow chart of a testing method in another embodiment;
FIG. 7 is a schematic flow chart of a test method in another embodiment;
FIG. 8 is a schematic diagram of the structure of a test apparatus in one embodiment;
FIG. 9 is a schematic diagram of the structure of a test apparatus in one embodiment;
FIG. 10 is a schematic diagram of the structure of a test apparatus in one embodiment;
FIG. 11 is a schematic diagram of the test apparatus in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The testing method provided by the embodiment of the application can be applied to the server shown in fig. 1. The server comprises a processor and a memory connected by a system bus, wherein the memory stores a computer program, and the processor executes the computer program to execute the steps of the following method embodiments. Optionally, the server may further comprise a network interface, a display screen and an input device. Wherein the processor of the server is configured to provide computing and control capabilities. The memory of the server includes a nonvolatile storage medium storing an operating system and a computer program, and an internal memory. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the server is used for communicating with an external terminal through network connection. Optionally, the server may also be a personal computer, a personal digital assistant, other terminal devices such as a tablet computer, a mobile phone, and the like, and may also be a cloud or a remote server, and a specific form of the server is not limited in the embodiment of the present application.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the servers to which the subject application applies, as a particular server may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, as shown in fig. 2, a testing method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
s201, classifying the test schemes of the target users to obtain test contents corresponding to each function to be tested of the server; the test content includes test cases and expected test results.
The server is to be used for various function tests, and an automatic test tool can be installed on the server. The target user may be any type of population that needs to perform a functional test on the server, such as a researcher at a college, an engineer at a business, a game fan, etc. It should be noted that the functional test requirements of various groups of people on the server may be different or the same.
The test scheme can comprise the test requirements and the test contents of the target user on the server. The test content may include a test item, a test level, a test case, an expected test result, and the like, where the test item is a function to be tested, and may specifically be an inspection test item, an operation maintenance test item, a reliability test item, and the like configured inside the server, for example, the inspection test item may specifically represent a check item between the function test information obtained by the test and the test requirement of the target user on the server; optionally, the operation maintenance test items include a remote maintenance Management software function, an Intelligent Platform Management Interface (IPMI) Protocol function test, a Redfish Interface Protocol support, a Simple Network Management Protocol (SNMP), and the like; optionally, the reliability test items include redundancy and hot plug tests of a disk, a power supply, a fan, a network card, and the like. The expected test result may be an expected result of each function to be tested by the user, for example, the predicted test result may be that the network card of the server is two giga network ports, or that the hard disk of the server is a 2-block 2TB SATA hard disk.
In this embodiment, an automated testing tool is provided on the server, and is used to perform various functional tests on the server. Optionally, the target user may edit the test scheme on the user side according to the test requirement, the user side generates a file containing the test scheme, and then sends the file containing the test scheme to the server, and the server obtains the test scheme of the target user from the user side; optionally, the target user may also edit the test scheme on the server according to the test requirement, so that the server obtains the test scheme of the target user. When the server acquires the test scheme, the test scheme may be further classified to classify the related contents of the multiple functions to be tested included in the test scheme, so as to obtain the test content corresponding to each function to be tested of the server, for example, after the test scheme is classified, the test level, the test case, the expected test result, and the like of the test item one, the test level, the test case, the expected test result, and the like of the test item two may be obtained. And then the server can analyze the codes of the classified test schemes, so that the server can identify the test schemes and further perform corresponding function tests based on the test schemes.
S202, running each test case to perform function test on the server, and obtaining and displaying function test information of each function to be tested on a test interface of the server.
The test interface of the server may specifically be a network interface (BMC web) of a base Board Management Controller (BMC) thereon, and the test interface may display function information, and may also perform various tests or function operations, for example, information such as a motherboard, a Central Processing Unit (CPU), a memory, a hard disk, and the like may be displayed on the test interface, and an operation of remote maintenance Management software, a network card hot plug, and the like may also be performed through the test interface. The functional test information may specifically be basic information of the server, or may also be operation information of the server, for example, the functional test information may include a BMC IP, a BMC user name and a password, a mirror version of an operating system, a BMC firmware, a bios batch tool, a power consumption acquisition and capping instruction, an ipmitool tool and automation script, a Redfish test tool and automation script, an SNMP test tool and automation script, an analog hardware plugging test instruction and model, a serial number, a motherboard number, and the like.
In this embodiment, when the server obtains the test cases corresponding to the functions to be tested based on the step of S201, the server may sequentially or simultaneously run the test cases to test the functions of the server, obtain the function test information of the functions to be tested, and display the function test information of the functions to be tested on the test interface of the server, for example, if the attribute of the network card is tested, the obtained function test information of the network card is that the network card is 1.5 gigabit network ports; if the attribute of the hard disk is tested, the functional test information of the hard disk is obtained to be the 1.5TB SATA hard disk, and the two pieces of functional test information are displayed on a BMC web interface so that a user can check the test information conveniently.
S203, determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
Each function to be tested corresponds to an expected test result, the expected test result can be determined in advance by a target user, and the expected test result is used for verifying whether the function test information of the function to be tested meets the expected requirement. The test result may include a verification result of each function test information in all the functions to be tested and the corresponding expected test result.
In this embodiment, when the server obtains the function test information of each function to be tested, the function test information of each function to be tested may be further verified according to an expected test result in the test scheme, so as to obtain a verification result corresponding to each function to be tested, and generate a test result including verification results corresponding to all functions to be tested. Optionally, when obtaining the verification result corresponding to each function to be tested, the server may also evaluate the importance or priority of the verification result corresponding to each function to be tested to obtain an evaluation result, and then generate a test result including the evaluation result.
According to the testing method provided by the embodiment of the application, the testing content corresponding to each classified testing function is obtained by classifying the testing scheme of the target user, each testing case is operated to perform the function testing on the server, the function testing information of each function to be tested is obtained and displayed on the testing interface of the server, and the testing result of each function to be tested is determined according to the function testing information of each function to be tested and the corresponding expected testing result. The test method realizes an automatic test scheme integrating a test scheme, a test interface and a test result, and does not need to intervene any manual operation, thereby greatly improving the test efficiency. In addition, the test method can be combined with test schemes of different target users to carry out automatic test, so that the function test of different user requirements can be met, the customized function test of the server is realized, and compared with the traditional test method which can only carry out single function through a test script or based on a test command, the test method provided by the scheme has extremely low time cost and labor cost.
In an embodiment, on the basis of the embodiment shown in fig. 2, the step of classifying the test solution of the target user in this embodiment is described in detail, that is, the step S201 of classifying the test solution of the target user to obtain the test content corresponding to each function to be tested of the server may include: and summarizing and classifying the contents of the test scheme according to the types of different functions to be tested to obtain the test contents corresponding to each function to be tested.
The types of the functions to be tested can be specifically classified into types of a verification test, an operation maintenance test, a reliability test and the like, wherein the types of the verification test can also comprise subcategories such as a mainboard, a CPU, a memory, a hard disk and the like of a server; the operation maintenance test category also comprises sub-categories such as remote maintenance management software function test, IPMI protocol function test, redfish interface protocol support test, SNMP interface protocol support test and the like; the reliability test also comprises sub categories such as redundancy and hot plug tests of magnetic disks, power supplies, fans, network cards and the like.
In this embodiment, the server may collect and classify the contents of the test scheme according to different categories of the to-be-tested functions, so as to collect the related contents of each to-be-tested function contained therein, for example, separately collect the related contents of the to-be-tested item one and the related contents of the to-be-tested item two, and then further perform detailed classification on the classified related contents of the to-be-tested functions, for example, classify the test grade, the test case, and the expected test result of the to-be-tested item one; classifying the test grade, the test case and the expected test result of the item II to be tested; after the classification is carried out according to the method, a classification result containing the test contents corresponding to all functions to be tested can be obtained, and the test contents corresponding to the functions to be tested are recorded in the classification result according to a preset classification format.
For example, the server may classify the contents of the test scheme according to three types of to-be-tested categories, i.e., the memory, the hard disk, and the network card, specifically, collect the related contents of the memory, respectively, where the test level, the test case, and the expected test result of the memory may be classified as the test contents corresponding to the memory test; summarizing related contents of the hard disk, wherein the test grade, the test case and the expected test result of the hard disk can be classified into test contents corresponding to the hard disk test; and summarizing the related contents of the network card, wherein the test level, the test case and the expected test result of the network card can be classified into the test contents corresponding to the network card test. According to the embodiment, the test content corresponding to each function to be tested is obtained by classifying the test scheme, so that the server can simultaneously test different functions to be tested according to test cases corresponding to different functions to be tested, and the test speed can be greatly improved while different function test requirements of users are met.
In one embodiment, based on the embodiment shown in fig. 2, as shown in fig. 3, the method further includes:
and S204, formatting the test scheme according to a preset format to obtain the processed test scheme.
The preset format may be a format including a title, a test item, a sub-item, a case number, a version, a reference document, a reference networking, importance, priority, a test purpose, a preset condition, a test step, an expected result, a remark, and the like, and may be specifically predetermined by the server.
In this embodiment, before the server needs to import the test scheme into the automation test tool, the test scheme may be formatted according to the preset format, and specifically, the test scheme is re-edited according to the preset format to generate a new test scheme. It should be noted that, before the first test scheme is imported by using the automated test tool, formatting needs to be performed, and if another test scheme needs to be imported next time, the automated test tool may directly import the test scheme, and the test scheme can be automatically imported according to a preset format when being imported, so that formatting and importing the test scheme at the same time are realized.
Correspondingly, when the server executes the step S201 of classifying the test scheme of the target user to obtain the test content corresponding to each function to be tested of the server, the specific steps are executed: and classifying the processed test schemes to obtain test contents corresponding to each function to be tested of the server.
The present embodiment relates to a method for classifying a test solution after formatting, the classification process is similar to the classification method of S201, and for detailed description, reference is made to the foregoing contents, which are not repeated herein. According to the embodiment, the test scheme is formatted and then classified, so that the classification accuracy can be improved, and the test efficiency according to the classified test scheme at the later stage is improved.
In an embodiment, an implementation manner of determining a test result is further provided, that is, the step S203 "determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result", as shown in fig. 4, includes the steps of:
s301, comparing and analyzing the function test information of each function to be tested with the corresponding expected test result, if the function information of the function to be tested is consistent with the corresponding expected test result, executing the step S302, and if the function information of the function to be tested is inconsistent with the corresponding expected test result, executing the step S303.
S302, determining that the test result is that the function to be tested passes the verification.
S303, determining that the test result is that the function to be tested is not verified.
In this embodiment, when the server acquires the function test information of each function to be tested, the function test information of each function to be tested may be further compared with a corresponding expected test result for analysis, and if the function test information of the function to be tested is consistent with the corresponding expected test result, it is indicated that the function information obtained after testing the function to be tested has no error and meets the expectation of the target user, so that it is determined that the function to be tested passes the verification; if the function information of the function to be tested is inconsistent with the corresponding expected test result, it is indicated that the function information obtained after testing the function to be tested is wrong and does not meet the expectation of the target user, so that the function to be tested is determined to be not verified.
For example, if the functional test information of the network card of the server to be tested is 1.5 gigabit network port and the expected test result of the network card of the server to be tested is 2 gigabit network port, comparing the functional test information (1.5 gigabit network port) of the network card of the server to be tested with the expected test result (2 gigabit network port) of the network card of the server to be tested, and determining that the functional test information of the network card is inconsistent with the expected test result of the network card, the test of the network card fails. For another example, if the functional test information of the hard disk of the server to be tested is 2 blocks of 1.5TB SATA hard disks, and the expected test result of the hard disk of the server to be tested is 2 blocks of 2TB SATA hard disks, the functional test information of the hard disk of the server to be tested (2 blocks of 1.5TB SATA hard disks) is compared with the expected test result of the network card of the server to be tested (2 blocks of 1.5TB SATA hard disks), so that it can be determined that the functional test information of the network card is consistent with the expected test result of the network card, and then the test of the network card passes verification. It should be noted that, when the server executes the method described in the embodiment of fig. 4, the server may compare and verify information, for example, information verification of each component on the server, network management port test, asset management test, automatic operation on the startup and shutdown restart interface, remote management user management security function test, remote management user permission test, automatic identification of mirror image file installation operating system, automatic search of bios batch tool for bios batch test, upgrading and downgrading test of firmware, log function test, hardware information monitoring and alarm function test, power consumption acquisition and capping function test, automatic search of IPMI interface protocol function test tool and script, automatic search of Redfish interface protocol function test tool and script, automatic search of SNMP interface protocol function test tool and script, and the like. According to the embodiment, the test result is determined by directly comparing the function information of each function to be tested with the corresponding expected test result, so that efficient information verification can be realized, and the test efficiency is improved.
In one embodiment, based on the embodiment shown in fig. 2, as shown in fig. 5, the method further includes:
s205, displaying the test result on the test interface, and displaying the function information of the function to be tested which is not verified and the corresponding expected test result under the condition that the test result is that the function to be tested is not verified.
In this embodiment, when the server obtains the test result based on the method described in the embodiment of fig. 2, the test result may be further displayed on the test interface for the user to visually check the test result, for example, if the test result indicates that the function to be tested passes the verification or fails the verification, the test result may be displayed on the test interface in a word "the function to be tested passes the verification" or in a word "the function to be tested fails the verification" when the test result is displayed on the test interface. And when the test result is the result that the function to be tested does not pass the verification, the function information of the function to be tested which does not pass the verification and the corresponding expected test result are displayed on the test interface, so that a user can specifically check the test information with errors, the error reason is analyzed, and the test experience of the user is improved.
In one embodiment, based on the embodiment shown in fig. 2, as shown in fig. 6, the method further includes:
s206, quantifying the test results corresponding to all functions to be tested according to the test requirements of the target user to obtain the quantification result of the server.
The test requirement of the target user is a requirement of the target user for testing the server, and can be determined by the server in advance and written into the test scheme.
In this embodiment, when the server obtains the test results corresponding to all the functions to be tested, the server may further extract the test requirement from the test scheme, and perform quantization processing on the test result corresponding to each function to be tested in combination with the test requirement, for example, the test result corresponding to each function to be tested is scored according to the importance or the grade of each function to be tested, where the more important or the grade of the function to be tested is, the higher the corresponding scoring score is, and the less important or the grade of the function to be tested is, the lower the corresponding scoring score is. Finally, the server determines the quantization result of the server according to the quantization result of all functions to be tested, for example, the score of the server is determined according to the score of all functions to be tested, specifically, the average score of the scores of all functions to be tested can be used as the score of the server, the important functions to be tested can also be selected from all functions to be tested, and the score of the server is determined according to the selected score of the important functions to be tested. After the server obtains the quantization result of the server, whether the server passes the test or not or whether the server meets the test requirement of the target user or not can be determined according to the quantization result.
And S207, displaying the quantification result on a test interface.
In this embodiment, when the server obtains the quantization result of the server, the quantization result may be displayed on the test interface, so that the target user may directly view the test result on the test interface, and intuitively determine whether the server passes the test, or whether the server meets the test requirement of the target user.
In combination with the methods described in all the above embodiments, the present application further provides a testing method, as shown in fig. 7, the method includes:
s401, formatting the test scheme according to a preset format to obtain the processed test scheme.
S402, classifying the processed test schemes according to the types of different functions to be tested to obtain test contents corresponding to each function to be tested.
And S403, running each test case to perform function test on the server, and obtaining and displaying function test information of each function to be tested on a test interface of the server.
S404, comparing and analyzing the function test information of each function to be tested with the corresponding expected test result to obtain a test result.
If the function information of the function to be tested is consistent with the corresponding expected test result, the test result is determined to be that the function to be tested passes the verification, and if the function information of the function to be tested is inconsistent with the corresponding expected test result, the test result is determined to be that the function to be tested does not pass the verification.
S405, displaying a test result on the test interface, and displaying the function information of the function to be tested and the corresponding expected test result which are not verified under the condition that the test result is that the function to be tested is not verified.
S406, quantifying the test results corresponding to all functions to be tested according to the test requirements of the target user to obtain a quantification result of the server.
And S407, displaying the quantification result on the test interface.
The methods described in the above steps are all described in the foregoing, and for detailed description, reference is made to the foregoing, which is not repeated herein.
According to the test method provided by the embodiment of the application, the automatic function test of the server is realized by combining the test scheme, compared with the traditional method for capturing and verifying the test function information by only using the test script, the method can provide a perfect test mode for the function test through relatively complete processes of input, classification analysis, checking, output and the like, an automatic test tool is arranged on the server to complete a series of operations, and a continuous demand collection port can be arranged on the automatic test tool to collect test schemes of different target users, so that the test requirements of different target users are met. In addition, the method greatly saves time and energy of manual verification brought by different customized function tests.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a testing device for realizing the testing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so the specific limitations in one or more embodiments of the testing device provided below can be referred to the limitations on the testing method in the above, and are not described herein again.
In one embodiment, as shown in fig. 8, there is provided a test apparatus including:
the classification module 601 is configured to classify the test scheme of the target user to obtain test content corresponding to each function to be tested of the server; the test content includes test cases and expected test results.
The test module 602 is configured to run each test case to perform a function test on the server, and obtain and display function test information of each function to be tested on a test interface of the server.
The determining module 603 is configured to determine a test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
In an embodiment, the classification module 601 is specifically configured to perform summary classification on the content of the test scheme according to different categories of the functions to be tested, so as to obtain test content corresponding to each function to be tested.
In one embodiment, as shown in fig. 9, the testing apparatus further includes:
the processing module 604 is configured to format the test scheme according to a preset format to obtain a processed test scheme.
Correspondingly, the classification module 601 is configured to classify the processed test solutions to obtain test contents corresponding to each function to be tested of the server.
In one embodiment, the determining module 603 is specifically configured to compare and analyze the function test information of each function to be tested with the corresponding expected test result, and determine that the test result indicates that the function to be tested passes the verification when the function information of the function to be tested is consistent with the corresponding expected test result; and determining that the test result is that the function to be tested is not verified under the condition that the function information of the function to be tested is inconsistent with the corresponding expected test result.
In one embodiment, as shown in fig. 10, the testing apparatus further includes:
the first display module 605 is configured to display a test result on the test interface, and display function information of a function to be tested that fails to be verified and a corresponding expected test result when the test result indicates that the function to be tested fails to be verified.
In one embodiment, as shown in fig. 11, the testing apparatus further includes:
the quantification module 606 is configured to quantify test results corresponding to all functions to be tested according to the test requirements of the target user, so as to obtain a quantification result of the server;
and a second display module 607 for displaying the quantization result on the test interface.
The modules in the testing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
running each test case to perform a function test on the server to obtain and display function test information of each function to be tested on a test interface of the server;
and determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
running each test case to perform a function test on the server to obtain and display function test information of each function to be tested on a test interface of the server;
and determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
In one embodiment, a computer program product is provided, comprising a computer program which when executed by a processor performs the steps of:
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
running each test case to perform a function test on the server to obtain and display function test information of each function to be tested on a test interface of the server;
and determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include a Read-Only Memory (ROM), a magnetic tape, a floppy disk, a flash Memory, an optical Memory, a high-density embedded nonvolatile Memory, a resistive Random Access Memory (ReRAM), a Magnetic Random Access Memory (MRAM), a Ferroelectric Random Access Memory (FRAM), a Phase Change Memory (PCM), a graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method of testing, the method comprising:
classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
running each test case to perform a function test on the server to obtain and display function test information of each function to be tested on a test interface of the server;
and determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
2. The method of claim 1, wherein the classifying the test schemes of the target users to obtain test contents corresponding to each function to be tested of the server comprises:
and summarizing and classifying the contents of the test scheme according to the types of the different functions to be tested to obtain the test contents corresponding to each function to be tested.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
formatting the test scheme according to a preset format to obtain a processed test scheme;
the classifying the test scheme of the target user to obtain the test content corresponding to each function to be tested of the server comprises the following steps:
and classifying the processed test schemes to obtain test contents corresponding to each function to be tested of the server.
4. The method of claim 3, wherein determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result comprises:
comparing and analyzing the function test information of each function to be tested with a corresponding expected test result;
if the function information of the function to be tested is consistent with the corresponding expected test result, determining that the test result is that the function to be tested passes the verification;
and if the function information of the function to be tested is inconsistent with the corresponding expected test result, determining that the test result is that the function to be tested is not verified.
5. The method of claim 4, further comprising:
and displaying the test result on the test interface, and displaying the function information of the function to be tested and the corresponding expected test result under the condition that the test result is that the function to be tested is not verified.
6. The method of claim 1 or 5, wherein the testing method further comprises:
quantifying the test results corresponding to all functions to be tested according to the test requirements of the target user to obtain a quantification result of the server;
and displaying the quantification result on the test interface.
7. A test apparatus, the apparatus comprising:
the classification module is used for classifying the test scheme of the target user to obtain test contents corresponding to each function to be tested of the server; the test content comprises a test case and an expected test result;
the test module is used for running each test case to perform functional test on the server to obtain and display functional test information of each function to be tested on a test interface of the server;
and the determining module is used for determining the test result of each function to be tested according to the function test information of each function to be tested and the corresponding expected test result.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202211624892.3A 2022-12-16 2022-12-16 Test method, test apparatus, computer device, storage medium, and program product Pending CN115878400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211624892.3A CN115878400A (en) 2022-12-16 2022-12-16 Test method, test apparatus, computer device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211624892.3A CN115878400A (en) 2022-12-16 2022-12-16 Test method, test apparatus, computer device, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN115878400A true CN115878400A (en) 2023-03-31

Family

ID=85755164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211624892.3A Pending CN115878400A (en) 2022-12-16 2022-12-16 Test method, test apparatus, computer device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN115878400A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116559662A (en) * 2023-06-27 2023-08-08 湖南贝特新能源科技有限公司 Propelling motor test system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116559662A (en) * 2023-06-27 2023-08-08 湖南贝特新能源科技有限公司 Propelling motor test system

Similar Documents

Publication Publication Date Title
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
US9569325B2 (en) Method and system for automated test and result comparison
WO2017129032A1 (en) Disk failure prediction method and apparatus
US20120254662A1 (en) Automated test system and automated test method
US11119843B2 (en) Verifying application behavior based on distributed tracing
CN112445875A (en) Data association and inspection method and device, electronic equipment and storage medium
CN112148766A (en) Method and system for sampling data using artificial neural network model
CN107329914A (en) It is a kind of that the out of order method and device of hard disk is detected based on linux system
CN114490375A (en) Method, device and equipment for testing performance of application program and storage medium
CN115878400A (en) Test method, test apparatus, computer device, storage medium, and program product
CN115952081A (en) Software testing method, device, storage medium and equipment
CN111694684B (en) Abnormal construction method and device of storage device, electronic device and storage medium
US20120310849A1 (en) System and method for validating design of an electronic product
CN115793990B (en) Memory health state determining method and device, electronic equipment and storage medium
CN115757099A (en) Automatic test method and device for platform firmware protection recovery function
CN113708986B (en) Server monitoring apparatus, method and computer-readable storage medium
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
CN113342632A (en) Simulation data automatic processing method and device, electronic equipment and storage medium
CN111767222A (en) Data model verification method and device, electronic equipment and storage medium
CN113220551A (en) Index trend prediction and early warning method and device, electronic equipment and storage medium
TWI778634B (en) Method for classifying faults, electronic equipment and storage medium
CN116521490B (en) PC system health degree self-checking method, self-checking device, equipment and medium
CN110765022B (en) Method, device, computer equipment and storage medium for automatically testing sample sending SSD
CN118113622A (en) Detection and repair method, device and equipment applied to batch operation scheduling
CN116627730A (en) Smart log acquisition and analysis method, system, device and medium

Legal Events

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