CN109683997A - Pass through the method for sandbox access application interface, sandbox and sandbox equipment - Google Patents

Pass through the method for sandbox access application interface, sandbox and sandbox equipment Download PDF

Info

Publication number
CN109683997A
CN109683997A CN201811571710.4A CN201811571710A CN109683997A CN 109683997 A CN109683997 A CN 109683997A CN 201811571710 A CN201811571710 A CN 201811571710A CN 109683997 A CN109683997 A CN 109683997A
Authority
CN
China
Prior art keywords
access
interface
client
sandbox
application
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
CN201811571710.4A
Other languages
Chinese (zh)
Other versions
CN109683997B (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.)
Qianjin Network Information Technology (shanghai) Co ltd
Original Assignee
Qianjin Network Information Technology (shanghai) 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 Qianjin Network Information Technology (shanghai) Co ltd filed Critical Qianjin Network Information Technology (shanghai) Co ltd
Priority to CN201811571710.4A priority Critical patent/CN109683997B/en
Publication of CN109683997A publication Critical patent/CN109683997A/en
Application granted granted Critical
Publication of CN109683997B publication Critical patent/CN109683997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Pass through the method for sandbox access application interface, sandbox and sandbox equipment the embodiment of the invention discloses a kind of.This method comprises: sandbox obtains and save the application program access configuration information of client, application program access configuration information is corresponding with the unique identification of client, including application program access interface information;The sandbox receives the application programming interfaces access request that client application is sent, and includes the unique identification of client in the access request;Sandbox accesses configuration information according to the application program that the inquiry of the unique identification of client has saved, and obtains application program access interface information corresponding with the unique identification of the client;The sandbox determines the application programming interfaces of client access according to the application program access interface information of acquisition, when the application programming interfaces for determining client access are not pseudo interface, the determining application programming interfaces of sandbox access.

Description

Pass through the method for sandbox access application interface, sandbox and sandbox equipment
Technical field
The present embodiments relate to information technology fields, and more particularly, to sandbox interface in a kind of test environment Method, sandbox and sandbox equipment.
Background technique
In mobile internet era, developing mobile applications (Application, APP) becomes the head of most of companies Choosing.In general, mobile APP needs cloud service cooperation to meet the various needs of user, and mobile applications are exactly Cloud service is accessed by application programming interface (Application Programming Interface, API), So api interface is most important for mobile APP.
In general, product can be published to again production environment by exploitation and test, so api interface correspondence also has three Set of environments develops environment, tests environment and production environment, under different environment, the access path of api interface is different certainly Sample.Conventional way is that the access path of varying environment is specified by modifying the code of APP at present, this way operation Complexity, each handover operation environment require the code of modification APP, recompilate APP.If mistakenly having issued exploitation ring The APP in the border or APP for testing environment, necessarily cause user can not normal use APP, very bad influence is caused to product.
Summary of the invention
The embodiment of the present invention provides a kind of by the method for sandbox access application interface, sandbox and sandbox equipment.
The embodiment of the present invention is in a first aspect, provide a kind of method of sandbox access application interface, comprising:
Sandbox obtains and saves the application program access configuration information of client, which accesses configuration information and client Unique identification it is corresponding, including application program access interface information;
The sandbox receives the application programming interfaces access request that client application is sent, and includes client in the access request Unique identification;
Sandbox accesses configuration information according to the application program that the inquiry of the unique identification of client has saved, and obtains and the client The corresponding application program access interface information of unique identification;
The sandbox determines the application programming interfaces of client access according to the application program access interface information of acquisition, works as determination When the application programming interfaces of client access are not pseudo interface, the determining application programming interfaces of sandbox access.
In embodiments of the present invention, preconfigured application programming interfaces are accessed by sandbox, is developing or testing environment In, modification APP code is not needed, but application programming interfaces access is carried out by sandbox, it can be flexibly in development interface, survey The interfaces such as mouth, formal interface of trying access switching;Simultaneously as APP code only has portion, the version after compiling only has one Part, so the case where also avoiding mistake publication APP version.
In some possible implementations, application program access interface information includes: the application program of client access Whether interface is pseudo interface;And when not being pseudo interface, the application programming interfaces path of the client access.
Sandbox connects according to the application program that the application programming interfaces path access in application program access interface information determines Mouthful;Application programming interfaces path is with the path of one of lower interface: development interface, test interface, formal interface.
In some possible implementations, sandbox includes pseudo interface, and sandbox is according to the application program access interface of acquisition Information determines the application programming interfaces of the client access specifically: sandbox determines that the application programming interfaces of client access are No is pseudo interface;When for pseudo interface, sandbox returns to static data to the client application.
In some possible implementations, it further includes one of following information or more that application program, which accesses configuration information, Kind: whether at random return error message, whether be forced back to sky data, whether the analog network waiting time, whether be randomly generated Pushed information;When the application programming interfaces for determining client access are pseudo interface, sandbox is answered according to inquiring and obtain Simulation dynamic data is returned to the client application with routine access configuration information.
Static data or simulation dynamic data are returned to client application by the way that pseudo interface is arranged in sandbox, it can be with Realize application program and application programming interfaces concurrent development in development process.
Second aspect of the embodiment of the present invention provides a kind of sandbox, including obtains module, memory module and scheduler module;
The application program access configuration information that module is used to obtain client is obtained, which accesses configuration information and the visitor The unique identification at family end is corresponding, including application program access interface information;
Memory module is used to store the application program access configuration information for obtaining the client that module obtains;
Scheduler module is used to receive the application programming interfaces access request of client application transmission, includes in the access request The unique identification of the client;
Scheduler module is also used to inquire the application program access saved in memory module according to the unique identification of client with confidence Breath obtains application program access interface information corresponding with the unique identification of the client;
Scheduler module is also used to determine the application programming interfaces of client access according to application program access interface information, works as determination When the application programming interfaces of client access are not pseudo interface, determining application programming interfaces are accessed.
In embodiments of the present invention, preconfigured application programming interfaces are accessed by sandbox, is developing or testing environment In, modification APP code is not needed, but application programming interfaces access is carried out by sandbox, it can be flexibly in development interface, survey The interfaces such as mouth, formal interface of trying access switching;Simultaneously as APP code only has portion, the version after compiling only has one Part, so the case where also avoiding mistake publication APP version.
In some possible implementations, application program access interface information includes: the application of the client access Whether routine interface is pseudo interface;And when not being pseudo interface, the application programming interfaces path of the client access;
Scheduler module connects according to the application program that the application programming interfaces path access in application program access interface information determines Mouthful;
Application programming interfaces path is with the path of one of lower interface: development interface, test interface, formal interface.
In some possible implementations, sandbox further includes pseudo interface module, and scheduler module is accessed according to application program Interface message determines the application programming interfaces of the client access are as follows: the scheduler module determines the application journey of client access Whether sequence interface is pseudo interface;When for pseudo interface, it is quiet that scheduler module notifies that pseudo interface module is returned to client application State data.
In some possible implementations, it further includes one of following information or more that application program, which accesses configuration information, Kind: whether at random return error message, whether be forced back to sky data, whether the analog network waiting time, whether be randomly generated Pushed information;When scheduler module determines that the application programming interfaces of client access are pseudo interface, pseudo interface module is according to scheduling The application program that module polls obtain accesses configuration information and returns to simulation dynamic data to client application.
Static data or simulation dynamic data are returned to client application by the way that pseudo interface is arranged in sandbox, it can be with Realize application program and application programming interfaces concurrent development in development process.
The third aspect of the embodiment of the present invention provides a kind of sandbox equipment, including processor and memory, wherein this is deposited Reservoir includes the sandbox of second aspect.
Fourth aspect of the embodiment of the present invention, provides a kind of sandbox equipment, including processor and memory, which uses In store instruction, the processor is for executing the instruction, when which executes the instruction of memory storage, the execution so that The processor executes the method in any possible implementation of first aspect or first aspect.
The 5th aspect of the embodiment of the present invention, provides a kind of computer-readable medium, for storing computer program, the meter Calculation machine program includes the instruction for executing the method in any possible implementation of first aspect or first aspect.
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 The some embodiments of inventive embodiments, for those of ordinary skill in the art, without creative efforts, also Other drawings may be obtained according to these drawings without any creative labor.
Fig. 1 is the schematic block diagram of the sandbox of the embodiment of the present invention;
Fig. 2 is the flow chart of the method by sandbox access application interface of the embodiment of the present invention;
Fig. 3 is the structural schematic diagram of the sandbox of the embodiment of the present invention;
Fig. 4 is another structural schematic diagram of the sandbox of the embodiment of the present invention;
Fig. 5 is another flow chart of the embodiment of the present invention by the method for sandbox access application interface.
Specific embodiment
The preferred embodiment of the embodiment of the present invention is described in detail with reference to the accompanying drawing, so that the embodiment of the present invention Advantages and features can be easier to be readily appreciated by one skilled in the art, to make to protection scope of the embodiment of the present invention apparent Explicitly define.
Join shown in Fig. 1, is the schematic diagram of sandbox equipment used in the embodiment of the present invention.
As shown in Figure 1, sandbox equipment 100 includes processor 101, memory 102.There is sandbox 300 in memory 120.
Memory 120 may include volatile memory (volatile memory) and/or nonvolatile memory (non-volatile memory), volatile memory such as random access memory (random-access memory, RAM);Nonvolatile memory such as read-only memory (read-only memory, ROM), flash memory (flash Memory), hard disk (hard disk drive, HDD) or solid state hard disk (solid-state drive, SSD) etc..
Processor 101 is used to execute program in memory 102, which can be operating system or various using journey Sequence.
In addition, sandbox equipment 100 can also include display, input equipment, output equipment (not shown in figure 1) etc., example Such as, input equipment may include keyboard, it is mouse, Trackpad, microphone, trace ball, touch-control jade-like stone curtain, game console, biometrics The input equipments such as input board and input pen/localizer, scanner, bar code reader and network camera.Output equipment can be with Including output equipments such as printer, loudspeaker and displays.
Sandbox equipment 100 can also include communication bus, video card, sound card and various sensor (not shown in figure 1)s etc..
By taking sandbox equipment 100 is server apparatus as an example, including sandbox 300, sandbox 300 is to carry out application program When exploitation or test, developer or tester is assisted to carry out the auxiliary system of application program and application programming interfaces function joint debugging System.The access of APP and true application programming interfaces has been isolated in sandbox 300, according to being pre-configured with for APP tester, guides APP Access request to corresponding api interface.
Fig. 2 is schematic flow of the embodiment of the present invention by the method for the 300 access application interface of sandbox of Fig. 1 Figure, comprising:
201, sandbox obtains and saves the application program access configuration information of client, which accesses configuration information and visitor The unique identification at family end is corresponding, including application program access interface information;
It is mounted with that the client device (such as mobile phone) of application program can access internal office by wireless signal, such as Wi-Fi signal Domain net to communicate with sandbox.Under the test environment, it when client application program interface access application interface, needs according to survey The requirement of examination personnel accesses different types of interface, to realize the test to application program, therefore, access application it Before, the application program access configuration information of the client needs that sandbox is allowed to know, client can will include that application program accesses The application program access configuration file of configuration information, which is visited, is sent to the configuration that sandbox or client access sandbox by browser The page carries out configuration application program access information on this page.
Application program access configuration information is corresponding with the unique identification of client, believes including application program access interface Breath.The application program access interface information includes whether application program access interface is pseudo interface, and when not being pseudo interface Interface path.
The unique identification of client can be different marks according to the different of client device, as long as can be by the client Equipment and other equipment are distinguished with regard to mark.Such as: if client is iPhone, which can be CFUUID (CF Universally Unique Identifier, CF Universally Unique Identifier) or CFUUID is calculated by MD5 The value that method is calculated.
If client is to install the mobile device of Android system, unique identification can be one in following: equipment Location (DEVICE_ID), Android address (ANDROID_ID), MAC ADDRESS(Media Access Control Address, Media access control address) or SIM card in IMSI (International Mobile Subscriber Identification Number, international mobile subscriber identity);Or above one is selected to be calculated by MD5 algorithm Obtained value is as unique identification.
Wherein device address (DEVICE_ID) can be IMEI(International Mobile Equipment Identity, international mobile equipment identification number), MEID(Mobile Equipment Identifier, mobile device identification Code), ESN(Electronic Serial Number, Electronic Serial Number) etc. in one.
202, sandbox receives the application programming interfaces access request that client application is sent, and includes in the access request The unique identification of the client;
Under the test environment, tester is somebody's turn to do by client application to sandbox sending application routine interface access request Access request can be HTTP request, which includes the unique identification of client;
For example, client application can first obtain the DEVICE_ID of the client device as unique identification, if it find that There is no DEVICE_ID to go to obtain ANDROID_ID again, ANDROID_ID does not also obtain IMSI then, if IMSI is also no Equipment MAC ADDRESS is obtained, it is above all then not create one as unique identification by random number, and be cached.So It include afterwards in HTTP request by the unique identification of above-mentioned acquisition.
203, sandbox accesses configuration information according to the application program that has saved of the unique identification of client inquiry, obtain with The corresponding application program access interface information of the unique identification of the client;
204, sandbox determines the application programming interfaces that client accesses according to the application program access interface information of acquisition.
205, when the application programming interfaces for determining client access are not pseudo interface, the determining application program of sandbox access Interface.
In 203-205, sandbox is not after receiving the application programming interfaces access request that client application is sent It is scheduled according to the application programming interfaces path in access request, but the storage mould is inquired according to the unique identification at family end The application program access configuration information saved in block, obtains application program access interface information corresponding with the client.
The application program access configuration information saved can be configuration file, be also possible to save letter in the database Breath.
Sandbox query configuration information acquisition application program access interface information corresponding with the unique identification of the client;It should Application program access interface information includes whether access interface is pseudo interface;And not when being pseudo interface, the client application journey Sequence needs the application programming interfaces path accessed.
Sandbox determines that the application program access interface is pseudo interface according to the application program access interface information, when When determining that client access interface is pseudo interface according to obtained application program access interface information, then sandbox answering client It is gone on the pseudo interface in sandbox with routine interface access request, pseudo interface returns to static data to client application, is somebody's turn to do Static data meets interface definition, and interface definition includes access address, incoming parameter, return parameters and return format etc.;If Application program access interface information is shown as the access interface of client configuration when not being pseudo interface, then sandbox obtains interface message In client configuration access physical interface path, so that it is determined that client access application programming interfaces.
Different application programming interfaces correspond to different interface paths, such as development interface, test interface, formal interface difference There is different interface paths, interface path can be the domain name or IP address of interface server.
For example, obtained application program access interface information is not access pseudo interface, suction parameter of configuration access path is to open The interface path of interface is sent out, then sandbox accesses the interface path.
In embodiment illustrated in fig. 2, is developing or testing in environment, do not needing modification APP code, but carried out by sandbox Application programming interfaces access can flexibly access switching in interfaces such as development interface, test interface, formal interfaces;Together Shi Yinwei APP code only has portion, and the version after compiling only has portion, so the case where also avoiding mistake publication APP version.
In embodiment shown in Fig. 2, it further includes one of following information or a variety of that application program, which accesses configuration information: Whether at random return error message, whether be forced back to sky data, whether the analog network waiting time, push whether is randomly generated Information;
When the application programming interfaces in the application program access interface information of client configuration are pseudo interface,
Sandbox is used to carry out corresponding operation according to above-mentioned configuration information, returns to corresponding simulation dynamic to client application Data.
For example, the analog network waiting time is 3 seconds, then when configuration information includes random return error message.Sandbox can be with Error message is returned to the client after waiting 3 seconds by pseudo interface therein.
It is understood that above-mentioned configuration information is merely illustrative, application development or tester be can according to need Configure other information.
Sandbox can also store the access number of client accordingly and the data that return to client of sandbox.Vacation in sandbox connects Mouth can call the data stored in sandbox when returning to static data or simulation dynamic data to client application.
The routine interface returned data in addition, sandbox after access application interface, is applied, then by the returned data It is sent to client.As it can be seen that sandbox is the direct access that client and application programming interfaces has been isolated for client.
It is exported by the way that pseudo interface simulation application interface is arranged in sandbox, returns to static number to client application According to or simulation dynamic data, application program and application programming interfaces concurrent development in development process may be implemented, even if using journey Also in the process of development, application program can also obtain test data for inside application program to sequence interface by application programming interfaces Business logic processing.
In addition, pseudo interface can simulate the exception error and data boundary of more difficult generation in normal access, to facilitate out Send out the reliability and stability of tester's inspection and debugging utility.
As shown in figure 3, being the schematic block diagram of sandbox of the embodiment of the present invention 300, which answers for executing above-mentioned access With the method for routine interface, as shown in figure 3, sandbox 300 includes obtaining module 301, memory module 302, scheduler module 303.
Obtain the application program access configuration information that module 301 is used to obtain client, the application program access configuration Information is corresponding with the unique identification of the client, including application program access interface information.
The unique identification of client can refer to the explanation of embodiment in Fig. 2, and this will not be repeated here.Confidence is matched in application program access It include application program access interface information corresponding with the unique identification of client in breath.For example, the interface message includes application Whether routine access interface is pseudo interface, and interface path when not for pseudo interface.
Memory module 302 is used to store the application program access configuration information for obtaining the client that module 301 obtains;
After acquisition module 301 gets application program access configuration information, store it in memory module 302.It is stored in Storing up the configuration information in module 302 is configuration file corresponding with the unique identification of client or database information.
Scheduler module 303 is used to receive the application programming interfaces access request of client application transmission, the access It include the unique identification of the client in request;Scheduler module 303 inquires storage mould according to the unique identification of the client The application program that block 302 saves accesses configuration information, obtains application program access corresponding with the unique identification of the client and connects Message breath;Scheduler module 303 is also used to determine the application journey of client access according to the access interface configuration information of acquisition Sequence access interface information accesses determining described when the application programming interfaces for determining client access are not pseudo interface Application programming interfaces.
Specifically, scheduler module 303 determines that application program corresponding with the unique identification of client is visited according to configuration information Ask that interface is pseudo interface, if not pseudo interface, then scheduler module 303 obtains the client application in configuration information The application programming interfaces path for needing to access accesses the application programming interfaces according to the interface path.Application programming interfaces path For with the path of one of lower interface: development interface, test interface, formal interface.
The explanation that scheduler module 303 executes aforesaid operations may refer to the explanation of the 202-205 in embodiment illustrated in fig. 2. This will not be repeated here.
For scheduler module 303 after access application interface, the returned data for the routine interface that is applied sends out the data Give client.
In conclusion embodiment advantage shown in Fig. 3 is: developing or testing in environment, do not needing modification using journey Sequence code, but carry out application program access scheduling by sandbox 300, can be flexibly in development interface, test interface, formal The switching that accesses of the interfaces such as interface;Simultaneously as application code only has portion, the version after compiling only has portion, institute The case where to also avoid wrong release application program version.
Optionally, it as shown in figure 4, sandbox 300 can also include pseudo interface module 304, is applied when scheduler module 303 determines When routine access interface is pseudo interface, then application programming interfaces access request is then gone to pseudo interface module by scheduler module 303 304, after pseudo interface module 304 receives application programming interfaces access request, to the client application journey for sending the access request Sequence returns to static data.
Optionally, whether application program access configuration information can also include one of following information or a variety of: random Return error message, whether be forced back to sky data, whether the analog network waiting time, whether pushed information is randomly generated.
When the application programming interfaces in the application program access interface information of client configuration are pseudo interface,
Pseudo interface module 304 is also used to inquire obtained above-mentioned configuration information according to scheduler module 303 and carries out corresponding operation, to Client application returns to corresponding simulation dynamic data.
For example, the analog network waiting time is 3 seconds, then pseudo interface module when configuration information includes being forced back to sky data 304 return to empty data to the client after waiting 3 seconds.
Memory module 302 can also store the access data and scheduler module 303 and pseudo interface module 304 of client The data returned to client.Pseudo interface module 304 can call storage when returning to static data to client application The data stored in module 302.
It is exported by the way that 304 simulation application interface of pseudo interface module is arranged in sandbox 300, to client application Static data or simulation dynamic data are returned, application program and application programming interfaces concurrent development may be implemented, even if using journey Also in the process of development, application program can also obtain test data for inside application program to sequence interface by application programming interfaces Business logic processing.In addition, pseudo interface module 304 can simulate the exception error and data of more difficult generation in normal access Boundary, to facilitate exploitation tester to check and the reliability and stability of debugging utility.
Fig. 5 is another flow chart of the embodiment of the present invention by the method for 300 access application interface of sandbox, below Illustrate the one embodiment of the present invention by the method for sandbox access application interface in practical application scene in conjunction with Fig. 5.
The application program of entitled " 51 meters the more " is mounted on certain mobile terminal (mobile phone): the mobile terminal is uniquely marked Knowing is 74de9a0c9a2e53fa505744401c38984e, is calculated by MD5 algorithm.Application programming interfaces Official domain name is https: //api.51job.com on the line of (api interface).The development interface path of api interface is https://10.100.2.72.The test interface path of api interface is https: // 10.100.3.105, which connects Internal wireless network is connect, is logged on on sandbox server by proxy server.
This method comprises:
501, sandbox obtains and stores the mobile terminal that unique identification is 74de9a0c9a2e53fa505744401c38984e Configuration information;
Mobile terminal initiates access request, accesses the configuration page of sandbox, the configuration of application program access information is carried out, in the visit It asks in request with equipment unique identification 74de9a0c9a2e53fa505744401c38984e.In the mobile terminal configuration information It is as follows to hold example:
Above-mentioned configuration information is merely illustrative, it is possible to understand that, or other configurations information.
502. sandboxs store configuration information corresponding with the mobile terminal device unique identification;
Configuration information is corresponding with mobile terminal device unique identification to be stored in sandbox.
503. sandboxs receive the access request of application program for mobile terminal " 51 meters the more " transmission, wherein in access request Equipment unique identification is 74de9a0c9a2e53fa505744401c38984e, and access api interface path is following path: https://api.51job.com/api/user/user_login;
504, sandbox obtains mobile terminal unique identification 74de9a0c9a2e53fa505744401c38984e from access request;
505, sandbox inquires the list for having deposited mobile terminal device unique identification, finds and mark 74de9a0c9a2e53fa505 The corresponding configuration information of 744401c38984e;
In 505, if sandbox does not find configuration information corresponding with mobile terminal, (i.e. sandbox is not saved and movement end Hold the corresponding configuration information of unique identification), then default access formal environments, i.e. https: //api.51job.com/api/ user/user_login.php。
506, sandbox determines application program access interface according to the configuration information found;
507, sandbox determines that the interface of the application program for mobile terminal configuration access is not pseudo interface, but path is i.e. The development interface of https: // 10.100.2.72/ api/user/user_login;
In other possible implementations, if if finding configuration information in mobile terminal configuration information, if configuration It is access formal environments API-api.51job.com, then accesses https: //api.51job.com/api/user/user_ login.php。
If that configuration is test environment API-10.100.3.105, https is accessed: // 10.100.3.105/api/ user/user_login.php。
If configuration is access pseudo interface (not accessing third party's interface)), access sandbox it is included /api/ User/user_login.php interface.
508, sandbox accesses the exploitation that above-mentioned path is https: // 10.100.2.72/ api/user/user_login Interface;
509, sandbox receives and saves the data of development interface return;
510, the data that development interface returns are sent to application program for mobile terminal " 51 meters the more " by sandbox.
It is appreciated that the above process is merely illustrative, for example, if configuring the client in 501 configuration information The interface for holding actual access is pseudo interface, then executes the following steps after 506:
511, sandbox determines that the interface of the application program for mobile terminal actual access is pseudo interface/api/user/user_ login.php;
512, sandbox is according to configuration information to application program for mobile terminal " 51 meters the more " returned data.
Sandbox by the return information of pseudo interface user_login.php interface (such as login successfully or the state value of failure, The miscue information etc. of failure) it returns again to client application.
The embodiment of the invention also provides a kind of computer storage medium, program generation is stored in the computer storage medium Code, the program code can serve to indicate that the method executed in aforementioned various embodiments of the invention.
Those of ordinary skill in the art may be aware that mould described in conjunction with the examples disclosed in the embodiments of the present disclosure Block and step can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually with hard Part or software mode execute, the specific application and design constraint depending on technical solution.Professional technician can be with Each specific application is used different methods to achieve the described function, but this realization is it is not considered that exceed this hair Bright range.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the module It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple module or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or module It closes or communicates to connect, can be electrical property, mechanical or other forms.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in a processing module It is modules physically individualism, can also be integrated in two or more modules in a module.The function is such as Fruit realizes and that when sold or used as an independent product can store can in a computer in the form of software function module It reads in storage medium.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part or the part of the technical solution can be embodied in the form of software products, which is stored in In one storage medium, including some instructions are used so that computer equipment (it can be personal computer, server, or Person's network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
More than, only specific embodiment of the embodiment of the present invention, but protection scope of the embodiment of the present invention is not limited thereto, Any change or replacement expected without creative work, should all cover within protection scope of the embodiment of the present invention.Therefore, Protection scope of the embodiment of the present invention should be determined by the scope of protection defined in the claims.

Claims (10)

1. a kind of method by sandbox access application interface characterized by comprising
Sandbox obtains and saves the application program access configuration information of client, application program access configuration information with it is described The unique identification of client is corresponding, including application program access interface information;
The sandbox receives the application programming interfaces access request that client application is sent, and includes institute in the access request State the unique identification of client;
The sandbox accesses configuration information, acquisition and institute according to the application program that the inquiry of the unique identification of the client has saved State the corresponding application program access interface information of unique identification of client;
The sandbox determines the application programming interfaces of the client access according to the application program access interface information of acquisition, when When the application programming interfaces for determining the client access are not pseudo interface, the determining application program of the sandbox access is connect Mouthful.
2. the method as described in claim 1, which is characterized in that the application program access interface information includes: the client Whether the application programming interfaces of end access are pseudo interface;
And when not being pseudo interface, the application programming interfaces path of the client access.
3. method according to claim 2, which is characterized in that when the application programming interfaces for determining the client access are not When pseudo interface, the determining application programming interfaces of the sandbox access are as follows: the sandbox is according to the application programming interfaces road The determining application programming interfaces of diameter access;
The application programming interfaces path is with the path of one of lower interface: development interface, test interface, formal interface.
4. the method as described in claim 1, which is characterized in that the sandbox includes the pseudo interface, and the sandbox is according to obtaining The application program access interface information obtained determines the application programming interfaces of the client access are as follows: determines the client access Application programming interfaces whether be the pseudo interface;
When for the pseudo interface, the sandbox returns to static data to the client application.
5. method as claimed in claim 4, which is characterized in that
The application program access configuration information further includes one of following information or a variety of: whether returning to mistake letter at random Breath, whether be forced back to sky data, whether the analog network waiting time, whether pushed information is randomly generated;
When the application programming interfaces for determining the client access are pseudo interface, the sandbox is answered according to inquiring and obtain Simulation dynamic data is returned to the client application with routine access configuration information.
6. a kind of sandbox is used for it is characterised in that it includes obtaining module, memory module and scheduler module;
The acquisition module, the application program for obtaining client access configuration information, and confidence is matched in the application program access Breath is corresponding with the unique identification of the client, including application program access interface information;
The memory module, the application program for storing the client that the acquisition module obtains access configuration information;
The scheduler module, for receiving the application programming interfaces access request of client application transmission, the access is asked It include the unique identification of the client in asking;
The scheduler module is also used to inquire the application journey saved in the memory module according to the unique identification of the client Sequence accesses configuration information, obtains application program access interface information corresponding with the unique identification of the client;
The scheduler module is also used to determine that the application program of the client access connects according to application program access interface information Mouthful, when the application programming interfaces for determining the client access are not pseudo interface, access the determining application programming interfaces.
7. sandbox as claimed in claim 6, which is characterized in that the application program access interface information includes: the client Whether the application programming interfaces of end access are pseudo interface;
And when not being pseudo interface, the application programming interfaces path of the client access;
The determining application programming interfaces of the scheduler module access are as follows: the scheduler module is according to the application programming interfaces The application programming interfaces that path access determines;
The application programming interfaces path is with the path of one of lower interface: development interface, test interface, formal interface.
8. sandbox as claimed in claim 6, which is characterized in that further include pseudo interface module, the scheduler module is according to application Routine access interface message determines the application programming interfaces of the client access are as follows: the scheduler module determines the client Whether the application programming interfaces of access are pseudo interface;
When for pseudo interface, the scheduler module notifies the pseudo interface module to return to static number to the client application According to.
9. sandbox as claimed in claim 8, which is characterized in that the application program access configuration information further includes following information One of or it is a variety of: whether at random return error message, whether be forced back to sky data, whether the analog network waiting time, Whether pushed information is randomly generated;
When the scheduler module determines that the application programming interfaces of the client access are pseudo interface, the pseudo interface module Configuration information, which is accessed, according to the application program that the scheduler module is inquired returns to mould to the client application Quasi- dynamic data.
10. a kind of sandbox equipment, which is characterized in that including processor and memory;The memory include as claim 6 to Any one of 9 sandbox.
CN201811571710.4A 2018-12-21 2018-12-21 Method for accessing application program interface through sandbox, sandbox and sandbox equipment Active CN109683997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811571710.4A CN109683997B (en) 2018-12-21 2018-12-21 Method for accessing application program interface through sandbox, sandbox and sandbox equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811571710.4A CN109683997B (en) 2018-12-21 2018-12-21 Method for accessing application program interface through sandbox, sandbox and sandbox equipment

Publications (2)

Publication Number Publication Date
CN109683997A true CN109683997A (en) 2019-04-26
CN109683997B CN109683997B (en) 2022-02-11

Family

ID=66188184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811571710.4A Active CN109683997B (en) 2018-12-21 2018-12-21 Method for accessing application program interface through sandbox, sandbox and sandbox equipment

Country Status (1)

Country Link
CN (1) CN109683997B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597723A (en) * 2019-09-18 2019-12-20 达疆网络科技(上海)有限公司 Lightweight joint debugging system for rapid test of merchant system docking
CN112948239A (en) * 2021-02-04 2021-06-11 深圳市镜玩科技有限公司 Application program testing method and system, terminal device and computer storage medium
TWI732466B (en) * 2020-02-25 2021-07-01 財金資訊股份有限公司 Application program interface centralized sandbox and its operation method, computer readable recording medium and computer program product
CN113760315A (en) * 2020-09-27 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for testing system
CN114417323A (en) * 2022-01-21 2022-04-29 北京飞书科技有限公司 Data reference method, device, equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268442A (en) * 2013-05-14 2013-08-28 北京奇虎科技有限公司 Method and device for achieving safe access of video websites
CN103514400A (en) * 2012-06-27 2014-01-15 捷讯研究有限公司 Selection of sandbox for initiating application
CN103618758A (en) * 2013-10-31 2014-03-05 新浪网技术(中国)有限公司 Web server and system resource access control method thereof
WO2014089097A1 (en) * 2012-12-06 2014-06-12 Microsoft Corporation Secure transcoding of video data
CN104160404A (en) * 2012-09-27 2014-11-19 英特尔公司 Detecting, enforcing and controlling access privileges based on sandbox usage
CN104408367A (en) * 2014-11-28 2015-03-11 北京奇虎科技有限公司 Application program configuration method and device
US20150089512A1 (en) * 2011-12-28 2015-03-26 Beijing Qihoo Technology Company Limited Method and Device for Browsing Webpage
US20170126817A1 (en) * 2015-10-30 2017-05-04 Mckesson Financial Holdings Methods and apparatuses for location-based data access
US20180046798A1 (en) * 2015-02-16 2018-02-15 Universitat Des Saarlandes Mining Sandboxes
CN108933713A (en) * 2018-07-20 2018-12-04 阿里巴巴集团控股有限公司 The method, apparatus and service server of sandbox debugging are realized based on shadow link

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150089512A1 (en) * 2011-12-28 2015-03-26 Beijing Qihoo Technology Company Limited Method and Device for Browsing Webpage
CN103514400A (en) * 2012-06-27 2014-01-15 捷讯研究有限公司 Selection of sandbox for initiating application
CN104160404A (en) * 2012-09-27 2014-11-19 英特尔公司 Detecting, enforcing and controlling access privileges based on sandbox usage
WO2014089097A1 (en) * 2012-12-06 2014-06-12 Microsoft Corporation Secure transcoding of video data
CN103268442A (en) * 2013-05-14 2013-08-28 北京奇虎科技有限公司 Method and device for achieving safe access of video websites
CN103618758A (en) * 2013-10-31 2014-03-05 新浪网技术(中国)有限公司 Web server and system resource access control method thereof
CN104408367A (en) * 2014-11-28 2015-03-11 北京奇虎科技有限公司 Application program configuration method and device
US20180046798A1 (en) * 2015-02-16 2018-02-15 Universitat Des Saarlandes Mining Sandboxes
US20170126817A1 (en) * 2015-10-30 2017-05-04 Mckesson Financial Holdings Methods and apparatuses for location-based data access
CN108933713A (en) * 2018-07-20 2018-12-04 阿里巴巴集团控股有限公司 The method, apparatus and service server of sandbox debugging are realized based on shadow link

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JOHN PAUL MUELLER: "What Is an API Sandbox?", 《HTTPS://SMARTBEAR.COM/LEARN/API-DESIGN/WHAT-IS-AN-API-SANDBOX/》 *
程序一粟: ".net调用支付宝的沙箱测试接口 完美调通(网页支付)", 《HTTPS://BLOG.CSDN.NET/JZL1234567/ARTICLE/DETAILS/78091711》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597723A (en) * 2019-09-18 2019-12-20 达疆网络科技(上海)有限公司 Lightweight joint debugging system for rapid test of merchant system docking
TWI732466B (en) * 2020-02-25 2021-07-01 財金資訊股份有限公司 Application program interface centralized sandbox and its operation method, computer readable recording medium and computer program product
CN113760315A (en) * 2020-09-27 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for testing system
CN112948239A (en) * 2021-02-04 2021-06-11 深圳市镜玩科技有限公司 Application program testing method and system, terminal device and computer storage medium
CN112948239B (en) * 2021-02-04 2024-05-14 深圳市仁凯网络科技有限公司 Application program testing method, system, terminal equipment and computer storage medium
CN114417323A (en) * 2022-01-21 2022-04-29 北京飞书科技有限公司 Data reference method, device, equipment and medium

Also Published As

Publication number Publication date
CN109683997B (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN109683997A (en) Pass through the method for sandbox access application interface, sandbox and sandbox equipment
CN104699616B (en) The method of a kind of application test, Apparatus and system
CN105808399B (en) Remote debugging method and device
CN109446072A (en) The generation method and device of test script
CN105389263B (en) Application software authority monitoring method, system and equipment
CN113312064B (en) Method and device for installing and configuring physical machine and computer readable medium
CN108228444B (en) Test method and device
CN110427324B (en) Joint debugging system, joint debugging method, computer equipment and storage medium
CN112965700A (en) Routing-based micro-service processing method and device, computer equipment and medium
CN111026672A (en) Test method, terminal equipment and mock server
CN111090592A (en) Automatic testing method of buried point, terminal and readable storage medium
CN113672441B (en) Method and device for testing intelligent equipment
KR20190061060A (en) Profile-based content and services
CN111309624A (en) Test method, device, equipment and storage medium
CN108089972A (en) interface test method and device
CN106302011B (en) Multi-terminal-based test method and terminal
CN107592302A (en) The port scanner and method of a kind of mobile terminal
CN108647139B (en) System test method, device, storage medium and electronic device
CN105339974B (en) Analog sensor
CN113691413B (en) Method and system for realizing compatibility of Internet of things equipment with multiple modules
CN111880996B (en) Bare metal data acquisition method, device, equipment and readable storage medium
KR101862617B1 (en) System of testing iot sensor for power facility management
CN110971478A (en) Pressure measurement method and device for cloud platform service performance and computing equipment
CN114860577A (en) Test method, test device, readable medium and electronic equipment
KR20180046748A (en) Test apparatus and method for providing virtual test environment

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