CN109344052A - Automatic interface testing method and device and electronic equipment - Google Patents

Automatic interface testing method and device and electronic equipment Download PDF

Info

Publication number
CN109344052A
CN109344052A CN201811009140.XA CN201811009140A CN109344052A CN 109344052 A CN109344052 A CN 109344052A CN 201811009140 A CN201811009140 A CN 201811009140A CN 109344052 A CN109344052 A CN 109344052A
Authority
CN
China
Prior art keywords
user right
interface
identification information
server
rank
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
CN201811009140.XA
Other languages
Chinese (zh)
Other versions
CN109344052B (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201811009140.XA priority Critical patent/CN109344052B/en
Publication of CN109344052A publication Critical patent/CN109344052A/en
Application granted granted Critical
Publication of CN109344052B publication Critical patent/CN109344052B/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
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Abstract

The embodiment of the invention discloses an interface automatic testing method, an interface automatic testing device and electronic equipment, relates to the technical field of computer networks, and can solve the problems of complex work and low efficiency of the existing interface testing. The automatic interface testing method is used for a testing end and comprises the following steps: sending an authority verification interface request to a server; receiving permission verification response information returned by the server side; extracting user authority identification information from the authority verification response information; and sending an interface request comprising the user authority identification information to any interface of a server. The embodiment of the invention is suitable for testing various interfaces.

Description

A kind of automatic interface testing method, device and electronic equipment
Technical field
The present invention relates to technical field of the computer network more particularly to a kind of automatic interface testing methods, device and electricity Sub- equipment.
Background technique
In network connection, when client is with server exchange data, it will usually have permission certification (login) process, service Device authentication storage information is inside session, and client would generally use cookie or token record user authentication to believe Breath.It is all to pass output data using stateless http protocol when general online, it means that client and server-side are in data It will middle connection breaking after the completion of transmission.At this moment we just need the mechanism for being always maintained at session connection.Occur in session Before, cookie just acts as this role completely.Cookie is stored in user browser (client) by Web server Small text file, it is for recording the identity informations such as the unique identification of relevant user.
Interface testing is a kind of test of test system components interface.Interface testing mainly for detection of external system with Interaction point between system and between internal subsystems.Existing interface testing technology generally requires server-side in permission When verifying (login), the unique identification of client is taken in the response, subsequent all interfaces all take this client only One mark is to be tested.Existing interface test method depends on browser, after the completion of the artificial login by browser, Using the working mechanism of browser, other interfaces are accessed using same browser and carry out data test.But browser page class Data exchange, generally all use cookie, when project has mass data interface, each time iteration update, require to test Interface is to determine whether interface is influenced by fresh code.A large amount of duplicate interface testings, so that interface testing work is complicated, inefficient.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of automatic interface testing method, device and electronic equipment, tested Journey is simpler and testing efficiency is higher.
In a first aspect, the embodiment of the present invention provides a kind of automatic interface testing method, it to be used for test lead, comprising:
It is requested to server-side sending permission verification interface;
Receive the authorization check response message that the server-side returns;
User right identification information is extracted from the authorization check response message;
The interface requests including the user right identification information are sent to the either interface of server-side.
With reference to first aspect, in the first embodiment of first aspect, to server-side sending permission verification interface Before request, further includes:
Obtain user right rank to be tested;
Judge whether the corresponding relationship concentration of pre-set user right rank and user right identification information can match To the user right rank to be tested;
If the corresponding relationship of the user right rank and user right identification information concentration can be matched to described to be tested User right rank then concentrates acquisition described to be measured from the corresponding relationship of the user right rank and user right identification information Permission Levels corresponding user right identification information in family on probation;
If the corresponding relationship of the user right rank and user right identification information concentration cannot be matched to described to be measured Family Permission Levels on probation then execute described the step of requesting to server-side sending permission verification interface.
The first embodiment with reference to first aspect, in second of embodiment of first aspect, from the power In limit verification response message after extraction user right identification information, further includes:
The use is arrived in the corresponding storage of the user right rank to be tested and user right identification information that this is obtained The corresponding relationship of family Permission Levels and user right identification information is concentrated.
With reference to first aspect the first or second of embodiment, in the third embodiment of first aspect, institute It states and is requested to server-side sending permission verification interface, comprising:
Simulation browser sends the authorization check interface requests of HTTP form to the server-side.
With reference to first aspect, in the 4th kind of embodiment of first aspect, the user right identification information is Cookie information;
It is wherein, described that the user right identification information is extracted from the authorization check response message, comprising:
Cookie information is extracted from the head response header of the authorization check response message;
It is described to send the interface requests including the user right identification information to the either interface of server-side, comprising:
This cookie information extracted is placed in the request header of interface requests;
The interface requests are sent to the either interface of server-side.
Second aspect, the embodiment of the present invention provide a kind of interface automatic test device, are used for test lead, comprising:
First request module, for being requested to server-side sending permission verification interface;
Receiving module, the authorization check response message returned for receiving the server-side;
Extraction module, for extracting user right identification information from the authorization check response message;
Second request module, for sending the interface including the user right identification information to the either interface of server-side Request.
In conjunction with second aspect, in the first embodiment of second aspect, the interface automatic test device is also wrapped It includes:
First obtains module, for obtaining user right rank to be tested;
Judgment module, for judging the set of correspondences of pre-set user right rank and user right identification information In whether can be matched to the user right rank to be tested;
Second obtains module, for when the judgment result of the judgment module is yes, from the user right rank and The corresponding relationship of user right identification information, which is concentrated, obtains the corresponding user right mark letter of the user right rank to be tested Breath;
Wherein, first request module, specifically for the judging result in the judgment module be it is no when, to server-side The request of sending permission verification interface.
In conjunction with the first embodiment of second aspect, in second of embodiment of second aspect, the interface is certainly Dynamicization test device further include:
Memory module, for this described first to be obtained the user right rank to be tested and described that module obtains The corresponding storage of the user right identification information that extraction module obtains is to the user right rank and user right identification information Corresponding relationship is concentrated.
In conjunction with the first or second of embodiment of second aspect, in the third embodiment of second aspect, institute The first request module is stated, sends the authorization check interface requests of HTTP form to the server-side specifically for simulation browser.
In conjunction with second aspect, in the 4th kind of embodiment of second aspect, the user right identification information is Cookie information;
The extraction module, specifically for being extracted from the head response header of the authorization check response message Cookie information;
The request module, comprising:
Submodule is set, and the cookie information for extracting this is placed in the request header of interface requests;
Sending submodule, for sending the interface requests that the setting submodule obtains to the either interface of server-side.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, and the electronic equipment includes: shell, processor, deposits Reservoir, circuit board and power circuit, wherein circuit board is placed in the space interior that shell surrounds, processor and memory setting On circuit boards;Power circuit, for each circuit or the device power supply for above-mentioned client;Memory is executable for storing Program code;Processor is corresponding with executable program code to run by reading the executable program code stored in memory Program, for executing automatic interface testing method described in aforementioned any embodiment.
A kind of automatic interface testing method, device and electronic equipment provided in an embodiment of the present invention, by weighing user Limit identification information is placed in interface requests, directly can send the interface for being used to carry out interface testing to the either interface of server-side Request code simulation browser principle transmission user right identification information can be used to carry out Authority Verification, without clear in this way Interface testing can be realized in device of looking at, and test process is simpler;In addition, user right identification information is placed in interface requests, Whole interfaces can be examined using automatic test code when each iteration updates by being easy to implement interface testing code It tests, tests without human intervention, testing efficiency is higher.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart of automatic interface testing method embodiment one of the present invention;
Fig. 2 is the flow chart of automatic interface testing method embodiment two of the present invention;
Fig. 3 is the flow chart of automatic interface testing method embodiment three of the present invention;
Fig. 4 is the structural schematic diagram of interface automatic test device embodiment one of the present invention;
Fig. 5 is the structural schematic diagram of interface automatic test device embodiment two of the present invention;
Fig. 6 is the structural schematic diagram of interface automatic test device embodiment three of the present invention;
Fig. 7 is the structural schematic diagram of interface automatic test device example IV of the present invention;
Fig. 8 is the structural schematic diagram of electronic equipment one embodiment of the present invention.
Specific embodiment
A kind of automatic interface testing method of the embodiment of the present invention and device are described in detail with reference to the accompanying drawing.
It will be appreciated that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Base Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts it is all its Its embodiment, shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart of automatic interface testing method embodiment one of the present invention, as shown in Figure 1, the side of the present embodiment Method may include:
Step 101 is requested to server-side sending permission verification interface.
Step 102 receives the authorization check response message that the server-side returns.
In the present embodiment, simulation browser is requested to server-side sending permission verification interface, and server-side can be returned including use The authorization check response message of family right identification information.
Step 103 extracts user right identification information from the authorization check response message.
Step 104 sends the interface requests including the user right identification information to the either interface of server-side.
In this step, user right identification information can be placed in the required parameter of interface requests or head information or data library In, can the interface requests for being used to carry out interface testing directly be sent to test the interface to the either interface of server-side.
The present embodiment can be directly to any of server-side by the way that user right identification information to be placed in interface requests Interface sends the interface requests for being used to carry out interface testing, code simulation browser principle can be used to transmit user right mark in this way Know information and carry out Authority Verification, interface testing can be realized without browser, test process is simpler;In addition, will use Family right identification information is placed in interface requests, is easy to implement interface testing code and is used automation when each iteration updates Test code can test to whole interfaces, test without human intervention, testing efficiency is higher.
Fig. 2 is the flow chart of automatic interface testing method embodiment two of the present invention, as shown in Fig. 2, the side of the present embodiment Method may include:
Step 201 obtains user right rank to be tested.
Step 202, the corresponding relationship concentration for judging pre-set user right rank and user right identification information are It is no to be matched to the user right rank to be tested;If so, thening follow the steps 203, otherwise, step 204 is executed.
Wherein, the corresponding relationship of user right rank and user right identification information concentration be stored with user right rank and The corresponding relationship of user right identification information.User right rank (the current user right to be tested that this step is obtained with this Rank) go the corresponding relationship of user right rank and user right identification information to concentrate progress user right rank matching.
Step 203 concentrates acquisition described to be tested from the corresponding relationship of user right rank and user right identification information The corresponding user right identification information of user right rank then jumps and executes step 207.
In the present embodiment, if being matched to this in the corresponding relationship of user right rank and user right identification information concentration The user right rank of acquisition is then directly obtained from the corresponding relationship of the user right rank and user right identification information concentration Take the corresponding user right identification information of the user right rank.
Such as: if the corresponding relationship of user right rank and user right identification information concentration is stored with user right rank The user right for the account B that user right identification information and user right rank for a 1 account A are 2 identifies letter Breath, the user right rank of current account C to be tested are 1, then can obtain to identify with the user right of the account A of its same level and believe It ceases and is used as the user right identification information of current account C to be tested.
Step 204 is requested to server-side sending permission verification interface.
Step 205 receives the authorization check response message that the server-side returns.
Step 206 extracts user right identification information from the authorization check response message.
Step 207 sends the interface requests including the user right identification information to the either interface of server-side.
In the present embodiment, the embodiment of step 207 is similar to above-mentioned steps 104, and details are not described herein again.
In the present embodiment, the set of correspondences of user right rank and user right identification information is preset, then every When secondary test, it can first judge whether concentrate to get in the corresponding relationship of user right rank and user right identification information to work as The corresponding user right identification information of preceding user right rank to be tested, it is preferential same using having recorded if can get The corresponding user right identification information of user right rank, if cannot be matched to, then whereabouts server-side sending permission verification interface It requests and obtains user right identification information.Number of request of the test client to server-side can be reduced in this way, be particularly suitable for It is a large amount of to repeat interface testing.
It, after step 206, can be comprising steps of this be obtained described to be tested in an alternative embodiment The corresponding storage of user right rank and user right identification information is to the user right rank and user right identification information Corresponding relationship is concentrated.The present embodiment is by pair of the user right rank of the no record got every time and user right identification information It should be related to that the corresponding relationship for adding to user right rank and user right identification information is concentrated, it can be in next interface testing It is preferentially concentrated from the corresponding relationship of user right rank and user right identification information and obtains user right identification information, save whereabouts The step of server-side request interface Authority Verification, improves interface testing efficiency.
It obviously, can also be periodically to the user right rank and user right mark letter in another alternative embodiment The set of correspondences of breath is updated, update method are as follows: user right rank and the corresponding of user right identification information are closed Each user right rank in assembly, using the user of same Permission Levels as test user, using side shown in step 101-103 Normal direction server-side sending permission verification interface requests to use to obtain the corresponding user right identification information of the user right rank The corresponding user right mark of relative users Permission Levels that the corresponding relationship of family Permission Levels and user right identification information is concentrated Know information and replace with the user right identification information currently obtained, to guarantee the user right rank and user right mark letter It is newest information state that the corresponding relationship of breath, which concentrates the user right identification information of record,.
Below by way of a specific embodiment, the embodiment of the present invention will be described in detail interface automatic test.
Fig. 3 is the flow chart of automatic interface testing method embodiment three of the present invention, as shown in figure 3, the side of the present embodiment Method may include:
Step 301 obtains user right rank to be tested.
Step 302, judge the corresponding relationship of pre-set user right rank and cookie information concentrate whether can It is fitted on the user right rank to be tested;If so, thening follow the steps 303, otherwise, step 304 is executed.
Step 303 obtains the corresponding cookie information of the user right rank to be tested, and continues to execute step 307.
In the present embodiment, the implementation method of step 301-303 is similar to step 201-203, and details are not described herein again.
Step 304, simulation browser send the authorization check interface requests of HTTP form to server-side.
In the present embodiment, HTTP request is sent to server-side by code simulation browser principle, it may be assumed that this step is simultaneously non-through Browser realization is crossed, but browser is realized to the principle of server-side hair request by program code, carries out interface testing When, call directly run the program code can be realized to server-side sending permission verification interface request.
Step 305 receives the authorization check response message that server-side returns.
Wherein, what is sent to server-side due to test lead is http request, then the authorization check that server-side returns responds letter It include the cookie information for identity user permission in breath.
Step 306 extracts cookie information from the head response header of the authorization check response message.
This cookie information obtained is placed in the request header of interface requests by step 307.
Step 308 sends the interface requests including this cookie information obtained to the either interface of server-side.
In the present embodiment, directly concentrates and obtain from the corresponding relationship of pre-set user right rank and cookie information The corresponding cookie of active user's Permission Levels, or by code simulation browser to server-side send HTTP form permission Verification interface is requested to obtain cookie information, and then this cookie information obtained is placed in the request header of interface requests Any interface for going request server-side, not needing manual operation browser can be realized automatic imitation browser acquisition cookie letter Breath, the cookie information that then will acquire are added in interface requests the either interface that can request server-side, can be realized interface Automatic test, test is simple, saves manpower.
Corresponding to automatic interface testing method provided in an embodiment of the present invention, it is automatic that the embodiment of the present invention also provides interface Change test device.Fig. 4 is the structural schematic diagram of interface automatic test device embodiment one of the present invention, as shown in figure 4, this implementation The device of example may include: the first request module 11, receiving module 12, extraction module 13 and the second request module 14;Wherein, One request module 11, for being requested to server-side sending permission verification interface;Receiving module 12 is returned for receiving the server-side The authorization check response message returned;Extraction module 13, for extracting user right mark from the authorization check response message Information;Second request module 14, for sending the interface including the user right identification information to the either interface of server-side Request.
The device of the present embodiment can be used for executing the technical solution of embodiment of the method shown in Fig. 1, realization principle and skill Art effect is similar, and details are not described herein again.
Fig. 5 is the structural schematic diagram of interface automatic test device embodiment two of the present invention, as shown in figure 5, the present embodiment Device apparatus structure shown in Fig. 4 on the basis of, further, the device can also include: the first acquisition module 15, judgement Module 16, second obtains module 17;Wherein, first module 15 is obtained, for obtaining user right rank to be tested;Judgment module 16, whether can be matched to for judging that the corresponding relationship of pre-set user right rank and user right identification information is concentrated The user right rank to be tested;Second obtains module 17, is when being, from described for the judging result in judgment module 16 The corresponding relationship of user right rank and user right identification information concentrates the acquisition user right rank to be tested corresponding User right identification information;First request module 11, specifically for the judging result in judgment module 16 be it is no when, to server-side The request of sending permission verification interface.
The device of the present embodiment can be used for executing the technical solution of embodiment of the method shown in Fig. 2, realization principle and skill Art effect is similar, and details are not described herein again.
Fig. 6 is the structural schematic diagram of interface automatic test device embodiment three of the present invention, as shown in fig. 6, the present embodiment Device apparatus structure shown in Fig. 5 on the basis of, further, which may also include that memory module 18, for by this First obtains the user right identification information of the user right rank to be tested that module 15 obtains and the acquisition of extraction module 13 Corresponding storage is concentrated to the corresponding relationship of the user right rank and user right identification information.
Fig. 7 is the structural schematic diagram of interface automatic test device example IV of the present invention, as shown in fig. 7, the present embodiment Device apparatus structure shown in Fig. 6 on the basis of, further, the second request module 14 may include setting submodule 141 With sending submodule 142.In the present embodiment, the user right identification information is cookie information;Wherein, the first request module 11, the authorization check interface requests of HTTP form are sent to the server-side specifically for simulation browser;Extraction module 13, tool Body is for extracting cookie information from the head response header of the authorization check response message;Submodule 141 is set, is used It (is extracted from the head response header of authorization check response message including extraction module 13 in the cookie information for extracting this Cookie information or second acquisition module 17 from the corresponding relationship of user right rank and cookie information concentration directly mention The cookie information taken) it is placed in the request header of interface requests;Sending submodule 142, for being sent out to the either interface of server-side Send the setting interface requests that submodule 141 obtains.
The device of the present embodiment can be used for executing the technical solution of embodiment of the method shown in Fig. 3, realization principle and skill Art effect is similar, and details are not described herein again.
Corresponding to automatic interface testing method provided in an embodiment of the present invention, the embodiment of the present invention also provides a kind of electronics Equipment, Fig. 8 are the structural schematic diagram of electronic equipment one embodiment of the present invention, and embodiment illustrated in fig. 1 of the present invention may be implemented Process, as shown in figure 8, above-mentioned electronic equipment may include: shell 21, processor 22, memory 23, circuit board 24 and power supply electricity Road 25, wherein circuit board 24 is placed in the space interior that shell 21 surrounds, and processor 22 and memory 23 are arranged in circuit board 24 On;Power circuit 25, for each circuit or the device power supply for above-mentioned electronic equipment;Memory 23 is for storing executable journey Sequence code;Processor 22 is run and executable program code pair by reading the executable program code stored in memory 23 The program answered, for executing the automatic interface testing method of aforementioned any embodiment.
Above-mentioned electronic equipment exists in a variety of forms, including but not limited to:
(1) mobile communication equipment: the characteristics of this kind of equipment is that have mobile communication function, and to provide speech, data Communication is main target.This Terminal Type includes: smart phone (such as iPhone), multimedia handset, functional mobile phone and low Hold mobile phone etc..
(2) super mobile personal computer equipment: this kind of equipment belongs to the scope of personal computer, there is calculating and processing function Can, generally also have mobile Internet access characteristic.This Terminal Type includes: PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device: this kind of equipment can show and play multimedia content.Such equipment include: audio, Video playback module (such as iPod), handheld device, e-book and intelligent toy and portable car-mounted navigation equipment.
(4) server: providing the equipment of the service of calculating, and the composition of server includes that processor, hard disk, memory, system are total Line etc., server is similar with general computer architecture, but due to needing to provide highly reliable service, in processing energy Power, stability, reliability, safety, scalability, manageability etc. are more demanding.
(5) other electronic equipments with data interaction function.
The present invention also provides a kind of computer readable storage medium, calculating is stored in the computer readable storage medium Machine program, for realizing the automatic interface testing method of aforementioned any embodiment when the computer program is executed by processor Step.
The embodiment of the invention also provides a kind of application programs, and the interface for executing aforementioned any embodiment automates Test method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answers It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (10)

1. a kind of automatic interface testing method, which is characterized in that be used for test lead, comprising:
It is requested to server-side sending permission verification interface;
Receive the authorization check response message that the server-side returns;
User right identification information is extracted from the authorization check response message;
The interface requests including the user right identification information are sent to the either interface of server-side.
2. automatic interface testing method according to claim 1, which is characterized in that verified to server-side sending permission Before interface requests, further includes:
Obtain user right rank to be tested;
Judge whether the corresponding relationship concentration of pre-set user right rank and user right identification information can be matched to institute State user right rank to be tested;
If the corresponding relationship of the user right rank and user right identification information concentration can be matched to the user to be tested Permission Levels then concentrate acquisition described to be measured on probation from the corresponding relationship of the user right rank and user right identification information The corresponding user right identification information of family Permission Levels;
If the corresponding relationship of the user right rank and user right identification information concentration cannot be matched to described to be measured on probation Family Permission Levels then execute described the step of requesting to server-side sending permission verification interface.
3. automatic interface testing method according to claim 2, which is characterized in that believe being responded from the authorization check In breath after extraction user right identification information, further includes:
The corresponding storage of the user right rank to be tested and user right identification information that this is obtained is weighed to the user The corresponding relationship for limiting rank and user right identification information is concentrated.
4. automatic interface testing method according to claim 2 or 3, which is characterized in that described to server-side transmission route Limit verification interface request, comprising:
Simulation browser sends the authorization check interface requests of HTTP form to the server-side.
5. automatic interface testing method according to claim 1, which is characterized in that the user right identification information is Cookie information;
It is wherein, described that the user right identification information is extracted from the authorization check response message, comprising:
Cookie information is extracted from the head response header of the authorization check response message;
It is described to send the interface requests including the user right identification information to the either interface of server-side, comprising:
This cookie information extracted is placed in the request header of interface requests;
The interface requests are sent to the either interface of server-side.
6. a kind of interface automatic test device, which is characterized in that be used for test lead, comprising:
First request module, for being requested to server-side sending permission verification interface;
Receiving module, the authorization check response message returned for receiving the server-side;
Extraction module, for extracting user right identification information from the authorization check response message;
Second request module is asked for sending the interface including the user right identification information to the either interface of server-side It asks.
7. interface automatic test device according to claim 6, which is characterized in that further include:
First obtains module, for obtaining user right rank to be tested;
Judgment module, for judge pre-set user right rank and user right identification information corresponding relationship concentrate be It is no to be matched to the user right rank to be tested;
Second obtains module, is used for when the judgment result of the judgment module is yes, from the user right rank and user The corresponding relationship of right identification information, which is concentrated, obtains the corresponding user right identification information of the user right rank to be tested;
Wherein, first request module, specifically for the judging result in the judgment module be it is no when, to server-side send Authorization check interface requests.
8. interface automatic test device according to claim 7, which is characterized in that further include:
Memory module, the user right rank to be tested and the extraction for obtaining this described first acquisition module The correspondence of the user right rank and user right identification information is arrived in the corresponding storage of the user right identification information that module obtains In set of relations.
9. interface automatic test device according to claim 7 or 8, which is characterized in that first request module, tool Body sends the authorization check interface requests of HTTP form for simulation browser to the server-side.
10. a kind of electronic equipment, which is characterized in that the electronic equipment includes: shell, processor, memory, circuit board and electricity Source circuit, wherein circuit board is placed in the space interior that shell surrounds, and processor and memory setting are on circuit boards;Power supply Circuit, for each circuit or the device power supply for above-mentioned client;Memory is for storing executable program code;Processor Program corresponding with executable program code is run by reading the executable program code stored in memory, for executing The described in any item automatic interface testing methods of preceding claims 1-5.
CN201811009140.XA 2018-08-30 2018-08-30 Interface automation test method and device and electronic equipment Active CN109344052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811009140.XA CN109344052B (en) 2018-08-30 2018-08-30 Interface automation test method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811009140.XA CN109344052B (en) 2018-08-30 2018-08-30 Interface automation test method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109344052A true CN109344052A (en) 2019-02-15
CN109344052B CN109344052B (en) 2022-07-26

Family

ID=65292123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811009140.XA Active CN109344052B (en) 2018-08-30 2018-08-30 Interface automation test method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109344052B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111831530A (en) * 2019-04-15 2020-10-27 北京字节跳动网络技术有限公司 Test method and device
CN113704080A (en) * 2020-05-22 2021-11-26 北京沃东天骏信息技术有限公司 Automatic testing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626379A (en) * 2009-08-11 2010-01-13 深圳市融创天下科技发展有限公司 Access management method and access management device for classifying access rights in embedded system
CN105335293A (en) * 2015-11-30 2016-02-17 努比亚技术有限公司 Automatic testing system and method based on parallel ports
CN105450581A (en) * 2014-06-20 2016-03-30 北京新媒传信科技有限公司 Authority control method and device
CN107832163A (en) * 2017-11-29 2018-03-23 努比亚技术有限公司 A kind of buffering updating method, server and computer-readable recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626379A (en) * 2009-08-11 2010-01-13 深圳市融创天下科技发展有限公司 Access management method and access management device for classifying access rights in embedded system
CN105450581A (en) * 2014-06-20 2016-03-30 北京新媒传信科技有限公司 Authority control method and device
CN105335293A (en) * 2015-11-30 2016-02-17 努比亚技术有限公司 Automatic testing system and method based on parallel ports
CN107832163A (en) * 2017-11-29 2018-03-23 努比亚技术有限公司 A kind of buffering updating method, server and computer-readable recording medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111831530A (en) * 2019-04-15 2020-10-27 北京字节跳动网络技术有限公司 Test method and device
CN113704080A (en) * 2020-05-22 2021-11-26 北京沃东天骏信息技术有限公司 Automatic testing method and device

Also Published As

Publication number Publication date
CN109344052B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CN105491524B (en) A kind of method and apparatus of determining target portable device location
CN101013968B (en) Automated interface testing method and system
CN104348822B (en) A kind of method, apparatus and server of internet account number authentication
CN102610130B (en) A kind of learning system efficiently
CN109450649A (en) Gateway verification method and device based on application program interface and electronic equipment
CN109413096B (en) A kind of login method and device more applied
CN104978266B (en) A kind of application testing method and device
CN106339613B (en) A kind of processing method, terminal and server using data
CN103152402A (en) Method and system for logging in through mobile terminal and cloud server
CN103107974A (en) Method for registration and login of users and mobile terminal
CN105022939B (en) Information Authentication method and device
CN105871695B (en) Expression sending method and device
CN110225002A (en) Business handling method and Related product
CN112073235B (en) Multifunctional mutual-help system of virtual machine
CN108306886A (en) A kind of auth method, device and storage medium
CN109344052A (en) Automatic interface testing method and device and electronic equipment
CN106254328B (en) A kind of access control method and device
CN107644556A (en) Internet education method and system based on school
CN110460617A (en) Machine examines examination system and Related product
CN103853651B (en) Method for testing software and device
CN106776323A (en) Application testing method and device
CN109213939A (en) A kind of friend recommendation method, system and server based on game
CN105743879B (en) Smart television personal identification method and system
CN109040050A (en) Data interactive method and Related product
CN110022327B (en) Short message authentication test method and device

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