CN110442524A - It is a kind of for have Certificate Authority web service interface test method and device - Google Patents

It is a kind of for have Certificate Authority web service interface test method and device Download PDF

Info

Publication number
CN110442524A
CN110442524A CN201910734440.2A CN201910734440A CN110442524A CN 110442524 A CN110442524 A CN 110442524A CN 201910734440 A CN201910734440 A CN 201910734440A CN 110442524 A CN110442524 A CN 110442524A
Authority
CN
China
Prior art keywords
sut
test
system under
under test
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910734440.2A
Other languages
Chinese (zh)
Other versions
CN110442524B (en
Inventor
李登宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN201910734440.2A priority Critical patent/CN110442524B/en
Publication of CN110442524A publication Critical patent/CN110442524A/en
Priority to PCT/CN2020/106707 priority patent/WO2021027615A1/en
Application granted granted Critical
Publication of CN110442524B publication Critical patent/CN110442524B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention discloses a kind of for the web service interface test method and device that have Certificate Authority, is related to field of computer technology.One specific embodiment of this method includes: to establish logon script respectively for each system under test (SUT);It according to the corresponding logon script of system under test (SUT) of the incidence relation dynamically load test between system under test (SUT) and logon script and executes, to simulate the system under test (SUT) for logging in test, obtains authentication information;Authentication information is supplied to interface testing tool being added to authentication information in the interface access request to the system under test (SUT) of test, the response data returned to the system under test (SUT) of test verifies.The embodiment is suitable for the web service interface automatic test to the system under test (SUT) for having permission control, it avoids invasive to system too big, reduce mistake, it is not required to human configuration Certificate Authority information, promotes automation efficiency, enhanced scalability, can the polygonal color of multi-user log in, guarantee interface testing adequacy, without restarting, lifting system availability.

Description

It is a kind of for have Certificate Authority web service interface test method and device
Technical field
The present invention relates to field of computer technology more particularly to it is a kind of for Certificate Authority web service interface survey Method for testing and device.
Background technique
Software test is a ring important in software life-cycle, is to guarantee software correctness, ease for use, safety, industry The significant process of business functional completeness.Wherein interface testing is the one kind for starting to carry out in the middle and later periods of business function development phase Test, the purpose is to data exchange, transmitting and the correctness of control in communicating between test system components.
In the interface testing of web application system is implemented, tester needs by tool simulation web browser to the back-end Service sends request, checks a verification to response message.For the system that logs in of needs, two schemes can be generally used: one It is to turn off login authentication from rear end, (is stored on user local terminal second is that being manually derived an available cookie every time Data) or token (token) take these authentication informations in access request later.The first scheme has permission band The system of control be it is not applicable because different login users may possess different permissions, and some service logics are Need to do authorization check, this mode for directly turning off permission is invasive to system too big, for the industry controlled comprising permission Business logic is unable to test, and needs independent deployment services device, can also bring unexpected mistake;Second scheme due to for Different interfaces, authentication information may be different, cause to its complex management, and furthermore authentication information generally has expired time, because This need to often be replaced, and be not suitable for automatic test scene.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
The prior art is unsuitable for having permission band the web service interface automatic test of the system under test (SUT) of control, to system It is invasive too big, independent deployment services device is needed, unexpected mistake can be also brought, for different system under test (SUT) scalabilities Difference, and do not support multi-user login, it not can guarantee the adequacy of interface testing.
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 and Device 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 system Too big defect is not necessarily to independent deployment services device, reduces mistake, provide effective Certificate Authority for automated test tool Information without by human configuration, promoting automation efficiency, guaranteeing the enhanced scalability for different systems under test (SUT), branch every time It 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 restarting Logon 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 Authority Web 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 tool After 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 load It 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 mentioned The authentication information of confession;The authentication information is supplied to the interface testing tool, with will be described by the interface testing tool Authentication 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 test The 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 script Group 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 tool With login user information, according to the corresponding logon script of system under test (SUT) of incidence relation dynamically load test and execute, with The 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 into It 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 described The input parameter of logon script of the specified login user information of mouth testing tool as load, executes the login foot of the load This, to simulate the system under test (SUT) for logging in the test, after described login successfully, the logon script is tested from the test The 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 on Interface is recorded, the logon script realizes the java login interface according to the login logic of the system under test (SUT), completes to described The 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 Authority Trial assembly is set.
It is a kind of for have Certificate Authority web service interface test device, comprising: logon script establishes module, is used for Logon 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 over When after request, according to the corresponding logon script of system under test (SUT) of test described in the incidence relation dynamically load and execute, with Simulation 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 provides Module, for the authentication information to be supplied to the interface testing tool, with by the interface testing tool by the certification Information 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 test The 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), matching One 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 tool The title and login user information of examining system, the logon script load and execution module are also used to: being searched and the test There 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 tool Login user information as load logon script input parameter, execute the logon script of the load, with simulate log in The 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 test It 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 to The 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 load The 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 programs When stating one or more programs and being executed by one or more of processors, so that one or more of processors realize this hair Bright 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 processor What 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 survey After 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 test It 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 provided Interface 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 tool In, and then the response data returned to the system under test (SUT) response interface access request of test verifies.It can be adapted to band The web service interface automatic test for having permission the system under test (SUT) of control overcomes too big defect invasive to system, without single Only deployment services device, reduces mistake, provides effective Certificate Authority information without every time for automated test tool By human configuration, automation efficiency is promoted, supports the customized logon script of user, is abstracted login interface and for each tested system System all realizes the login interface, guarantees the enhanced scalability for different systems under test (SUT).Configurable multiple groups login user information, branch It 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 load The 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 embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is the master for the web service interface test method with Certificate Authority according to a first embodiment of the present invention Want step schematic diagram;
Fig. 2 is the login authentication authorization flow schematic diagram of system under test (SUT) according to a second embodiment of the present invention;
Fig. 3 is the master for the web service interface test device with Certificate Authority according to a third embodiment of the present invention Want module diagram;
Fig. 4 is the system friendship tested for the web service interface with Certificate Authority according to a fourth embodiment of the present invention Mutual schematic diagram;
Fig. 5 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 6 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention Figure.
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 invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It 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.Together Sample, 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 soft The 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 invention Want step schematic diagram.
As shown in Figure 1, the present embodiment mainly includes as follows for the web service interface test method with Certificate Authority Step 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 script Incidence 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 invention The 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 completion Record.Concrete implementation logic is for example: (can be used to provide efficient, newest, feature-rich using httpClient development kit Support http protocol client programming kit) simulation the page submit web logging request or htmlUnit it is (a to open The java page analysis tool in source can be effectively using the content on the htmlUnit analysis page after reading the page) development kit Simulation browser parses web login page, to log in system under test (SUT), after logining successfully, parses the Certificate Authority letter of login Breath, and it is encapsulated into a kind of Map (container that key object and value object are associated) return.To for each tested System can realize respective logon script.
It should be noted that above-mentioned httpClient development kit, htmlUnit development kit also could alternatively be other can Simulation sends the java developing instrument of http request, which sends web logging request to system under test (SUT), receives simultaneously The 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 foot Originally 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 script Parameter, 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 realized Parameter 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 held Row, 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 tested This, and load the logon script;Using the login user information that interface testing tool is specified as the input of the logon script of load Parameter 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 test System 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 available In the information of Certificate Authority.
Step S103: being supplied to interface testing tool for authentication information, to be added authentication information by interface testing tool It 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 test Response 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 this Interface 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 data Interface testing tool is returned to, so that response data of the interface testing tool to the return verifies.To the tested system of test The above-mentioned response data that system returns is verified, and is mainly verified to the checkpoint in response data.Checkpoint, that is, interface The 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 script Login (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 on Then the A system stated uploads established logon script A.class, to establish between A system and logon script A.class Incidence 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 script One 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 & approval The 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 " management Member ".
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 work Have the logging request to A system sended over, include the information such as A, administrator in logging request, administrator is to login user The name of information can know that the user of specified A system is entitled " admin " by the name, and password is " admin ".According to reflecting Penetrate relationship:The logon script A.class with A there are mapping relations is found, ClassLoader (class is passed through Loader) 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 specified The 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 script A.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 completed Process.
Fig. 3 is the master for the web service interface test device with Certificate Authority according to a third embodiment of the present invention Want 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, below Abbreviation web service interface test device 300 specifically includes that logon script establishes module 301, logon script load and executes mould Block 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) with Incidence 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 invention The 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 completion Record.
Web service interface test device 300 can also include input parameter configuration module, establish module in logon script 301 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 or Multiple 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 device In 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 over After the logging request of examining system, according to the incidence relation between system under test (SUT) and logon script, dynamically load test is tested The 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 recognizes Demonstrate,prove information.
Web service interface test device 300 can also include information receiving module, specified for receiving interface testing tool Test 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 test The logon script of mapping relations, and load the logon script;Using the login user information that interface testing tool is specified as load Logon script input parameter, execute the logon script of load, with simulate log in test system under test (SUT), logining successfully Afterwards, 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 awarded Weigh information.Web application system usually all has authentication module, and to guarantee software system data safety, certification is that user is defeated Enter identity information, server is verified, and the process of back-checking result, i.e., verification user is legitimate user.Authentication It 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 test The logon script answered.
Authentication information provides module 303, for authentication information to be supplied to interface testing tool, by interface testing tool Authentication 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 test Access 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) should Login interface, and the simulation completed in the implementation to system under test (SUT) logs in, and has high extension row, also, when in use, interface Testing tool sends logging request to the web service interface test device 300 of the present embodiment, indicates that the user name used can be returned The authentication information after logging in is returned, in addition, the web service interface test device of the present embodiment is using java ClassLoader dynamic The 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 adds It 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 invention Mutual 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 invention Mouthful test device), interface testing tool, the interaction between system under test (SUT).It is tested for the web service interface with Certificate Authority Device can cooperate automated test tool to work, and provide effective Certificate Authority information without every for automated test tool Secondary 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 system Incidence relation between system and logon script.
Step S402:web service interface test device configures the input parameter of each logon script, each logon script configuration Input 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 script To 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, should Token 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 request Logic 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 invention Implementation content, described above be directed in the web service interface test method with Certificate Authority have been described in detail, therefore This 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 Authority Or 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 with Including 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 out Send message etc..Various telecommunication customer end applications can be installed, such as web browser is answered on terminal device 501,502,503 With (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, packet Include 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 user The website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be stepped on to what is received The 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 invention Method is generally executed by server 505, correspondingly, is generally positioned at for the web service interface test device with Certificate Authority In server 505.
It should be understood that the number of terminal device, network and server in Fig. 5 is only schematical.According to realization need It 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 application The 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 reality The 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 in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute 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 always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The 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 because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer 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 invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.In In such embodiment, which can be downloaded and installed from network by communications portion 609, and/or from can Medium 611 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 601, the system that executes the application The 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 meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The 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 wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (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 journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In 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 unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any 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 journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On 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 wants It 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 rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It 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 hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet It includes logon script and module, logon script load and execution module, authentication information offer module is provided.Wherein, the name of these modules Claim 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 script Block ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes The equipment include: establish logon script respectively for each system under test (SUT), and save the system under test (SUT) and the logon script it Between incidence relation;After receiving the logging request to the system under test (SUT) of test that interface testing tool sends over, according to The 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 simulation System under test (SUT), obtain the test system under test (SUT) provide authentication information;The authentication information is supplied to the interface Testing tool, the authentication information to be added to the interface visit to the system under test (SUT) of the test by the interface testing tool It 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 school It tests.
Technical solution according to an embodiment of the present invention establishes logon script for each system under test (SUT) respectively, and saves tested system Incidence relation between system and logon script;In the login for receiving the system under test (SUT) to test that interface testing tool sends over After 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 simulation The 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, with Authentication 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 test Examining 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 band The web service interface automatic test of system overcomes too big defect invasive to system, is not necessarily to independent deployment services device, reduces Mistake occurs, and provides effective Certificate Authority information without by human configuration, being promoted certainly every time for automated test tool Dynamicization 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 on Record, 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 corresponding Script is recorded, the logon script load for the system under test (SUT) newly tested can be completed without restarting the device of the invention, improve System 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 bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (13)

1. a kind of for the web service interface test method for having Certificate Authority characterized by comprising
Logon script is established respectively for each system under test (SUT), and saves being associated between the system under test (SUT) and the logon script System;
After receiving the logging request to the system under test (SUT) of test that interface testing tool sends over, closed according to the association It is the corresponding logon script of system under test (SUT) of test described in dynamically load and executes, simulates the tested system for logging in the test System obtains the authentication information that the system under test (SUT) of the test provides;
The authentication information is supplied to the interface testing tool, to be added the authentication information by the interface testing tool It is added in the interface access request to the system under test (SUT) of the test, and then the interface is responded to the system under test (SUT) of the test Access request and the response data returned is verified.
2. the method according to claim 1, wherein further include: for the system under test (SUT) establish logon script it Afterwards, one or more groups of input parameters of the logon script are configured, every group of input parameter is one group of login user of the system under test (SUT) Information.
3. according to the method described in claim 2, it is characterized in that, the logging request includes that the interface testing tool is specified The test system under test (SUT) title and login user information,
It according to the corresponding logon script of system under test (SUT) of incidence relation dynamically load test and executes, described in simulation login The system under test (SUT) of test, obtain the test system under test (SUT) provide authentication information the step of, comprising:
There are the logon scripts of mapping relations for the title of the system under test (SUT) of lookup and the test, and load the logon script;
Using the login user information that the interface testing tool is specified as the input parameter of the logon script loaded, described in execution The logon script of load, to simulate the system under test (SUT) for logging in the test, after described login successfully, the logon script is from institute It states in the response message of the system under test (SUT) return of test and parses the authentication information.
4. the method according to claim 1, wherein the web login process of the system under test (SUT) is abstracted as Java login interface, the logon script realize the java login interface according to the login logic of the system under test (SUT), complete The simulation of the system under test (SUT) is logged in.
5. the method according to claim 1, wherein using the quilt of test described in java Classloader dynamically load The corresponding logon script of examining system.
6. the method according to claim 1, wherein the authentication information is token or session information.
7. a kind of for the web service interface test device for having Certificate Authority characterized by comprising
Logon script establishes module, for establishing logon script respectively for each system under test (SUT), and saves the system under test (SUT) and institute State the incidence relation between logon script;
Logon script load and execution module, for receiving the system under test (SUT) to test that interface testing tool sends over After logging request, according to the corresponding logon script of system under test (SUT) of test described in the incidence relation dynamically load and execute, To simulate the system under test (SUT) for logging in the test, the authentication information that the system under test (SUT) of the test provides is obtained;
Authentication information provides module, for the authentication information to be supplied to the interface testing tool, to be surveyed by the interface The authentication information is added in the interface access request to the system under test (SUT) of the test by trial work tool, and then to the test The system under test (SUT) response data that responds the interface access request and return verified.
8. device according to claim 7, which is characterized in that further include input parameter configuration module, be used for: for the quilt Examining system is established after logon script, and one or more groups of input parameters of the logon script are configured, and every group of input parameter is the quilt One group of login user information of examining system.
9. device according to claim 8, which is characterized in that further include information receiving module, for receiving the interface The title and login user information of the system under test (SUT) of the specified test of testing tool,
The logon script load and execution module are also used to:
There are the logon scripts of mapping relations for the title of the system under test (SUT) of lookup and the test, and load the logon script;
Using the login user information that the interface testing tool is specified as the input parameter of the logon script loaded, described in execution The logon script of load, to simulate the system under test (SUT) for logging in the test, after described login successfully, the logon script is from institute It states in the response message of the system under test (SUT) return of test and parses the authentication information.
10. device according to claim 7, which is characterized in that the web login process of the system under test (SUT) to be abstracted as Java login interface, the logon script realize the java login interface according to the login logic of the system under test (SUT), complete The simulation of the system under test (SUT) is logged in.
11. device according to claim 7, which is characterized in that the logon script load and execution module use java The corresponding logon script of the system under test (SUT) of test described in Classloader dynamically load.
12. a kind of electronic equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors Realize such as method as claimed in any one of claims 1 to 6.
13. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor Such as method as claimed in any one of claims 1 to 6 is realized when row.
CN201910734440.2A 2019-08-09 2019-08-09 Method and device for testing web service interface with authentication authorization Active CN110442524B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910734440.2A CN110442524B (en) 2019-08-09 2019-08-09 Method and device for testing web service interface with authentication authorization
PCT/CN2020/106707 WO2021027615A1 (en) 2019-08-09 2020-08-04 Test method and device for web service interface having authentication authorization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910734440.2A CN110442524B (en) 2019-08-09 2019-08-09 Method and device for testing web service interface with authentication authorization

Publications (2)

Publication Number Publication Date
CN110442524A true CN110442524A (en) 2019-11-12
CN110442524B CN110442524B (en) 2021-03-30

Family

ID=68434360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910734440.2A Active CN110442524B (en) 2019-08-09 2019-08-09 Method and device for testing web service interface with authentication authorization

Country Status (2)

Country Link
CN (1) CN110442524B (en)
WO (1) WO2021027615A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104675A (en) * 2019-11-15 2020-05-05 泰康保险集团股份有限公司 Method and device for detecting system security vulnerability
CN111159000A (en) * 2019-12-30 2020-05-15 北京明朝万达科技股份有限公司 Server performance test method, device, equipment and storage medium
WO2021027615A1 (en) * 2019-08-09 2021-02-18 中国建设银行股份有限公司 Test method and device for web service interface having authentication authorization
CN112433933A (en) * 2020-04-09 2021-03-02 上海哔哩哔哩科技有限公司 Method and equipment for automatically testing interface
CN112817811A (en) * 2020-12-31 2021-05-18 深圳市联影高端医疗装备创新研究院 Method, device, equipment and storage medium for predicting scanning failure rate
CN113225223A (en) * 2021-04-21 2021-08-06 武汉思普崚技术有限公司 Automatic testing method for WEB authentication process of PC terminal
CN113535574A (en) * 2021-07-26 2021-10-22 工银科技有限公司 Automatic generation method, device, equipment and medium for test user data
CN113704080A (en) * 2020-05-22 2021-11-26 北京沃东天骏信息技术有限公司 Automatic testing method and device
CN113938886A (en) * 2021-11-30 2022-01-14 上海派拉软件股份有限公司 Identity authentication platform test method, device, equipment and storage medium
CN114301892A (en) * 2021-12-28 2022-04-08 苏州浪潮智能科技有限公司 Method, device and system for simulating Web application to realize example function
CN115277210A (en) * 2022-07-28 2022-11-01 中国工商银行股份有限公司 Token obtaining method and device, electronic equipment and storage medium
CN113938886B (en) * 2021-11-30 2024-04-05 上海派拉软件股份有限公司 Identity authentication platform testing method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833777A (en) * 2012-08-23 2012-12-19 北京傲天动联技术有限公司 Method for testing PORTAL performance of access controller
CN107122297A (en) * 2017-04-18 2017-09-01 上海雷腾软件股份有限公司 The method and apparatus that request message for test interface is generated
US20170337122A1 (en) * 2016-05-18 2017-11-23 Dynatrace Llc Synthetic test recorder installed inline with a web portal
CN107678962A (en) * 2017-09-26 2018-02-09 郑州云海信息技术有限公司 The automated testing method and device of a kind of cli interface
CN109032956A (en) * 2018-09-11 2018-12-18 郑州云海信息技术有限公司 A kind of interface test method and device
CN109376021A (en) * 2018-09-26 2019-02-22 深圳壹账通智能科技有限公司 The response method and server that interface calls
CN109446093A (en) * 2018-11-05 2019-03-08 郑州云海信息技术有限公司 A kind of expansion platform interface test method and device
CN109831360A (en) * 2019-02-27 2019-05-31 深圳市吉祥腾达科技有限公司 Automated testing method and test macro for multi-user concurrent web authentication

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10402290B2 (en) * 2017-07-24 2019-09-03 Microsoft Technology Licensing, Llc Using a pre-installation environment to debug a server without a functioning operating system
CN110442524B (en) * 2019-08-09 2021-03-30 中国建设银行股份有限公司 Method and device for testing web service interface with authentication authorization

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833777A (en) * 2012-08-23 2012-12-19 北京傲天动联技术有限公司 Method for testing PORTAL performance of access controller
US20170337122A1 (en) * 2016-05-18 2017-11-23 Dynatrace Llc Synthetic test recorder installed inline with a web portal
CN107122297A (en) * 2017-04-18 2017-09-01 上海雷腾软件股份有限公司 The method and apparatus that request message for test interface is generated
CN107678962A (en) * 2017-09-26 2018-02-09 郑州云海信息技术有限公司 The automated testing method and device of a kind of cli interface
CN109032956A (en) * 2018-09-11 2018-12-18 郑州云海信息技术有限公司 A kind of interface test method and device
CN109376021A (en) * 2018-09-26 2019-02-22 深圳壹账通智能科技有限公司 The response method and server that interface calls
CN109446093A (en) * 2018-11-05 2019-03-08 郑州云海信息技术有限公司 A kind of expansion platform interface test method and device
CN109831360A (en) * 2019-02-27 2019-05-31 深圳市吉祥腾达科技有限公司 Automated testing method and test macro for multi-user concurrent web authentication

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李昕: "认证鉴权系统的分析与测试", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021027615A1 (en) * 2019-08-09 2021-02-18 中国建设银行股份有限公司 Test method and device for web service interface having authentication authorization
CN111104675A (en) * 2019-11-15 2020-05-05 泰康保险集团股份有限公司 Method and device for detecting system security vulnerability
CN111159000A (en) * 2019-12-30 2020-05-15 北京明朝万达科技股份有限公司 Server performance test method, device, equipment and storage medium
CN112433933A (en) * 2020-04-09 2021-03-02 上海哔哩哔哩科技有限公司 Method and equipment for automatically testing interface
CN113704080A (en) * 2020-05-22 2021-11-26 北京沃东天骏信息技术有限公司 Automatic testing method and device
CN112817811A (en) * 2020-12-31 2021-05-18 深圳市联影高端医疗装备创新研究院 Method, device, equipment and storage medium for predicting scanning failure rate
CN113225223A (en) * 2021-04-21 2021-08-06 武汉思普崚技术有限公司 Automatic testing method for WEB authentication process of PC terminal
CN113535574A (en) * 2021-07-26 2021-10-22 工银科技有限公司 Automatic generation method, device, equipment and medium for test user data
CN113535574B (en) * 2021-07-26 2022-07-19 工银科技有限公司 Automatic generation method, device, equipment and medium for test user data
CN113938886A (en) * 2021-11-30 2022-01-14 上海派拉软件股份有限公司 Identity authentication platform test method, device, equipment and storage medium
CN113938886B (en) * 2021-11-30 2024-04-05 上海派拉软件股份有限公司 Identity authentication platform testing method, device, equipment and storage medium
CN114301892A (en) * 2021-12-28 2022-04-08 苏州浪潮智能科技有限公司 Method, device and system for simulating Web application to realize example function
CN114301892B (en) * 2021-12-28 2023-08-15 苏州浪潮智能科技有限公司 Method, device and system for simulating Web application to realize example function
CN115277210A (en) * 2022-07-28 2022-11-01 中国工商银行股份有限公司 Token obtaining method and device, electronic equipment and storage medium
CN115277210B (en) * 2022-07-28 2024-02-27 中国工商银行股份有限公司 Token acquisition method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2021027615A1 (en) 2021-02-18
CN110442524B (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN110442524A (en) It is a kind of for have Certificate Authority web service interface test method and device
CN102694857B (en) Method and apparatus for giving over data networks
CN109446071A (en) Interface test method, interface test device, electronic equipment and storage medium
CN108932194A (en) Automated testing method, device, system, medium and electronic equipment
CN109558134A (en) The method and apparatus of business datum verification
CN104065528A (en) Method And Apparatus For Analyzing And Verifying Functionality Of Multiple Network Devices
CN107766040A (en) A kind of method, apparatus and computer-readable recording medium for generating interface document
US20070117560A1 (en) Remote testing of mobile terminals
CN108574604A (en) test method and device
CN109150904A (en) Interface service call method and terminal device
CN112187558B (en) Data verification method and device and electronic equipment
CN107295607A (en) Method and apparatus for connecting WAP
CN113992514B (en) Method for rapidly realizing data acquisition instrument protocol by zero code and data acquisition instrument terminal
CN109815105A (en) Applied program testing method and device based on Btrace
CN109815107A (en) The method and apparatus of automatic test
CN109284198A (en) A kind of method and apparatus verifying data
CN108694120A (en) The method and apparatus of testing service component
CN114745156A (en) Distributed single sign-on realization method and device, electronic equipment and storage medium
CN109587197A (en) It is associated with the methods, devices and systems of reported data
CN109150898A (en) Method and apparatus for handling information
CN111736807B (en) Tenant function customization method and device and tenant-based office system
CN113296744A (en) Application development system and method
CN113535574A (en) Automatic generation method, device, equipment and medium for test user data
CN111240855A (en) API debugging system, method, storage medium and computer device
CN110098921A (en) Verification code generation method, device, application service end and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220921

Address after: 12 / F, 15 / F, 99 Yincheng Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai, 200120

Patentee after: Jianxin Financial Science and Technology Co.,Ltd.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Patentee before: CHINA CONSTRUCTION BANK Corp.

Patentee before: Jianxin Financial Science and Technology Co.,Ltd.