CN109510735A - A kind of method and device of message test - Google Patents

A kind of method and device of message test Download PDF

Info

Publication number
CN109510735A
CN109510735A CN201811432593.3A CN201811432593A CN109510735A CN 109510735 A CN109510735 A CN 109510735A CN 201811432593 A CN201811432593 A CN 201811432593A CN 109510735 A CN109510735 A CN 109510735A
Authority
CN
China
Prior art keywords
message
specified
test
document
parsed
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
Application number
CN201811432593.3A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811432593.3A priority Critical patent/CN109510735A/en
Publication of CN109510735A publication Critical patent/CN109510735A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Environmental & Geological Engineering (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of methods of message test, comprising: the message of interaction under true environment is intercepted and captured according to specified communication protocol;The message of the interaction is parsed, the message parsed is saved as into specified document;Using the specified document as fictitious assets, test request message (TRM) is inputted into the fictitious assets to obtain test response.Also disclose a kind of device of message test.The scheme of the embodiment of the present invention improves traditional baffle making pattern, integrates multi-protocols, it can be achieved that cross-platform deployment;It allows the assets for being not easy to obtain easily to obtain simulated environment, easily simulates, the scene of true environment not Easy Test.

Description

A kind of method and device of message test
Technical field
The present invention relates to cloud computing technology, espespecially a kind of method and device of message test.
Background technique
Current Project design is increasingly complicated, frequently couples between system, and project is because of the association of some or multiple resources Tune problem causes research and development or testing progress very slowly even to be stagnated;Heavy assets (such as server, the physics such as interchanger money Produce) become that supply falls short of demand in development phase, this causes problem constantly to be accumulated toward the project later period, often leads to face online one liang of week The outburst of problem blowout, at present research and development or tester manufacture the modes such as baffle and carry out meet demand often through ' piling ', but This mode is often inefficient, and sustainability is low.
Summary of the invention
In order to solve the above-mentioned technical problems, the present invention provides a kind of method and devices of message test, can quickly take Black-box Testing scene needed for building project simulates the respondent behavior of heavy assets or unknown assets.
In order to reach the object of the invention, the present invention provides a kind of methods of message test, comprising:
The message of interaction under true environment is intercepted and captured according to specified communication protocol;
The message of the interaction is parsed, the message parsed is saved as into specified document;
Using the specified document as fictitious assets, test request message (TRM) is inputted into the fictitious assets to obtain test and ring It answers.
Further, the specified communication protocol includes: socket, hypertext transfer protocol, Simple Network Management Protocol.
Further, the specified document includes following format: JS object numbered musical notation, extensible markup language.
Further, after the message that will have been parsed saves as specified document, further includes:
The data in document are specified according to the data modification of predetermined scene.
A kind of device of message test, comprising: memory and processor;Wherein:
The memory, for saving the program for being used for message test;
The processor executes the program for message test for reading, performs the following operations:
The message of interaction under true environment is intercepted and captured according to specified communication protocol;
The message of the interaction is parsed, the message parsed is saved as into specified document;
Using the specified document as fictitious assets, test request message (TRM) is inputted into the fictitious assets to obtain test and ring It answers.
Further, the specified communication protocol includes: socket, hypertext transfer protocol, Simple Network Management Protocol.
Further, the specified document includes following format: JS object numbered musical notation, extensible markup language.
After the message that will have been parsed saves as specified document, further includes:
The data in document are specified according to the data modification of predetermined scene.
The scheme of the embodiment of the present invention improves traditional baffle making pattern, integrates multi-protocols, it can be achieved that cross-platform deployment; It allows the assets for being not easy to obtain easily to obtain simulated environment, easily simulates, the scene of true environment not Easy Test.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical solution of the present invention, and constitutes part of specification, with this The embodiment of application technical solution for explaining the present invention together, does not constitute the limitation to technical solution of the present invention.
Fig. 1 is the flow chart for the method that a kind of message of the embodiment of the present invention is tested;
Fig. 2 is the schematic diagram for the device that a kind of message of the embodiment of the present invention is tested.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application Feature can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable Sequence executes shown or described step.
Fig. 1 is the flow chart for the method that a kind of message of the embodiment of the present invention is tested, as shown in Figure 1, the side of the present embodiment Method may include:
Step 101, the message that interaction under true environment is intercepted and captured according to specified communication protocol;
Step 102 parses the message of the interaction, and the message parsed is saved as specified document;
Step 103, using the specified document as fictitious assets, test request message (TRM) is inputted into the fictitious assets to obtain Test response.
In the present embodiment, " true environment " such as Third-party payment company (abbreviation A) will access bank's billing and accounting system (referred to as B), one of scene is to call the function of transferring accounts of bank, this function bank is usually to be packaged into interface of transferring accounts for third party It uses.
Third-party payment company needs to develop a set of fund transfer system at this time, and Third-party payment company sends transfer request to silver Row billing and accounting system tells the content of transferring accounts of bank's billing and accounting system oneself (such as debt-credit side's account, transfer amounts etc.);Account system, bank System is given to one response results of Third-party payment company (success of such as transferring accounts, mistake of transferring accounts according to the request of Third-party payment company It loses).
In the present embodiment, it is contemplated that compatibility supports various communications protocol, such as Socket (socket), HTTP extensively (Hyper Text Transfer Protocol, hypertext transfer protocol), SNMP (Simple Network Management Protocol, Simple Network Management Protocol) etc..
In the present embodiment, consider to support the Asset Allocation mode that is easily understood from ease for use, such as Json (JS object numbered musical notation), Xml (Extensible Markup Language, extensible markup language) etc..
The method of the present embodiment is based on SOA (Services Oriented Achitecture service-oriented Architecture) realization assets (service) virtualization technology of thought, can very easily configure " fictitious assets (service) ", Easily manufacture simulated environment.
In the present embodiment, the information interactive interface that can be called externally is provided, for example, business is verified, login is published, and is handed in real time Easily, the information interactive interfaces such as hardware alarm.
Request and corresponding message according to communication protocol intercepting and capturing true environment, are distributed to protocol resolver by agency, will solve The message analysed automatically forms such as xml document.Forming xml document can be convenient interacting for information between personnel's participation system Journey is the respondent behavior of controllable system under test (SUT) by configuration documentation;Document can also be further converted to more understandable, be easier to The graphic interface of hand.
Using the data of document storing as template, data can be modified according to precognition scene, form fictitious assets, such as bank's account Business system, the fictitious assets of server warning system etc..
Later test request available " fictitious assets " responds this behavior instead of actual driving assembly.
The method of the embodiment of the present invention greatly reduces dependence of the research and development test phase to physical machine, and flexible data Configuration mode can also easily cover the indetectable blind area of true environment;The method of the embodiment of the present invention also will be in the project cycle The problem of being likely to occur exposes in advance, guarantees the steady progress of project;A series of such as moneys of simulation CPU, storage pool, magnetic battle array etc. Source reduces project cost, improves code quality.
Fig. 2 is the schematic diagram for the device that a kind of message of the embodiment of the present invention is tested, as described in Figure 2, the dress of the present embodiment Set may include: memory and processor, wherein
The memory, for saving the program for being used for message test;
The processor executes the program for message test for reading, performs the following operations:
The message of interaction under true environment is intercepted and captured according to specified communication protocol;
The message of the interaction is parsed, the message parsed is saved as into specified document;
Using the specified document as fictitious assets, test request message (TRM) is inputted into the fictitious assets to obtain test and ring It answers.
In one embodiment, after the message that will have been parsed saves as specified document, further includes:
The data in document are specified according to the data modification of predetermined scene.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored with computer executable instructions, The computer executable instructions are performed the method for realizing the message test.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove Functional module/unit in setting may be implemented as software, firmware, hardware and its combination appropriate.In hardware embodiment, Division between the functional module/unit referred in the above description not necessarily corresponds to the division of physical assemblies;For example, one Physical assemblies can have multiple functions or a function or step and can be executed by several physical assemblies cooperations.Certain groups Part or all components may be implemented as by processor, such as the software that digital signal processor or microprocessor execute, or by It is embodied as hardware, or is implemented as integrated circuit, such as specific integrated circuit.Such software can be distributed in computer-readable On medium, computer-readable medium may include computer storage medium (or non-transitory medium) and communication media (or temporarily Property medium).As known to a person of ordinary skill in the art, term computer storage medium is included in for storing information (such as Computer readable instructions, data structure, program module or other data) any method or technique in the volatibility implemented and non- Volatibility, removable and nonremovable medium.Computer storage medium include but is not limited to RAM, ROM, EEPROM, flash memory or its His memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storages, magnetic holder, tape, disk storage or other Magnetic memory apparatus or any other medium that can be used for storing desired information and can be accessed by a computer.This Outside, known to a person of ordinary skill in the art to be, communication media generally comprises computer readable instructions, data structure, program mould Other data in the modulated data signal of block or such as carrier wave or other transmission mechanisms etc, and may include any information Delivery media.

Claims (8)

1. a kind of method of message test characterized by comprising
The message of interaction under true environment is intercepted and captured according to specified communication protocol;
The message of the interaction is parsed, the message parsed is saved as into specified document;
Using the specified document as fictitious assets, test request message (TRM) is inputted into the fictitious assets to obtain test response.
2. the method according to claim 1, wherein
The specified communication protocol includes: socket, hypertext transfer protocol, Simple Network Management Protocol.
3. the method according to claim 1, wherein
The specified document includes following format: JS object numbered musical notation, extensible markup language.
4. method according to claim 1-3, which is characterized in that the message that will have been parsed saves as specified After document, further includes:
The data in document are specified according to the data modification of predetermined scene.
5. a kind of device of message test, comprising: memory and processor;It is characterized by:
The memory, for saving the program for being used for message test;
The processor executes the program for message test for reading, performs the following operations:
The message of interaction under true environment is intercepted and captured according to specified communication protocol;
The message of the interaction is parsed, the message parsed is saved as into specified document;
Using the specified document as fictitious assets, test request message (TRM) is inputted into the fictitious assets to obtain test response.
6. device according to claim 5, which is characterized in that
The specified communication protocol includes: socket, hypertext transfer protocol, Simple Network Management Protocol.
7. device according to claim 5, which is characterized in that
The specified document includes following format: JS object numbered musical notation, extensible markup language.
8. according to the described in any item devices of claim 5-7, which is characterized in that the message that will have been parsed saves as specified After document, further includes:
The data in document are specified according to the data modification of predetermined scene.
CN201811432593.3A 2018-11-28 2018-11-28 A kind of method and device of message test Pending CN109510735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811432593.3A CN109510735A (en) 2018-11-28 2018-11-28 A kind of method and device of message test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811432593.3A CN109510735A (en) 2018-11-28 2018-11-28 A kind of method and device of message test

Publications (1)

Publication Number Publication Date
CN109510735A true CN109510735A (en) 2019-03-22

Family

ID=65750964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811432593.3A Pending CN109510735A (en) 2018-11-28 2018-11-28 A kind of method and device of message test

Country Status (1)

Country Link
CN (1) CN109510735A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930608A (en) * 2019-10-31 2020-03-27 福建新大陆支付技术有限公司 POS terminal ISO8583 message testing method and simulation background baffle system
CN112135095A (en) * 2020-09-15 2020-12-25 杭州迪普科技股份有限公司 Virtual camera creating method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102740342A (en) * 2012-06-08 2012-10-17 大唐移动通信设备有限公司 Network management equipment performance simulation test method and system
CN107179995A (en) * 2017-03-09 2017-09-19 北京融信易安信息技术有限公司 A kind of performance test methods of application program of computer network
CN108614777A (en) * 2018-05-08 2018-10-02 山东浪潮通软信息科技有限公司 A kind of financial transaction test system and test method based on actual services

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102740342A (en) * 2012-06-08 2012-10-17 大唐移动通信设备有限公司 Network management equipment performance simulation test method and system
CN107179995A (en) * 2017-03-09 2017-09-19 北京融信易安信息技术有限公司 A kind of performance test methods of application program of computer network
CN108614777A (en) * 2018-05-08 2018-10-02 山东浪潮通软信息科技有限公司 A kind of financial transaction test system and test method based on actual services

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930608A (en) * 2019-10-31 2020-03-27 福建新大陆支付技术有限公司 POS terminal ISO8583 message testing method and simulation background baffle system
CN112135095A (en) * 2020-09-15 2020-12-25 杭州迪普科技股份有限公司 Virtual camera creating method and device
CN112135095B (en) * 2020-09-15 2022-11-25 杭州迪普科技股份有限公司 Virtual camera creating method and device

Similar Documents

Publication Publication Date Title
CN108848092B (en) Method and device for processing micro-service gray release based on call chain
CN108255847B (en) Page generation method and device
CN105389256B (en) A kind of unit test method and system
CN109344170B (en) Stream data processing method, system, electronic device and readable storage medium
CN107979508A (en) Micro services test method and device
CN108459953A (en) test method and device
CN109684188B (en) Test method and device
CN106874519A (en) Webpage representation method and apparatus
CN111782524B (en) Application testing method and device, storage medium and electronic device
CN111367562B (en) Data acquisition method, device, storage medium and processor
US20130332212A1 (en) Methods and systems for developing an optimised operational system in a network
CN109901968A (en) A kind of automation page data method of calibration and device
CN107729246A (en) For the auxiliary test methods of intended application, device, equipment and storage medium
CN109145238A (en) Card display method and device and mobile device
CN107168844B (en) Performance monitoring method and device
CN106933518A (en) A kind of printing equipment and Method of printing
CN111897738B (en) Automatic testing method and device based on atomic service
US11232019B1 (en) Machine learning based test coverage in a production environment
CN105912328B (en) Display methods, device and the web system of the web system page
CN110007921A (en) A kind of code dissemination method and device
CN109510735A (en) A kind of method and device of message test
CN111090533A (en) Notice information sending method and device, electronic equipment and storage medium
CN109582317A (en) Method and apparatus for debugging boarding application
CN109710252A (en) Page generation method, device, equipment and storage medium
KR101596257B1 (en) System and method for developing of service based on software product line

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: 20190322

RJ01 Rejection of invention patent application after publication