CN102999404B - Test method, test device and test equipment for computer system - Google Patents
Test method, test device and test equipment for computer system Download PDFInfo
- Publication number
- CN102999404B CN102999404B CN201110269995.8A CN201110269995A CN102999404B CN 102999404 B CN102999404 B CN 102999404B CN 201110269995 A CN201110269995 A CN 201110269995A CN 102999404 B CN102999404 B CN 102999404B
- Authority
- CN
- China
- Prior art keywords
- test
- related information
- under test
- unit under
- information
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 1013
- 238000010998 test method Methods 0.000 title abstract 2
- 238000000034 method Methods 0.000 claims abstract description 64
- 230000000977 initiatory effect Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 21
- 238000011144 upstream manufacturing Methods 0.000 abstract description 13
- 238000010977 unit operation Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 9
- 230000003213 activating effect Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 230000010365 information processing Effects 0.000 description 1
- 238000000059 patterning Methods 0.000 description 1
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The invention aims at providing a test method, a test device and test equipment for a computer system. The method comprises the steps of: selecting one or multiple tested units corresponding to prescient test relevant information from multiple tested units of the computer system; performing the scheduled operation on each tested unit of the one or multiple tested units; and obtaining one or multiple pieces of new test relevant information based on the operation of the tested unit subjected to the scheduled operation, wherein the relevant information is used for performing operations on the other tested units. The method, the device and the equipment has the following advantages: 1) the process of determining a downstream tested unit is fully automatic, the execution sequence of the upstream and downstream test units is not required to be manually predetermined, and the test efficiency is improved; and 2) the obtained test relevant information is real data obtained in the tested unit operation process, so that the computer system testing accuracy is greatly improved.
Description
Technical Field
The present invention relates to the field of computers, and in particular, to a method, an apparatus, and a device for testing a computer system.
Background
Generally, in a testing method for a computer system, the execution sequence relationship among modules in the system needs to be manually set, and the testing data needed for the execution of each module needs to be manually determined, which has the problems that: manually determining the execution order is inefficient and the test data determined manually lacks authenticity, resulting in large differences in test results from the actual results of the computer system when it is actually running.
Disclosure of Invention
The invention aims to provide a method, a device and equipment for testing a computer system.
According to one aspect of the present invention, there is provided a computer-implemented method for testing a computer system, wherein the method comprises the steps of:
a, selecting one or more tested units corresponding to the predicted test related information from a plurality of tested units of the computer system, wherein the following steps are executed for each tested unit in the one or more tested units:
x executing a predetermined operation on the unit under test to obtain one or more new test related information based on the operation of the unit under test after the predetermined operation, so as to execute the operation on other units under test.
According to an aspect of the present invention, there is also provided a test apparatus for testing a computer system, wherein the test apparatus comprises:
selecting means for selecting one or more units under test corresponding to the predicted test-related information from a plurality of units under test of the computer system, wherein the testing means performs an operation on each of the one or more units under test by:
the first execution acquisition device is used for executing a preset operation on the unit under test so as to obtain one or more pieces of new test related information based on the operation of the unit under test after the preset operation, and the one or more pieces of new test related information are used for executing the operation on other units under test.
According to another aspect of the present invention, there is also provided a computer apparatus, wherein the computer apparatus comprises the test device.
Compared with the prior art, the invention has the following advantages: 1) the downstream unit to be operated is determined by acquiring the test related information generated based on the operation on the upstream unit to be tested, so that the process of determining the downstream unit to be tested is fully automatic, the execution sequence between the upstream unit to be tested and the downstream unit to be tested does not need to be preset manually, and the test efficiency is improved; 2) because the obtained test related information is real data obtained in the running process of the tested unit, the accuracy of the computer system test is greatly improved; 3) various items of data obtained by performing the test operation for multiple times can be presented to the user in a form of a chart, so that the user obtains more intuitive results.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 is a flow diagram of a computer-implemented method for testing a computer system in accordance with an aspect of the present invention;
FIG. 2 is a flow diagram of a method for testing a computer system in accordance with a preferred embodiment of the present invention;
FIG. 3 is a flow chart of a method for testing a computer system in accordance with yet another preferred embodiment of the present invention;
FIG. 4 is a block diagram of a test apparatus for testing a computer system according to an aspect of the present invention;
FIG. 5 is a schematic structural diagram of a test apparatus for testing a computer system according to a preferred embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a testing apparatus for testing a computer system according to another preferred embodiment of the present invention;
fig. 7 is a graph showing the result of the patterning according to the preferred embodiment of the present invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
FIG. 1 illustrates a flow diagram of a computer-implemented method for testing a computer system in accordance with an aspect of the present invention. The method according to the present invention includes step S1 and step S2. The method according to the present invention may be implemented by a testing apparatus in a computer device, for example, by an application module, an operating system, a process controller, etc. in the computer device. The computer device is a modern intelligent electronic device capable of automatically and rapidly performing a large number of numerical calculations and various information processing according to a pre-stored program, and the hardware thereof includes but is not limited to a microprocessor, an FPGA, a DSP, an embedded device, and the like. Preferably, the computer devices are operable individually to implement the present invention, and are also operable to access a network and to implement the present invention by interoperating with other computer devices in the network. The computer device includes a network device and a user device. Wherein, the network device includes but is not limited to a single network server, a server group composed of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud composed of a large number of computers or network servers, wherein, the Cloud Computing is one of distributed Computing, a super virtual computer composed of a group of loosely coupled computer sets, and the user device includes but is not limited to a computer, a smart phone, a PDA, etc. The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a VPN network, and the like.
It should be noted that the ue and the network device are only examples, and other existing or future ues, network devices or networks may also be included in the scope of the present invention and are included by reference.
In step S1, the test apparatus selects one or more units under test corresponding to the predicted test-related information from among the units under test of the computer system.
Wherein the unit under test includes, but is not limited to, one or more executable modules in the computer system. The test-related information includes information related to initiating one or more units under test to perform a test. Preferably, the test-related information includes, but is not limited to, at least one of the following: 1) identification information of the unit under test on which the test-related information is based, for example, a module ID of the unit under test on which the test-related information is based, and for example, name information of the unit under test on which the test-related information is based, and the like; 2) the test related information includes test data information of the unit under test based on which the test related information is based, wherein the test data information includes various items of data information obtained by the test apparatus based on the operation of the unit under test, and preferably, the test data information includes but is not limited to at least one of the following items of information: a) the operation output information of the tested unit based on the test related information; b) the operation information of the unit under test based on the test related information includes, but is not limited to, information obtained by the test apparatus in the operation process of the unit under test, for example, the CPU occupancy of the unit under test obtained by the test apparatus in the operation process of the unit under test, for example, the number of socket packets received by the unit under test statistically obtained by the test apparatus in the operation process of the unit under test, and for example, the network bandwidth occupied by the unit under test obtained by the test apparatus monitoring the network usage of the unit under test; c) the test-related information is based on operation result information of the unit under test, preferably, the operation result information includes but is not limited to: i) the operation is successful, for example, in the case that the unit under test outputs information indicating that the operation is successful, for example, in the case that the unit under test outputs predetermined data that the unit under test should output in normal operation, the test device determines that the unit under test is successful in operation, and the like; ii) a failed operation, e.g., in case the unit under test is forced to terminate, e.g., in case the unit under test outputs information indicating its failed operation, the test apparatus determines that the unit under test failed to operate, etc.; iii) has run, e.g., when the unit under test has completed running, the test apparatus determines that the unit under test is running, etc.
Wherein the manner of obtaining the predicted test-related information includes, but is not limited to:
1) and acquiring manually input test related information.
2) Receiving the predicted test-related information provided by a first remote device, wherein the first remote device obtains the predicted test-related information based on executing a predetermined operation on a unit under test contained in the first remote device. The first remote device is connected to the testing apparatus via a network.
The manner of obtaining the predicted test-related information based on the predetermined operation performed on the unit under test included in the unit under test is the same as or similar to the manner of obtaining one or more new test-related information based on the predetermined operation performed on the unit under test in the subsequent step S2, and is not described in detail herein.
3) The predicted test-related information is obtained based on performing a predetermined operation on other units under test that are started before the unit under test.
The manner of starting the other unit under test includes but is not limited to: a) starting up by the test device executing a predetermined operation on the other unit under test; b) manual activation, e.g., by entering instructions in the command line to activate other units under test; c) is initiated by the operation of the unit under test upstream of the other unit under test. For example, the code of the other unit under test is included in the code of the upstream unit under test of the other unit under test, and when the upstream unit under test executes the code, the other unit under test is started.
The manner of obtaining the predicted test-related information based on the predetermined operation performed on the other unit under test started before the unit under test is the same as or similar to the manner of obtaining one or more new test-related information based on the predetermined operation performed on the unit under test in the subsequent step S2, and is not described in detail herein.
The manner of selecting one or more units under test corresponding to the predicted test-related information from the plurality of units under test of the computer system by the test apparatus includes, but is not limited to:
1) and directly querying based on the test related information to obtain the identification information of the corresponding one or more tested units.
For example, when the obtained test-related information includes output information "outputting" output by the unit under test on which the test-related information is based, the test apparatus performs an inquiry in a list of output information and unit under test correspondence list based on the output information to obtain a corresponding unit under test.
For another example, when the predicted test-related information includes the output information "finish" output by the unit under test based on which the test-related information is based and the identification information "Mid _ 1" of the unit under test based on which the predicted test-related information is based, the test apparatus queries the corresponding list of the test-related information and the unit under test based on the predicted test-related information, and obtains two units under test corresponding to both the output information "finish" and the identification information "Mid _ 1".
2) Selecting the one or more units under test from all units under test corresponding to the predicted test-related information based on a predetermined selection priority.
Wherein the predetermined selection priority includes, but is not limited to, at least one of the following: a) selecting a predetermined priority of conditions for selecting a unit under test corresponding to the predicted test-related information; b) a predetermined priority of information types of the foreseen test-related information, the information types including but not limited to: i) identifying the information type; ii) data type of output information, e.g., int type, char type, string type, etc.; iii) the source type of the operation information, e.g., CPU information, Socket information, etc.; iv) type of operation result information.
For example, the test apparatus determines the unit under test related to the predicted test-related information based on the selection conditions shown in table 1 below, where the predetermined priority is a first priority, a second priority, and a third priority from top to bottom:
TABLE 1
If the predicted test-related information includes the identification information Mid _2 of the unit under test and the output information "a" of the unit under test Mid _2, which are based on the identification information, which is 1, the test apparatus first selects a selection condition with a predetermined priority as a first priority for judgment, and judges that the predicted test-related information does not meet the selection condition with the first priority; then, the testing apparatus continues to select the selection condition with the predetermined priority as the second priority for determination, and determines that the predicted test-related information satisfies the selection condition, and then the testing apparatus takes the unit under test Mid _5 as the selected unit under test.
For another example, the test apparatus determines the unit under test related to the predicted test-related information based on the following table 2, where the predetermined priority is the first priority, the second priority, and the third priority from top to bottom:
TABLE 2
The predicted test related information includes that the tested unit on which the predicted test related information is based is Mid _5 and the CPU occupancy rate of the tested unit is 64%, the test device first determines whether string type test related information with a predetermined priority as a first priority is included in the predicted test related information, when it is determined that the string type test related information is not included, the test device continues to determine whether the predicted test related information includes CPU information type test related information with a second priority, and determines that the predicted test related information includes test related information of the CPU information type, namely "CPU occupancy rate 64%", the test device determines that the predicted test related information satisfies a first selection condition "CPU occupancy rate of Mid _ 5" > 50% "corresponding to the CPU information type, and selects a corresponding tested unit Mid _ CPU _ 1.
Preferably, the test apparatus selects the test related information of the corresponding information type according to a predetermined priority of the information type of the test related information, and selects the selection condition for selecting the unit under test according to the order of the predetermined priority of the selection condition corresponding to the information type from high to low.
It should be noted that the predetermined selection priority may be expressed in various forms, for example, in a sequentially executed code, the predetermined priority of each selection condition is determined by the order of the respective appearance positions of the code corresponding to each selection condition, and the like; for another example, the priority of the selection condition is determined by the logical relationship of the code language, for example, in the code written in C language, the priority of two parallel "if" statements is the same, and the priority of "else" statement is smaller than the corresponding "if" statement; for another example, the predetermined priority or the like corresponding to each selection condition is determined based on a correspondence list including the selection condition and the predetermined priority.
It should be further noted that the above examples are only for better illustrating the technical solutions of the present invention, and not for limiting the present invention, and those skilled in the art should understand that any implementation manner of selecting one or more tested units corresponding to the predicted test related information from a plurality of tested units of the computer system should be included in the scope of the present invention.
Next, the test apparatus performs step S2 on each of the one or more cells under test obtained in step S1.
In step S2, the testing apparatus performs a predetermined operation on the selected unit under test to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation, so as to perform an operation on other units under test.
A person skilled in the art should determine what predetermined operation should be performed on the unit under test according to actual conditions and requirements, for example, query a corresponding list of the unit under test and the predetermined operation to determine the predetermined operation to be performed on the unit under test, for example, based on performing the same predetermined operation on each unit under test, and so on, which is not described herein again.
Wherein the predetermined operations include, but are not limited to: 1) when the unit to be tested does not operate, starting the unit to be tested; 2) when the unit under test is already in the running state: a) restarting the tested unit; b) causing the unit under test to perform a portion of the function, e.g., causing the unit under test to reload a database, etc.; c) for example, the test apparatus provides the information of the available remaining memory space of the unit under test at the current time point to the unit under test in operation, so that the unit under test can determine whether the current remaining memory space is sufficient for the unit under test to continue operating.
Moreover, a person skilled in the art may determine which item or items of test-related information need to be obtained according to actual situations and requirements, for example, query a corresponding list of the unit under test and the test-related information to be obtained to determine the test-related information to be obtained when a predetermined operation is performed on the unit under test, and for example, obtain the output information of each unit under test based on a predetermined operation of obtaining the output information, and the like, which is not described herein again.
The method for the testing apparatus to perform the predetermined operation on the unit under test to obtain one or more new test related information based on the operation of the unit under test after the predetermined operation includes, but is not limited to:
1) the test device directly executes a predetermined operation on the unit under test to obtain one or more new test related information based on the operation of the unit under test after the predetermined operation.
For example, when the testing apparatus selects the unit under test Mid _5 that has not yet been operated in step S1, the testing apparatus directly activates Mid _5 to acquire the operation result information of Mid _ 5. For another example, when the testing apparatus selects the running unit under test Mid _10 in step S1, the testing apparatus obtains data from the local database and provides the data to the unit under test Mid _10 to obtain the output information of Mid _ 10; for another example, when the testing apparatus selects the running dut Mid _11 in step S1, the testing apparatus restarts Mid _11 to obtain the time information required for the Mid _11 to restart as the running information.
2) And obtaining input information of the unit under test based on part or all of the predicted test related information, and executing a predetermined operation on the unit under test to obtain one or more new test related information based on the operation of the unit under test after the predetermined operation so as to execute the operation on other units under test.
Wherein, the manner of obtaining the input information of the unit under test based on part or all of the predicted test-related information includes but is not limited to:
a) directly using the test related information as input information;
for example, the predicted test-related information includes output information "Mid _5_ string" of the unit under test Mid _5 on which the predicted test-related information is based, and the testing apparatus selects the unit under test Mid _7 in step S1, the testing apparatus starts Mid _7 with the obtained output information "Mid _5_ string" as input information of the unit under test Mid _7, and obtains operation result information when the input information of the unit under test Mid _7 is "Mid _5_ string".
b) Performing predetermined processing on the test-related information to obtain corresponding input information, wherein the predetermined processing includes:
i) predetermined information corresponding to the test-related information is acquired as input information.
For example, when the predicted test-related information includes the output string "success" of the unit under test Mid _ x based on itself, a predetermined numerical value "16" corresponding to the output string "success" of Mid _ x is acquired, and the unit under test Mid _ y is started by using the numerical value "16" as the input information of the unit under test Mid _ y corresponding to the predicted test-related information.
ii) performing a predetermined operation on the test-related information to obtain input information.
For example, if the predicted test-related information includes the number of packet packets "15" and the network bandwidth information "2M", the test apparatus determines that the output information is the network bandwidth — the number of packet packets × the predetermined size of the predetermined packet packets, 2M — 15 × 128Kb, or 128 Kb.
3) The testing device judges whether all the obtained testing relevant information corresponding to the tested unit is all the testing relevant information required for executing the preset operation on the tested unit; and when judging that all the test related information is obtained, the test device executes a preset operation on the unit under test to obtain one or more new test related information based on the operation of the unit under test after the preset operation so as to execute the operation on other units under test. The whole test-related information includes part or all of the test-related information, and preferably, the whole test-related information further includes other pre-stored test-related information corresponding to the unit under test.
Specifically, the test device determines all one or more items of test-related information required for executing a predetermined operation on the unit under test, determines whether all the test-related information corresponding to the unit under test, which has been obtained by the test device, is all the test-related information required for executing the predetermined operation on the unit under test, and when it is determined that all the test-related information has been obtained, the test device executes the predetermined operation on the unit under test to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation, so as to execute the operation on other units under test.
In this case, a person skilled in the art can determine which one or more items of test related information are required for performing the predetermined operation on the unit under test according to actual conditions and requirements, and details are not described herein again. For example, determining which item or items of test related information needs to be input when the start operation is performed on the unit under test according to the interface information of the unit under test; for another example, it is determined which item or items of test-related information are needed when the restart operation is performed on the unit under test, and the like, according to a pre-stored list of test-related information needed to restart the unit under test.
For example, the test apparatus selects a unit under test related to the predicted test-related information including the output information "Mid _3_ string" of the unit under test Mid _3 on which the predicted test-related information is based, based on the selection condition as shown in the aforementioned table 1, and the test apparatus selects the unit under test Mid _6 based on the selection condition of the third priority in step S1; and the testing device determines that all the test related information required for starting the unit under test Mid _6 includes the output information of Mid _3 according to the interface information of Mid _6, the testing device determines that all the test related information required for starting Mid _6 is obtained, and starts Mid _6 by using "Mid _3_ string" as the input information of Mid _6, so as to obtain the average CPU occupation rate of Mid _6 in the running process and the running result information of Mid _ 6.
For another example, the testing apparatus selects the unit under test related to the predicted test-related information based on the selection condition as shown in table 2, the predicted test-related information includes the identification information Mid _5 of the unit under test based on the predicted test-related information, the testing apparatus selects the unit under test Mid _8 according to the selection condition corresponding to the type of the identification information with the predetermined priority being the third priority in step S1, and the testing apparatus determines that the test-related information required to restart the unit under test Mid _8 includes the identification information Mid _5 and the output information "reboot" based on any unit under test according to the pre-obtained list of the test-related information required to restart the unit under test Mid _ 8; and the testing device determines that the pre-stored other testing related information corresponding to Mid _8 already contains the output information "reboot"; the testing device determines that all the test related information required to restart Mid _8 has been obtained and restarts Mid _8 to obtain the CPU occupation rate of the process at Mid _8 restart.
When all the test related information is judged to be obtained, the test device executes a preset operation on the unit under test, so as to obtain one or more new test related information based on the operation of the unit under test after the preset operation, and the new test related information is used for executing the operation on other units under test. The test apparatus performs a predetermined operation on the unit under test to obtain one or more new test related information based on the operation of the unit under test after the predetermined operation, and the manner for performing the operation on other units under test is the same as or similar to the implementation manner described in the foregoing implementation manner 1) or 2), and is not described herein again.
Preferably, when it is determined that all the test-related information has not been obtained, the test apparatus stores the test-related information as other test-related information corresponding to the unit under test, so as to determine whether all the test-related information of the unit under test has been obtained when the unit under test is selected again according to other new test-related information.
For example, the testing apparatus selects the unit under test related to the predicted test-related information based on the selection condition shown in table 2, where the predicted test-related information includes that the CPU occupancy of the unit under test Mid _5 based on which the predicted test-related information is based is 64%, the testing apparatus selects the corresponding unit under test Mid _ CPU _1 in step S1, and determines that the two items of input information required to start the unit under test Mid _ CPU _1 include the CPU occupancy information of the unit under test Mid _5 and the CPU occupancy information of the unit under test Mid _7 according to the pre-stored input information list corresponding to Mid _ CPU _ 1; and the testing apparatus determines that the other pre-stored testing-related information corresponding to Mid _ CPU _1 does not include the CPU occupancy information of the unit under test Mid _7, the testing apparatus determines that all the testing-related information required to start the unit under test Mid _ CPU _1 is not obtained, and stores "the CPU occupancy 64% of the unit under test Mid _ 5" as the other testing-related information corresponding to the unit under test Mid _ CPU _1, so as to determine whether all the testing-related information of Mid _ CPU _1 has been obtained when the unit under test Mid _ CPU _1 is selected again according to the other new testing-related information.
It should be noted that the above examples are only for better illustrating the technical solutions of the present invention, and not for limiting the present invention, and those skilled in the art should understand that any implementation manner of performing a predetermined operation on the unit under test to obtain one or more new test-related information based on the predetermined operation for performing operations on other units under test is included in the scope of the present invention.
According to the method, the downstream unit to be tested to be operated is determined by acquiring the test related information generated based on the operation on the upstream unit to be tested, so that the process of determining the downstream unit to be tested is completely automatic, the execution sequence between the upstream unit to be tested and the downstream unit to be tested does not need to be preset manually, and the test efficiency is improved; and because the obtained test related information is the real data obtained in the running process of the tested unit, the accuracy of the computer system test is greatly improved.
FIG. 2 illustrates a flow chart of a method for testing a computer system in accordance with a preferred embodiment of the present invention. The method according to the present embodiment includes step S1, step S3, step S4, step S5, and step S2.
Step S1 has already been described in detail in the embodiment shown in fig. 1, and is included herein by way of reference, which is not described again.
Next, for each of the one or more cells under test selected in step S1, the test apparatus performs step S3, step S4, step S5, and step S2.
In step S3, the test apparatus acquires operation time information of the unit under test. Wherein the operation time information includes but is not limited to: 1) current time point information, for example, a current time point acquired by the test apparatus in real time; 2) the operation time length information is, for example, information on a time period during which the test apparatus is continuously operated, and further, for example, information on a time length during which the test apparatus is continuously operated from a predetermined time point, and the like.
Next, in step S4, the test apparatus determines whether the operation time information meets a predetermined start condition that needs to be satisfied to start performing a predetermined operation on the unit under test.
Wherein the predetermined start-up conditions include, but are not limited to: 1) the current time point information is in a preset time range; 2) the run-time length information is greater than a predetermined time threshold, etc.
For example, the testing apparatus obtains the current time point in real time in step S3, and determines whether the time point obtained in real time is within a predetermined time range; for another example, the test apparatus acquires the operation time length information of its own continuous operation in step S3, and determines whether the operation time length information is larger than a predetermined time threshold or the like.
It should be noted that, the above examples are only for better illustrating the technical solutions of the present invention, and not for limiting the present invention, and those skilled in the art should understand that any implementation manner for determining whether the operation time information meets the predetermined starting condition required to start the predetermined operation performed on the unit under test should be included in the scope of the present invention.
Next, in step S5, when the start-up related information is determined to meet the predetermined start-up condition of the DUT, the testing apparatus performs step S2 on the DUT. The step S2 has already been described in detail in the embodiment shown in fig. 1, and is included herein by way of reference, which is not described again.
As one of preferable solutions of this embodiment, the method according to this embodiment further includes step S6 (not shown).
In step S6, the testing apparatus sends the one or more new testing-related information obtained in step S2 to a second remote device in the network to start other units under test contained in the second remote device. Wherein the second remote device comprises at least one of: 1) a network device; 2) a user equipment.
The second remote device and the first remote device described in the embodiment shown in fig. 1 may be the same remote device or different remote devices.
Accordingly, the second remote device obtains one or more new test-related information sent by the testing apparatus in step S6, and uses the one or more new test-related information as the predicted test-related information, selects one or more units under test corresponding to the predicted test-related information from a plurality of units under test of the computer system included in the second remote device, and performs a predetermined operation on each of the one or more units under test to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation, and performs an operation on other units under test.
Wherein the second remote device performs the above-mentioned operations by its own included testing apparatus, which is the same as or similar to the testing apparatus described in the embodiment with reference to fig. 1 or fig. 2.
According to the method of the embodiment, part of modules of the computer system can be respectively tested in the plurality of computer devices through the testing devices respectively contained in the plurality of computer devices, so that the testing efficiency is improved, and the operation burden of each computer device is reduced.
FIG. 3 illustrates a flow chart of a method for testing a computer system in accordance with yet another preferred embodiment of the present invention. The method according to the present embodiment includes step S1, step S2, and step S7.
Step S1 and step S2 have been described in detail in the embodiment shown in fig. 1 and are included herein by way of reference, and are not described again.
In step S7, the test apparatus takes the one or more new test-related information as the predicted test-related information and repeats the steps S1 and S2 until a predetermined termination condition is satisfied, and draws corresponding test pattern information according to the one or more units under test determined each time step S1 is performed and/or the one or more new test-related information obtained by performing step S2.
Wherein the testing apparatus performs steps S1 and S2 in a manner as referred to the embodiment shown in fig. 1 or fig. 2.
Wherein the predetermined termination condition comprises at least one of: 1) the run-time information satisfies predetermined time expiration information including, but not limited to: a) the running time of the test device reaches a specific time point; b) the length of the running time of the testing device exceeds a preset time threshold; 2) the times of executing corresponding operations on the same tested unit reach a preset threshold value; for example, the number of times the test apparatus restarts the same unit under test reaches a predetermined threshold; 3) based on all available new test-related information, a predetermined operation cannot be performed on other units under test; for example, the test apparatus cannot obtain a unit under test corresponding to predicted test-related information; for another example, the test apparatus only obtains part of the test-related information required to start the unit under test, and none of the other units under test is in the operating state.
For example, the predicted test-related information includes the identification information Mid _12 of the unit under test on which the predicted test-related information is based and its output information, and the testing apparatus selects the unit under test Mid _13 and Mid _14 corresponding to the predicted test-related information in step S1; the testing device starts the tested unit Mid _13 and obtains the running result information of the tested unit Mid _ 13; and the testing device reloads the database used by the unit under test Mid _14 and obtains the output information of the unit under test Mid _ 14.
Next, the testing apparatus uses the operation result information of the unit under test Mid _13 as predicted test-related information, performs step S1 on the test-related information to select the corresponding unit under test Mid _15, and starts Mid _15 in step S2 to obtain the number of socket packets received during the operation of Mid _ 15; and the test apparatus regards the output information of the unit under test Mid _14 as the predicted test-related information and determines that there is no unit under test corresponding to the predicted test item information. Next, the testing apparatus executes step S1 with the number of socket packets received by Mid _15 as the predicted test related information, and selects the unit under test Mid _16 corresponding to the number of socket packets, the testing apparatus determines that it is necessary to obtain the network connection status information output by another unit under test Mid _17 when Mid _16 is started according to the interface information of Mid _16, and the testing apparatus detects that Mid _17 has stopped operating and does not obtain the output information of Mid _17, and then the testing apparatus determines to terminate the execution.
Next, the test apparatus draws an execution flowchart of each unit under test based on the identification information of the unit under test in the most initial predicted test-related information and the identification information of the unit under test determined each time step S1 is executed, as shown in fig. 7.
For another example, the testing apparatus plots a CPU occupancy transformation trend graph in the whole testing process based on the CPU occupancy information corresponding to each unit under test obtained in each execution of step S2.
It should be noted that, the above examples are only for better illustrating the technical solutions of the present invention, and not for limiting the present invention, and those skilled in the art should understand that any implementation manner of using the one or more new test-related information as the predicted test-related information and repeating the steps S1 and S2 until a predetermined termination condition is satisfied, and drawing corresponding test pattern information according to the one or more tested units determined by performing the step S1 and/or the one or more new test-related information obtained by performing the step S2 each time should be included in the scope of the present invention.
According to the method of the present invention, the items of data obtained by repeatedly performing steps S1 and S2 a plurality of times are graphically presented to the user, so that the user obtains more intuitive results.
FIG. 4 is a block diagram of a test apparatus for testing a computer system according to an aspect of the present invention. The testing device according to the invention comprises selection means 1 and first execution acquisition means 2.
The selection device 1 selects one or more units under test corresponding to predicted test-related information from among a plurality of units under test of a computer system.
Wherein the unit under test includes, but is not limited to, one or more executable modules in the computer system. The test-related information includes information related to initiating one or more units under test to perform a test. Preferably, the test-related information includes, but is not limited to, at least one of the following: 1) identification information of the unit under test on which the test-related information is based, for example, a module ID of the unit under test on which the test-related information is based, and for example, name information of the unit under test on which the test-related information is based, and the like; 2) the test related information includes test data information of the unit under test based on which the test related information is based, wherein the test data information includes various items of data information obtained by the test apparatus based on the operation of the unit under test, and preferably, the test data information includes but is not limited to at least one of the following items of information: a) the operation output information of the tested unit based on the test related information; b) the operation information of the unit under test based on the test related information includes, but is not limited to, information obtained by the test apparatus in the operation process of the unit under test, for example, the CPU occupancy of the unit under test obtained by the test apparatus in the operation process of the unit under test, for example, the number of socket packets received by the unit under test statistically obtained by the test apparatus in the operation process of the unit under test, and for example, the network bandwidth occupied by the unit under test obtained by the test apparatus monitoring the network usage of the unit under test; c) the test-related information is based on operation result information of the unit under test, preferably, the operation result information includes but is not limited to: i) the operation is successful, for example, in the case that the unit under test outputs information indicating that the operation is successful, for example, in the case that the unit under test outputs predetermined data that the unit under test should output in normal operation, the test device determines that the unit under test is successful in operation, and the like; ii) a failed operation, e.g., in case the unit under test is forced to terminate, e.g., in case the unit under test outputs information indicating its failed operation, the test apparatus determines that the unit under test failed to operate, etc.; iii) has run, e.g., when the unit under test has completed running, the test apparatus determines that the unit under test is running, etc.
Wherein the manner of obtaining the predicted test-related information includes, but is not limited to:
1) the testing device obtains manually input testing related information.
2) Receiving means (not shown) included in the testing apparatus receives the predicted test-related information provided by the first remote device, wherein the first remote device obtains the predicted test-related information based on performing a predetermined operation on a unit under test included in the first remote device. The first remote device is connected to the testing apparatus via a network.
The manner in which the testing apparatus obtains the predicted test-related information based on performing the predetermined operation on the unit under test included in the testing apparatus is the same as or similar to the manner in which the subsequent first execution acquiring apparatus 2 performs the predetermined operation on the unit under test to obtain one or more new test-related information based on the predetermined operation, and is not described in detail herein.
3) Second execution acquisition means (not shown) included in the test apparatus acquires the predicted test-related information based on execution of a predetermined operation on other units under test started before the unit under test.
The manner of starting the other unit under test includes but is not limited to: a) starting up by the test device executing a predetermined operation on the other unit under test; b) manual activation, e.g., by entering instructions in the command line to activate other units under test; c) is initiated by the operation of the unit under test upstream of the other unit under test. For example, the code of the other unit under test is included in the code of the upstream unit under test of the other unit under test, and when the upstream unit under test executes the code, the other unit under test is started.
The manner in which the test apparatus obtains the predicted test-related information based on performing the predetermined operation on the other unit under test started before the unit under test is the same as or similar to the manner in which the subsequent first execution acquiring apparatus 2 performs the predetermined operation on the unit under test to obtain one or more new test-related information based on the predetermined operation, and is not described in detail herein.
The manner of selecting one or more units under test corresponding to the predicted test-related information from the plurality of units under test of the computer system by the selection apparatus 1 includes, but is not limited to:
1) the selection means 1 query directly on the basis of the test-related information to obtain identification information of the respective unit or units under test.
For example, when the obtained test-related information includes output information "outputting" output by the unit under test on which the test-related information is based, the selection device 1 performs an inquiry in the list of output information and unit under test correspondence list based on the output information to obtain the corresponding unit under test.
For another example, when the predicted test-related information includes the output information "finish" output by the unit under test based on which the test-related information is based and the identification information "Mid _ 1" of the unit under test based on which the predicted test-related information is based, the selection device 1 queries the corresponding list of the test-related information and the unit under test based on the predicted test-related information, and obtains two units under test corresponding to both the output information "finish" and the identification information "Mid _ 1".
2) The sub-selection means (not shown) included in the selection means 1 selects the one or more units under test from all the units under test corresponding to the predicted test-related information based on a predetermined selection priority, so that the first execution acquisition means 2 performs an operation on each of the one or more units under test.
Wherein the predetermined selection priority includes, but is not limited to, at least one of the following: a) selecting a predetermined priority of conditions for selecting a unit under test corresponding to the predicted test-related information; b) a predetermined priority of information types of the foreseen test-related information, the information types including but not limited to: i) identifying the information type; ii) data type of output information, e.g., int type, char type, string type, etc.; iii) the source type of the operation information, e.g., CPU information, Socket information, etc.; iv) type of operation result information.
For example, the sub-selection means determines the unit under test related to the predicted test-related information based on the selection conditions shown in table 3 below, where the predetermined priority is from top to bottom the first priority, the second priority, and the third priority:
TABLE 3
If the predicted test-related information includes the identification information Mid _2 of the unit under test and the output information "a" of the unit under test Mid _2, which are based on the identification information, which is 1, the sub-selection device first selects the selection condition with the predetermined priority as the first priority for judgment, and judges that the predicted test-related information does not meet the selection condition with the first priority; then, the sub-selection device continues to select the selection condition with the predetermined priority as the second priority for judgment, and judges that the predicted test-related information satisfies the selection condition, and then the unit under test Mid _5 is taken as the selected unit under test.
For another example, the sub-selection means determines the unit under test related to the predicted test-related information based on the following table 4, where the predetermined priority is the first priority, the second priority, and the third priority from top to bottom:
TABLE 4
The predetermined test related information includes that the tested unit on which the predetermined test related information is based is Mid _5 and the CPU occupancy rate thereof is 64%, the sub-selection device first determines whether the predetermined test related information includes string-type test related information having a predetermined priority as a first priority, when it is determined that the string-type test related information is not included, the sub-selection device continues to determine whether the predetermined test related information includes CPU information type test related information having a second priority, and determines that the predetermined test related information includes test related information "CPU occupancy rate 64%" of the CPU information type, the sub-selection device determines that the predetermined test related information satisfies a first selection condition "CPU occupancy rate > 50%" corresponding to the CPU information type, and selects a corresponding tested unit Mid _ CPU _ 1.
Preferably, the sub-selection means selects the test related information of the corresponding information type according to a predetermined priority of the information type of the test related information, and selects the selection condition for selecting the unit under test according to the order of the predetermined priority of the selection condition corresponding to the information type from high to low.
It should be noted that the predetermined selection priority may be expressed in various forms, for example, in a sequentially executed code, the predetermined priority of each selection condition is determined by the order of the respective appearance positions of the code corresponding to each selection condition, and the like; for another example, the priority of the selection condition is determined by the logical relationship of the code language, for example, in the code written in C language, the priority of two parallel "if" statements is the same, and the priority of "else" statement is smaller than the corresponding "if" statement; for another example, the predetermined priority or the like corresponding to each selection condition is determined based on a correspondence list including the selection condition and the predetermined priority.
It should be further noted that the above examples are only for better illustrating the technical solutions of the present invention, and not for limiting the present invention, and those skilled in the art should understand that any implementation manner of selecting one or more tested units corresponding to the predicted test related information from a plurality of tested units of the computer system should be included in the scope of the present invention.
Next, the first execution acquisition means 2 performs an operation on each of the one or more units under test acquired by the selection means 1.
The first execution acquiring device 2 executes a predetermined operation on the selected unit under test to obtain one or more new test related information based on the operation of the unit under test after the predetermined operation, so as to execute the operation on other units under test.
A person skilled in the art should determine what predetermined operation should be performed on the unit under test according to actual conditions and requirements, for example, query a corresponding list of the unit under test and the predetermined operation to determine the predetermined operation to be performed on the unit under test, for example, based on performing the same predetermined operation on each unit under test, and so on, which is not described herein again.
Wherein the predetermined operations include, but are not limited to: 1) when the unit to be tested does not operate, starting the unit to be tested; 2) when the unit under test is already in the running state: a) restarting the tested unit; b) causing the unit under test to perform a portion of the function, e.g., causing the unit under test to reload a database, etc.; c) for example, the test apparatus provides the running unit under test with information about the available remaining memory space at the current time point, so that the unit under test can determine whether the current remaining memory space is sufficient for the unit under test to continue running.
Moreover, a person skilled in the art may determine which item or items of test-related information need to be obtained according to actual situations and requirements, for example, query a corresponding list of the unit under test and the test-related information to be obtained to determine the test-related information to be obtained when a predetermined operation is performed on the unit under test, and for example, obtain the output information of each unit under test based on a predetermined operation of obtaining the output information, and the like, which is not described herein again.
The first execution acquiring device 2 executes a predetermined operation on the unit under test to acquire one or more new test related information based on the operation of the unit under test after the predetermined operation, and the manner for executing the operation on other units under test includes but is not limited to:
1) the first execution acquisition means 2 directly executes a predetermined operation on the unit under test to obtain one or more new test related information based on the operation of the unit under test after the predetermined operation.
For example, when the selecting device 1 selects the unit under test Mid _5 which is not yet operated, the first execution acquiring device 2 directly activates Mid _5 to acquire the operation result information of Mid _ 5. For another example, when the selecting device 1 selects the running unit under test Mid _10, the first executing and acquiring device 2 acquires data from the local database and provides the data to the unit under test Mid _10 to acquire the output information of Mid _ 10; for another example, when the selecting device 1 selects the running unit under test Mid _11, the first executing and acquiring device 2 restarts Mid _11 to acquire the time information required for the restart of Mid _11 as the running information.
2) A first sub-execution acquiring device (not shown) included in the first execution acquiring device 2 acquires input information of the unit under test based on part or all of the predicted test-related information, and performs a predetermined operation on the unit under test, so as to acquire one or more new test-related information based on the operation of the unit under test after the predetermined operation, and perform the operation on other units under test.
Wherein, the manner of obtaining the input information of the unit under test based on part or all of the predicted test-related information includes but is not limited to:
a) the first sub-execution acquisition device directly takes the test related information as input information;
for example, if the predicted test-related information includes the output information "Mid _5_ string" of the unit under test Mid _5 based on which the predicted test-related information is based, and the selecting device 1 selects the unit under test Mid _7, the first execution acquiring device 2 starts the Mid _7 with the acquired output information "Mid _5_ string" as the input information of the unit under test Mid _7, and acquires the operation result information when the input information of the unit under test Mid _7 is "Mid _5_ string".
b) The first sub-execution acquisition means executes predetermined processing on the test-related information to acquire corresponding input information, wherein the predetermined processing includes:
i) the first sub-execution acquisition means acquires predetermined information corresponding to the test-related information as input information.
For example, when the predicted test-related information includes the output string "success" of the unit under test Mid _ x based on itself, the first sub-execution unit acquires a predetermined numerical value "16" corresponding to the output string "success" of Mid _ x, and starts the unit under test Mid _ y by using the numerical value "16" as the input information of the unit under test Mid _ y corresponding to the predicted test-related information.
ii) the first sub-execution acquisition means executes a predetermined operation on the test-related information to acquire the input information.
For example, if the predicted test-related information includes the number of packet packets "15" and the network bandwidth information "2M", the first sub-execution-acquisition device determines that the output information is the network bandwidth — the number of packet packets × the predetermined size of the predetermined packet packets, which is 2M-15 × 128Kb, which is 128 Kb.
3) First judging means (not shown) included in the test apparatus judges whether all the obtained test-related information corresponding to the unit under test are all the test-related information required for performing a predetermined operation on the unit under test; and when it is determined that all the test-related information has been obtained, a second sub-execution obtaining device (not shown) included in the first execution obtaining device 2 performs a predetermined operation on the unit under test, so as to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation, so as to perform the operation on other units under test. The whole test-related information includes part or all of the test-related information, and preferably, the whole test-related information further includes other pre-stored test-related information corresponding to the unit under test.
Specifically, the first determining device determines all one or more items of test related information required for executing the predetermined operation on the unit under test, and determines whether all the test related information corresponding to the unit under test, which is obtained by the testing device, is all the test related information required for executing the predetermined operation on the unit under test; when the first judging device judges that all the test related information is obtained, the second sub-execution obtaining device executes a preset operation on the unit under test, so as to obtain one or more new test related information based on the operation of the unit under test after the preset operation, and the new test related information is used for executing the operation on other units under test.
In this case, a person skilled in the art can determine which one or more items of test related information are required for performing the predetermined operation on the unit under test according to actual conditions and requirements, and details are not described herein again. For example, determining which item or items of test related information needs to be input when the start operation is performed on the unit under test according to the interface information of the unit under test; for another example, it is determined which item or items of test-related information are needed when the restart operation is performed on the unit under test, and the like, according to a pre-stored list of test-related information needed to restart the unit under test.
For example, the predicted test-related information includes output information "Mid _3_ string" of the unit under test Mid _3 on which the predicted test-related information is based, and the selecting device 1 selects the unit under test Mid _6 based on the third-priority selection condition among the selection conditions shown in the foregoing table 3; and the first judging device determines that all the test related information required for starting the tested unit Mid _6 comprises the output information of Mid _3 according to the interface information of Mid _6, the first judging device judges that all the test related information required for starting Mid _6 is obtained; the second sub-execution acquiring means starts Mid _6 with "Mid _3_ string" as the input information of Mid _6 to obtain the average CPU occupation rate of Mid _6 during the operation and the operation result information of Mid _ 6.
For another example, the predicted test-related information includes identification information Mid _5 of the unit under test based on which the predicted test-related information is based, and the selection device 1 selects the unit under test Mid _8 based on the selection condition corresponding to the identification information type with the predetermined priority being the third priority among the selection conditions shown in table 4. The first judgment device determines that the test related information required for restarting the Mid _8 includes the identification information Mid _5 and the output information "reboot" based on any unit under test according to the pre-acquired test related information list required for restarting the unit under test Mid _ 8; and the first judging device judges that the other pre-stored test-related information corresponding to Mid _8 already contains the output information "rebot"; the first judgment device judges that all the test related information required by the restart Mid _8 is obtained; the second sub-execution acquires the device and restarts the unit under test Mid _8 to acquire the CPU occupancy of the process at Mid _8 restart.
Wherein, when it is determined that all the test-related information has been obtained, the second sub-execution obtaining means performs a predetermined operation on the unit under test to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation for performing an operation on other units under test, for example, the second sub-execution obtaining means directly performs the predetermined operation on the unit under test to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation, and for example, a third sub-execution means included in the second sub-execution obtaining means obtains input information of the unit under test based on one or more test-related information of the all the test-related information, performs the predetermined operation on the unit under test to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation, and the like, the same as or similar to the implementation described in the foregoing implementation 1) or 2), and will not be described herein again.
Preferably, when the first determining means determines that all the test-related information is not obtained, a storage means (not shown) included in the testing apparatus stores the test-related information as other test-related information corresponding to the unit under test, so as to determine whether all the test-related information of the unit under test has been obtained when the unit under test is selected again according to other new test-related information.
For example, the predicted test-related information includes that the CPU occupancy of the unit under test Mid _5 on which the predicted test-related information is based is 64%, and the selecting device 1 selects the unit under test Mid _ CPU _1 related to the predicted test-related information based on the selection condition as shown in the foregoing table 4; and the first judging device determines that the two items of input information required for activating the tested unit Mid _ CPU _1 include the CPU occupancy information of the tested unit Mid _5 and the CPU occupancy information of the tested unit Mid _7 according to the pre-stored input information list corresponding to Mid _ CPU _1, the first judging device judges that the CPU occupancy information of the tested unit Mid _7 is not included in the other pre-stored test-related information corresponding to Mid _ CPU _1, the first determination means determines that all test-related information required for activating the unit under test Mid _ cpu _1 is not obtained, the storage means stores "CPU occupancy 64% of the unit under test Mid _ 5" as other test-related information corresponding to the unit under test Mid _ CPU _1, to determine whether all the test-related information of Mid _ cpu _1 has been obtained when the unit under test Mid _ cpu _1 is selected again according to other new test-related information.
It should be noted that the above examples are only for better illustrating the technical solutions of the present invention, and not for limiting the present invention, and those skilled in the art should understand that any implementation manner of performing a predetermined operation on the unit under test to obtain one or more new test-related information based on the predetermined operation for performing operations on other units under test is included in the scope of the present invention.
According to the scheme of the invention, the downstream unit to be tested to be operated is determined by acquiring the test related information generated based on the operation on the upstream unit to be tested, so that the process of determining the downstream unit to be tested is fully automatic, the execution sequence between the upstream unit to be tested and the downstream unit to be tested does not need to be preset manually, and the test efficiency is improved; and because the obtained test related information is the real data obtained in the running process of the tested unit, the accuracy of the computer system test is greatly improved.
Fig. 5 is a schematic structural diagram of a test apparatus for testing a computer system according to a preferred embodiment of the present invention. The test apparatus according to the present embodiment comprises selection means 1, acquisition means 3, second determination means 4, execution trigger means 5 and first execution acquisition means 2.
The selection device 1 has been described in detail in the embodiment shown in fig. 4 and is included herein by way of reference, and thus is not described again.
Next, the acquisition means 3, the second judgment means 4, the execution trigger means 5, and the first execution acquisition means 2 execute an operation for each of the one or more units under test selected by the selection means 1.
The acquisition means 3 acquires the operation time information of the unit under test. Wherein the operation time information includes but is not limited to: 1) current time point information, for example, a current time point acquired in real time by the acquisition means 3; 2) the operation time length information is, for example, information of a time period during which the acquisition device 3 is continuously operated, and further, for example, information of a time length during which the acquisition device 3 is continuously operated from a predetermined time point, or the like.
Next, the second judgment means 4 judges whether or not the operation time information meets a predetermined start condition that needs to be satisfied to start a predetermined operation on the unit under test.
Wherein the predetermined start-up conditions include, but are not limited to: 1) the current time point information is in a preset time range; 2) the run-time length information is greater than a predetermined time threshold, etc.
For example, if the acquiring device 3 acquires the current time point in real time, the second determining device 4 determines whether the time point acquired in real time is within a predetermined time range; for another example, when the acquiring means 3 acquires the operating time length information of the continuous operation of itself, the second judging means 4 judges whether or not the operating time length information is larger than a predetermined time threshold value or the like.
It should be noted that, the above examples are only for better illustrating the technical solutions of the present invention, and not for limiting the present invention, and those skilled in the art should understand that any implementation manner for determining whether the operation time information meets the predetermined starting condition required to start the predetermined operation performed on the unit under test should be included in the scope of the present invention.
Then, when the second determination device 4 determines that the start-up related information meets the predetermined start-up condition of the unit under test, the execution trigger device 5 triggers the first execution acquisition device 2 to execute the operation. The first execution acquiring device 2 has been described in detail in the embodiment shown in fig. 4, and is included herein by way of reference, which is not described again.
As one of preferable solutions of this embodiment, the testing apparatus according to this embodiment further includes a sending apparatus (not shown).
The sending means sends the one or more new test related information obtained by the first execution acquiring means 2 to a second remote device in the network to start other units under test contained in the second remote device. Wherein the second remote device comprises at least one of: 1) a network device; 2) a user equipment.
The second remote device and the first remote device described in the embodiment shown in fig. 1 may be the same remote device or different remote devices.
Correspondingly, the second remote device acquires one or more new test related information sent by the sending device, takes the one or more new test related information as the predicted test related information, selects one or more tested units corresponding to the predicted test related information from a plurality of tested units of the computer system contained in the second remote device, and performs a predetermined operation on each tested unit of the one or more tested units to obtain one or more new test related information based on the operation of the tested unit after the predetermined operation so as to perform the operation on other tested units.
Wherein the second remote device performs the above-mentioned operations by its own included testing apparatus, which is the same as or similar to the testing apparatus described in the embodiment with reference to fig. 1 or fig. 2.
According to the scheme of the embodiment, partial modules of the computer system can be respectively tested in the plurality of computer devices through the testing devices respectively contained in the plurality of computer devices, so that the testing efficiency is improved, and the operation burden of each computer device is reduced.
Fig. 6 is a schematic structural diagram of a testing apparatus for testing a computer system according to another preferred embodiment of the present invention. The testing device according to the present embodiment comprises a selection device 1, a first execution acquisition device 2 and a plotting device 7.
The selection device 1 and the first execution acquiring device 2 have been described in detail in the embodiment shown in fig. 4, and are included herein by way of reference, which is not described again.
The drawing device 7 is used for taking the new test-related information as the predicted test-related information and triggering the selection device 1 to repeatedly execute the operation with the first execution acquisition device 2 until a predetermined termination condition is met, and drawing corresponding test pattern information according to the one or more tested units determined by the selection device 1 each time and/or the at least one item of test-related information obtained by the first execution acquisition device 2.
The selection device 1 and the first execution acquisition device 2 perform operations according to the embodiment shown in fig. 1 or fig. 2.
Wherein the predetermined termination condition comprises at least one of: 1) the run-time information satisfies predetermined time expiration information including, but not limited to: a) the running time of the test device reaches a specific time point; b) the length of the running time of the testing device exceeds a preset time threshold; 2) the times of executing corresponding operations on the same tested unit reach a preset threshold value; for example, the number of times that the first execution acquisition means 2 included in the test apparatus restarts the same unit under test reaches a predetermined threshold; 3) based on all available new test-related information, a predetermined operation cannot be performed on other units under test; for example, the first execution acquisition device 2 included in the test apparatus cannot acquire a unit under test corresponding to the predicted test-related information; for another example, the first execution acquiring device 2 included in the testing device only acquires part of the testing-related information required for starting the unit under test, and none of the other units under test is in the operating state.
For example, the predicted test-related information includes the identification information Mid _12 of the unit under test on which the predicted test-related information is based and its output information, and the selection device 1 selects the unit under test Mid _13 and Mid _14 corresponding to the predicted test-related information; the first execution acquisition device 2 starts the tested unit Mid _13 and acquires the operation result information of the tested unit Mid _ 13; and the first executing and acquiring device 2 reloads the database used by the unit under test Mid _14 and obtains the output information of the unit under test Mid _ 14.
Then, the drawing device 7 takes the operation result information of the tested unit Mid _13 as predicted test related information, triggers the selection device 1 to perform an operation on the predicted test related information to select the corresponding tested unit Mid _15, and triggers the first execution acquisition device 2 to start the Mid _15 to acquire the number of socket data packets received in the operating process of the Mid _ 15; and the drawing device 7 takes the output information of the unit under test Mid _14 as the predicted test-related information and determines that there is no unit under test corresponding to the predicted test item information. Then, the drawing device 7 uses the number of socket packets received by Mid _15 as the predicted test-related information to trigger the selection device 1 to perform an operation on the predicted test-related information to select the tested unit Mid _16 corresponding to the number of socket packets, the first determination device included in the testing device determines that the starting Mid _16 still needs to obtain the network connection status information output by another tested unit Mid _17 according to the interface information of Mid _16, and the drawing device 7 detects that Mid _17 has stopped operating and the first execution acquisition device 2 does not obtain the output information of Mid _17, then the drawing device 7 determines to terminate the trigger selection device 1 and the first execution acquisition device 2.
Next, the drawing means 7 draws an execution flowchart of each unit under test based on the identification information of the unit under test in the most initial predicted test-related information and the identification information of the unit under test determined by the selection means 1 for each execution, as shown in fig. 7.
For another example, the drawing device 7 draws a CPU occupancy transformation trend graph in the whole testing process based on the CPU occupancy information corresponding to each unit under test obtained by the first execution acquiring device 2 executing the operation each time.
It should be noted that the above examples are only for better illustrating the technical solutions of the present invention, and not for limiting the present invention, and those skilled in the art should understand that any implementation manner of using the one or more test related information as the predicted test related information and triggering the selection device 1 and the first execution acquisition device 2 to repeatedly perform the operation until the predetermined termination condition is met, and drawing the corresponding test pattern information according to the one or more tested units determined by the selection device 1 each time and/or the at least one test related information obtained by the first execution acquisition device 2 should be included in the scope of the present invention.
According to the scheme of the invention, various items of data obtained by repeatedly executing the operation of the selection device 1 and the first execution acquisition device 2 for multiple times can be presented to the user in a graphical mode, so that the user can obtain more intuitive results.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Claims (27)
1. A computer-implemented method for testing a computer system, wherein the method comprises the steps of:
a, selecting one or more tested units corresponding to the predicted test related information from a plurality of tested units of the computer system, wherein the following steps are executed for each tested unit in the one or more tested units:
x executing a predetermined operation on the unit under test to obtain one or more new test related information based on the operation of the unit under test after the predetermined operation, so as to execute the operation on other units under test;
wherein the step a comprises:
directly querying based on the predicted test-related information to obtain identification information of the corresponding one or more tested units; or,
selecting the one or more units under test from all units under test corresponding to the predicted test-related information based on a predetermined selection priority.
2. The method of claim 1, wherein the step x comprises the steps of:
-obtaining input information of the unit under test based on part or all of the predicted test-related information, performing a predetermined operation on the unit under test to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation for performing operations on other units under test.
3. The method of claim 1, wherein for each of the one or more units under test selected in step a, the method further comprises the steps of:
-determining whether all obtained test related information corresponding to the unit under test is all test related information required for performing a predetermined operation on the unit under test, wherein the all test related information comprises part or all of the test related information;
wherein the step x comprises the steps of:
x1 when it is determined that all of the test-related information has been obtained, performing a predetermined operation on the unit under test to obtain one or more new test-related information based on the operation of the unit under test after the predetermined operation for performing operations on other units under test.
4. The method of claim 3, wherein the step x1 comprises the steps of:
-obtaining input information for the unit under test based on one or more of the total test related information, performing a predetermined operation on the unit under test to obtain one or more new test related information based on the running of the unit under test after the predetermined operation for performing operations on other units under test.
5. The method according to claim 3 or 4, wherein the total test-related information further comprises other pre-stored test-related information corresponding to the unit under test, wherein for each of the one or more units under test selected in step a, the method further comprises the steps of:
-when it is determined that all test relevant information has not been obtained, storing said test relevant information as further test relevant information corresponding to the unit under test for determining whether all test relevant information of the unit under test has been obtained when the unit under test is selected again on the basis of further new test relevant information.
6. The method according to any one of claims 1 to 4, wherein the method further comprises, before step a:
-receiving said foreseen test related information provided by a first remote device, wherein the first remote device obtains the foreseen test related information based on performing a predetermined operation on a unit under test comprised by itself.
7. The method according to any one of claims 1 to 4, wherein the method further comprises, before step a:
-obtaining said predicted test related information based on performing a predetermined operation on other units under test started before the unit under test.
8. The method of any one of claims 1 to 4, wherein for each of the one or more units under test selected in step a, the method further comprises the steps of:
-obtaining operating time information of the unit under test;
-determining whether the operation time information complies with a predetermined start condition that needs to be fulfilled for starting a predetermined operation on the unit under test;
-executing said step x when said operating time information is judged to comply with a predetermined start condition of the unit under test.
9. The method according to any one of claims 1 to 4, wherein the method further comprises the steps of:
-sending said one or more new test related information obtained in step x to a second remote device in the network for initiating other units under test comprised in said second remote device.
10. The method according to any one of claims 1 to 4, wherein the method further comprises the steps of:
-using said one or more new test related information as said predicted test related information and repeating said steps a and x until a predetermined termination condition is met, and drawing corresponding test pattern information in dependence of said one or more units under test determined each time step a is performed and/or said one or more new test related information obtained by performing step x.
11. The method of claim 10, wherein the predetermined termination condition comprises at least one of:
-run time meets predetermined time expiry information;
-the number of runs of the same unit under test reaches a predetermined threshold;
-not performing predetermined operations on other units under test based on all available new test related information.
12. The method according to any one of claims 1 to 4, wherein the test-related information comprises at least one of:
-identification information of the unit under test on which the test-related information is based;
-test data information of the unit under test on which the test related information is based.
13. The method of claim 12, wherein the test data information comprises at least one of:
-output information of the unit under test on which the test-related information is based;
-operating information of the unit under test on which the test-related information is based;
-operation result information of the unit under test on which the test-related information is based.
14. A test apparatus for testing a computer system, wherein the test apparatus comprises:
selecting means for selecting one or more units under test corresponding to the predicted test-related information from a plurality of units under test of the computer system, wherein the testing means performs an operation on each of the one or more units under test by:
the first execution acquisition device is used for executing a preset operation on the unit under test so as to obtain one or more pieces of new test related information based on the operation of the unit under test after the preset operation and execute the operation on other units under test;
wherein the selection means is for:
directly querying based on the predicted test-related information to obtain identification information of the corresponding one or more tested units; or,
selecting the one or more units under test from all units under test corresponding to the predicted test-related information based on a predetermined selection priority.
15. The test device of claim 14, wherein the first execution acquisition device comprises:
and the first sub-execution acquisition device is used for acquiring the input information of the unit under test based on part or all of the predicted test related information, executing a preset operation on the unit under test, acquiring one or more new test related information based on the operation of the unit under test after the preset operation, and executing the operation on other units under test.
16. The test apparatus of claim 14, wherein the test apparatus further performs the operation for each of the one or more units under test selected by the selection apparatus by:
first judging means for judging whether all the obtained test-related information corresponding to the unit under test is all test-related information required for performing a predetermined operation on the unit under test, wherein the all the test-related information includes part or all of the test-related information;
wherein the first execution acquisition means comprises:
and the second sub-execution acquisition device is used for executing a preset operation on the unit under test when judging that all the test related information is obtained, so as to obtain one or more new test related information based on the operation of the unit under test after the preset operation, and the new test related information is used for executing the operation on other units under test.
17. The test apparatus of claim 16, wherein the second sub-execution acquisition means comprises:
and a third sub-execution acquiring device, configured to acquire input information of the unit under test based on one or more pieces of test-related information in all the pieces of test-related information, execute a predetermined operation on the unit under test, and acquire one or more pieces of new test-related information based on the operation of the unit under test after the predetermined operation, so as to execute the operation on other units under test.
18. The test apparatus according to claim 16 or 17, wherein the overall test-related information further includes other pre-stored test-related information corresponding to the unit under test, wherein the test apparatus further performs an operation for each of the one or more units under test selected by the selection apparatus by:
and the storage device is used for storing the test related information as other test related information corresponding to the unit under test when judging that all the test related information is not obtained, and is used for judging whether all the test related information of the unit under test is obtained or not when the unit under test is selected again according to other new test related information.
19. The test device of any one of claims 14 to 17, wherein the test device further comprises:
receiving means, configured to receive the predicted test-related information provided by a first remote device, where the first remote device obtains the predicted test-related information based on performing a predetermined operation on a unit under test included in the first remote device.
20. The test device of any one of claims 14 to 17, wherein the test device further comprises:
and the second execution acquisition device is used for acquiring the predicted test related information based on executing a predetermined operation on other tested units started before the tested unit.
21. The test apparatus according to any one of claims 14 to 17, wherein the test apparatus further performs an operation for each of the one or more units under test selected by the selection apparatus by:
the acquisition device is used for acquiring the operation time information of the unit to be tested;
the second judgment device is used for judging whether the operation time information meets a preset starting condition which is required to be met when the preset operation is started to be executed on the tested unit;
and the execution triggering device is used for triggering the first execution acquisition device to execute the operation when the operation time information is judged to accord with the preset starting condition of the tested unit.
22. The test device of any one of claims 14 to 17, wherein the test device further comprises:
and the sending device is used for sending the one or more pieces of new test related information obtained by the first execution obtaining device to a second remote device in the network so as to start other tested units contained in the second remote device.
23. The test device of any one of claims 14 to 17, wherein the test device further comprises:
and the drawing device is used for taking the one or more new test related information as the predicted test related information, triggering the selection device and the first execution acquisition device to repeatedly execute the operation until a preset termination condition is met, and drawing corresponding test pattern information according to the one or more new test related information obtained by the one or more tested units and/or the first execution acquisition device determined by the selection device each time.
24. The test device of claim 23, wherein the predetermined termination condition comprises at least one of:
-run time meets predetermined time expiry information;
-the number of runs of the same unit under test reaches a predetermined threshold;
-not performing predetermined operations on other units under test based on all available new test related information.
25. A test device according to any of claims 14 to 17, wherein the test related information comprises at least one of:
-identification information of the unit under test on which the test-related information is based;
-test data information of the unit under test on which the test related information is based.
26. The test device of claim 25, wherein the test data information comprises at least one of:
-output information of the unit under test on which the test-related information is based;
-operating information of the unit under test on which the test-related information is based;
-operation result information of the unit under test on which the test-related information is based.
27. A computer apparatus, wherein the computer apparatus comprises a test device according to any one of claims 14 to 26.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110269995.8A CN102999404B (en) | 2011-09-13 | 2011-09-13 | Test method, test device and test equipment for computer system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110269995.8A CN102999404B (en) | 2011-09-13 | 2011-09-13 | Test method, test device and test equipment for computer system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102999404A CN102999404A (en) | 2013-03-27 |
CN102999404B true CN102999404B (en) | 2017-05-24 |
Family
ID=47928004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110269995.8A Active CN102999404B (en) | 2011-09-13 | 2011-09-13 | Test method, test device and test equipment for computer system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102999404B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101882107A (en) * | 2010-06-28 | 2010-11-10 | 山东中创软件商用中间件股份有限公司 | Method and device for automatically testing WEB (World Wide Web) application |
CN102135939A (en) * | 2011-03-30 | 2011-07-27 | 镇江睿泰信息科技有限公司 | Test case operation dispatching device and method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5383192A (en) * | 1992-12-23 | 1995-01-17 | Intel Corporation | Minimizing the likelihood of slip between the instant a candidate for a break event is generated and the instant a microprocessor is instructed to perform a break, without missing breakpoints |
DE4418231C2 (en) * | 1994-05-25 | 1997-02-27 | Siemens Ag | Modularly structured service personal computer |
-
2011
- 2011-09-13 CN CN201110269995.8A patent/CN102999404B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101882107A (en) * | 2010-06-28 | 2010-11-10 | 山东中创软件商用中间件股份有限公司 | Method and device for automatically testing WEB (World Wide Web) application |
CN102135939A (en) * | 2011-03-30 | 2011-07-27 | 镇江睿泰信息科技有限公司 | Test case operation dispatching device and method |
Also Published As
Publication number | Publication date |
---|---|
CN102999404A (en) | 2013-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111125444A (en) | Big data task scheduling management method, device, device and storage medium | |
AU2018309008B2 (en) | Writing composite objects to a data store | |
US20180004568A1 (en) | Distributed task system and service processing method based on internet of things | |
JP2020520515A (en) | Database integration test method, device, server, and recording medium | |
US20160085656A1 (en) | System diagnostics with thread dump analysis | |
CN105426234B (en) | Database deadlocks detection method and device | |
CN112034819A (en) | Vehicle diagnosis method, vehicle diagnosis device and diagnosis equipment | |
CN112486502B (en) | Distributed task deployment method, distributed task deployment device, computer equipment and storage medium | |
CN112527449A (en) | Cluster node label creating method and system, electronic device and storage medium | |
CN115437617A (en) | Vehicle control code automatic generation method and device, storage medium and electronic equipment | |
CN111124854A (en) | Method, system, terminal and storage medium for distributing smoking test cases | |
CN102999404B (en) | Test method, test device and test equipment for computer system | |
CN111241594B (en) | Method, device, computer equipment and storage medium for signing transaction information | |
CN112052144B (en) | Information management method, device, electronic equipment and storage medium | |
CN113127479B (en) | Method and device for loading elastic search index, computer equipment and storage medium | |
CN112560939A (en) | Model verification method and device and computer equipment | |
CN104239218B (en) | Real-time software stress test case generation method and device | |
CN111797152A (en) | Data scene generation method and device and computer equipment | |
CN116702668A (en) | Regression testing method and device, electronic equipment and storage medium | |
CN115580550B (en) | Network card stability testing method, device, equipment and storage medium | |
CN110413531A (en) | Realize IOMT automatic test approach, device, computer equipment and storage medium | |
CN110753090A (en) | Task execution method and device of server cluster, computer equipment and storage medium | |
CN113656268B (en) | Performance test method and device for business service, electronic equipment and storage medium | |
CN114328196B (en) | Data leakage prevention system testing method, device, equipment and storage medium | |
CN114327673A (en) | Task starting method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |