CN106802865B - Response simulator and method for software test - Google Patents

Response simulator and method for software test Download PDF

Info

Publication number
CN106802865B
CN106802865B CN201710030740.3A CN201710030740A CN106802865B CN 106802865 B CN106802865 B CN 106802865B CN 201710030740 A CN201710030740 A CN 201710030740A CN 106802865 B CN106802865 B CN 106802865B
Authority
CN
China
Prior art keywords
message
reply
test
sent
receiving
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.)
Active
Application number
CN201710030740.3A
Other languages
Chinese (zh)
Other versions
CN106802865A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201710030740.3A priority Critical patent/CN106802865B/en
Publication of CN106802865A publication Critical patent/CN106802865A/en
Application granted granted Critical
Publication of CN106802865B publication Critical patent/CN106802865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

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)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of response simulator and method for software test, which includes: that adaptation module receives the test post that tested test system is sent;When the format of test post meets preset data form: test post is sent to simulation control module by adaptation module, receives replying message and being sent to tested test system for its return;When being unsatisfactory for: test post is converted into the first inside story according to preset data form and is sent to simulation control module by adaptation module;It will reply message and be converted into the second inside story and be sent to tested test system;Simulation control module is searched from preset case data table according to test post or the first inside story to be replied message accordingly;Case data table storage test post or the first inside story and the mapping relations for replying message collection.Development and maintenance cost can be reduced using apparatus of the present invention, the test of any scene can be covered, improves test coverage.

Description

Response simulator and method for software test
Technical field
The present invention relates to software performance test technical field, in particular to a kind of response simulator for software test And method.
Background technique
As the information system of the development of IT technology, telecommunications, the industries such as finance becomes increasingly complex, individual system is to other systems The dependency degree of system is higher and higher.The problem that the elevator belt that system external relies on complexity is: the survey for wherein individual system Examination need to build in advance it is numerous there is associated system therewith, otherwise, the test of this system is difficult to carry out.And coordinate all The cost and difficulty of dependence system are very high, especially coordinate the dependence test environment of outer company.Therefore, partially it is related to relying on system The test of system, which generally requires introducing testing tool, reduces cost.Existing major part testing tool, such as: LoadRunner, one As can only test to tested test system active transmission request scene.Message is issued to the system of dependence for tested test system, and The scene that dependence system replies message is received, lacks effective tool at present.The method generally used is for tested test system list Solely one simulation tool of exploitation, for receiving the message of tested test system, then according to the reply pair of the test cases scene of formulation The message answered.The tool is often referenced as baffle.Using baffle test returns scene the problem is that: existing method is for every The corresponding baffle of one tested system development, project is in implementation process, exploitation for system, and modification etc. is required to synchronize Maintenance test baffle is developed, the workload of project is increased;It is usually fixed disappear that baffle, which receives the message replied after message, Breath does not support generally tester (especially operational trials personnel) to define case.And during actual test, abnormal scene It tests extremely important.
Summary of the invention
The embodiment of the invention provides a kind of response simulator for software test, reduce exploitation and maintenance at This, may be implemented the case under any scene, cover the test of any scene, provide effectively guarantor to test coverage is improved Card.The device includes: adaptation module and simulation control module;
The adaptation module, the test post sent for receiving tested test system;
When the format of test post meets preset data form:
The adaptation module is used for: test post is sent to simulation control module;Receive what simulation control module returned It replies message, will reply message and be sent to tested test system;
When the format of test post is unsatisfactory for preset data form:
The adaptation module is used for: the test post is converted into the first inside story according to preset data form, it will First inside story is sent to simulation control module;Replying message for simulation control module return is received, progress will be replied message Format conversion, obtains the second inside story, the second inside story is sent to tested test system;
The simulation control module is used for: being looked into from preset case data table according to test post or the first inside story It looks for and replying message accordingly, and described reply message is back to adaptation module;
The case data table is used to store the mapping relations for receiving message and replying message collection;The reception message is to survey Try message or the first inside story;
The test post and the format of the second inside story are the tested acceptable message format of test system;Described first Inside story and the format replied message meet preset data form.
The embodiment of the invention also provides a kind of response analogy methods for software test, this method comprises:
Receive the test post that tested test system is sent;
When the format of test post meets preset data form:
It is searched from preset case data table according to test post and is replied message accordingly, and will replied message and be sent to Tested test system;
When the format of test post is unsatisfactory for preset data form:
The test post is converted into the first inside story according to preset data form, according to the first inside story from pre- If case data table in search and reply message accordingly, formatted replying message, obtain the second inside story, will Second inside story is sent to tested test system;
The case data table is used to store the mapping relations for receiving message and replying message collection;The reception message is to survey Try message or the first inside story;
The test post and the format of the second inside story are the tested acceptable message format of test system;Described first Inside story and the format replied message meet preset data form.
In embodiments of the present invention, the test post that tested test system is sent is received by adaptation module, works as test post Format when meeting preset data form: test post is sent to simulation control module by adaptation module;When the lattice of test post When formula is unsatisfactory for preset data form: the test post being converted into the first inside story according to preset data form, by One inside story is sent to simulation control module;Control module is simulated according to test post or the first inside story from preset case It searches in example tables of data and replies message accordingly, and described reply message is back to adaptation module, case data table is for depositing Storage receives message and replies message the mapping relations of collection;The reception message is test post or the first inside story.For new Tested test system, it is only necessary to corresponding adaptation module is developed according to the data format of tested test system, can be great Reduce the cost of exploitation and maintenance.Since case data table can be preset, the case under any scene can be realized, covering is appointed The test for scene of anticipating is effectively ensured to test coverage offer is improved.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of response simulator structural schematic diagram one for software test provided in an embodiment of the present invention;
Fig. 2 is a kind of case data table structure schematic diagram provided in an embodiment of the present invention;
Fig. 3 is a kind of tree structure schematic diagram for replying data provided in an embodiment of the present invention;
Fig. 4 is a kind of response simulator structural schematic diagram two for software test provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that the described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.Based on this Embodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative efforts Example is applied, shall fall within the protection scope of the present invention.
In embodiments of the present invention, a kind of response simulator for software test is provided, main purpose is basis Response of the case simulation dependence system of user configuration to tested test system.As shown in Figure 1, the device include: adaptation module and Simulate control module.
Wherein, adaptation module is used to receive the test post that tested test system is sent;
When the format of test post meets preset data form: test post is sent to simulation control mould by adaptation module Block;Replying message for simulation control module return is received, will reply message and be sent to tested test system;
When the format of test post is unsatisfactory for preset data form: adaptation module disappears test according to preset data form Breath is converted into the first inside story, and the first inside story is sent to simulation control module;Receive what simulation control module returned It replies message, is formatted replying message, obtain the second inside story, the second inside story is sent to tested system System;
Simulation control module is used to search phase from preset case data table according to test post or the first inside story That answers replies message, and described reply message is back to adaptation module.
Wherein, case data table is for storing reception message (test post or the first inside story) and replying message collection Mapping relations;Test post and the format of the second inside story are the tested acceptable message format of test system;Disappear inside first The format for ceasing and replying message meets preset data form.
When it is implemented, when the real messages format communicated between tested test system and its all dependence system is identical When, the test post that tested test system is sent directly is sent to simulation control module by adaptation module;When tested test system and its When the real messages format difference communicated between all dependence systems, adaptation module needs to be converted to test post tested The real messages communicated between system and dependence system, including message format transformation and communication Protocol Conversion simulate control module It is replied message according to case definition generation, adaptation module, which will reply message, is converted to real messages, and the format of real messages is quilt Real messages are sent to system under test (SUT) by the receptible data format of test macro, the communication protocol for reusing system under test (SUT).Mould Quasi- control module and adaptation module play the role of driving case to be separated with message adaptation, improves the versatility of device.
When it is implemented, case data table is to store to receive message and reply message according to the type of message for receiving message The mapping relations of collection.Specifically, case data table is a HASH table, case data table includes that index entry and index entry are corresponding Reply message collection;Wherein, index entry is the type for receiving message, and the content of case data table is to reply message collection, such as Fig. 2 institute Show.Reply message collection include the priority replied message, reply condition and some receive and all under type of message can reply Data are replied, collection is replied message and is defined as a Zhang Liebiao in the present invention, call case list in the following text.The structure of case list such as table Shown in 1:
Table 1
Priority Condition Reply data
1 Condition 1 Reply data 1
2 Condition 2 Reply data 2
。。。 。。。 。。。
n Condition n Reply data n
Wherein, a priority, a condition and a reply data are referred to as an element, and priority indicates the reply The priority of message;Condition indicates after receiving the type message, if to reply the message of corresponding data, the item that should meet Part.Such as: after receiving transfer request, replying successful condition of transferring accounts is reception behavior features XX bank.Replying data indicates this The content of part complex data next time.
Due to using baffle test returns scene there is a problem in that: under many scenes, many elements of returned data It to be filled according to the context of current scene.Such as: the former message serial number for replying message is needed according to the message for receiving message It number fills in;The serial number replied message will then be filled in generating new sequence.General plate washer does not often have such complicated function Energy.Therefore, institutional framework of the data of reply according to business factor, the data for having used tree structure tissue to be replied.Each The node of tree can be fixed value, be also possible to the expression formula of data.Fig. 3 is the tree structure schematic diagram for replying data.
When it is implemented, as shown in figure 4, adaptation module may include external communications units, Date Conversion Unit and first Intercom unit;Wherein, external communications units are used to receive the test post that tested test system is sent;When the lattice of test post When formula meets preset data form: external communications units are used to the test post being sent to the first internal communication list Member;Described reply message is sent to tested test system;When the format of test post is unsatisfactory for preset data form: outside is logical Letter unit is used to the test post being sent to the Date Conversion Unit;Second inside story is sent to tested System;Date Conversion Unit, for the test post to be converted into the first inside story according to preset data form;It will be described It replies message and formats, obtain the second inside story;First intercom unit is used for the test post or institute It states the first inside story and is sent to simulation control module;Receive replying message for the second intercom unit return.
Specifically, adaptation module is to carry out the interface module of data communication with tested test system.External communications units can be with Use communication mode (TCP/IP is direct-connected, http protocol or use MQ communication mode) reception/transmission data of tested test system; Date Conversion Unit be responsible for inside story and the conversion of tested System Data Format (such as: inside story and ISO8583 format Mutually conversion or inside story and ISO20022 format mutually convert);First intercom unit is then responsible for adaptation module With the data interaction between simulation control module.
In addition, the Date Conversion Unit in adaptation module is also used to: the identification type of message for receiving message is sent to First intercom unit;First intercom unit is also used to: the type of message for receiving message is sent to simulation control Molding block.Specifically, after Date Conversion Unit identifies the type of message for receiving message, by the after type of message write-in conversion In the corresponding field of one inside story.Following method standard can be used in the field:<node name="msgType"></node >。
When it is implemented, as shown in figure 4, simulation control module may include the second intercom unit, reply message life At unit and case data table.Wherein, the second intercom unit connects described in the transmission of the first intercom unit for receiving Receive the type of message and the reception message (test post or the first inside story) of message;Generation unit is replied message, is used for Case data table is accessed according to the type of message for receiving message, is searched from case data table accordingly according to message is received It replies message, and described reply message is back to adaptation module.
Specifically, the first intercom unit of adaptation module and the second intercom unit of simulation control module use Internal communication protocol connection.The present invention uses TCP unidirectionally long connection type interaction data.
The format simulating the first inside story between control module and adaptation module and replying message meets preset data XML (eXtensible Markup Language) format can be used in format, preset data form.Each data in case Element is defined as simple types node in inside story, and the title of " name " attribute labeling Data Elements, XML data can be used " value " in domain marks the value of the data.If some data is the set of multiple data elements, hereinafter referred to as structure, then use Compound type node indicate, by comprising data element be put under the node.
When it is implemented, it is described simulation control module in reply message generation unit searches as follows (or give birth to At) reply message:
The first inside story received is parsed according to XML format, converts data therein to the tree-like knot of Fig. 3 signal Structure.
According to conversion as a result, type of message is obtained from the reception message of tree structure, then according to reception message Type of message accesses the types index table of case data table, and acquisition is corresponding to reply message collection (namely described case column Table);
When the element number (could also say that and reply data amount check) in case list is 0, then the message is not returned It is multiple, i.e., it does not return and replies message;
When the reply data amount check for replying message concentration is 1, judge that the reception disappears according to the content for receiving message Whether breath meets corresponding message back condition, when meeting, then returns to the reply data and does not return back then when being unsatisfactory for Multiple message;
When the reply data amount check for replying message concentration is multiple, since the highest reply data of priority level, root Judge whether the reception message meets corresponding message back condition and then return when meeting one by one according to the content for receiving message Return corresponding reply data;Otherwise, continue to judge, until having traversed multiple reply data corresponding message back condition; When the corresponding message back condition of multiple reply data is not satisfied in the reception message, does not return and reply message.Or it will The last one node of case list is set as the reply case of default.
It obtains after replying data, scan data calculates the value of the expression formula of all data.For example, certain field mark needs The serial number of former message is filled in, then takes out the value of serial number from the serial number field of former message, is then filled up to the value On corresponding position.
The data for completing the tree structure after expression formula calculates are converted into replying message for XML format, and reply is disappeared Breath is sent to the second intercom unit of simulation control module.
When it is implemented, due to using baffle test returns scene there is a problem in that: baffle is general only passive to be returned Test data does not save test data, is unfavorable for analyzing test result.Therefore, the present invention is simulated for the response of software test Device further include: case database and user's operation module, as shown in Figure 4.Wherein, case database is for storing the reception It message and described replies message.Case database is also used to the case of preservation being converted to case data table structure.Case data Mainly complete the persistence of test cases and the persistence of test result data in library.User's operation module is exchanged with test user, It is main to complete test cases configuration, and the data of configuration are written in case database, while user can be checked by the module Test result, statistical test data.
When it is implemented, there is following difference in case data table and case database:
(1) case data table is internal storage structure, and case database is to the persistent storage for receiving message and replying message.
(2) case data table is that the mapping for receiving message and replying message collection is stored according to the type of message for receiving message Relationship, it is preferred that emphasis is mapping relations;
(3) for receiving message, case data table, which only stores, receives type of message, and non-reception message entity, reception disappear It ceases entity and storage is responsible for by case database.
(4) for replying message, case data table, which only stores, replys message template, and the message template is by simulation control dress After that sets replies message generation unit processing, generation replies message entity, this replies message entity and is responsible for by case database Persistent storage.
Used above, the group of the software and/or hardware of predetermined function may be implemented in term " unit " or " module " It closes.Although device described in above embodiments is preferably realized with software, the combination of hardware or software and hardware Realization be also that may and be contemplated.
Based on the same inventive concept, a kind of response simulation side for software test is additionally provided in the embodiment of the present invention Method, as described in the following examples.The principle solved the problems, such as due to the response analogy method for software test with for software The response simulator of test is similar, and the implementation for being accordingly used in the response analogy method of software test may refer to survey for software The implementation of the response simulator of examination, overlaps will not be repeated.
Response analogy method proposed by the present invention for software test includes:
Receive the test post that tested test system is sent;
When the format of test post meets preset data form:
It is searched from preset case data table according to test post and is replied message accordingly, and will replied message and be sent to Tested test system;
When the format of test post is unsatisfactory for preset data form:
The test post is converted into the first inside story according to preset data form, according to the first inside story from pre- If case data table in search and reply message accordingly, formatted replying message, obtain the second inside story, will Second inside story is sent to tested test system;
The case data table is used to store the mapping relations for receiving message and replying message collection;The reception message is to survey Try message or the first inside story;
The test post and the format of the second inside story are the tested acceptable message format of test system;Described first Inside story and the format replied message meet preset data form.
When it is implemented, the case data table stores reception message according to the type of message for receiving message and reply disappears Cease the mapping relations of collection;
After obtaining reception message, further includes:
Identify the type of message for receiving message;
Case data table is accessed according to the type of message for receiving message, according to the reception message from preset case It searches in tables of data and replies message accordingly.
When it is implemented, the case data table includes index entry and index entry is corresponding replies message collection;The index Item is the type for receiving message;The collection that replies message includes priority, reply condition and the corresponding reply replied message Data;
Case data table is accessed according to the type of message for receiving message, according to the reception message from preset case data It searches in table and replies message accordingly, comprising:
According to the types index table for the type of message access case data table for receiving message, corresponding reply message is obtained Collection;
When the reply data amount check for replying message concentration is 0, does not return and reply message;
When the reply data amount check for replying message concentration is 1, judge that the reception disappears according to the content for receiving message Whether breath meets corresponding message back condition, when meeting, then returns to the reply data and does not return back then when being unsatisfactory for Multiple message;
When the reply data amount check for replying message concentration is multiple, since the highest reply data of priority level, root Judge whether the reception message meets corresponding message back condition and then return when meeting one by one according to the content for receiving message Return corresponding reply data;Otherwise, continue to judge, until having traversed multiple reply data corresponding message back condition; When the corresponding message back condition of multiple reply data is not satisfied in the reception message, does not return and reply message.
In conclusion a kind of response simulator for software test proposed by the present invention, has the following beneficial effects:
(1) response simulator of the invention is a kind of universal architecture.For new tested test system, it is only necessary to exploitation pair The adaptation module answered can be significantly reduced the cost of exploitation and maintenance.In the development process of tested test system, rely on If the communication data format and communication protocol of system do not change, adaptation module of the invention can be remained unchanged.
(2) method that the present invention is combined using rule and expression formula, can be realized the case under any scene, and covering is appointed The test of what scene is effectively ensured to test coverage offer is improved.
(3) the case data table in simulation control module of the invention use HASH table structure, with type of message as The index of HASH table, can be quickly found out that this kind of message is corresponding to reply message collection.Reply data in case data table save The expression of whole nodes can be completed in this way, doing primary traversal to reply data tree when generating and replying data for tree structure Formula calculates.The first inside story after the test post received simultaneously or conversion is also indicated using tree structure, in calculating process It is capable of the respective value of quick obtaining reception message, can quickly generates and reply message under complex scene, improve operational efficiency, Therefore present invention can apply to the performance tests under complex scene.
(4) correlated results of test data is persisted in case database by the present invention, is supplied to user and is done test point Analysis, provides effective foundation for customer analysis problem.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the embodiment of the present invention can have various modifications and variations.All within the spirits and principles of the present invention, made Any modification, equivalent substitution, improvement and etc. should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of response simulator for software test characterized by comprising adaptation module and simulation control module;
The adaptation module, the test post sent for receiving tested test system;
When the format of test post meets preset data form:
The adaptation module is used for: test post is sent to simulation control module;Receive the reply that simulation control module returns Message will reply message and be sent to tested test system;
When the format of test post is unsatisfactory for preset data form:
The adaptation module is used for: the test post being converted into the first inside story according to preset data form, by first Inside story is sent to simulation control module;Replying message for simulation control module return is received, carry out format will be replied message Conversion obtains the second inside story, the second inside story is sent to tested test system;
The simulation control module is used for: searching phase from preset case data table according to test post or the first inside story That answers replies message, and described reply message is back to adaptation module;
The case data table is used to store the mapping relations for receiving message and replying message collection;The reception message is that test disappears Breath or the first inside story;
The test post and the format of the second inside story are the tested acceptable message format of test system;Inside described first Message and the format replied message meet preset data form.
2. being used for the response simulator of software test as described in claim 1, which is characterized in that the case data table is pressed The mapping relations for receiving message and replying message collection are stored according to the type of message for receiving message;
The adaptation module is also used to: identification receives the type of message of message;
The simulation control module is also used to: case data table is accessed according to the type of message for receiving message, according to the reception Message is searched from preset case data table and is replied message accordingly.
3. being used for the response simulator of software test as claimed in claim 2, which is characterized in that the case data table packet It includes index entry and index entry is corresponding replies message collection;The index entry is the type for receiving message;It is described to reply message Ji Bao Include the priority replied message, reply condition and corresponding reply data;
The simulation control module is specifically used for:
According to the types index table for the type of message access case data table for receiving message, acquisition is corresponding to reply message collection;
When the reply data amount check for replying message concentration is 0, does not return and reply message;
When the reply data amount check for replying message concentration is 1, judge that the reception message is according to the content for receiving message It is no to meet corresponding message back condition, when meeting, then the reply data are returned to, when being unsatisfactory for, does not then return to reply and disappear Breath;
When the reply data amount check for replying message concentration is multiple, since the highest reply data of priority level, according to connecing The content for receiving message judges whether the reception message meets corresponding message back condition and then return to phase when meeting one by one The reply data answered;Otherwise, continue to judge, until having traversed multiple reply data corresponding message back condition;Work as institute It states when receiving message the corresponding message back condition of multiple reply data is not satisfied, does not return and reply message.
4. being used for the response simulator of software test as claimed in claim 2, which is characterized in that the adaptation module includes External communications units, Date Conversion Unit and the first intercom unit;
The external communications units, the test post sent for receiving tested test system;
When the format of test post meets preset data form:
The external communications units are used for: the test post is sent to first intercom unit;By the reply Message is sent to tested test system;
When the format of test post is unsatisfactory for preset data form:
The external communications units are used for: the test post is sent to the Date Conversion Unit;Inside described second Message is sent to tested test system;
The Date Conversion Unit, for the test post to be converted into the first inside story according to preset data form;It will Described reply message formats, and obtains the second inside story;
First intercom unit, for the test post or first inside story to be sent to simulation control mould Block;Receive replying message for the second intercom unit return;
The Date Conversion Unit is also used to: the identification type of message for receiving message is sent to the first intercom unit;
First intercom unit is also used to: the type of message for receiving message is sent to simulation control module;
The simulation control module includes the second intercom unit, replies message generation unit and case data table;
Second intercom unit, the type of message of the reception message for receiving the transmission of the first intercom unit With the reception message;
It is described to reply message generation unit, for accessing case data table according to the type of message for receiving message, according to connecing Receipts message is searched from case data table to be replied message accordingly, and described reply message is back to adaptation module.
5. being used for the response simulator of software test as described in claim 1, which is characterized in that further include:
Case database, for storing the reception message and described replying message.
6. being used for the response simulator of software test as claimed in claim 5, which is characterized in that further include:
User's operation module, for configuring case data table;It checks and counts and receive message and reply message.
7. being used for the response simulator of software test as described in claim 1, which is characterized in that first inside story XML format is used with the format replied message.
8. a kind of response analogy method for software test characterized by comprising
Receive the test post that tested test system is sent;
When the format of test post meets preset data form:
Searched from preset case data table according to test post and replied message accordingly, and will reply message be sent to it is tested Test system;
When the format of test post is unsatisfactory for preset data form:
The test post is converted into the first inside story according to preset data form, according to the first inside story from preset It searches in case data table and replies message accordingly, formatted replying message, the second inside story is obtained, by second Inside story is sent to tested test system;
The case data table is used to store the mapping relations for receiving message and replying message collection;The reception message is that test disappears Breath or the first inside story;
The test post and the format of the second inside story are the tested acceptable message format of test system;Inside described first Message and the format replied message meet preset data form.
9. being used for the response analogy method of software test as claimed in claim 8, which is characterized in that the case data table is pressed The mapping relations for receiving message and replying message collection are stored according to the type of message for receiving message;
After obtaining reception message, further includes:
Identify the type of message for receiving message;
Case data table is accessed according to the type of message for receiving message, according to the reception message from preset case data It searches in table and replies message accordingly.
10. being used for the response analogy method of software test as claimed in claim 9, which is characterized in that the case data table Collection is replied message including index entry and index entry are corresponding;The index entry is the type for receiving message;It is described to reply message collection Including the priority, reply condition and corresponding reply data replied message;
Case data table is accessed according to the type of message for receiving message, according to the reception message from preset case data table Lookup replies message accordingly, comprising:
According to the types index table for the type of message access case data table for receiving message, acquisition is corresponding to reply message collection;
When the reply data amount check for replying message concentration is 0, does not return and reply message;
When the reply data amount check for replying message concentration is 1, judge that the reception message is according to the content for receiving message It is no to meet corresponding message back condition, when meeting, then the reply data are returned to, when being unsatisfactory for, does not then return to reply and disappear Breath;
When the reply data amount check for replying message concentration is multiple, since the highest reply data of priority level, according to connecing The content for receiving message judges whether the reception message meets corresponding message back condition and then return to phase when meeting one by one The reply data answered;Otherwise, continue to judge, until having traversed multiple reply data corresponding message back condition;Work as institute It states when receiving message the corresponding message back condition of multiple reply data is not satisfied, does not return and reply message.
CN201710030740.3A 2017-01-17 2017-01-17 Response simulator and method for software test Active CN106802865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710030740.3A CN106802865B (en) 2017-01-17 2017-01-17 Response simulator and method for software test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710030740.3A CN106802865B (en) 2017-01-17 2017-01-17 Response simulator and method for software test

Publications (2)

Publication Number Publication Date
CN106802865A CN106802865A (en) 2017-06-06
CN106802865B true CN106802865B (en) 2019-10-11

Family

ID=58985537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710030740.3A Active CN106802865B (en) 2017-01-17 2017-01-17 Response simulator and method for software test

Country Status (1)

Country Link
CN (1) CN106802865B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302476B (en) * 2017-08-04 2021-07-09 上海爱数信息技术股份有限公司 Automatic testing method and system for testing asynchronous interactive system
CN110162464A (en) * 2019-04-19 2019-08-23 平安普惠企业管理有限公司 Mcok test method and system, electronic equipment and readable storage medium storing program for executing
CN111427796A (en) * 2020-04-12 2020-07-17 中信银行股份有限公司 System testing method and device and electronic equipment
CN115437913A (en) * 2021-12-23 2022-12-06 北京罗克维尔斯科技有限公司 Software in-loop testing method, device, system and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001075553A2 (en) * 2000-04-04 2001-10-11 Digital Site Systems, Inc. Vertically integrated construction business
CN101360092A (en) * 2007-07-30 2009-02-04 国际商业机器公司 Automatic information collecting method and system in message transmission system
CN101923688A (en) * 2009-06-16 2010-12-22 上海上大吉柴电子信息技术有限公司 Hotel guest room electronic convenient information system control method
CN105610680A (en) * 2015-10-13 2016-05-25 广西中烟工业有限责任公司 Multi-account WeChat management system based on cigarette after-sale service evaluation system
CN105808501A (en) * 2016-03-09 2016-07-27 北京众星智联科技有限责任公司 Implementation of artificial intelligence learning
CN105869094A (en) * 2016-03-21 2016-08-17 腾讯科技(深圳)有限公司 Medical consultation system, method and device

Also Published As

Publication number Publication date
CN106802865A (en) 2017-06-06

Similar Documents

Publication Publication Date Title
CN106802865B (en) Response simulator and method for software test
CN109302522A (en) Test method, device and computer system and medium
US7996818B1 (en) Method for testing using client specified references
CN108092854B (en) Test method and device for train-level Ethernet equipment based on IEC61375 protocol
CN108270640B (en) Information interoperation consistency test method for intelligent marketing and distribution information integration system
CN112631932A (en) Sub-function independent test method of automatic train monitoring system based on interface
CN113342583B (en) Chip verification system, method, device, equipment and storage medium
CN106487603A (en) A kind of response test method and device
CN110413465A (en) A kind of consistency on messaging test method, system and authentication server based on information interactive bus
CN110532779A (en) A kind of method, apparatus of Hole Detection, terminal and storage medium
CN106681867A (en) Testing method and device
CN109977012A (en) Joint debugging test method, device, equipment and the computer readable storage medium of system
CN102291274A (en) System and method for realizing automatic adaptation of network testing instrument
CN110019444B (en) Operation request processing method, device, equipment and system
CN116955097A (en) Test flow display method and device and test flow display system
CN110377588A (en) A kind of database object access monitoring method, server and terminal
CN109032947A (en) For the test method of operating system, device, equipment and storage medium
CN108173948A (en) A kind of Distributed Experiment data real-time exchange method
CN111526028B (en) Data processing method, device and equipment
CN103023740B (en) A kind of information interactive bus system and electric data transmission method
CN110058995A (en) A kind of the data library test method and system of the interference of avoidable type of database
CN106301833A (en) A kind of transformer station schedule information method of testing
CN115833964A (en) Performance test method and performance test system of dual-mode communication module
CN112799956B (en) Asset identification capability test method, device and system device
CN109614230A (en) Resource virtualizing method, apparatus and electronic equipment

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