Summary of the invention
In view of this, the embodiment of the present invention provide it is a kind of for Certificate Authority web service interface test method andDevice can be adapted to the web service interface automatic test for having permission the system under test (SUT) of control to band, overcome invasive to systemToo big defect is not necessarily to independent deployment services device, reduces mistake, provide effective Certificate Authority for automated test toolInformation without by human configuration, promoting automation efficiency, guaranteeing the enhanced scalability for different systems under test (SUT), branch every timeIt holds the polygonal color of multi-user to log in, ensure that the adequacy of interface testing, and the system under test (SUT) newly tested can be completed without restartingLogon script load, improve system availability.
To achieve the above object, according to an aspect of an embodiment of the present invention, it provides a kind of for Certificate AuthorityWeb service interface test method.
It is a kind of for the web service interface test method for having Certificate Authority, comprising: establish step on respectively for each system under test (SUT)Script is recorded, and saves the incidence relation between the system under test (SUT) and the logon script;It is sent receiving interface testing toolAfter the logging request to the system under test (SUT) of test to come over, according to the tested system of test described in the incidence relation dynamically loadIt unites and corresponding logon script and executes, to simulate the system under test (SUT) for logging in the test, the system under test (SUT) for obtaining the test is mentionedThe authentication information of confession;The authentication information is supplied to the interface testing tool, with will be described by the interface testing toolAuthentication information is added in the interface access request to the system under test (SUT) of the test, and then rings to the system under test (SUT) of the testThe response data answering the interface access request and returning is verified.
Optionally, further includes: established after logon script for the system under test (SUT), configure one group or more of the logon scriptGroup input parameter, every group of input parameter are one group of login user information of the system under test (SUT).
Optionally, the logging request includes the title of the system under test (SUT) of the specified test of the interface testing toolWith login user information, according to the corresponding logon script of system under test (SUT) of incidence relation dynamically load test and execute, withThe step of simulation logs in the system under test (SUT) of the test, obtains the authentication information of system under test (SUT) offer of the test, comprising: look intoIt looks for that there are the logon scripts of mapping relations with the title of the system under test (SUT) of the test, and loads the logon script;It is connect with describedThe input parameter of logon script of the specified login user information of mouth testing tool as load, executes the login foot of the loadThis, to simulate the system under test (SUT) for logging in the test, after described login successfully, the logon script is tested from the testThe authentication information is parsed in the response message that system returns.
Optionally, the web login process of the system under test (SUT) java (a kind of Object-Oriented Programming Language) is abstracted as to step onInterface is recorded, the logon script realizes the java login interface according to the login logic of the system under test (SUT), completes to describedThe simulation of system under test (SUT) logs in.
Optionally, using the corresponding logon script of system under test (SUT) of test described in java Classloader dynamically load.
Optionally, the authentication information is token or session (session control) information.
According to another aspect of an embodiment of the present invention, it provides a kind of for the web service interface survey with Certificate AuthorityTrial assembly is set.
It is a kind of for have Certificate Authority web service interface test device, comprising: logon script establishes module, is used forLogon script is established respectively for each system under test (SUT), and saves the incidence relation between the system under test (SUT) and the logon script;Logon script load and execution module, in the login for receiving the system under test (SUT) to test that interface testing tool sends overWhen after request, according to the corresponding logon script of system under test (SUT) of test described in the incidence relation dynamically load and execute, withSimulation logs in the system under test (SUT) of the test, obtains the authentication information that the system under test (SUT) of the test provides;Authentication information providesModule, for the authentication information to be supplied to the interface testing tool, with by the interface testing tool by the certificationInformation is added in the interface access request to the system under test (SUT) of the test, and then responds institute to the system under test (SUT) of the testThe response data stating interface access request and returning is verified.
Optionally, further include input parameter configuration module, be used for: after establishing logon script for the system under test (SUT), matchingOne or more groups of input parameters of the logon script are set, every group of input parameter is one group of login user information of the system under test (SUT).
It optionally, further include information receiving module, for receiving the quilt of the specified test of the interface testing toolThe title and login user information of examining system, the logon script load and execution module are also used to: being searched and the testThere are the logon scripts of mapping relations for the title of system under test (SUT), and load the logon script;It is specified with the interface testing toolLogin user information as load logon script input parameter, execute the logon script of the load, with simulate log inThe system under test (SUT) of the test, after described login successfully, sound that the logon script is returned from the system under test (SUT) of the testIt answers and parses the authentication information in message.
Optionally, the web login process of the system under test (SUT) is abstracted as java login interface, the logon script according toThe login logic of the system under test (SUT) realizes the java login interface, completes the simulation to the system under test (SUT) and logs in.
Optionally, the logon script load and execution module use the quilt of test described in java Classloader dynamically loadThe corresponding logon script of examining system.
Another aspect according to an embodiment of the present invention, provides a kind of electronic equipment.
A kind of electronic equipment, comprising: one or more processors;Memory works as institute for storing one or more programsWhen stating one or more programs and being executed by one or more of processors, so that one or more of processors realize this hairBright offer is directed to the web service interface test method with Certificate Authority.
Another aspect according to an embodiment of the present invention, provides a kind of computer-readable medium.
A kind of computer-readable medium is stored thereon with computer program, realizes this when described program is executed by processorWhat invention provided is directed to the web service interface test method with Certificate Authority.
One embodiment in foregoing invention has the following advantages that or the utility model has the advantages that establishes login respectively for each system under test (SUT)Script, and save the incidence relation between system under test (SUT) and logon script;Receiving that interface testing tool sends over to surveyAfter the logging request of the system under test (SUT) of examination, simultaneously according to the corresponding logon script of system under test (SUT) of incidence relation dynamically load testIt executes, to simulate the system under test (SUT) for logging in test, the authentication information that the system under test (SUT) tested provides;Authentication information is providedInterface testing tool is given, authentication information to be added to the interface access request to the system under test (SUT) of test by interface testing toolIn, and then the response data returned to the system under test (SUT) response interface access request of test verifies.It can be adapted to bandThe web service interface automatic test for having permission the system under test (SUT) of control overcomes too big defect invasive to system, without singleOnly deployment services device, reduces mistake, provides effective Certificate Authority information without every time for automated test toolBy human configuration, automation efficiency is promoted, supports the customized logon script of user, is abstracted login interface and for each tested systemSystem all realizes the login interface, guarantees the enhanced scalability for different systems under test (SUT).Configurable multiple groups login user information, branchIt holds the polygonal color of multi-user to log in, ensure that the adequacy of interface testing, in addition, using the test of java Classloader dynamically loadThe login for the system under test (SUT) newly tested can be completed without restarting the device of the invention in the corresponding logon script of system under test (SUT)Script load, improves system availability.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodimentWith explanation.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present inventionDetails should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognizeIt arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.TogetherSample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Those skilled in the art will understand that embodiments of the present invention can be implemented as a kind of system, device, equipment,Method or computer program product.Therefore, the present disclosure may be embodied in the following forms, it may be assumed that complete hardware, complete softThe form that part (including firmware, resident software, microcode etc.) or hardware and software combine.
Fig. 1 is the master for the web service interface test method with Certificate Authority according to a first embodiment of the present inventionWant step schematic diagram.
As shown in Figure 1, the present embodiment mainly includes as follows for the web service interface test method with Certificate AuthorityStep S101 to step S103.
Step S101: logon script is established respectively for each system under test (SUT), and is saved between system under test (SUT) and logon scriptIncidence relation.
System under test (SUT) is specifically as follows web application system.
The web login process of system under test (SUT) is abstracted as java login interface, each logon script by the embodiment of the present inventionThe java login interface is realized according to the login logic of associated system under test (SUT), and the simulation of corresponding system under test (SUT) is stepped in completionRecord.Concrete implementation logic is for example: (can be used to provide efficient, newest, feature-rich using httpClient development kitSupport http protocol client programming kit) simulation the page submit web logging request or htmlUnit it is (a to openThe java page analysis tool in source can be effectively using the content on the htmlUnit analysis page after reading the page) development kitSimulation browser parses web login page, to log in system under test (SUT), after logining successfully, parses the Certificate Authority letter of loginBreath, and it is encapsulated into a kind of Map (container that key object and value object are associated) return.To for each testedSystem can realize respective logon script.
It should be noted that above-mentioned httpClient development kit, htmlUnit development kit also could alternatively be other canSimulation sends the java developing instrument of http request, which sends web logging request to system under test (SUT), receives simultaneouslyThe response message that system under test (SUT) returns is handled, to parse the Certificate Authority information of login, and is encapsulated into Map.Log in footOriginally it is referred to as java logon script.
The above-mentioned Certificate Authority information parsed may be simply referred to as authentication information, execute the logon script of some system under test (SUT) i.e.The authentication information that the available system under test (SUT) provides.
It is established after logon script for a system under test (SUT), further includes: configure one or more groups of inputs of the logon scriptParameter, every group of input parameter are one group of login user information of the system under test (SUT).
The input for the java login interface that the input parameter of the logon script of one system under test (SUT), the i.e. logon script are realizedParameter is specifically as follows the form of String array, including user name, the encrypted message for logging in system under test (SUT) needs.
Step S102: after receiving the logging request to the system under test (SUT) of test that interface testing tool sends over,According to the incidence relation between system under test (SUT) and logon script, the corresponding logon script of system under test (SUT) of dynamically load test is simultaneously heldRow, to simulate the system under test (SUT) for logging in test, the authentication information that the system under test (SUT) tested provides.
The logging request includes the title and login user information of the system under test (SUT) of the specified test of interface testing tool.The system under test (SUT) of test is the system under test (SUT) that be currently performed interface testing.
Step S102 can specifically include: there are the login feet of mapping relations for the title for the system under test (SUT) searched and testedThis, and load the logon script;Using the login user information that interface testing tool is specified as the input of the logon script of loadParameter executes the logon script of load, and to simulate the system under test (SUT) for logging in test, after logining successfully, logon script is from testSystem under test (SUT) return response message in parse authentication information.
After parsing authentication information, authentication information is stored in Map, is then returned to interface testing tool.
Wherein it is possible to the corresponding logon script of system under test (SUT) tested using java Classloader dynamically load.
Authentication information can be token;Or session information, such as session ID (mark);Or other are availableIn the information of Certificate Authority.
Step S103: being supplied to interface testing tool for authentication information, to be added authentication information by interface testing toolIt is returned into the interface access request of the system under test (SUT) to test, and then to the system under test (SUT) response interface access request of testResponse data verified.
After authentication information is added in the interface access request to the system under test (SUT) of test by interface testing tool, by thisInterface access request is sent to the system under test (SUT) of test, and the system under test (SUT) of test responds the interface access request, by response dataInterface testing tool is returned to, so that response data of the interface testing tool to the return verifies.To the tested system of testThe above-mentioned response data that system returns is verified, and is mainly verified to the checkpoint in response data.Checkpoint, that is, interfaceThe test point of test, such as certain fields in response data, verification, which can be, checks whether these fields meet expection.
Fig. 2 is the login authentication authorization flow schematic diagram of system under test (SUT) according to a second embodiment of the present invention.
As shown in Fig. 2, the web login process of system under test (SUT) is abstracted as java login interface by the embodiment of the present invention, such as:Login (String []) login interface.Establish the logon script of system under test (SUT) (being denoted as A system): A.class, the logon scriptLogin (String []) login interface is realized according to the login logic of A system, and A system is logged in simulation.
Login management is carried out to system under test (SUT), can create new system under test (SUT) in the interface UI (user interface), such as onThen the A system stated uploads established logon script A.class, to establish between A system and logon script A.classIncidence relation, for example, establishing the following mapping relations between the title of A system and logon script A.class:Save the mapping relations.Multiple groups login user information is configured, every group of login user information is logon scriptOne group of input parameter of login (String []) login interface that A.class is realized.Such as:
Administrator: login (" admin ", " admin ")
Examination & approval person: login (" verify ", " verify ")
For each system under test (SUT), can be serviced according to its rear end in different Role Information (such as administrator, examination & approvalThe roles such as member), multiple groups login user information is configured according to the method described above, and is every group of login user information name, such as " managementMember ".
By taking the login authentication authorization of A system as an example, interface testing tool specifies the title and login user information of A system,Such as log in: A, administrator.In addition, the interface of the also specified A system to be accessed, such as interface: B111.Receiving interface tests workHave the logging request to A system sended over, include the information such as A, administrator in logging request, administrator is to login userThe name of information can know that the user of specified A system is entitled " admin " by the name, and password is " admin ".According to reflectingPenetrate relationship:The logon script A.class with A there are mapping relations is found, ClassLoader (class is passed throughLoader) it dynamically load logon script A.class and executes.Logon script A.class realizes the login (String [])Login interface logs in A system with simulation, and the current input parameter of login (String []) login interface is above-mentioned specifiedThe username and password of A system, it may be assumed that login (" admin ", " admin ").
Authentication information Token=111 is obtained by executing logon script A.class, which is to execute logon scriptA.class simulation logs in A system, and after logining successfully provided by A system.The Token is returned into interface testing tool,It is added in the interface access request to A system by interface testing tool, the login authentication authorization to A system can be completedProcess.
Fig. 3 is the master for the web service interface test device with Certificate Authority according to a third embodiment of the present inventionWant module diagram.
As shown in figure 3, the embodiment of the present invention is directed to the web service interface test device 300 with Certificate Authority, belowAbbreviation web service interface test device 300 specifically includes that logon script establishes module 301, logon script load and executes mouldBlock 302, authentication information provide module 303.
Logon script establishes module 301, for establishing logon script respectively for each system under test (SUT), and save system under test (SUT) withIncidence relation between logon script.
System under test (SUT) is specifically as follows web application system.
The web login process of system under test (SUT) can be abstracted as java login interface, each logon script root by the embodiment of the present inventionThe java login interface is realized according to the login logic of associated system under test (SUT), and the simulation of associated system under test (SUT) is stepped in completionRecord.
Web service interface test device 300 can also include input parameter configuration module, establish module in logon script301 establish after logon script for system under test (SUT), the input parameter configuration module can be used for configuring one group of the logon script orMultiple groups input parameter, and every group of input parameter is one group of login user information of the system under test (SUT).In web service interface test deviceIn 300, multiple groups logon account information can be configured according to Role Information for each system under test (SUT).
Logon script load and execution module 302, in the quilt to test for receiving interface testing tool and sending overAfter the logging request of examining system, according to the incidence relation between system under test (SUT) and logon script, dynamically load test is testedThe corresponding logon script of system simultaneously executes, and to simulate the system under test (SUT) for logging in test, what the system under test (SUT) tested provided recognizesDemonstrate,prove information.
Web service interface test device 300 can also include information receiving module, specified for receiving interface testing toolTest system under test (SUT) title and login user information.
Logon script load and execution module 302 specifically can be used for: searching and exist with the title of the system under test (SUT) of testThe logon script of mapping relations, and load the logon script;Using the login user information that interface testing tool is specified as loadLogon script input parameter, execute the logon script of load, with simulate log in test system under test (SUT), logining successfullyAfterwards, logon script parses authentication information from the response message that the system under test (SUT) of test returns.
Authentication information is specifically as follows Token;Or session information, such as session ID;Or other certifications are awardedWeigh information.Web application system usually all has authentication module, and to guarantee software system data safety, certification is that user is defeatedEnter identity information, server is verified, and the process of back-checking result, i.e., verification user is legitimate user.AuthenticationIt is user after logging in, whether the verification whether access back-end services have permission, i.e. verification legitimate user is authorized to operate that.
Logon script load and execution module 302 can be using the systems under test (SUT) pair of java Classloader dynamically load testThe logon script answered.
Authentication information provides module 303, for authentication information to be supplied to interface testing tool, by interface testing toolAuthentication information is added in the interface access request to the system under test (SUT) of test, and then to the system under test (SUT) response interface of testAccess request and the response data returned is verified.
The web service interface test device of the embodiment of the present invention is abstracted login interface, and realizing to each system under test (SUT) shouldLogin interface, and the simulation completed in the implementation to system under test (SUT) logs in, and has high extension row, also, when in use, interfaceTesting tool sends logging request to the web service interface test device 300 of the present embodiment, indicates that the user name used can be returnedThe authentication information after logging in is returned, in addition, the web service interface test device of the present embodiment is using java ClassLoader dynamicThe logon script of system under test (SUT) is loaded, the logon script that new system under test (SUT) can be completed in the device without restarting the present embodiment addsIt carries, guarantees the high availability of the present apparatus.
Fig. 4 is the system friendship tested for the web service interface with Certificate Authority according to a fourth embodiment of the present inventionMutual schematic diagram.
As shown in figure 4, the embodiment of the present invention includes three parts for the web service interface test with Certificate Authority(hereinafter referred to as web services connect for interaction, i.e. the web service interface test device with Certificate Authority that is directed to of the embodiment of the present inventionMouthful test device), interface testing tool, the interaction between system under test (SUT).It is tested for the web service interface with Certificate AuthorityDevice can cooperate automated test tool to work, and provide effective Certificate Authority information without every for automated test toolSecondary all human configurations, to promote automation efficiency.
Interaction flow is specific as follows:
Step S401:web service interface test device is that each system under test (SUT) establishes logon script respectively, and saves tested systemIncidence relation between system and logon script.
Step S402:web service interface test device configures the input parameter of each logon script, each logon script configurationInput parameter can be one or more groups of.
Step S403: interface testing tool is sent to web service interface test device to system under test (SUT) (by taking A system as an example)Logging request.
Step S404:web service interface test device is searched according to the incidence relation between system under test (SUT) and logon scriptTo the logon script of A system.
Step S405: logon script that dynamically load is found and execution.
Step S406: realize that simulation logs in A system.
Step S407: after logining successfully, A system provides Token to web service interface test device, specifically, shouldToken is that logon script is parsed from the response message (being denoted as the first response message) that A system returns.
Token is returned to interface testing tool by step S408:web service interface test device.
Step S409: Token is added in the interface access request to A system by interface testing tool.
Step S410:A system runs the service logic of A system, some of business after receiving interface access requestLogic does authorization check using the Token.
Step S411:A system is to interface testing tool returning response message (being denoted as the second response message).
Step S412: interface testing tool checks a verification to the second response message.
In addition, described for the specific of the web service interface test device with Certificate Authority in embodiments of the present inventionImplementation content, described above be directed in the web service interface test method with Certificate Authority have been described in detail, thereforeThis duplicate contents no longer illustrates.
Fig. 5 is shown can be using the embodiment of the present invention for the web service interface test method with Certificate AuthorityOr the exemplary system architecture 500 for the web service interface test device with Certificate Authority.
As shown in figure 5, system architecture 500 may include terminal device 501,502,503, network 504 and server 505.Network 504 between terminal device 501,502,503 and server 505 to provide the medium of communication link.Network 504 can be withIncluding various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 501,502,503 and be interacted by network 504 with server 505, to receive or send outSend message etc..Various telecommunication customer end applications can be installed, such as web browser is answered on terminal device 501,502,503With (merely illustrative) such as, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 501,502,503 can be the various electronic equipments with display screen and supported web page browsing, packetInclude but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 505 can be to provide the server of various services, such as utilize terminal device 501,502,503 to userThe website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be stepped on to what is receivedThe data such as record request are handled, such as are logged in system under test (SUT) (being not shown in Fig. 5) according to logging request and obtained system under test (SUT)The response data of return parse etc. processing to response data, and by processing result (such as authentication information -- merely illustrative)Feed back to terminal device.
It should be noted that for the web service interface test side with Certificate Authority provided by the embodiment of the present inventionMethod is generally executed by server 505, correspondingly, is generally positioned at for the web service interface test device with Certificate AuthorityIn server 505.
It should be understood that the number of terminal device, network and server in Fig. 5 is only schematical.According to realization needIt wants, can have any number of terminal device, network and server.
Below with reference to Fig. 6, it illustrates the calculating of the terminal device or server that are suitable for being used to realize the embodiment of the present applicationThe structural schematic diagram of machine system 600.Terminal device or server shown in Fig. 6 are only an example, should not be to the application realityThe function and use scope for applying example bring any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored inProgram in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 andExecute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to alwaysLine 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathodeThe output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.;And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as becauseThe network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such asDisk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereonComputer program be mounted into storage section 608 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present inventionCalculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computerComputer program on readable medium, the computer program include the program code for method shown in execution flow chart.InIn such embodiment, which can be downloaded and installed from network by communications portion 609, and/or from canMedium 611 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 601, the system that executes the applicationThe above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meterCalculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but notBe limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.MeterThe more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wiresTaking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storageDevice (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,Or above-mentioned any appropriate combination.In this application, computer readable storage medium can be it is any include or storage journeyThe tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at thisIn application, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimitedIn electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer canAny computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used forBy the use of instruction execution system, device or device or program in connection.Include on computer-readable mediumProgram code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentionedAny appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journeyThe architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generationA part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or moreExecutable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in boxThe function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practicalOn can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wantsIt is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute ruleThe dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instructionIt closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hardThe mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packetIt includes logon script and module, logon script load and execution module, authentication information offer module is provided.Wherein, the name of these modulesClaim not constituting the restriction to the module itself under certain conditions, be also described as example, logon script establishes module" for establishing logon script respectively for each system under test (SUT), and save the mould of the incidence relation between system under test (SUT) and logon scriptBlock ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can beIncluded in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculatingMachine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makesThe equipment include: establish logon script respectively for each system under test (SUT), and save the system under test (SUT) and the logon script itBetween incidence relation;After receiving the logging request to the system under test (SUT) of test that interface testing tool sends over, according toThe corresponding logon script of system under test (SUT) of test described in the incidence relation dynamically load simultaneously executes, and logs in the test with simulationSystem under test (SUT), obtain the test system under test (SUT) provide authentication information;The authentication information is supplied to the interfaceTesting tool, the authentication information to be added to the interface visit to the system under test (SUT) of the test by the interface testing toolIt asks in request, and then the response data for responding the interface access request to the system under test (SUT) of the test and returning carries out schoolIt tests.
Technical solution according to an embodiment of the present invention establishes logon script for each system under test (SUT) respectively, and saves tested systemIncidence relation between system and logon script;In the login for receiving the system under test (SUT) to test that interface testing tool sends overAfter request, according to the corresponding logon script of system under test (SUT) of incidence relation dynamically load test and executes, logged in and surveyed with simulationThe system under test (SUT) of examination, the authentication information that the system under test (SUT) tested provides;Authentication information is supplied to interface testing tool, withAuthentication information is added in the interface access request to the system under test (SUT) of test by interface testing tool, and then to the quilt of testExamining system response interface access request and the response data returned is verified.It can be adapted to the tested system that control is had permission to bandThe web service interface automatic test of system overcomes too big defect invasive to system, is not necessarily to independent deployment services device, reducesMistake occurs, and provides effective Certificate Authority information without by human configuration, being promoted certainly every time for automated test toolDynamicization efficiency supports the customized logon script of user, abstract login interface simultaneously to realize that the login connects for each system under test (SUT)Mouthful, guarantee the enhanced scalability for different systems under test (SUT).Configurable multiple groups login user information, supports the polygonal color of multi-user to step onRecord, ensure that the adequacy of interface testing, in addition, stepping on using the system under test (SUT) that java Classloader dynamically load is tested is correspondingScript is recorded, the logon script load for the system under test (SUT) newly tested can be completed without restarting the device of the invention, improveSystem availability.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be brightIt is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is anyMade modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present inventionWithin.