Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide one kind is stepped on based on SSH agreements
The test method and system of land certification carry out debarkation authentication test manually in the prior art for solving, cumbersome, efficiency is low
The problem of.
In order to achieve the above objects and other related objects, the present invention provides a kind of carrying out debarkation authentication based on SSH agreements
Test method is used for user equipment, includes the following steps:Logon information pair is generated according to preset create-rule, and will be described
Logon information at least one of logon information be sent to equipment under test, so that the equipment under test is preserved;Based on SSH
At least another logon information of the logon information centering is sent to the equipment under test by agreement, for the equipment under test
Execute the authentication test program of the corresponding logon information pair;Obtain the test letter that the equipment under test executes authentication test program
Breath.
Preferably, described to include in such a way that preset create-rule generates logon information pair:According to preset correspondence
The sequence of the create-rule of each logon information pair sequentially generates corresponding logon information pair.
Preferably, further include:When including exception information in acquired test information, sends and stop to the equipment under test
Instruction.
Based on above-mentioned purpose, the present invention also provides a kind of test methods carrying out debarkation authentication based on SSH agreements, are used for
Equipment under test, including:Obtain and preserve the logon information that is generated from user equipment at least one of logon information, and
Based on acquired logon information to the corresponding authentication test program of determination;Acquisition is logged in from what the user equipment was generated
Information centering at least another logon information, and execute identified authentication test program and record the letter of the test in implementation procedure
Breath;The test information is fed back into the user equipment.
Preferably, the mode that test information is fed back to the user equipment includes:The survey that will be recorded in real time
Examination information feeds back to the user equipment, and stops the execution authentication test based on the halt instruction from the user equipment
Program;Alternatively, based on the exception information in the test information recorded, stop executing the authentication test program, and will be current
The test information recorded feeds back to the user equipment.
Based on above-mentioned purpose, the present invention also provides a kind of user equipment for the debarkation authentication test based on SSH agreements,
Including:Processing module is automatically generated, for generating logon information pair according to preset create-rule;First communication module is used for
Based on SSH agreements by the logon information at least one of logon information be sent to equipment under test, tested set for described
It is standby to be preserved;And at least another logon information of the logon information centering to be sent to the equipment under test,
So that the equipment under test executes the authentication test program of the corresponding logon information pair, and obtains the equipment under test execution and recognize
Demonstrate,prove the test information of test program.
Preferably, the first communication module is additionally operable in the acquired test information include exception information, to described
Equipment under test sends halt instruction.
Preferably, the processing module that automatically generates is for the create-rule according to each logon information pair of preset correspondence
Sequentially, corresponding logon information pair is sequentially generated.
Based on above-mentioned purpose, the present invention also provides a kind of equipment under test for the debarkation authentication test based on SSH agreements,
Including:Second communication module, at least first for obtaining and preserving the logon information centering generated from user equipment steps on
Land information;Test module is used for based on acquired logon information to the corresponding authentication test program of determination;Second communication
Module is additionally operable to obtain the second logon information of logon information centering generated from the user equipment;The test module,
It is additionally operable to execute identified authentication test program and records the test information in implementation procedure;The second communication module is also used
In the test information is fed back to the user equipment.
Preferably, further include:Stopping modular;The stopping modular is in real time feeding back to the test information recorded
The user equipment, and the execution authentication test program is stopped based on the halt instruction from the user equipment;Alternatively, institute
It states stopping modular and executes the authentication test program for based on the exception information in the test information recorded, stopping, and will
The test information currently recorded feeds back to the user equipment.
Based on above-mentioned purpose, the present invention also provides a kind of system for the debarkation authentication test based on SSH agreements, packets
It includes:As above any user equipment, and as above any equipment under test.
As described above, the test method and system for being carried out debarkation authentication based on SSH agreements of the present invention, is had beneficial below
Effect:By automatically generating logon information pair, tester can be convenient for carry out batch testing, without manual operation, to keep away
The shortcomings of testing efficiency is low, error rate is high caused by artificial participation is exempted from;In addition, when testing information appearance exception, in time
Stop test, is conducive to tester's timely processing;In addition, tested according to default debarkation authentication sequence, it can be with reality
Border operation is consistent, and is conducive to provide data supporting with test result for true traffic-operating period.
Specific implementation mode
Illustrate that embodiments of the present invention, those skilled in the art can be by this specification below by way of specific specific example
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.It should be noted that in the absence of conflict, following embodiment and implementation
Feature in example can be combined with each other.
It should be noted that the diagram provided in following embodiment only illustrates the basic structure of the present invention in a schematic way
Think, component count, shape and size when only display is with related component in the present invention rather than according to actual implementation in schema then
Draw, when actual implementation kenel, quantity and the ratio of each component can be a kind of random change, and its assembly layout kenel
It is likely more complexity.
Referring to Fig. 1, the present invention provides a kind of test method carrying out debarkation authentication based on SSH agreements.The test side
Method is mainly executed by user equipment and equipment under test.Wherein, the user equipment passes through network serial line interface with equipment under test
It is connected.Wherein, it has prestored in equipment under test and has corresponded to the authentication test program of various debarkation authentications.For the ease of to described tested
The functions such as verification process and performance are tested under the verification process of equipment, large traffic environment, and this method executes following steps:
In step sl, the user equipment generates logon information pair according to preset create-rule, and is logged in described
Information at least one of logon information be sent to equipment under test.
Wherein, the create-rule is related to institute's verification process to be tested.For example, institute's verification process packet to be tested
It includes:User name cipher authentication is tested, then the create-rule is to be generated at random according to preset user name length and Password Length
User name, the rule of password.For another example, institute's verification process to be tested includes:Key authentication is tested, then the create-rule is choosing
Select the rule that preset key generator generates public key, private key.For another example, institute's verification process to be tested includes:Key authentication is surveyed
Examination and version authentication test, then the create-rule includes:Preset key generator is selected to generate public key and private key, Yi Jisheng
At the rule of version number.Wherein, the key generator includes:Puttygen tools etc..
It is set according to the selected create-rule of tester or the create-rule of multiple selected sequences, the user
It is standby to generate at least one logon information pair.Wherein, the logon information is to including:Username and password pair, and/or public key and private
Key equity.
Also according to the logon information pair generated, at least one logon information therein is sent to equipment under test.
For example, the logon information by the public key to for public key and private key pair, being then sent to equipment under test.
For another example, the username and password to for username and password pair, being then sent to described by the logon information
Equipment under test.
Here, selecting authentication test program for the ease of equipment under test, the user equipment is when uploading each logon information
Also upload corresponding logon information type.Wherein, the logon information type includes:Password type and Key Tpe.
The user equipment is by serial line interface by the logon information to being sent to the equipment under test.
Preferably, the user equipment can be with a variety of debarkation authentications of follow-on test.So in this step, the user sets
It is standby to sequentially generate corresponding logon information pair according to the sequence of the create-rule of each logon information pair of preset correspondence,
And by the logon information generated every time at least one of logon information be sent to equipment under test.When the equipment under test with
After the user equipment performs follow-up step S2-S5, retransmit the logon information that is subsequently generated at least one of step on
Land information.And so on, until completing all debarkation authentication tests.
In step s 2, the equipment under test preserve the logon information that is generated from user equipment at least one of
Logon information, and based on acquired logon information to the corresponding authentication test program of determination.
Specifically, format, quantity and the acquired log-on message that the equipment under test passes through the analysis logon information
At least one of type determines corresponding authentication test program.For example, acquired logon information is text formatting, then really
Fixed corresponding authentication test program is cipher authentication test program.The quantity of acquired logon information is two, it is determined that
Corresponding authentication test program is key authentication test program.
In step s3, the user equipment based on SSH agreements by the logon information centering at least another log in
Information is sent to the equipment under test.
Specifically, the user equipment proceeds by debarkation authentication test at this time, simulates normal user's landfall process, will
The logon information of required transmission is sent to the equipment under test when logging in.For example, the user equipment utilizes SSH agreements by user
Name and password are sent to equipment under test, then the equipment under test executes step S4.
In step s 4, the equipment under test executes identified authentication test program and records the test in implementation procedure
Information.
Specifically, the equipment under test executes identified authentication test program, and according in the authentication test program
Log recording point, record test process and test result.Wherein, the test process includes but not limited to:The normal stage
Test information, test of abnormal stage information, preset other that the to be checked test process of tester etc..The test knot
Fruit includes but not limited to:Successfully tested rate tests whether to pass through.
In step s 5, the test information comprising test process and test result is fed back to the use by the equipment under test
Family equipment.In this way, tester can directly check test information on a user device.
In order to provide the test information with abnormality test situation in time, the equipment under test feeds back survey in the following ways
Try information.
1) the test information recorded is fed back into the user equipment in real time, and based on from the user equipment
Halt instruction stops executing the authentication test program.
Specifically, the new test information recorded is fed back to user equipment by the equipment under test in real time, by described
User equipment is parsed, if be resolved to received test information be exception information when, send out halt instruction.It is described tested
Equipment is based on the halt instruction, and stopping continues to execute corresponding authentication test program.
2) equipment under test stops executing the authentication test journey based on the exception information in the test information recorded
Sequence, and the test information currently recorded is fed back into the user equipment.
Specifically, the equipment under test is during record tests information, label of the detection with exception information, if inspection
Survey monitors exception information, then will detect that the test information between exception information is protected from execution authentication test program large-size screen monitors
It deposits, and stops the execution of corresponding authentication test program.Obtained test information is sent to user equipment again.It tests as a result,
Personnel can obtain the operating condition of authentication test program by monitoring user equipment.
Referring to Fig. 2, the present invention also provides a kind of systems carrying out debarkation authentication test based on SSH agreements.The test
System includes:User equipment and equipment under test.Wherein, the user equipment is connected with equipment under test by network serial line interface.
Wherein, it has prestored in equipment under test and has corresponded to the authentication test program of various debarkation authentications.For the ease of to the equipment under test
Verification process, the functions such as verification process and performance are tested under large traffic environment, the user equipment 1 includes:It is automatic raw
At processing module 11, first communication module 12;The equipment under test 2 includes:Second communication module 21 and test module 22.
The processing module 11 that automatically generates according to preset create-rule for generating logon information pair.
Wherein, the create-rule is related to institute's verification process to be tested.For example, institute's verification process packet to be tested
It includes:User name cipher authentication is tested, then the create-rule is to be generated at random according to preset user name length and Password Length
User name, the rule of password.For another example, institute's verification process to be tested includes:Key authentication is tested, then the create-rule is choosing
Select the rule that preset key generator generates public key, private key.For another example, institute's verification process to be tested includes:Key authentication is surveyed
Examination and version authentication test, then the create-rule includes:Preset key generator is selected to generate public key and private key, Yi Jisheng
At the rule of version number.Wherein, the key generator includes:Puttygen tools etc..
It is set according to the selected create-rule of tester or the create-rule of multiple selected sequences, the user
Standby 1 generates at least one logon information pair.Wherein, the logon information is to including:Username and password pair, and/or public key and
Private key equity.
Also according to the logon information pair generated, at least one logon information therein is passed into the first communication mould
Block 12, so that it is sent to equipment under test 2.
For example, the logon information by the public key to for public key and private key pair, being then sent to equipment under test 2.
For another example, the username and password to for username and password pair, being then sent to described by the logon information
Equipment under test 2.
Here, selecting authentication test program, the processing module 11 that automatically generates uploading respectively for the ease of equipment under test 2
Corresponding logon information type is also uploaded when logon information.Wherein, the logon information type includes:Password type and close
Key type.
The first communication module 12 is by serial line interface by the logon information to being sent to the equipment under test 2.
Preferably, the user equipment 1 can be with a variety of debarkation authentications of follow-on test.So described automatically generate processing also
Corresponding logon information pair can be sequentially generated, and will according to the sequence of the create-rule of each logon information pair of preset correspondence
The logon information generated every time at least one of logon information be sent to equipment under test 2.When the equipment under test 2 and institute
It states after each module has executed primary test in user equipment 1, the processing module 11 that automatically generates is communicated by described first again
Module 12 send the logon information that is subsequently generated at least one of logon information.And so on, until completing all log in
Authentication test.
The second communication module 21 is for preserving the logon information centering provided from the first communication module 12
At least one logon information.
The test module 22 is used for based on acquired logon information to the corresponding authentication test program of determination.
Specifically, the test module 22 is believed by analyzing format, quantity and the acquired login of the logon information
At least one of type is ceased to determine corresponding authentication test program.For example, acquired logon information is text formatting, then
Determine that corresponding authentication test program is cipher authentication test program.The quantity of acquired logon information is two, then really
Fixed corresponding authentication test program is key authentication test program.
The first communication module 12 be additionally operable to based on SSH agreements by the logon information centering at least another log in
Information is sent to the equipment under test 2.
Specifically, the first communication module 12 proceeds by debarkation authentication test at this time, simulates normal user and logs in
The logon information of required transmission when logging in is sent to the equipment under test 2 by process.For example, 12 profit of the first communication module
Username and password is sent to equipment under test 2 with SSH agreements, then the test module 22 in the equipment under test 2 continues to hold
Row.
The test module 22 is additionally operable to execute identified authentication test program and records the letter of the test in implementation procedure
Breath.
Specifically, the test module 22 executes identified authentication test program, and according to the authentication test program
In log recording point, record test process and test result.Wherein, the test process includes but not limited to:Normal rank
Section test information, test of abnormal stage information, preset other that the to be checked test process of tester etc..The test
As a result include but not limited to:Successfully tested rate tests whether to pass through.
The second communication module 21 is additionally operable to feed back to the test information comprising test process and test result described
User equipment 1.In this way, tester can check test information directly on user equipment 1.
In order to provide the test information with abnormality test situation in time, the equipment under test 2 further includes:Stopping modular.
(being unillustrated)
The stopping modular is used to indicate the second communication module 21 and in real time feeds back to the test information recorded
The user equipment 1, and the execution authentication test program is stopped based on the halt instruction from the user equipment 1.
Specifically, the stopping modular indicates the new test information that the second communication module 21 will be recorded in real time
User equipment 1 is fed back to, is parsed by the analysis module (being unillustrated) in the user equipment 1, is received if being resolved to
Test information be exception information when, then send out halt instruction.The stopping modular is based on the halt instruction, and stopping continues to hold
The corresponding authentication test program of row.
The stopping modular is used to, based on the exception information in the test information recorded, stop executing the authentication test
Program, and the test information currently recorded is fed back into the user equipment 1.
Specifically, the stopping modular is during record tests information, label of the detection with exception information, if inspection
Survey monitors exception information, then will detect that the test information between exception information is protected from execution authentication test program large-size screen monitors
It deposits, and stops the execution of corresponding authentication test program.Obtained test information is sent to user equipment 1 again.It tests as a result,
Personnel can obtain the operating condition of authentication test program by monitoring user equipment 1.
In conclusion the present invention by automatically generating logon information pair, can be convenient for tester to carry out batch testing, nothing
It needs to be manually operated, caused the shortcomings of testing efficiency is low, error rate is high is participated in so as to avoid artificial;In addition, when test letter
When breath occurs abnormal, stops test in time, be conducive to tester's timely processing;In addition, coming according to default debarkation authentication sequence
It is tested, can be consistent with practical operation, be conducive to provide data supporting with test result for true traffic-operating period.Institute
With the present invention effectively overcomes various shortcoming in the prior art and has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology can all carry out modifications and changes to above-described embodiment without violating the spirit and scope of the present invention.Cause
This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as
At all equivalent modifications or change, should by the present invention claim be covered.