CN106250315A - A kind of automatic imitation request-reply system and method for configurableization - Google Patents
A kind of automatic imitation request-reply system and method for configurableization Download PDFInfo
- Publication number
- CN106250315A CN106250315A CN201610634705.8A CN201610634705A CN106250315A CN 106250315 A CN106250315 A CN 106250315A CN 201610634705 A CN201610634705 A CN 201610634705A CN 106250315 A CN106250315 A CN 106250315A
- Authority
- CN
- China
- Prior art keywords
- solicited message
- request
- response
- client
- analysis 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
- 238000000034 method Methods 0.000 title claims abstract description 22
- 230000004044 response Effects 0.000 claims abstract description 58
- 230000008878 coupling Effects 0.000 claims description 21
- 238000010168 coupling process Methods 0.000 claims description 21
- 238000005859 coupling reaction Methods 0.000 claims description 21
- 230000005540 biological transmission Effects 0.000 claims description 4
- 235000013399 edible fruits Nutrition 0.000 claims 1
- 230000007613 environmental effect Effects 0.000 abstract description 4
- 238000004088 simulation Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses the automatic imitation request-reply system and method for a kind of configurableization, set up automatic imitation request-reply system by client, request analysis module and configuration module.Set response logic, response parameter;User is filed a request by client;Solicited message is resolved;According to the response logic set, the requested content after resolving is carried out logical judgment, corresponding judged result is back to client;The final automatic imitation request response method realizing configurableization.The present invention is that simulation based on network service request returns pattern, Auto-matching response when realizing asking by user's autonomous configuration, the different requests achieving user can obtain different response messages, solve the problem that tradition mock instrument answer-mode is single, achieve the variation of mock instrument answer-mode, and avoid the appearance of the problems such as environmental disorder.
Description
Technical field
The present invention relates to data processing field, be specifically related to automatic imitation request-reply system and the side of a kind of configurableization
Method.
Background technology
Along with software system becomes increasingly complex, most enterprises all uses service-oriented architectural framework to come between reduction system
The degree of coupling, improve serviced component reusability.But, in exploitation and test process, build outside service systems, with outward
Portion's service system joint debugging, the test data preparing to service are it is possible to bottleneck can be become, and may need many individual's cooperations, seriously
Waste of manpower.In the actual working environment carrying out close beta and exploitation, traditional mock system (a kind of simulation test system
System) function singleness, exist and use restriction greatly;Such as: the no matter number of number of users, the demand of each user, mock system
System all can only return a fixing mock response;When any user revises mock response, all influence whether making of other users
With, thus cause environmental disorder.
Summary of the invention
It is an object of the invention to the problem single in order to solve tradition mock instrument answer-mode, it is achieved that mock instrument
Answer-mode variation, and avoid the appearance of the problems such as environmental disorder;The automatic imitation request providing a kind of configurableization should
Answer system and method.
In order to achieve the above object, the present invention is achieved through the following technical solutions:
A kind of automatic imitation request response method of configurableization, described method comprises:
Response logic, response parameter is set for multiple solicited messages;
Client obtains a solicited message;
The transmission of described solicited message is resolved to request analysis module;
Request analysis module carries out logic according to the response logic set to the content of described solicited message after resolving and sentences
Disconnected, corresponding judged result is back to described client.
It is preferred that comprise in the step setting response logic, response parameter for multiple solicited messages:
According to the Service name in each described solicited message, interface name, set described solicited message right the need of arranging
The analog answer information answered;
When needed, the analog answer information of coupling is set for described solicited message;
When not needed, according to the Service name of described solicited message, it is judged that described solicited message is the need of arranging acquiescence
Response message;
When needed, default replies information is set for described solicited message.
It is preferred that carry out, in the step resolved, comprising the steps of by described solicited message in described request analysis module:
Described request analysis module resolves described solicited message, obtains the Service name in described solicited message, interface name.
It is preferred that described request analysis module according to the response logic set to resolve described solicited message content
Carry out logical judgment, corresponding judged result be back in the step of described client, comprise the steps of:
According to Service name corresponding to described solicited message, interface name, described solicited message is simulated response message
Matching operation;
When finding the analog answer information of coupling, send described analog answer information to described client, terminate;
When not finding the analog answer information of coupling, search whether existence according to the Service name of described solicited message
The default replies information joined;
When finding the described default replies information of coupling, send described default replies information, knot to described client
Bundle;
When described request analysis module does not finds the default replies information of coupling, call the reality of described solicited message
Request address of service also sends it to described client.
A kind of automatic imitation request-reply system of configurableization, described system comprises:
Client, described client obtains solicited message;
Configuration module, is connected with described request analysis module;Described configuration module settings response logic, response parameter;
Request analysis module, is connected with described client, obtains and resolve the described solicited message that described client sends
After;Setting according to described configuration module carries out response logical judgment and returns judged result to described client.
On the basis of meeting common sense in the field, above-mentioned each optimum condition, can combination in any, obtain each preferable reality of the present invention
Example.
The most progressive effect of the present invention is:
The automatic imitation request-reply system and method for a kind of configurableization disclosed by the invention, by client, request
Parsing module and configuration module set up automatic imitation request-reply system.Utilize configuration module settings response logic, response parameter;
User is filed a request by client;Request analysis module obtains the solicited message of user, and this solicited message is resolved
After;Request analysis module carries out logical judgment, by correspondence according to the response logic set to the requested content after resolving
Judged result be back to client;The final automatic imitation request response method realizing configurableization.The present invention is based on net
The simulation of network service request returns pattern, and concrete technique effect is as follows: automatic when 1, realizing asking by user's autonomous configuration
Coupling response, it is achieved that the different requests of user can obtain different response messages;2, tradition mock instrument response mould is solved
The problem that formula is single, it is achieved that mock instrument answer-mode variation;3, the appearance of the problems such as environmental disorder is avoided.
Accompanying drawing explanation
Fig. 1 is the overall structure schematic diagram of the automatic imitation request-reply system of a kind of configurableization of the present invention.
Fig. 2 is the overall flow schematic diagram of the automatic imitation request response method of a kind of configurableization of the present invention.
Fig. 3 is the embodiment schematic flow sheet of the automatic imitation request response method of a kind of configurableization of the present invention.
Detailed description of the invention
Further illustrate the present invention below by the mode of embodiment, but the most therefore limit the present invention to described reality
Execute among example scope.
Below in conjunction with accompanying drawing, by describing a preferably specific embodiment in detail, the present invention is further elaborated.
As it is shown in figure 1, the automatic imitation request-reply system of a kind of configurableization, this system comprises: client 1, request
Parsing module 2 and configuration module 3.Wherein, request analysis module 2 is connected with client 1, configuration module 3 respectively.
In the present invention, configuration module 3 sets response logic, response parameter.
In the present invention, solicited message is inputted to client 1 by user;Request analysis module 2 obtains and resolves client 1
After the solicited message sent, carry out response logical judgment according to the setting of configuration module 3 and return judged result to client 1.
In the present embodiment, when configuration module 3 arranges following response logic: according to Service name, interface name in solicited message, sentence
This solicited message disconnected is the need of the analog answer parameter of configuration correspondence.
When needed, configuration module 3 arranges the analog answer information of coupling for this solicited message.When not needed, configuration
Module 3 arranges following response logic: according to the Service name of this solicited message, it is judged that this solicited message should the need of allocating default
Answer information.
When needed, configuration module 3 arranges default replies information for this solicited message.
As in figure 2 it is shown, the automatic imitation request response method of a kind of configurableization, the method comprises:
S1, sets response logic, response parameter for multiple solicited messages.This step specifically comprises the steps of:
According to Service name, interface name in solicited message, configuration module 3 judges that this solicited message is the need of arranging correspondence
Analog answer information.
In the present embodiment, configuration module 3 according to the Service name in solicited message, that interface name mates this solicited message is corresponding
Request message, and judge whether this request message exists corresponding keyword, these keywords are the most right with in configuration module 3
Service name, the request message keyword of interface name coupling answered are consistent.When consistent, demonstrate the need for the analog answer of configurations match
Information;When inconsistent, configuration module 3 judges that this solicited message is the need of arranging default replies information.
When needed, configuration module 3 arranges the analog answer information of coupling for this solicited message.
When not needed, according to the Service name of this solicited message, configuration module 3 judges that this solicited message is the need of setting
Default replies information.
When needed, configuration module 3 arranges default replies information for this solicited message.
In the present embodiment, judge that this solicited message is without configuration when the Service name according to arbitrary solicited message configures module 3
During default replies information, request analysis module 2 calls the actual request address of service of this solicited message.
S2, client 1 obtains solicited message.
In the present embodiment, solicited message is inputted to client 1 by user, and the solicited message that user inputs is turned by client 1
Turn to ask URL (URL).
S3, resolves solicited message transmission to request analysis module 2.This step is specific as follows:
The solicited message of user is resolved by request analysis module 2 by client 1, obtains the clothes in this solicited message
Business name, interface name, and the Service name in this solicited message, interface name are sent to configuration module 3.
In the present embodiment, request analysis module 2 obtains request URL, and this request URL is resolved to include Service name,
Interface name, the solicited message of request message.
S4, request analysis module 2 carries out logic according to the response logic set to the requested content after resolving and sentences
Disconnected, corresponding judged result is back to client 1.This step specifically comprises the steps of:
Request analysis module 2 obtains Service name corresponding to solicited message, interface name, and carries out this solicited message is carried out mould
Intend the matching operation of response parameter.
When finding the analog answer information of coupling in configuring module 3, request analysis module 2 sends to client 1
This analog answer information, terminates.
When not finding the analog answer information of coupling in configuring module 3, request analysis module 2 is believed according to this request
The Service name of breath searches whether to there is corresponding default replies information.
When request analysis module 2 finds the default replies information of coupling in configuring module 3, this request analysis module
2 send, to client 1, this default replies information that configuration module 3 has set, terminate.
When request analysis module 2 does not finds the default replies information of this coupling, this request analysis module 2 calls this please
Ask the actual request address of service of information and send it to client 1.
As it is shown on figure 3, the specific embodiment of the automatic imitation request response method of a kind of configurableization disclosed by the invention
As follows:
A1, client 1 obtains the solicited message of user, and is translated into mock request transmission to request analysis module 2;
This mock request is resolved by request analysis module 2, obtains Service name, interface name and request message in this mock request.
A2, according to the Service name in the mock request that request analysis module 2 sends, interface name, request analysis module 2 basis
Arranging of configuration module 3 judges whether this mock request exists matched configuration mock response.When it is present, step is performed
A3;In the presence of not, jump to step A4.
A3, the configuration mock response mated with this mock request is sent to client 1, terminates by request analysis module 2.
A4, according to the Service name in the mock request that request analysis module 2 sends, request analysis module 2 judges this mock
Whether request exists matched acquiescence mock response.When it is present, step A5 is performed;In the presence of not, perform step A6.
A5, the acquiescence mock response mated with this mock request is sent to client 1, terminates by request analysis module 2.
A6, request analysis module 2 is called the actual request address of service of this mock request and sends it to client 1.
Although the foregoing describing the detailed description of the invention of the present invention, it will be appreciated by those of skill in the art that these
Being merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back
On the premise of the principle and essence of the present invention, these embodiments can be made various changes or modifications, but these change
Protection scope of the present invention is each fallen within amendment.
Claims (5)
1. the automatic imitation request response method of configurableization, it is characterised in that described method comprises:
Response logic, response parameter is set for multiple solicited messages;
Client obtains a solicited message;
The transmission of described solicited message is resolved to request analysis module;
Request analysis module carries out logical judgment according to the response logic set to the content of described solicited message after resolving, will
Corresponding judged result is back to described client.
2. the automatic imitation request response method of configurableization as claimed in claim 1, it is characterised in that for multiple requests
Information setting response logic, response parameter step in comprise:
According to the Service name in each described solicited message, interface name, set described solicited message the need of arranging correspondence
Analog answer information;
When needed, the analog answer information of coupling is set for described solicited message;
When not needed, according to the Service name of described solicited message, it is judged that described solicited message is the need of arranging default replies
Information;
When needed, default replies information is set for described solicited message.
3. the automatic imitation request response method of configurableization as claimed in claim 1, it is characterised in that please solve described
Described solicited message is carried out, in the step resolved, comprising the steps of by analysis module:
Described request analysis module resolves described solicited message, obtains the Service name in described solicited message, interface name.
4. the automatic imitation request response method of configurableization as claimed in claim 2, it is characterised in that please solve described
Analysis module carries out logical judgment according to the response logic set to the content resolving described solicited message, by corresponding judgement knot
Fruit is back in the step of described client, comprises the steps of:
According to Service name corresponding to described solicited message, interface name, described solicited message is simulated the coupling of response message
Operation;
When finding the analog answer information of coupling, send described analog answer information to described client, terminate;
When not finding the analog answer information of coupling, search whether to there is coupling according to the Service name of described solicited message
Default replies information;
When finding the described default replies information of coupling, send described default replies information to described client, terminate;
When described request analysis module does not finds the default replies information of coupling, call the actual request of described solicited message
Address of service also sends it to described client.
5. the automatic imitation request-reply system of configurableization, it is characterised in that described system comprises:
Client, described client obtains solicited message;
Configuration module, is connected with described request analysis module;Described configuration module settings response logic, response parameter;
Request analysis module, is connected with described client, after obtaining and resolve the described solicited message that described client sends;Root
Carry out response logical judgment according to the setting of described configuration module and return judged result to described client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610634705.8A CN106250315A (en) | 2016-08-04 | 2016-08-04 | A kind of automatic imitation request-reply system and method for configurableization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610634705.8A CN106250315A (en) | 2016-08-04 | 2016-08-04 | A kind of automatic imitation request-reply system and method for configurableization |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106250315A true CN106250315A (en) | 2016-12-21 |
Family
ID=58079258
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610634705.8A Pending CN106250315A (en) | 2016-08-04 | 2016-08-04 | A kind of automatic imitation request-reply system and method for configurableization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106250315A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107807841A (en) * | 2017-10-18 | 2018-03-16 | 中国平安人寿保险股份有限公司 | Server analogy method, device, equipment and readable storage medium storing program for executing |
CN108199921A (en) * | 2017-12-29 | 2018-06-22 | 上海瑞家信息技术有限公司 | The method, apparatus and storage medium of a kind of simulation test |
CN108563567A (en) * | 2018-04-09 | 2018-09-21 | 平安普惠企业管理有限公司 | Automated testing method, device, equipment and computer readable storage medium |
CN115473837A (en) * | 2022-02-22 | 2022-12-13 | 北京广利核系统工程有限公司 | Communication testing tool capable of configuring protocol and communication testing method based on same |
CN115484227A (en) * | 2022-08-31 | 2022-12-16 | 湖南锐思华创科技有限公司 | HUD automatic adaptation method, system and device and vehicle |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101557144A (en) * | 2009-05-31 | 2009-10-14 | 无锡宏泰风力电机股份有限公司 | Carbon powder collecting device for wind-driven generator |
CN103442256A (en) * | 2013-08-30 | 2013-12-11 | Tcl集团股份有限公司 | Electronic program menu implementation method and system based on HTML5 |
CN105099801A (en) * | 2014-05-07 | 2015-11-25 | 中国电信股份有限公司 | Testing system for information management system, and testing environment simulation method |
-
2016
- 2016-08-04 CN CN201610634705.8A patent/CN106250315A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101557144A (en) * | 2009-05-31 | 2009-10-14 | 无锡宏泰风力电机股份有限公司 | Carbon powder collecting device for wind-driven generator |
CN103442256A (en) * | 2013-08-30 | 2013-12-11 | Tcl集团股份有限公司 | Electronic program menu implementation method and system based on HTML5 |
CN105099801A (en) * | 2014-05-07 | 2015-11-25 | 中国电信股份有限公司 | Testing system for information management system, and testing environment simulation method |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107807841A (en) * | 2017-10-18 | 2018-03-16 | 中国平安人寿保险股份有限公司 | Server analogy method, device, equipment and readable storage medium storing program for executing |
CN107807841B (en) * | 2017-10-18 | 2020-10-09 | 中国平安人寿保险股份有限公司 | Server simulation method, device, equipment and readable storage medium |
CN108199921A (en) * | 2017-12-29 | 2018-06-22 | 上海瑞家信息技术有限公司 | The method, apparatus and storage medium of a kind of simulation test |
CN108563567A (en) * | 2018-04-09 | 2018-09-21 | 平安普惠企业管理有限公司 | Automated testing method, device, equipment and computer readable storage medium |
CN115473837A (en) * | 2022-02-22 | 2022-12-13 | 北京广利核系统工程有限公司 | Communication testing tool capable of configuring protocol and communication testing method based on same |
CN115473837B (en) * | 2022-02-22 | 2024-03-22 | 北京广利核系统工程有限公司 | Communication test tool capable of configuring protocol and communication test method based on communication test tool |
CN115484227A (en) * | 2022-08-31 | 2022-12-16 | 湖南锐思华创科技有限公司 | HUD automatic adaptation method, system and device and vehicle |
CN115484227B (en) * | 2022-08-31 | 2024-03-08 | 湖南锐思华创科技有限公司 | HUD automatic adaptation method, HUD automatic adaptation system, HUD automatic adaptation device and vehicle |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106250315A (en) | A kind of automatic imitation request-reply system and method for configurableization | |
CN103401909B (en) | Data interactive method based on BS and system, client and server | |
CN110785970B (en) | Techniques to automate robotic creation of web pages | |
CN100426750C (en) | Method for generating two set of network administration systems | |
CN105871690A (en) | Instant messaging realization method and device | |
CN101626383A (en) | Route test method of aeronautical telecommunication network and router virtual machine | |
CA2915620A1 (en) | Method and apparatus for code virtualization and remote process call generation | |
CN107122224A (en) | A kind of data transmission method, virtual machine and host | |
CN103534988A (en) | Publish and subscribe messaging method and apparatus | |
CN111522727B (en) | Simulation object test method, device and system | |
CN110069248A (en) | Call method, device, equipment and the computer readable storage medium of interface data | |
CN102622262A (en) | Distributed real-time interactive simulation system based on modelica modeling language | |
CN102609409A (en) | Online translation method, device, system and server | |
KR20210138095A (en) | Systems and methods for a virtual agent in a cloud computing environment | |
CN107092559A (en) | Test platform middleware, test system and method based on Jmeter | |
CN113256095B (en) | Draggable configuration agile flow service construction method, system, equipment and medium | |
CN103927167A (en) | Functional-granularity highly-customizable system integration method | |
CN103248654B (en) | The machinery of consultation of virtual desktop serve parameter, apparatus and system | |
Sanchez et al. | Bigraphical modelling of architectural patterns | |
CN109684148A (en) | A kind of airborne embedded software virtual bus communication construction method based on ARINC653 | |
CN102594685A (en) | Communication method between ECUs (Electronic Control Units) based on message forwarding | |
US11227025B2 (en) | Device augmentation of real time communications | |
Hinze et al. | Interaction design for a mobile context-aware system using discrete event modelling | |
CN106789449A (en) | A kind of CAN exploitation and method of testing and system | |
CN109298956A (en) | Document transmission method, device and terminal device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161221 |