CN109460266A - A kind of method and device constructing software analogue data - Google Patents
A kind of method and device constructing software analogue data Download PDFInfo
- Publication number
- CN109460266A CN109460266A CN201811265625.5A CN201811265625A CN109460266A CN 109460266 A CN109460266 A CN 109460266A CN 201811265625 A CN201811265625 A CN 201811265625A CN 109460266 A CN109460266 A CN 109460266A
- Authority
- CN
- China
- Prior art keywords
- data
- interface
- software
- request
- module
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45575—Starting, stopping, suspending or resuming virtual machine instances
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
The present invention provides a kind of method and devices for constructing software analogue data, this method comprises: being pre-configured with software interface setting in interface configuration module, it is parsed by retrieval module to from Client-initiated request, to parse the interface IP address corresponding with user's request, by response parameter corresponding to interface IP address and parameter value logging data constructing module, data configuration module to parameter value execute whether be rule function judgement, and when parameter value is rule function, it calls preconfigured software interface to be arranged and generates the analogue data corresponding with user's request, data capsule is written into analogue data, and analogue data is called from data capsule by respond module, to respond user.By the application, software development flow is simplified, and does not need developer's manual compiling static simulation data, avoids and invasion is generated to software code, reduce the residual of software analogue data.
Description
Technical field
The present invention relates to software data analogue technique field more particularly to a kind of methods and dress for constructing software analogue data
It sets.
Background technique
In software development process, usually defining software interface can be started to develop.But software is in the process of development, nothing
Method provides enough software datas and responds caller, and caller needs a large amount of software data to fill view, so that view
Scheme full beauty.In existing software development process, typically directly software data is write extremely in software code, is rung with this
Using family or developer.This way inefficiency, and it is not convenient for safeguarding, the software data of batch can not be provided, be not easy to do
Interface testing.
With the fast development of Software Industry, micro services are exactly handle at most popular software architecture instantly, this framework
The software of one bulky complex splits into multiple services having a single function, these services provide unified software interface for mutually it
Between access data.In project development process, all it is often multiple services while carries out, and needs to provide data between servicing.
In the prior art, conventional technology is artificial to be inserted into test data in database or write in code
The fixed data of a pile are used to return, with to micro services configuration and performance carry out simulation test.The above-mentioned prior art results in
The increase of human cost and time cost;Simultaneously because being inserted into test data in database or writing what a pile was fixed in code
Data have software code certain invasive, therefore cause many puzzlements to software code examination;Meanwhile it completing to micro-
After the simulation tests of softwares such as service, it is also necessary to carry out the work of regularly code inspection and cleaning residual data.
In view of this, it is necessary to the building method in the prior art for constructing software analogue data and be based on the construction side
The software analogue data constructing apparatus of method is improved, to solve the above problems.
Summary of the invention
It is an object of the invention to disclose a kind of method for constructing software analogue data and a kind of construction based on this method
The device of software analogue data avoids developer's manual compiling static simulation data to simplify software development flow, avoids pair
Software code generates invasion, reduces the residual of software analogue data.
To realize above-mentioned first purpose, the present invention provides a kind of method for constructing software analogue data, the methods
The following steps are included:
S1, software interface setting is pre-configured in interface configuration module;
S2, Client-initiated request is received by extraction module, and be sent to retrieval module;
S3, it is parsed by retrieval module to from Client-initiated request, to parse the interface corresponding with user's request
Address;
S4, response parameter corresponding to interface IP address and parameter value are imported into data configuration module, the data configuration module pair
Whether it is that the judgement of rule function calls preconfigured software interface and when parameter value is rule function that parameter value executes
It is arranged and generates the analogue data corresponding with user's request;
S5, analogue data is written to data capsule, and analogue data is called from data capsule by respond module, to respond use
Family.
As a further improvement of the present invention, after step S5 is finished further include: clean up process is called, to data
The analogue data retained in container is cleared up.
As a further improvement of the present invention, the calling clean up process is controlled by respond module and executes cleaning.
As a further improvement of the present invention, the rule as composed by multiple rule functions built in the data configuration module
Function library, and the introducting interface of addition manually or batch importing rule function is configured, the introducting interface is RESTful API
Or SOAP.
As a further improvement of the present invention, the data capsule be database, key-value storage system, calculate memory,
JVM or file system;
The type of user's request is GET request, POST request, UPDATE request or DELETE request, and with the side HTTP
Formula initiates request or receives analogue data.
As a further improvement of the present invention, the step S3 further include:
The interface IP address corresponding with user's request parsed is set be pre-configured with software interface in interface configuration module
The step of being retrieved is set,
When the software interface setting similarly configured if it exists, identical configuration software interface is directly called from interface configuration module
Corresponding analogue data, and it is sent to respond module, to be responded by respond module to user;
When the software interface setting similarly configured if it does not exist, step S4 is executed.
To realize another above-mentioned goal of the invention, the present invention also provides a kind of device for constructing software analogue data, packets
It includes:
For the interface configuration module of pre-structured software interface,
Client-initiated request is parsed for responding the extraction module of user's request, and by retrieval module, with parsing
The interface IP address corresponding with user's request out,
Data configuration module, response parameter and parameter value corresponding to the interface IP address received from retrieval module typing, the number
According to constructing module to parameter value execute whether be rule function judgement, and when parameter value is rule function, calling is matched in advance
The software interface set is arranged and generates analogue data,
For receiving and saving the data capsule of analogue data, and
The respond module of analogue data is obtained, from data capsule to respond by the respond module to user.
As a further improvement of the present invention, the rule as composed by multiple rule functions built in the data configuration module
Function library, and the introducting interface of addition manually or batch importing rule function is configured, the introducting interface is RESTful API
Or SOAP.
As a further improvement of the present invention, described device further include: it is controlled by the cleaning modul of respond module, it is described clear
Reason module operation has clean up process, and after respond module is responded to user, sends data dump to cleaning modul and refer to
It enables, so that the analogue data in data capsule is executed cleaning operation by cleaning modul.
As a further improvement of the present invention, the Client-initiated request is by interface IP address, request type, response parameter
And response parameter value describes jointly;The data capsule is database, key-value storage system, calculates memory, JVM or file
System;The Client-initiated request type is GET request, POST request, UPDATE request or DELETE request.
As a further improvement of the present invention, described device further include: the software mutually accessed with interface configuration module connects
Mouth library;Described device supports concurrent response model.
As a further improvement of the present invention, it is described construction software analogue data device be deployed in web server or
Cloud computing manages in platform.
As a further improvement of the present invention, the cloud computing manages platform OpenStack, CloudStack, VMware
VCloud, Microsoft Azure Pack, OpenNebula or Eucalyptus.
Compared with prior art, the beneficial effects of the present invention are: being simulated by a kind of construction software disclosed herein
The method of data and a kind of device based on this method, simplify software development flow, and do not need developer's manual compiling
Static simulation data avoid and generate invasion to software code, reduce the residual of software analogue data.
Detailed description of the invention
Fig. 1 is a kind of scene figure of device for constructing software analogue data of the present invention in the specific implementation process, wherein structure
The service 2 on the right side of the device of software analogue data is made to be initiated to the reference user of service 4 to the device of construction software analogue data
Construction request, construct software analogue data device on the left of service 1 refer to service 2 to service 4 by construction software simulate number
According to the service that is constructed of device.
Fig. 2 is a kind of process schematic for the method for constructing software analogue data of the present invention;
Fig. 3 is a kind of logic chart for the method for constructing software analogue data of the present invention;
Fig. 4 is a kind of module map of the device for constructing software analogue data of the present invention in the first specific embodiment;
Fig. 5 is a kind of module map of the device for constructing software analogue data of the present invention in second of specific embodiment;
Fig. 6 is a kind of module map of the device for constructing software analogue data of the present invention in the third specific embodiment;
Fig. 7 is a kind of module map of the device for constructing software analogue data of the present invention in the 4th kind of specific embodiment.
Specific embodiment
The present invention is described in detail for each embodiment shown in reference to the accompanying drawing, but it should be stated that, these
Embodiment is not limitation of the present invention, those of ordinary skill in the art according to these embodiments made by function, method,
Or equivalent transformation or substitution in structure, all belong to the scope of protection of the present invention within.
Before elaborating each embodiment of the application, necessary restriction is carried out to the term in the application and is explained.
In this application, term "Construction request" with "Client-initiated request" make equivalence interpretation." parameter value " and " response parameter value "
Make equivalence interpretation.
Join Fig. 1 shown in, specification and its Figure of description it is revealed construction software analogue data method or be based on
The device 100 for running the construction software analogue data of this method is normally operated in web server or cloud computing management platform
In, and (service 2 to service 4 can be in the scene of Fig. 1 based on one or more service shown by service 2 to service 4
It is micro services, some plug-in unit or basic configuration of software or computing system also may be implemented), to pass through one in Fig. 1
The configuration of the software interface of specific function is simulated in the execution of device 100 of kind construction software analogue data, to form one
Or multiple services constructed as shown by service 1 by constructing the device of software analogue data.
Certainly, the service constructed is also possible to a kind of micro services, be also possible to one of cloud platform application or
Program or component.Service 1 can substantially be defined as or be interpreted as service consumer.
Embodiment one:
It please join a kind of specific embodiment of Fig. 2, Fig. 3 and a kind of method for constructing software analogue data illustrated in fig. 5.
In the present embodiment, a method of construction software analogue data the described method comprises the following steps:
Firstly, executing step S1, being pre-configured with software interface setting in interface configuration module 11.In this step, this is preparatory
The software interface setting of configuration can be configured to one or several kinds of for the common analogue data of test software interface.Software interface
Setting in the present embodiment can include: service name, interface name, interface IP address, interface specification, request type, required parameter,
Response parameter (for example,id、name) and response parameter value.Response parameter value is rule function set by corresponding response parameter
(for example,@name).
The construction request for the construction software analogue data that request type, i.e. user 30 are initiated, which includes that GET is asked
It asks, POST request, UPDATE are requested or DELETE request.
Service name is defined generally according to service function, and is defined in advance before software development.For example, order
Service can be named as " order ".Interface name refers to the title of some operation, and the software interface usually provided with software is kept
Unanimously.For example, when interface name is " listOrder ", being then presented as when service name is " order " and " listing all order
The meaning of list ".Interface IP address automatically generates, default address be "URL+ service name+interface name", such as "http:// 127.0.0.1:8800/order/listOrder".The step of software interface is arranged can be in visual user interface
(UI) it edited, replicated, deleted or is checked in a manner of customized in.
User 30 executes step 111 and initiates construction request to extraction module 12, and the initiation mode of construction request is HTTP
Request.
Then, it executes step S2, receive the request (i.e. construction is requested) of the initiation of user 30 by extraction module 12, extract mould
Block 12, which jumps, executes step 113, and the request that user 30 initiates is sent to retrieval module 13.Then, it executes step S3, pass through
Retrieval module 13 parses the request initiated from user 30, to parse the interface IP address corresponding with user's request.
Retrieval module 13, which jumps, executes step 115 with operation logic one, thus by operation logic one, to pass through retrieval mould
The request that block 13 initiates user 30 judges with the presence or absence of matched interface in the request, if executing step 117 jumping, if
It is no, then it jumps and executes step 118, and terminate (EDN).When in the request initiated there are user 30 comprising there are matched interfaces
When, it is performed simultaneously step 116, is connect corresponding to the above-mentioned request initiated with user 30 with being extracted from interface configuration module 11
Mouthful, and it is passed to the construction that data configuration module 14 carries out software analogue data together.Specifically, user 30 is typically based on the side Http
Formula sends the request of construction software analogue data, and the URL according to included in the request that user 30 initiates to extraction module 12
Address.
Then, it executes step S4, response parameter corresponding to interface IP address and parameter value is imported into data configuration module 14.
In this, applicant is unfolded to illustrate to technical terms such as response parameter, response parameter values (i.e. parameter value).At this
In application, response parameter can shift to an earlier date to be predefined in interface configuration module 11, shown below several response parameters.
@guid: unique ID is generated;
@" number | 1-100 ": a random number is taken from 1-100;
@increment: it generates and is incremented by ID;
@title: random title is generated;
@date (' yyyy-MM-dd A HH:mm:ss'): date date of formation Hour Minute Second;
@id: random ID is generated;
@name: user name is generated;
@boolean: true/false is generated.
Data configuration module 14 to parameter value execute whether be rule function judgement (ginseng Fig. 2 in logic two shown in),
And when parameter value is rule function, calls preconfigured software interface to be arranged and generate the simulation corresponding with user's request
Data.In step S4 corresponding diagram 2 dotted line frame B it is specified to logic step.Wherein, " parameter value " refers in particular to " response parameter "
Parameter value, for example, { name: "@name " } is used as a response parameter, " name " therein is in response to parameter, and "@name " is then
With response parameter value corresponding to response parameter.
Response parameter refers to, response parameter is arranged according to the return parameters that interface defines.Need to follow certain rule
Then, the present invention program can be according to regular dynamic generation software analogue data, and is not necessarily to prepare software analogue data in advance, only needs root
The parameter type, the format that return are needed according to functional rule setting, therefore, is different from and existing code is needed to generate in advance
Analogue data is inserted into database, especially reminds, and the example for the database that " database " and data capsule 16 herein uses exists
It is different on logical architecture, i.e. technical solution in the application in data capsule 16, the revealed method of the present embodiment will not
Cause to invade the beneficial of software code (software refers to service 1 in Fig. 1 or other need to carry out the software of simulation test)
Effect.
In the present embodiment, it can be generated uniquely by the constructed analogue data of data configuration module 14, such as@guid
Request ID(6E78941e-FFb0-1fD3-fa49-D3cfC972D8be), orders | 3 can generate 3 orders data,
The generation of these regular datas (" rule function " i.e. in the application) can be used the realization of Nodejs language technology, and will generate
Software analogue data reside in calculate memory in, therefore the software analogue data of generation will not be deposited in construction software simulation
In the device 100 of data, so remaining junk data will not be generated.
Specifically, data configuration module 14, which jumps, executes step 120, to return rule function library 15 by one or more
It whether is that rule function judges to parameter value execution.Rule function library 15, which jumps, executes step 121, is passed by two Duis of logic
Whether the parameter value entered is that rule function is judged;
If so, jump execute step 124 and from interface configuration module 11 call with parameter value match and in step
The rule function formed in rapid S1 returns to software analogue data (shown in ginseng step 124);If not, that is, if data configuration
When parameter value is determined as irregular function by the logic two in module 14,119 are thened follow the steps: current parameter value is not made to locate
Reason, and continue to keep traversal, it is initiated until can be called from interface configuration module 11 to user by rule function library 15
The matched software analogue data of request, and finally jump execute step 123.Wherein, rule function is that developer pre-sets
Function, they for example pre-set the rule function of a time of return with rule name, then developer needs in regular letter
One datetime(function name of name is due up in number libraries 15, is not specified format, can be date, date or
Other function representation forms of person, as long as and function title is consistent when interface parameters value is arranged) function, and in letter
Setting returns to a time value to number in vivo.
Finally, executing step S5, joining analogue data write-in data capsule 16(shown in step 123), and pass through response mould
Block 17 calls analogue data (shown in ginseng step 125) from data capsule 16, to respond shown in user 30(ginseng step 126).
Preferably, in the present embodiment, after step S5 is finished further include: clean up process is called, to data
The analogue data retained in container 16 is cleared up.It calls clean up process to be controlled by respond module 18 and executes cleaning.Specifically, working as
After step 126 is finished, respond module 17, which jumps, executes step 127, will be to the successful feedback analog data of user 30
Message informing cleaning modul 18.Cleaning modul 18, which jumps, executes step 128, simulates number with the software to resident in data capsule 16
According to cleaning is executed, to reduce residual of the software analogue data in data capsule 16.
Applicant is particularly noted that, in the prior art, in order to micro services configuration and performance carry out simulation test, lead to
Often can not be also purged to residual data, though there is the operation for removing analogue data, and in entire software or
After the exploitation of micro services finishes, discarded software analogue data is searched out in such a way that catalogue is retrieved.
Therefore, during clear operation, it is necessary to stack address, the data of overall importance for recording all software analogue datas
File label claims, if the micro services for constituting a service are numerous, will lead to the time for accidentally deleting or removing software analogue data
It is too long, even result in the problem of file loss or component loss occur for software leaved for development.However, disclosed in the present embodiment
A kind of construction software analogue data method in specific embodiment in, can be to the remaining software mould of institute in data capsule 16
Quasi- data are " instant " to be removed, so as to avoid the above problem.
Shown in cooperation ginseng Fig. 6, the rule function library 15 as composed by multiple rule functions built in the data configuration module 14,
And configure manually addition perhaps batch import rule function 141 introducting interface of introducting interface be RESTful API or
SOAP.Administrator 40 can import new rule function in introducting interface 141, the new rule function may include response parameter and
Response parameter value.
Data capsule 16 be database (database), key-value storage system (for example, Redis), calculate memory (for example,
Shmop), JVM(JAVA Virtual Machine) or file system (File System, FS).What user 30 initiated asks
The request type asked is GET request, POST request, UPDATE request or DELETE request, and initiates to request in a manner of HTTP
Or receive analogue data.Wherein, which can be configured to relevant database (eg:MySQL) or non-relational data
Library (eg:NoSQL).In the present embodiment, which specifically selects relevant database.
In the present embodiment, required parameter and response parameter can be unified for json format or other kinds of lightweight
Data interchange format file (for example, XML format file, txt file or journal file) or array form.To meet
Subsequent calling process and treatment process.
The method of revealed construction software analogue data through this embodiment, simplifies software development flow, and be not required to
Want developer's manual compiling static simulation data;Importantly, in this embodiment, not needing to exist software data " writing dead "
In software code (software i.e. being developed), thus substantially increase the software development efficiency of user or developer with
And the efficiency of performance simulation test is carried out to software interface.
Embodiment two:
Cooperation is referring to shown in 7, a kind of a kind of variation of the method for construction software analogue data shown by the present embodiment, with
The method of the revealed construction software analogue data of embodiment one is compared, and the main distinction is, in the present embodiment, the step
S3 further include:
The interface IP address and interface configuration module 11 corresponding with user's request that logic a pair in retrieval module 13 parses
The step of middle be pre-configured with software interface setting is retrieved, when the software interface setting similarly configured if it exists, directly from
Analogue data corresponding to identical configuration software interface is called in interface configuration module 11, and is sent to respond module 17, with
It is responded by respond module 17 to user 30;When the software interface setting similarly configured if it does not exist, until downward sequence is held
Row step S4.
In the present embodiment, whether preserved based on user in interface configuration module 11 due to joined in step s3
The step of judgement for being formed by history software analogue data of the 30 construction requests initiated, so that the construction that user 30 initiates is asked
It asks and directly identical configuration software is called to connect from interface configuration module 11 by retrieval module 13 by the direction of four-headed arrow D
Analogue data corresponding to mouthful;The construction request suitably initiated if it does not exist with user 30 is formed by the simulation of history software
Data are then sent to shown in respond module 17(ginseng arrow E), directly to be responded to user 30 by respond module 17.?
In the present embodiment, the simplicity of construction software analogue data is further simplified.
A kind of technology of the method for construction software analogue data and same section in embodiment one shown by the present embodiment
Scheme please join described in embodiment one, and details are not described herein.
Embodiment three:
It please join Fig. 3 and a kind of a kind of specific embodiment party for the device 100 for constructing software analogue data of the present invention illustrated in fig. 4
Formula.
In the present embodiment, the device 100 of the construction software analogue data, comprising: extraction module 12, interface configuration module
11, retrieval module 13, internal operation logic one, data configuration module 14,14 internal operation of data configuration module one or
The multiple rule function libraries 15 of person, operation logic two, respond module 17 and data capsule 16 in rule function library 15.Logic one with
Logic judgment process performed by logic two is joined described in embodiment one, and details are not described herein.
When retrieval module 13 judges to notify there are when matched interface with the direction of arrow C by the logic one built in it
Data configuration module 14 generates the software analogue data of response according to rule function.
Specifically, in the present embodiment, interface configuration module 11 is used for pre-structured software interface.Extraction module 12 is for ringing
Using family request (i.e. user 30 is requested by the construction that HTTP mode is initiated to extraction module 12), and pass through retrieval module 13
The request initiated user 30 parses, and requests corresponding interface IP address with user 30 to parse.
Data configuration module 14, response parameter and parameter corresponding to the interface IP address received from 13 typing of retrieval module
Value, the data configuration module 14 to parameter value execute whether be rule function judgement, and when parameter value is rule function,
It calls preconfigured software interface to be arranged and generates analogue data.Data capsule 16 is for receiving and saving analogue data.It rings
Module 17 is answered to obtain analogue data from data capsule 15, to respond by the respond module 17 to user 30.
The rule function library 15 as composed by multiple rule functions built in data configuration module 14, and configure addition manually or
Person's batch imports the introducting interface 141 of rule function.Specifically, the introducting interface 141 is RESTful API or SOAP.?
In the present embodiment, introducting interface 141 selects RESTful API.
The request that user 30 initiates is described jointly by interface IP address, request type, response parameter and response parameter value.Data
Container 16 is database, key-value storage system, calculates memory, JVM or file system.User 30 initiate request type be
GET request, POST request, UPDATE request or DELETE request.Meanwhile 100, the device of the construction software analogue data
It is deployed in web server or cloud computing management platform.
Specifically, the cloud computing manages platform OpenStack, CloudStack, VMware vCloud, Microsoft
Azure Pack, OpenNebula or Eucalyptus.Meanwhile web server can be operation windows2003,
The web server of the Windows operating system of windows2008 or windows2012;It is of course also possible to be operation
The web server of the (SuSE) Linux OS such as CentOS or Ubuntu.
Example IV:
Please join a kind of device 100(hereinafter referred to as " device 100 " for constructing software analogue data of the present invention illustrated in fig. 5) the
A kind of variation.In the present embodiment compared with the device 100 that embodiment three goes out, the main distinction is, in the present embodiment,
The device 100 further include: be controlled by the cleaning modul 18 of respond module 17, the operation of cleaning modul 18 has clean up process, and in sound
After answering module to respond to user 30, data dump instruction is sent to cleaning modul 18, thus will by cleaning modul 18
Analogue data in data capsule 16 executes cleaning operation.
Meanwhile the rule function library 15 as composed by multiple rule functions built in the data configuration module 14, and configure hand
Dynamic addition 141 introducting interface of introducting interface that perhaps batch imports rule function is RESTful API or SOAP.Data are held
Device 16 is database, key-value storage system, calculates memory, JVM or file system.User initiates request type to be asked for GET
It asks, POST request, UPDATE request perhaps DELETE request and initiate to request or receive analogue data in a manner of HTTP.
It should be noted that the present embodiment in 16 optional database of data capsule example when, as data capsule
A kind of 16 databases for showing form simultaneously unconventional operate in data center or the database with Proxy server carry.
The example of 16 optional database of data capsule in the present embodiment, which only refers to, operates in web server or cloud computing management
Database in platform.
The technical side of same section in the device 100 and embodiment three of software analogue data is constructed shown by the present embodiment
Case please join described in embodiment three, and details are not described herein.
Embodiment five:
It please join Fig. 3 and a kind of second of variation of the device 100 for constructing software analogue data of the present invention illustrated in fig. 6.?
Compared with the device 100 that embodiment two and/or embodiment three go out, the main distinction is the present embodiment, in the present embodiment,
The device 100 further include: the software interface library 10 mutually accessed with interface configuration module 11.Software interface library 10 passes through two-way arrow
First 129 mutually access.
It is furthermore preferred that in the present embodiment, which not only supports administrator 40 or user 30 to pass through
RESTFul API is predefined, and is alternatively arranged as what the construction request that interface configuration module 11 is initiated according to user 30 was constructed
The temporary memory space or storage medium of interface configuration.Storage medium herein can be the storage medium of physical layer,
Can virtual level storage medium (such as array, set etc.).
Meanwhile device 100 shown by the present embodiment also supports concurrent response model, to meet UDP circulating server
The demand of model.Different user 30 is preserved in software interface library 10 to be sent out based on the device 100 of the construction software analogue data
The corresponding software interface of the software interface test performed to various types of software or service risen.Based on this reality
The technical solution of the revealed above-mentioned deformation of example is applied, the different construction requests that same subscriber 30 can be supported to issue simultaneously, or
Person supports the construction request with father and son's process relationship that different user 30 issues simultaneously.
The device 100 for constructing software analogue data shown by the present embodiment and phase in embodiment two and/or embodiment three
Technical solution with part please join described in embodiment two and/or embodiment three, and details are not described herein.
Embodiment six:
It please join a kind of second of variation of the device 100 for constructing software analogue data of the present invention illustrated in fig. 7, meanwhile, knot
It closes shown in a kind of method of construction software analogue data shown by embodiment two.
It is main in the present embodiment compared with the device 100 that embodiment three goes out to any of embodiment five embodiment
Difference is that in the present embodiment, the logic one (shown in the step S3 in ginseng embodiment one) run in the retrieval module 13 is right
In the interface IP address and interface configuration module 11 corresponding with user's request parsed be pre-configured with software interface be arranged into
Row retrieval (is directed toward the direction of interface configuration module 11) shown in ginseng four-headed arrow D, the software interface setting similarly configured if it exists
When, (the ginseng four-headed arrow D institute of analogue data corresponding to identical configuration software interface is directly called from interface configuration module 11
Show be directed toward logic one direction), and be sent to respond module 17(ginseng arrow E shown in), with by respond module to user 30 into
Row response;When the software interface setting similarly configured if it does not exist, the step S4 in embodiment one is executed.
The device 100 for constructing software analogue data shown by the present embodiment and phase in embodiment three and/or example IV
Technical solution with part please join described in embodiment three to embodiment five, and details are not described herein.
In several embodiments provided herein, disclosed it will be apparent to an ordinarily skilled person in the art that arriving
System, device and method may be implemented in other ways.For example, Installation practice described above is only to illustrate
Property, for example, the division of the module or unit, only a kind of logical function partition can have other in actual implementation
Division mode, such as multiple units or components can be combined or can be integrated into another system or some features can neglect
Slightly, it or does not execute.Another point, shown or discussed mutual coupling, direct-coupling or communication connection, which can be, to be passed through
The indirect coupling or communication connection of some interfaces, device or unit can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
The series of detailed descriptions listed above only for feasible embodiment of the invention specifically
Protection scope bright, that they are not intended to limit the invention, it is all without departing from equivalent implementations made by technical spirit of the present invention
Or change should all be included in the protection scope of the present invention.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie
In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims
Variation is included within the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.
In addition, it should be understood that although this specification is described in terms of embodiments, but not each embodiment is only wrapped
Containing an independent technical solution, this description of the specification is merely for the sake of clarity, and those skilled in the art should
It considers the specification as a whole, the technical solutions in the various embodiments may also be suitably combined, forms those skilled in the art
The other embodiments being understood that.
Claims (13)
1. a kind of method for constructing software analogue data, which is characterized in that the described method comprises the following steps:
S1, software interface setting is pre-configured in interface configuration module;
S2, Client-initiated request is received by extraction module, and be sent to retrieval module;
S3, it is parsed by retrieval module to from Client-initiated request, to parse the interface corresponding with user's request
Address;
S4, response parameter corresponding to interface IP address and parameter value are imported into data configuration module, the data configuration module pair
Whether it is that the judgement of rule function calls preconfigured software interface and when parameter value is rule function that parameter value executes
It is arranged and generates the analogue data corresponding with user's request;
S5, analogue data is written to data capsule, and analogue data is called from data capsule by respond module, to respond use
Family.
2. the method according to claim 1, wherein after step S5 is finished further include: calling clear up into
Journey, to clear up the analogue data retained in data capsule.
3. according to the method described in claim 2, it is characterized in that, the calling clean up process is controlled by respond module execution clearly
Reason.
4. the method according to claim 1, wherein the data configuration module is built-in by multiple rule function institutes
The rule function library of composition, and the introducting interface of addition manually or batch importing rule function is configured, the introducting interface is
RESTful API or SOAP.
5. method according to claim 1 to 4, which is characterized in that the data capsule is database, key-
It is worth storage system, calculates memory, JVM or file system;
The type of user's request is GET request, POST request, UPDATE request or DELETE request, and with the side HTTP
Formula initiates request or receives analogue data.
6. the method according to claim 1, wherein the step S3 further include:
The interface IP address corresponding with user's request parsed is set be pre-configured with software interface in interface configuration module
The step of being retrieved is set,
When the software interface setting similarly configured if it exists, identical configuration software interface is directly called from interface configuration module
Corresponding analogue data, and it is sent to respond module, to be responded by respond module to user;
When the software interface setting similarly configured if it does not exist, step S4 is executed.
7. a kind of device (100) for constructing software analogue data characterized by comprising
For the interface configuration module of pre-structured software interface,
Client-initiated request is parsed for responding the extraction module of user's request, and by retrieval module, with parsing
The interface IP address corresponding with user's request out,
Data configuration module, response parameter and parameter value corresponding to the interface IP address received from retrieval module typing, the number
According to constructing module to parameter value execute whether be rule function judgement, and when parameter value is rule function, calling is matched in advance
The software interface set is arranged and generates analogue data,
For receiving and saving the data capsule of analogue data, and
The respond module of analogue data is obtained, from data capsule to respond by the respond module to user.
8. the device of construction software analogue data according to claim 7, which is characterized in that in the data configuration module
The rule function library as composed by multiple rule functions is set, and configures the manual importing added or import rule function in batches and connects
Mouthful, the introducting interface is RESTful API or SOAP.
9. the device of construction software analogue data according to claim 7, which is characterized in that described device further include: by
The cleaning modul in respond module is controlled, the cleaning modul operation has clean up process, and responds in respond module to user
Later, data dump instruction is sent to cleaning modul, to execute the analogue data in data capsule clearly by cleaning modul
Reason operation.
10. constructing the device of software analogue data according to weighing and require 7, which is characterized in that the Client-initiated request
It is described jointly by interface IP address, request type, response parameter and response parameter value;The data capsule is database, key-value is deposited
Storage system calculates memory, JVM or file system;The Client-initiated request type be GET request, POST request,
UPDATE request or DELETE request.
11. the device of construction software analogue data according to claim 7, which is characterized in that described device further include: with
The software interface library that interface configuration module mutually accesses;Described device supports concurrent response model.
12. the device of construction software analogue data according to any one of claims 7 to 11, which is characterized in that described
The device of construction software analogue data is deployed in web server or cloud computing management platform.
13. the device of construction software analogue data according to claim 12, which is characterized in that the cloud computing management is flat
Platform OpenStack, CloudStack, VMware vCloud, Microsoft Azure Pack, OpenNebula or
Eucalyptus。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811265625.5A CN109460266A (en) | 2018-10-29 | 2018-10-29 | A kind of method and device constructing software analogue data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811265625.5A CN109460266A (en) | 2018-10-29 | 2018-10-29 | A kind of method and device constructing software analogue data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109460266A true CN109460266A (en) | 2019-03-12 |
Family
ID=65608660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811265625.5A Pending CN109460266A (en) | 2018-10-29 | 2018-10-29 | A kind of method and device constructing software analogue data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109460266A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020233369A1 (en) * | 2019-05-21 | 2020-11-26 | 深圳壹账通智能科技有限公司 | Method for improving software integration system on basis of simulated port, and related device |
CN112306881A (en) * | 2020-11-02 | 2021-02-02 | 平安普惠企业管理有限公司 | Simulation data generation method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104199725A (en) * | 2014-09-27 | 2014-12-10 | 上海瀚之友信息技术服务有限公司 | Service interface data simulation method and system |
CN106302747A (en) * | 2016-08-17 | 2017-01-04 | 北京乐美无限科技有限公司 | A kind of business cloud platform of Internet WEB front-end exploitation |
CN106648920A (en) * | 2016-09-29 | 2017-05-10 | 山东浪潮云服务信息科技有限公司 | Interface-based data communication method |
CN107247660A (en) * | 2017-05-05 | 2017-10-13 | 北京奇虎科技有限公司 | The method of testing and test device of a kind of interface |
CN107577590A (en) * | 2016-07-04 | 2018-01-12 | 北京奇虎科技有限公司 | Method and device based on database service real-time calling virtual interface |
-
2018
- 2018-10-29 CN CN201811265625.5A patent/CN109460266A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104199725A (en) * | 2014-09-27 | 2014-12-10 | 上海瀚之友信息技术服务有限公司 | Service interface data simulation method and system |
CN107577590A (en) * | 2016-07-04 | 2018-01-12 | 北京奇虎科技有限公司 | Method and device based on database service real-time calling virtual interface |
CN106302747A (en) * | 2016-08-17 | 2017-01-04 | 北京乐美无限科技有限公司 | A kind of business cloud platform of Internet WEB front-end exploitation |
CN106648920A (en) * | 2016-09-29 | 2017-05-10 | 山东浪潮云服务信息科技有限公司 | Interface-based data communication method |
CN107247660A (en) * | 2017-05-05 | 2017-10-13 | 北京奇虎科技有限公司 | The method of testing and test device of a kind of interface |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020233369A1 (en) * | 2019-05-21 | 2020-11-26 | 深圳壹账通智能科技有限公司 | Method for improving software integration system on basis of simulated port, and related device |
CN112306881A (en) * | 2020-11-02 | 2021-02-02 | 平安普惠企业管理有限公司 | Simulation data generation method, device, equipment and storage medium |
CN112306881B (en) * | 2020-11-02 | 2023-11-24 | 金联兴电子(深圳)有限公司 | Analog data generation method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10565086B2 (en) | Service modeling and virtualization | |
CN103927253B (en) | Multiple browser compatibility testing method and system | |
CN104572114B (en) | A kind of binding device, using updating device and method | |
CN110083455B (en) | Graph calculation processing method, graph calculation processing device, graph calculation processing medium and electronic equipment | |
US12028210B2 (en) | Production software application performance and resiliency testing | |
CN108647141A (en) | Automatic test approach, device, computer-readable medium and electronic equipment | |
US10866884B2 (en) | Stateless injected script debugging | |
CN109634718A (en) | The method and system of cloud platform creation mirror image | |
CN109324857B (en) | User guide implementation method, device and storage medium | |
CN107483521A (en) | A kind of information displaying method, apparatus and system | |
CN112988608B (en) | Data testing method and device, computer equipment and storage medium | |
US20210042196A1 (en) | Data Migration For A Shared Database | |
CN108600311A (en) | The method and device of client simulation interface data | |
CN106075911A (en) | A kind of generation method and device of the micro-end of web game | |
CN109460266A (en) | A kind of method and device constructing software analogue data | |
CN109739704A (en) | A kind of interface test method, server-side and computer readable storage medium | |
CN115437954A (en) | Interface automation test data separation method | |
CN113434173B (en) | Data processing method, device, storage medium and electronic equipment | |
CN109408322B (en) | A kind of automatic business process implementation method of cloud platform | |
CN110515514A (en) | A kind of data processing method, device and storage medium | |
CN114253823A (en) | Distributed test method and related equipment | |
CN112988600A (en) | Service scene testing method and device, electronic equipment and storage medium | |
AU2020221273B2 (en) | Stack-based communications systems and methods | |
CN111143193B (en) | Big data service testing method, system, terminal and storage medium based on RobotFramework | |
CN111221687B (en) | Cloud storage testing system and method |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190312 |
|
RJ01 | Rejection of invention patent application after publication |