Summary of the invention
In order to solve the above-mentioned technical problem, this application provides a kind of distributed memory system byte-lock characteristic test methods
And device, it can automatically carry out distributed memory system byte-lock characteristic test and avoid omitting certain to improve testing efficiency
The test of a little clustered nodes improves test quality.
The embodiment of the present application discloses following technical solution:
In a first aspect, the embodiment of the present application provides a kind of distributed memory system byte-lock characteristic test method, in advance
Automated test frame is constructed, the automated test frame includes automatic test node and task engine pond, the automation
It include more task engines in the task engine pond at least provided with task queue on test node, which comprises
The goal task in task queue is read, the goal task is appointed for the characteristic test of distributed memory system byte-lock
The task that any bar is not carried out in business, the characteristic test task include at least one task;
According to the corresponding automatic test configuration file of the goal task, goal task is determined from the task pool
Machine, the goal task machine include more task engines;
Target detection script is obtained from the goal task machine, and executes the target detection script, described in completing
Distributed memory system byte-lock characteristic test task.
Optionally, the goal task machine is used to be used as clustered node and client.
Optionally, the method for the preparatory building automated test frame includes:
The task engine pond is created, and corresponding operation system is installed for the multiple task engine in the task engine pond
System;It wherein, is the goal task machine installation targets operating system, the goal task machine is described for goal task machine
Any in multiple tasks machine, the destination OS is the corresponding operating system of the goal task machine;
Create automation control node.
Optionally, between the multiple task engine configure safety shell protocol public key, with realize the multiple task engine it
Between without cryptographic acess;
The safety shell protocol public key is configured between the automation control node and the goal task machine, to realize
Without cryptographic acess between the automation control node and the goal task machine.
Optionally, before the goal task in the reading task queue, the method also includes:
Distributed memory system byte-lock characteristic installation kit is installed for the multiple task engine;
The automatic test configuration file is write using markup language, the automatic test configuration file indicates automatically
Task engine quantity, target detection script path needed for changing test;
The distributed memory system byte-lock characteristic test task is added into the task queue.
Optionally, the target detection script is stored in remote testing script bank.
Optionally, described that target detection script is obtained from the goal task machine, and the target detection script is executed,
To complete the distributed memory system byte-lock characteristic test task, comprising:
The test script from the remote testing script bank, the test script packet are obtained from the goal task machine
Include target detection script and subtest script;
The target detection script is executed, to complete the distributed memory system byte-lock characteristic test task.
Optionally, the goal task read in task queue, comprising:
Start the perform script of the automatic test node;
According to the perform script, the goal task in task queue is read.
Optionally, target detection script is obtained from the goal task machine described, and executes the target detection foot
This, after completing the distributed memory system byte-lock characteristic test task, the method also includes:
The log that the target detection script generates will be executed to upload under specified path.
Second aspect, the embodiment of the present application provide a kind of distributed memory system byte-lock characteristic test device, in advance
Automated test frame is constructed, the automated test frame includes automatic test node and task engine pond, the automation
Include more task engines in the task engine pond at least provided with task queue on test node, described device include read it is single
Member, determination unit and execution unit:
The reading unit, for reading the goal task in task queue, the goal task is distributed storage system
The task that any bar is not carried out in system byte-lock characteristic test task, the characteristic test task include at least one task;
The determination unit is used for according to the corresponding automatic test configuration file of the goal task, from the task
Goal task machine is determined in pond, the goal task machine includes more task engines;
The execution unit for obtaining target detection script from the goal task machine, and executes the target and surveys
Training sheet, to complete the distributed memory system byte-lock characteristic test task.
Optionally, the goal task machine is used to be used as clustered node and client.
Optionally, described device further includes the first creating unit and the second creating unit:
First creating unit for creating the task engine pond, and is the multiple in the task engine pond
Business machine installs corresponding operating system;It wherein, is the goal task machine installation targets operating system for goal task machine,
The goal task machine is any in the multiple task engine, and the destination OS is that the goal task machine is corresponding
Operating system;
Second creating unit, for creating the automation control node.
Optionally, between the multiple task engine configure safety shell protocol public key, with realize the multiple task engine it
Between without cryptographic acess;
The safety shell protocol public key is configured between the automation control node and the goal task machine, to realize
Without cryptographic acess between the automation control node and the goal task machine.
Optionally, described device further includes installation unit, writing unit and adding unit:
The installation unit, for installing distributed memory system byte-lock characteristic installation kit for the multiple task engine;
The writing unit, for using markup language to write the automatic test configuration file, the automation is surveyed
Task engine quantity, target detection script path needed for examination configuration file indicates automatic test;
The adding unit, for adding the distributed memory system byte-lock characteristic test task to the task team
In column.
Optionally, the target detection script is stored in remote testing script bank.
Optionally, the execution unit is used to obtain from the goal task machine from the remote testing script bank
Test script, the test script include target detection script and subtest script;The target detection script is executed, with complete
At the distributed memory system byte-lock characteristic test task.
Optionally, the reading unit is used to start the perform script of the automatic test node;According to the execution
Script reads the goal task in task queue.
Optionally, described device further includes uploading unit:
The uploading unit uploads under specified path for will execute the log that the target detection script generates.
The embodiment of the present application has the advantage that it can be seen from above-mentioned technical proposal
When carrying out the characteristic test of distributed memory system byte-lock, automated test frame can be constructed in advance, it is described
Automated test frame includes automatic test node and task engine pond, at least provided with task on the automatic test node
Queue includes more task engines in the task engine pond, only carries out automated test frame of building during the test, leads to
Goal task in task queue can automatically be read by crossing automatic test node, and the goal task is distributed storage system
The task that any bar is not carried out in system byte-lock characteristic test task, the characteristic test task include at least one task;Root
According to the corresponding automatic test configuration file of the goal task, goal task machine, the target are determined from the task pool
Task engine includes more task engines;Target detection script is obtained from the goal task machine, and executes the target detection foot
This, to complete the distributed memory system byte-lock characteristic test task.As it can be seen that by constructing automatic test frame automatically
Frame, and then automatic test node automatically carries out distributed memory system byte-lock characteristic test, and testing efficiency can be improved,
It avoids omitting the test of certain clustered nodes, improves test quality.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only this
Apply for a part of the embodiment, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art exist
Every other embodiment obtained under the premise of creative work is not made, shall fall in the protection scope of this application.
When traditional use manual testing's method carries out the characteristic test of distributed memory system byte-lock, due to test job
Amount can be very huge, causes the workload of manual testing can be very huge, and then reduces testing efficiency, in some instances it may even be possible to can omit certain
The test of a little clustered nodes reduces test quality.
For this purpose, the embodiment of the present application provides a kind of distributed memory system byte-lock characteristic test method, this method can be with
Automated test frame is automatically constructed, and then utilizes the automatic test node in automated test frame and task engine pond,
The characteristic test of distributed memory system byte-lock is automatically carried out to avoid omitting certain clustered nodes to improve testing efficiency
Test, improve test quality.
With reference to the accompanying drawing, distributed memory system byte-lock provided by the embodiments of the present application characteristic test side is described in detail
Method.
In the present embodiment, it will be introduced for storage system NFS in a distributed manner.It is that the application is real referring to Fig. 1, Fig. 1
A kind of flow chart of distributed memory system byte-lock characteristic test method of example offer is applied, in the method, building in advance is certainly
Dynamicization test frame, the automated test frame include automatic test node and task engine pond, the automatic test section
Point is upper at least provided with task queue, includes more task engines in the task engine pond, referring to fig. 2, Fig. 2 shows based on automatically
Change the system architecture diagram that test frame carries out distributed memory system byte-lock characteristic automatic test.It is wrapped in the system architecture diagram
Include automation control node 201 and task engine pond 202.
The described method includes:
Goal task in S101, reading task queue.
Wherein, the goal task is times that any bar is not carried out in distributed memory system byte-lock characteristic test task
Business, the characteristic test task include at least one task.
It should be noted that as shown in Fig. 2, tester can submit distributed storage system on automation control node
The byte-lock characteristic test task of system NFS, automation control node can deposit distribution after recognizing task submiting command
The byte-lock characteristic test task of storage system NFS is added in task queue, with pending.
It should be noted that can also include script bank and yum in addition to being provided with task queue on automation control node
(full name is yellow dog updater, modified) source, the source yum is with can indicating a software assembly.
It should be noted that in one implementation, the method for constructing automated test frame in advance includes: creation institute
Task engine pond is stated, and corresponding operating system is installed for the multiple task engine in the task engine pond;Wherein, for target
Task engine, is the goal task machine installation targets operating system, and the goal task machine is any in the multiple task engine
Platform, the destination OS are the corresponding operating system of the goal task machine;Create the automation control node.
In one case, in order to avoid during automatic test byte-lock characteristic, between multiple tasks machine with
And need to input password between automation control node and goal task machine and can just access, guarantee automatic test byte
It locks the smooth of characteristic to carry out, in one implementation, safety shell protocol (Secure is configured between the multiple task engine
Shell, abbreviation SSH) public key, to realize between the multiple task engine without cryptographic acess;The automation control node and institute
It states and configures the safety shell protocol public key between goal task machine, to realize that the automation control node and the target are appointed
Without cryptographic acess between business machine.Wherein, the safety shell protocol public key can be indicated with SSH-Key, creation SSH-Key's
It can be set simultaneously and exempt from confidential information, to realize no cryptographic acess.
After the building for completing automated test frame, the byte-lock characteristic that can star distributed memory system NFS is compiled
Building task is translated, automation task can complete task engine for the update installation of the byte-lock characteristic of distributed memory system NFS.
Specifically, before the goal task in the reading task queue, the method also includes: for the multiple task engine installation
Distributed memory system byte-lock characteristic installation kit;Write the automatic test configuration file using markup language, it is described from
Task engine quantity, target detection script path needed for dynamicization test profile indicates automatic test;Add the distribution
Formula storage system byte-lock characteristic test task is appointed into the task queue so as to read target from task queue
Business.
It should be noted that in the present embodiment, a kind of implementation for reading the goal task in task queue can be with
It is: starts the perform script of the automatic test node;According to the perform script, the target read in task queue is appointed
Business.
S102, according to the corresponding automatic test configuration file of the goal task, target is determined from the task pool
Task engine.
Wherein, the goal task machine includes more task engines, and Fig. 2 is by taking N platform task engine as an example.It is being determined from task pool
When goal task machine, idle task machine can be specifically determined first from task pool, it is then, corresponding automatic according to goal task
Change test profile, goal task machine is determined from idle task machine.
For example, including 10 task engines in task pool, automatic test configuration file indicates appoints needed for automatic test
Business machine quantity is 4, wherein there are 5 task engines to be carrying out automatic test task in task pool, it is occupied, then,
4 can be selected from remaining 5 task engine according to automatic test configuration file, and lock 4 task engines, by this 4
Task engine is as goal task machine.
According to the feature of distributed memory system NFS, distributed memory system NFS generally comprises node cluster and NFS visitor
Family end, therefore, in the present embodiment, the goal task machine is used to be used as clustered node and client, in distributed storage system
It unites in NFS, which is NFS client, and user oriented, with external offer service, which platform task engine is made in goal task machine
For clustered node, which platform task engine can determine that node profile is to mention according to node profile as NFS client
It is generated after the byte-lock characteristic test task of friendship distributed memory system NFS.
For example, with reference to Fig. 2, if determined from N platform task engine 4 task engines as goal task machine, then, at 4
In task engine, it can determine that preceding 3 task engines can be used as clustered node according to node profile, 1 task engine can be made
For NFS client.
It is understood that can execute after determining as the task engine of clustered node and build distributed type assemblies foot
This, could be aware that the state of clustered node by distributed type assemblies script, how to build distributed type assemblies etc..
After determining NFS client, can in NFS client the byte-lock of carry distributed memory system NFS it is special
Property, and detect whether carry success, whether state normal, so as to the byte-lock characteristic carry of distributed memory system NFS at
Function and state it is normal after, execute S103.
S103, target detection script is obtained from the goal task machine, and execute the target detection script, to complete
The distributed memory system byte-lock characteristic test task.
Target detection script can be located in test script library, and test script library can be located in every task engine, certainly,
It is convenient that unified maintenance is carried out to test script library in order to avoid carrying out maintenance and management to the test script library in every task engine
And management, in one implementation, test script library can be located in remote testing script bank, i.e. target detection script is located at
In remote testing script bank.
In this case, described that target detection script is obtained from the goal task machine, and execute the target and survey
Training sheet may is that with completing the specific implementation of the distributed memory system byte-lock characteristic test task from described
The test script from the remote testing script bank is obtained on goal task machine, the test script includes target detection script
With subtest script, wherein subtest script is not the test script needed to be implemented, be can be for describing clustered node
The test script of the characteristics such as state, for assisting performance objective test script;The target detection script is executed, to complete mesh
The execution of mark task, and then complete the distributed memory system byte-lock characteristic test task.
It should be noted that for the ease of subsequent analysis and the byte-lock characteristic test for checking distributed memory system NFS
The information such as test script implementing result after S103, can will execute the target detection foot in one implementation
The log of this generation uploads under specified path.Wherein, the implementing result of all test scripts can be embodied in the log, tested
Script quantity executes the information such as time.
After obtaining log, log can be analyzed automatically, and generate test report, being sent automatically by mail should
Test report, so as to tester it will be seen that the test result of the byte-lock characteristic test of distributed memory system NFS.
It should be noted that if above step executes failure, it can enter failure procedures, clear up clustered node, upload day
Will discharges goal task machine.
When carrying out the characteristic test of distributed memory system byte-lock, automated test frame can be constructed in advance, it is described
Automated test frame includes automatic test node and task engine pond, at least provided with task on the automatic test node
Queue includes more task engines in the task engine pond, only carries out automated test frame of building during the test, leads to
Goal task in task queue can automatically be read by crossing automatic test node, and the goal task is distributed storage system
The task that any bar is not carried out in system byte-lock characteristic test task, the characteristic test task include at least one task;Root
According to the corresponding automatic test configuration file of the goal task, goal task machine, the target are determined from the task pool
Task engine includes more task engines;Target detection script is obtained from the goal task machine, and executes the target detection foot
This, to complete the distributed memory system byte-lock characteristic test task.As it can be seen that by constructing automatic test frame automatically
Frame, and then automatic test node automatically carries out distributed memory system byte-lock characteristic test, and testing efficiency can be improved,
It avoids omitting the test of certain clustered nodes, improves test quality.
Based on the distributed memory system byte-lock characteristic test method that previous embodiment provides, the embodiment of the present application is provided
A kind of distributed memory system byte-lock characteristic test device, constructs automated test frame, the automatic test in advance
Frame includes automatic test node and task engine pond, described at least provided with task queue on the automatic test node
Include more task engines in task engine pond, described device includes reading unit 301, determination unit 302 and execution unit 303:
The reading unit 301, for reading the goal task in task queue, the goal task is distributed storage
The task that any bar is not carried out in system byte-lock characteristic test task, the characteristic test task include at least one task;
The determination unit 302 is used for according to the corresponding automatic test configuration file of the goal task, from described
It is engaged in determining goal task machine in pond, the goal task machine includes more task engines;
The execution unit 303 for obtaining target detection script from the goal task machine, and executes the target
Test script, to complete the distributed memory system byte-lock characteristic test task.
Optionally, the goal task machine is used to be used as clustered node and client.
Optionally, described device further includes the first creating unit and the second creating unit:
First creating unit for creating the task engine pond, and is the multiple in the task engine pond
Business machine installs corresponding operating system;It wherein, is the goal task machine installation targets operating system for goal task machine,
The goal task machine is any in the multiple task engine, and the destination OS is that the goal task machine is corresponding
Operating system;
Second creating unit, for creating the automation control node.
Optionally, between the multiple task engine configure safety shell protocol public key, with realize the multiple task engine it
Between without cryptographic acess;
The safety shell protocol public key is configured between the automation control node and the goal task machine, to realize
Without cryptographic acess between the automation control node and the goal task machine.
Optionally, described device further includes installation unit, writing unit and adding unit:
The installation unit, for installing distributed memory system byte-lock characteristic installation kit for the multiple task engine;
The writing unit, for using markup language to write the automatic test configuration file, the automation is surveyed
Task engine quantity, target detection script path needed for examination configuration file indicates automatic test;
The adding unit, for adding the distributed memory system byte-lock characteristic test task to the task team
In column.
Optionally, the target detection script is stored in remote testing script bank.
Optionally, the execution unit is used to obtain from the goal task machine from the remote testing script bank
Test script, the test script include target detection script and subtest script;The target detection script is executed, with complete
At the distributed memory system byte-lock characteristic test task.
Optionally, the reading unit is used to start the perform script of the automatic test node;According to the execution
Script reads the goal task in task queue.
Optionally, described device further includes uploading unit:
The uploading unit uploads under specified path for will execute the log that the target detection script generates.
When carrying out the characteristic test of distributed memory system byte-lock, automated test frame can be constructed in advance, it is described
Automated test frame includes automatic test node and task engine pond, at least provided with task on the automatic test node
Queue includes more task engines in the task engine pond, only carries out automated test frame of building during the test, leads to
Goal task in task queue can automatically be read by crossing automatic test node, and the goal task is distributed storage system
The task that any bar is not carried out in system byte-lock characteristic test task, the characteristic test task include at least one task;Root
According to the corresponding automatic test configuration file of the goal task, goal task machine, the target are determined from the task pool
Task engine includes more task engines;Target detection script is obtained from the goal task machine, and executes the target detection foot
This, to complete the distributed memory system byte-lock characteristic test task.As it can be seen that by constructing automatic test frame automatically
Frame, and then automatic test node automatically carries out distributed memory system byte-lock characteristic test, and testing efficiency can be improved,
It avoids omitting the test of certain clustered nodes, improves test quality.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and foregoing routine can be stored in a computer readable storage medium, which exists
When execution, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned can be at least one in following media
Kind: read-only memory (English: read-only memory, abbreviation: ROM), RAM, magnetic or disk etc. are various to be can store
The medium of program code.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment it
Between same and similar part may refer to each other, each embodiment focuses on the differences from other embodiments.
For equipment and system embodiment, since it is substantially similar to the method embodiment, so describe fairly simple,
The relevent part can refer to the partial explaination of embodiments of method.Equipment and system embodiment described above is only schematic
, wherein unit may or may not be physically separated as illustrated by the separation member, it is shown as a unit
Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks
On unit.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
Those of ordinary skill in the art can understand and implement without creative efforts.
The above, only a kind of specific embodiment of the application, but the protection scope of the application is not limited thereto,
Within the technical scope of the present application, any changes or substitutions that can be easily thought of by anyone skilled in the art,
Should all it cover within the scope of protection of this application.Therefore, the protection scope of the application should be with scope of protection of the claims
Subject to.