CN106470131A - A kind of method of testing and equipment - Google Patents

A kind of method of testing and equipment Download PDF

Info

Publication number
CN106470131A
CN106470131A CN201510512109.8A CN201510512109A CN106470131A CN 106470131 A CN106470131 A CN 106470131A CN 201510512109 A CN201510512109 A CN 201510512109A CN 106470131 A CN106470131 A CN 106470131A
Authority
CN
China
Prior art keywords
terminal unit
test request
request message
service
server
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
CN201510512109.8A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510512109.8A priority Critical patent/CN106470131A/en
Publication of CN106470131A publication Critical patent/CN106470131A/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/50Testing arrangements

Abstract

The embodiment of the present application discloses a kind of method of testing and equipment, including:Terminal unit sends service test request message to server;Described terminal unit judges whether the corresponding service logic information of described service test request message that described server returns meets the corresponding test result of default described service test request message, to determine whether described service test request correctly executes.By corresponding for service test request message service logic information is shown to terminal unit, realize completing test result verification in end side.

Description

A kind of method of testing and equipment
Technical field
The application is related to communication technical field, more particularly, to a kind of method of testing and equipment.
Background technology
When to website test process, need the feature operation by terminal unit, corresponding inspection backstage clothes Business device the business processing logic of various applications correctness, the scope of examination not only include various application request strings, Methods of Database SQL Query, also includes encapsulated object information, abnormal information etc..
At present, in the test job of website, need to verify various clicks, the selection operation result of front page layout, Whether correctly called by background server and respond.Generally, background application species in website is various, such as engine, Algorithm, data base, caching etc..Test then needs the operation for some front page layout, real time inspection Whether the business processing logic of background application is correct.In prior art, this checking procedure needs manually to enter Row completes, and holding time is many, easy test leakage.
Content of the invention
The embodiment of the present application provides a kind of method of testing and equipment, in order to realize automatically testing in terminal unit.
For this reason, the application adopts following technological means:
This application provides a kind of method of testing, it is applied to include the network system of server and terminal unit In, including:
Terminal unit sends service test request message to server;
Described terminal unit judges the corresponding business of described service test request message that described server returns Whether logical message meets the corresponding test result of default described service test request message, described to determine Whether service test request correctly executes.
Wherein, described terminal unit judges that the described service test request message that described server returns is corresponding Whether service logic information meets the corresponding test result of default described service test request message, concrete bag Include:
Described terminal unit receives the corresponding business of described service test request message that described server returns Logical message;
Described service logic information is shown in the page source code of described terminal unit by described terminal unit In label;
Described terminal unit judges whether described service logic information meets default described service test request The corresponding test result of message.
Wherein, described service logic information is shown in the page source generation of described terminal unit by described terminal unit In the label of code, specifically include:
Described service logic information is shown in described terminal unit in described web page source generation by described terminal unit In newly-built label or the original label of described web page source code in code.
Wherein, to receive the described service test request message that described server returns corresponding for described terminal unit Before service logic information, methods described also includes:
The current running status of server described in described terminal judges, when described server is in state in non-thread When, the corresponding business of described service test request message that described terminal unit receives described server return is patrolled The information of collecting.
Wherein, to receive the described service test request message that described server returns corresponding for described terminal unit Service logic information, specifically includes:
The described service test request that the described terminal unit described server of reception reads from specifying variable disappears Cease corresponding service logic information.
Present invention also provides the terminal unit in a kind of network system being applied to comprise server, including:
Sending module, for sending service test request message to server;
Judge module, for judging the corresponding business of described service test request message that described server returns Whether logical message meets the corresponding test result of default described service test request message, described to determine Whether service test request correctly executes.
Wherein, described judge module, specifically includes:
Receiving submodule, for receiving the corresponding industry of described service test request message that described server returns Business logical message;
Display sub-module, for being shown in the page source code of described terminal unit by described service logic information Label in;
Judging submodule, asks for judging whether described service logic information meets default described operational trials Seek the corresponding test result of message.
Wherein, described display sub-module, sets specifically for described service logic information is shown in described terminal For in newly-built label in described web page source code or the original label of described web page source code.
Wherein, described receiving submodule, the running status current specifically for judging described server, when true When fixed described server is in state in non-thread, the described service test request receiving described server return disappears Cease corresponding service logic information.
Wherein, described receiving submodule, is additionally operable to receive described in described server reads from specifying variable The corresponding service logic information of service test request message.
Compared with prior art, above-described embodiment of the application has following Advantageous Effects:
In the application, terminal unit sends service test request message to server;Described terminal unit judges It is default whether the corresponding service logic information of described service test request message that described server returns meets The corresponding test result of described service test request message, to determine whether described service test request correct Execution.By corresponding for service test request message service logic information is shown to terminal unit, realize End side completes test result verification.
Brief description
In order to the technical scheme of the embodiment of the present application is clearly described, the embodiment of the present application will be retouched below In stating the accompanying drawing of required use be briefly described it should be apparent that, drawings in the following description are only Some embodiments of the present application, for those of ordinary skill in the art, are not paying creative work Under the premise of, other accompanying drawings can also be obtained according to these accompanying drawings of the embodiment of the present application.
The automatic test approach schematic flow sheet that Fig. 1 provides for the embodiment of the present application;
The flow chart that service logic information is exported terminal unit that Fig. 2 provides for the embodiment of the present application;
The automatic test approach schematic flow sheet comprising terminal unit that Fig. 3 provides for the embodiment of the present application;
The structural representation of the background server that Fig. 4 provides for the embodiment of the present application.
Specific embodiment
Below in conjunction with the accompanying drawings clear, complete description is carried out to the technical scheme of the application it is clear that described Embodiment be some embodiments of the present application, rather than whole embodiment.Based on the enforcement in the application Example, the every other enforcement that those of ordinary skill in the art are obtained under the premise of not making creative work Example, broadly falls into the protection domain of the application.
By corresponding for service test request message service logic information is shown to terminal unit in the application, Realize completing test result verification in end side.
With reference to specific embodiment, method of testing is described in detail.
As shown in figure 1, the flow chart of the method for testing providing for the application, including:
Step S101, terminal unit send service test request message to server.
Service test request message is the call result for test background server that terminal unit sends The whether correct test request with response, for example, the various clicks of terminal unit, selection operation etc., it is used for Check with response to whether background server correctly calls.
Step S102, described terminal unit judge the described service test request message pair that described server returns Whether the service logic information answered meets the corresponding test result of default described service test request message, with Determine whether described service test request correctly executes.
Specifically, after server receives the service test request of terminal unit transmission, this request is rung Should, and the service logic information of response is sent to terminal unit, terminal unit judges described service logic letter Whether breath meets the corresponding test result of default described service test request message.
In specific application scenarios, the described service test request message that terminal unit the reception server returns After corresponding service logic information, described service logic information is shown in described terminal and sets by described terminal unit In the label of standby page source code, whether service logic information described in described terminal judges meets default institute State the corresponding test result of service test request message.
Wherein, described service logic information is shown in the page source generation of described terminal unit by described terminal unit Code label in, described label can be the newly-built label in described web page source code of described terminal unit or The original label of described web page source code, that is, described terminal unit described service logic information is shown in described In terminal unit newly-built label or the original label of described web page source code in described web page source code.
In specific application scenarios, described terminal unit receives the described operational trials that described server returns Before the corresponding service logic information of request message, described terminal unit also will judge that described server is current Running status, service logic information output is mainly realized by valve (DebugTextValve) class, Only when server is in state in non-thread, described terminal unit just can receive the institute that described server returns State the corresponding service logic information of service test request message, this is because when server is in state on line When, if causing the safety problem of server after outgoing traffic logical message.
In the preferred embodiment of the application, the shape of background server can be determined by judging mode value State, when mode value is for dev or test, described background server is in state in non-thread, now The corresponding service logic information of described service test request message can be assembled, and described service logic information is returned Back to described terminal unit, when mode value is online, then will not business of assembling logical message.
Receive the corresponding industry of described service test request message that described server returns in described terminal unit Before business logical message, the service logic information assembling is temporarily stored in specifying variable described server, when When described server responds to described service test request message, the described industry of reading from specifying variable The business corresponding service logic information of test request message, and described service logic information is sent to described terminal Equipment.
After described terminal unit receives service logic information, judge whether described service logic information meets pre- If the corresponding test result of described service test request message, determine whether described service test request correct Execution.
In specific application scenarios, each service test request message has preset test result, due to end The described service logic information receiving is shown in described terminal unit in described web page source code by end equipment In newly-built label or the original label of described web page source code, by whether judging described service logic information Meet default test result, realize in end side, test result being verified, and then determine the industry this time sending The business test request whether correct call result of being serviced device and response.For example, service test request message is to search Rope " fruit ", then terminal unit receive service logic information and obtain Search Results and include " Fructus Mali pumilae ", due to Herba Marsileae Quadrifoliae Fruit is included in then it is assumed that this time searching for successfully within fruit, and server calls are correct with response.
Compared with prior art, above-described embodiment of the application has following Advantageous Effects:
In the application, terminal unit sends service test request message to server;Described terminal unit judges It is default whether the corresponding service logic information of described service test request message that described server returns meets The corresponding test result of described service test request message, to determine whether described service test request correct Execution.By corresponding for service test request message service logic information is shown to terminal unit, realize End side completes test result verification.
With reference to specific embodiment, terminal unit is passed through with the described service test request message pair receiving The service logic information answered determines that the detailed process whether described service test request correctly executes is carried out in detail Explanation.
As shown in the flowchart of figure 2, including:
Step S201, judge the mode value of server.
After terminal unit sends service test request message to server, judge described server current state, I.e. mode value.
Step S202, when mode value is dev or test, obtain service logic information, and by described industry Business logical message is kept in Threadlocal variable.
Wherein, when mode value is dev or test, that is, described background server is in state in non-thread, group Fill the corresponding service logic information of described service test request message, and described service logic information is kept in In specifying variable Threadlocal variable.
The described operational trials that step S203, the terminal unit described server of reception read from specifying variable please Seek the corresponding service logic information of message.
Described server reads described service test request message pair from specifying variable Threadlocal variable The service logic information answered, and described service logic information is sent to terminal unit.
Described service logic information is shown in the page of described terminal unit by step S204, described terminal unit Source code<TextArea>In label.
Described service logic information is encapsulated into page source code by described terminal unit<TextArea>Label In, so that terminal unit completes automation inspection by service logic information.
Compared with prior art, above-described embodiment of the application has following Advantageous Effects:
In the application, terminal unit sends service test request message to server;Described terminal unit judges It is default whether the corresponding service logic information of described service test request message that described server returns meets The corresponding test result of described service test request message, to determine whether described service test request correct Execution.By corresponding for service test request message service logic information is shown to terminal unit, realize End side completes test result verification.
With reference to specific embodiment, the detailed process of test is described in detail.
Flow chart as shown in Figure 3, including:
Step S301, terminal unit send service test request message to background server.
Step S302, described terminal unit judge that the state of server assembles described industry in non-thread during state The business corresponding service logic information of test request message, and be temporarily stored in specifying variable.
Step S303, described terminal unit receive the described business survey that described server reads from specifying variable The examination corresponding service logic information of request message, and described service logic information is shown in described terminal unit Page source code<TextArea>In label.
The page source code that step S304, the described background server of described terminal unit parsing respond <TextArea>Label, obtains service logic information.
It is described with default that step S305, described terminal unit compare the corresponding test result of service logic information Whether the corresponding test result of service test request message, determine the service test request this time sending by backstage Server correctly calls and responds.
It should be noted that when carrying out service logic information encapsulation, being not limited in being encapsulated <TextArea>In label, as long as terminal unit is able to know which tag resolution to go out service logic information from Label is all within the protection domain of the application.
Compared with prior art, above-described embodiment of the application has following Advantageous Effects:
In the application, terminal unit sends service test request message to server;Described terminal unit judges It is default whether the corresponding service logic information of described service test request message that described server returns meets The corresponding test result of described service test request message, to determine whether described service test request correct Execution.By corresponding for service test request message service logic information is shown to terminal unit, realize End side completes test result verification.
As shown in figure 4, terminal in a kind of network system being applied to include server providing for the application The structure chart of equipment, including:
Sending module 41, for sending service test request message to server;
Judge module 42, for judging the corresponding industry of described service test request message that described server returns Whether business logical message meets the corresponding test result of default described service test request message, to determine State whether service test request correctly executes.
Wherein, described judge module 42, specifically includes:
Receiving submodule, for receiving the corresponding industry of described service test request message that described server returns Business logical message;
Display sub-module, for being shown in the page source code of described terminal unit by described service logic information Label in;
Judging submodule, asks for judging whether described service logic information meets default described operational trials Seek the corresponding test result of message.
Wherein, described display sub-module, sets specifically for described service logic information is shown in described terminal For in newly-built label in described web page source code or the original label of described web page source code.
Wherein, described receiving submodule, the running status current specifically for judging described server, when true When fixed described server is in state in non-thread, the described service test request receiving described server return disappears Cease corresponding service logic information.
Wherein, described receiving submodule, is additionally operable to receive described in described server reads from specifying variable The corresponding service logic information of service test request message.
Compared with prior art, above-described embodiment of the application has following Advantageous Effects:
In the application, terminal unit sends service test request message to server;Described terminal unit judges It is default whether the corresponding service logic information of described service test request message that described server returns meets The corresponding test result of described service test request message, to determine whether described service test request correct Execution.By corresponding for service test request message service logic information is shown to terminal unit, realize End side completes test result verification.
Through the above description of the embodiments, those skilled in the art can be understood that the application Can realize by the mode of software plus necessary general hardware platform naturally it is also possible to pass through hardware, but very In the case of many, the former is more preferably embodiment.Based on such understanding, the technical scheme of the application is substantially In other words prior art is contributed partly can be embodied in the form of software product, this computer Software product is stored in a storage medium, including some instructions with so that a station terminal equipment is (permissible It is mobile phone, personal computer, server, or the network equipment etc.) execute described in each embodiment of the application Method.
It will be understood by those skilled in the art that the module in device in embodiment can describe according to embodiment Carry out in the device be distributed in embodiment it is also possible to carry out that respective change is disposed other than the present embodiment Or in multiple device.The module of above-described embodiment can merge into a module it is also possible to be further split into Multiple submodule.
The above is only the preferred implementation of the application it is noted that common for the art For technical staff, on the premise of without departing from the application principle, some improvements and modifications can also be made, These improvements and modifications also should regard the protection domain of the application.

Claims (10)

1. a kind of method of testing, is applied to include in server and the network system of terminal unit, and it is special Levy and be, the method includes:
Terminal unit sends service test request message to server;
Described terminal unit judges the corresponding business of described service test request message that described server returns Whether logical message meets the corresponding test result of default described service test request message, described to determine Whether service test request correctly executes.
2. the method for claim 1 is it is characterised in that described terminal unit judges described service Whether the corresponding service logic information of described service test request message that device returns meets default described industry The business corresponding test result of test request message, specifically includes:
Described terminal unit receives the corresponding business of described service test request message that described server returns Logical message;
Described service logic information is shown in the page source code of described terminal unit by described terminal unit In label;
Described terminal unit judges whether described service logic information meets default described service test request The corresponding test result of message.
3. method as claimed in claim 2 is it is characterised in that described business is patrolled by described terminal unit Collect in the label of the page source code in described terminal unit for the presentation of information, specifically include:
Described service logic information is shown in described terminal unit in described web page source generation by described terminal unit In newly-built label or the original label of described web page source code in code.
4. method as claimed in claim 2 is it is characterised in that described terminal unit receives described service Before the corresponding service logic information of described service test request message that device returns, methods described also includes:
The current running status of server described in described terminal judges, when described server is in state in non-thread When, the corresponding business of described service test request message that described terminal unit receives described server return is patrolled The information of collecting.
5. method as claimed in claim 2 is it is characterised in that described terminal unit receives described service The corresponding service logic information of described service test request message that device returns, specifically includes:
The described service test request that the described terminal unit described server of reception reads from specifying variable disappears Cease corresponding service logic information.
6. the terminal unit in a kind of network system being applied to comprise server is it is characterised in that include:
Sending module, for sending service test request message to server;
Judge module, for judging the corresponding business of described service test request message that described server returns Whether logical message meets the corresponding test result of default described service test request message, described to determine Whether service test request correctly executes.
7. terminal unit as claimed in claim 6 it is characterised in that
Described judge module, specifically includes:
Receiving submodule, for receiving the corresponding industry of described service test request message that described server returns Business logical message;
Display sub-module, for being shown in the page source code of described terminal unit by described service logic information Label in;
Judging submodule, asks for judging whether described service logic information meets default described operational trials Seek the corresponding test result of message.
8. terminal unit as claimed in claim 7 it is characterised in that
Described display sub-module, specifically for being shown in described terminal unit in institute by described service logic information State in newly-built label in web page source code or the original label of described web page source code.
9. method as claimed in claim 7 it is characterised in that
Described receiving submodule, the running status current specifically for judging described server, described when determining When server is in state in non-thread, receive the described service test request message correspondence that described server returns Service logic information.
10. method as claimed in claim 7 it is characterised in that
Described receiving submodule, being additionally operable to receive the described operational trials that described server reads from specifying variable please Seek the corresponding service logic information of message.
CN201510512109.8A 2015-08-19 2015-08-19 A kind of method of testing and equipment Pending CN106470131A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510512109.8A CN106470131A (en) 2015-08-19 2015-08-19 A kind of method of testing and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510512109.8A CN106470131A (en) 2015-08-19 2015-08-19 A kind of method of testing and equipment

Publications (1)

Publication Number Publication Date
CN106470131A true CN106470131A (en) 2017-03-01

Family

ID=58214496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510512109.8A Pending CN106470131A (en) 2015-08-19 2015-08-19 A kind of method of testing and equipment

Country Status (1)

Country Link
CN (1) CN106470131A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865726A (en) * 2020-07-29 2020-10-30 中国工商银行股份有限公司 Service message testing method, device, computer system and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080304101A1 (en) * 2007-06-08 2008-12-11 Naoko Sasase Server and printer introducing method under thin client environment
CN102164311A (en) * 2010-12-02 2011-08-24 青岛海信传媒网络技术有限公司 Advertising strategy verification method, device and system
CN102510523A (en) * 2011-10-13 2012-06-20 青岛海信宽带多媒体技术有限公司 Socket communication interactive testing method and network television testing system using same
CN103164324A (en) * 2011-12-09 2013-06-19 腾讯科技(深圳)有限公司 Microblog test method and device
CN103428046A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Interface protocol test method and terminal
CN103678284A (en) * 2012-08-31 2014-03-26 上海斐讯数据通信技术有限公司 Method and device for translating page characters

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080304101A1 (en) * 2007-06-08 2008-12-11 Naoko Sasase Server and printer introducing method under thin client environment
CN102164311A (en) * 2010-12-02 2011-08-24 青岛海信传媒网络技术有限公司 Advertising strategy verification method, device and system
CN102510523A (en) * 2011-10-13 2012-06-20 青岛海信宽带多媒体技术有限公司 Socket communication interactive testing method and network television testing system using same
CN103164324A (en) * 2011-12-09 2013-06-19 腾讯科技(深圳)有限公司 Microblog test method and device
CN103428046A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Interface protocol test method and terminal
CN103678284A (en) * 2012-08-31 2014-03-26 上海斐讯数据通信技术有限公司 Method and device for translating page characters

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865726A (en) * 2020-07-29 2020-10-30 中国工商银行股份有限公司 Service message testing method, device, computer system and storage medium
CN111865726B (en) * 2020-07-29 2022-03-08 中国工商银行股份有限公司 Service message testing method, device, computer system and storage medium

Similar Documents

Publication Publication Date Title
CN108563768A (en) Data transfer device, device, equipment and the storage medium of different data model
CN112035344A (en) Multi-scenario test method, device, equipment and computer readable storage medium
CN107347048A (en) The method, apparatus and system of data check
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN107015902A (en) A kind of method of testing and equipment
US11191111B2 (en) Bluetooth connection establishment method, device and system
CN105847169A (en) Method and device for traffic control
CN107360036A (en) A kind of network failure locating method, terminal and server
CN106844471A (en) A kind of electronic operation and maintenance system form data processing method and server
CN106470131A (en) A kind of method of testing and equipment
CN104320415B (en) A kind of substation equipment kinematic insert formula specification analytic method
CN114064208A (en) Method and device for detecting application service state, electronic equipment and storage medium
CN113495825A (en) Line alarm processing method and device, electronic equipment and readable storage medium
CN112101810A (en) Risk event control method, device and system
CN102761672B (en) Method, system and device for realizing speech communication in webpage server
CN106961529B (en) Work order processing method and communication service equipment
CN107067232A (en) Synergetic office work method and device
CN108287757A (en) The method and device that a kind of data acquisition, data are shown
CN108830441B (en) Resource query method and device
CN115190008A (en) Fault processing method, fault processing device, electronic device and storage medium
CN104812066A (en) Method and device for identifying and positioning faults and server
CN106445798B (en) A kind of data processing method and equipment
CN114153729A (en) Webpage testing method and device, electronic equipment and storage medium
CN113626068A (en) Page management method and device
CN112463729A (en) Data file storage method and device, electronic equipment and medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170301