CN109710522A - Code test method, device, computer equipment and storage medium - Google Patents
Code test method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109710522A CN109710522A CN201811545376.5A CN201811545376A CN109710522A CN 109710522 A CN109710522 A CN 109710522A CN 201811545376 A CN201811545376 A CN 201811545376A CN 109710522 A CN109710522 A CN 109710522A
- Authority
- CN
- China
- Prior art keywords
- message
- updated
- tested
- code
- update
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010998 test method Methods 0.000 title claims abstract description 22
- 238000012360 testing method Methods 0.000 claims abstract description 41
- 238000000034 method Methods 0.000 claims abstract description 15
- 230000004044 response Effects 0.000 claims description 71
- 238000004590 computer program Methods 0.000 claims description 17
- 230000005540 biological transmission Effects 0.000 claims description 7
- 238000012986 modification Methods 0.000 claims description 5
- 230000004048 modification Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 9
- 238000009877 rendering Methods 0.000 description 6
- 230000007547 defect Effects 0.000 description 5
- 239000000284 extract Substances 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 235000014510 cooky Nutrition 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000008929 regeneration Effects 0.000 description 1
- 238000011069 regeneration method Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
This application involves a kind of code test method, device, computer equipment and storage mediums.This method comprises: receiving code tester request;It include parameter identification and breakpoint location data in code tester request, breakpoint location data are corresponding with breakpoint location;Obtain target component corresponding with parameter identification;More fresh code does not run the message to be updated obtained to breakpoint location for crawl;Message to be updated, message after being updated are updated according to target component;Message after update is sent to equipment to be tested, so that equipment to be tested is based on message after updating and tests code to be tested.Testing process can be improved using this method, carry out code tester in advance in the case where front and back end code does not update performance simultaneously.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of code test method, device, computer equipment and
Storage medium.
Background technique
With the development of computer technology, there is code tester technology.When proposing new system requirements, front and back end is opened
Hair personnel need to negotiate integrated system upgrading mode, and respectively according to selected system upgrade mode respectively to front-end code with after
End code is developed.It is unified to carry out code tester usually after code development deployment in front and back end is completed.Such as in front end
Carry out page jump measure of merit.In traditional approach, since front and back end code interdepends, when front-end code or back-end code are opened
Not in time, when front and back end code is not updated under performance simultaneously, code tester will lie on the table hair, when extending system upgrade
Between.
Summary of the invention
Based on this, it is necessary to which in view of the above technical problems, providing one kind not while can update completion in front and back end code
In the case of carry out code test method, device, computer equipment and the storage medium of code tester in advance.
A kind of code test method, which comprises receive code tester request;Include in the code tester request
Parameter identification and breakpoint location data, the breakpoint location data are corresponding with breakpoint location;It obtains and the parameter identification phase
The target component answered;More fresh code does not run the message to be updated obtained to the breakpoint location for crawl;Joined according to the target
Number updates the message to be updated, message after being updated;Message after the update is sent to equipment to be tested, so that described
Message tests code to be tested after equipment to be tested is based on the update.
More fresh code does not run the report to be updated obtained to the breakpoint location for the crawl in one of the embodiments,
Text, comprising: the front-end code that do not update that crawl terminal is sent runs the request message to be updated obtained to the breakpoint location;Institute
It states and message after the update is sent to equipment to be tested, so that the equipment to be tested is based on message after the update to be measured
Examination code is tested, comprising: message after update is sent to server to be tested, so that the server to be tested is based on institute
Message tests back-end code to be tested after stating update.
More fresh code does not run the report to be updated obtained to the breakpoint location for the crawl in one of the embodiments,
Text, comprising: the back-end code that do not update that crawl back-end server is sent runs the response to be updated obtained to the breakpoint location
Message;It is described that message after the update is sent to equipment to be tested, so that the equipment to be tested is reported after being based on the update
Text tests code to be tested, comprising: message after update is sent to terminal to be tested, so that the terminal base to be tested
Message tests front-end code to be tested after the update.
The code tester request is identified comprising target rear end in one of the embodiments, the crawl back-end services
The back-end code that do not update that device is sent runs the response message to be updated obtained to the breakpoint location, comprising: after crawl is multiple
The corresponding back-end code that end server is sent runs the response message to be screened obtained to the breakpoint location;From described to be screened
Target rear end is extracted in response message and identifies corresponding response message to be updated, using remaining response message to be screened as to be sent
Response message;It is described that message after the update is sent to equipment to be tested, comprising: by message after the update and it is described to
It sends response message and is sent to terminal to be tested.
The parameter identification includes interface document mark, the acquisition and the parameter mark in one of the embodiments,
Know corresponding target component, comprising: obtain new version interface document corresponding with interface document mark and legacy version interface
Document;By comparing the new version interface document and the legacy version interface document, updated target component is extracted.
It is described in one of the embodiments, that the message to be updated is updated according to the target component, after obtaining update
Message, comprising: identify the corresponding updating type of the target component;When updating type is to delete, the report to be updated is deleted
The target component for including in text, message after being updated;When updating type is modification, search in the message to be updated with institute
The corresponding parameter to be updated of target component is stated, the parameter to be updated is replaced with into the target component, message after being updated;
When updating type is newly-increased, search update corresponding with target component position in the message to be updated, it is described more
Add the target component, message after being updated in new position.
A kind of code tester device, described device include: receiving module, for receiving code tester request;The code
It include parameter identification and breakpoint location data in test request;The breakpoint location data are corresponding with breakpoint location;Obtain mould
Block, for obtaining target component corresponding with the parameter identification;Handling module is run for grabbing not more fresh code to described
The message to be updated that breakpoint location obtains;Update module is obtained for updating the message to be updated according to the target component
Message after update;Test module, for message after the update to be sent to equipment to be tested, so that the equipment base to be tested
Message tests code to be tested after the update.
In one of the embodiments, the handling module be also used to grab back-end server transmission do not update rear end generation
The response message to be updated that code operation is obtained to the breakpoint location;Message is sent to after the test module is also used to update
Terminal to be tested, so that message tests front-end code to be tested after the terminal to be tested is based on the update.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing
The step of device realizes above-mentioned each code test method as described in the examples when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
The step of above-mentioned each code test method as described in the examples is realized when row.
Above-mentioned code test method, device, computer equipment and storage medium, it includes parameter identification that proxy server, which receives,
After the code tester request of breakpoint location data, target component corresponding with parameter identification can be obtained.Proxy server is also
Can according to breakpoint location data grabber, more fresh code does not run the message to be updated obtained to corresponding breakpoint location, and according to acquisition
Target component update the message to be updated, message after being updated.Message after update is sent to be tested by proxy server
In equipment, so that equipment to be tested is based on message after updating and tests code to be tested.By proxy server by front and back
End separation can carry out in advance code tester to the one end completed is updated in the case where front and back end code does not update performance simultaneously,
So as to find aacode defect much sooner, the code tester period is shortened, so as to shorten the system upgrade time.
Detailed description of the invention
Fig. 1 is the application scenario diagram of code test method in one embodiment;
Fig. 2 is the flow diagram of code test method in one embodiment;
Fig. 3 a is breakpoint schematic diagram before responding in one embodiment;
Fig. 3 b is breakpoint schematic diagram after responding in one embodiment;
Fig. 4 is the flow diagram of code test method in another embodiment;
Fig. 5 is the structural block diagram of code tester device in one embodiment;
Fig. 6 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Code test method provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 102
It is communicated with proxy server 104 by network.Proxy server 104 is communicated with back-end server 106 by network.
Wherein, terminal 102 can be, but not limited to be various personal computers, laptop, smart phone, tablet computer and portable
Wearable device, proxy server 104 and back-end server 106 can be formed with the either multiple servers of independent server
Server cluster realize.What proxy server 104 received the transmission of terminal 102 includes parameter identification and breakpoint location data
After code tester request, proxy server 104 can obtain target component corresponding with parameter identification.Proxy server 104 is also
Can according to breakpoint location data grabber, more fresh code does not run the message to be updated obtained to corresponding breakpoint location, and according to acquisition
Target component update the message to be updated, message after being updated.When message to be updated is response message to be updated, agency
Message after update is sent to terminal 102 by server 104, so that message is to be tested to front end in advance after terminal 102 is based on update
Code is tested;When message to be updated is request message to be updated, after message after update is sent to by proxy server 104
Server 106 is held, so that back-end server 106 is based on message after updating and tests in advance rear end code to be tested.
In one embodiment, as shown in Fig. 2, providing a kind of code test method, it is applied in Fig. 1 in this way
It is illustrated for proxy server 104, comprising the following steps:
Step 202, code tester request is received;It include parameter identification and breakpoint location data in code tester request;It is disconnected
Point position data is corresponding with breakpoint location.
Code tester request is the request for carrying out code tester.Code tester can front and back end code not while more
Under new performance, tested in advance to front-end code or to back-end code.Parameter identification refers to for obtaining target component
Mark.Parameter identification can be the character string being made of at least one of letter, number, punctuation mark.Such as parameter identification
It can be the field name of the store path of target component, the version number for the interface document for being stored with target component or target component
Deng without being limited thereto.Breakpoint location data refer to the data for describing breakpoint location.Breakpoint, which refers to, allows code to interrupt in needs
Place, to facilitate its analysis in one embodiment, proxy server can be based on code tester request by packet catcher and be set
Set breakpoint.Packet catcher includes but is not limited to Fiddler, Charles etc..Breakpoint location can be in response to preceding breakpoint location
Breakpoint location (after response breakpoint) after (before response breakpoint) or response.Response
Preceding breakpoint location be beat terminal send request message after and request message reach server before when;Breakpoint after response
Position is beaten after back-end server response and when before response message is returned to terminal.
Step 204, target component corresponding with parameter identification is obtained.
Target component refers to the discrepancy parameter for the interface that needs are updated.Such as target component can be needs newly
The field name and field value increase, being deleted or modified.When proposing new system requirements, front and back end developer needs to negotiate unified
System upgrade mode, and analyze the target component for needing to be updated in code.Developer consults system upgrade mode
Later, it can also update corresponding interface document, proxy server can determine target component based on updated interface document.
Step 206, more fresh code does not run the message to be updated obtained to breakpoint location for crawl.
More fresh code does not include the front-end code not updated or the back-end code not updated.Correspondingly, message packet to be updated
Include request message to be updated or corresponding message to be updated.Proxy server can be grabbed before terminal operating do not update by packet catcher
The code request message to be updated that breakpoint location obtains before responding is held, rear end operation can also be grabbed and do not update back-end code and exist
The response message to be updated that breakpoint location obtains after response.
It for example, is as shown in Figure 3a the schematic diagram for responding preceding breakpoint, when proxy server 304a receives terminal
It when the request message that 302a is sent, and detects and is previously provided with the preceding breakpoint 300a of response for the request message, then intercepting should
Request message.It is as shown in Figure 3b the schematic diagram of breakpoint after response, when proxy server 304b receives back-end server 306b
When the response message of transmission, and detect for the response message be previously provided with response after breakpoint 300b, then intercept the response
Message.
Step 208, message to be updated, message after being updated are updated according to target component.
Message, which refers to, after update is updated resulting message later to message to be updated.Can be grab it is to be updated
After message, for user by carrying out artificial regeneration to message to be updated, user can be directly by packet catcher to message to be updated
In parameter modify update.It is also possible to be based on target component automation update message to be updated by proxy server.
In one embodiment, message to be updated, message after being updated are updated according to target component, comprising: identification mesh
Mark the corresponding updating type of parameter;When updating type is to delete, the target component for including in message to be updated is deleted, is obtained more
Message after new;When updating type is modification, parameter to be updated corresponding with target component in message to be updated is searched, it will be to more
New parameter replaces with target component, message after being updated;When updating type is newly-increased, search in message to be updated with target
Target component, message after being updated are added updating position in the corresponding update position of parameter.
Proxy server is determining that one or more target components and each target component are corresponding based on parameter identification
Updating type.The target component of different update type can be distinguished by different update marks.After determining updating type, it can determine
The update position of position target component.Position is being updated, the parameter to be updated for needing to delete is being deleted, will need to modify to be updated
Parameter replaces with target component, and insertion needs newly-increased target component.Report to be updated is updated according to one or more target components
Message after being updated after text.Any parameter to be updated in message to be updated, such as host information can be modified,
Cookie (data being stored on user local terminal) or the picture URL of data, display in list, the link jumped,
The text etc. that the page includes, it is without being limited thereto.
Step 210, message after update is sent to equipment to be tested, so that equipment to be tested is based on message after updating and treats
Test code is tested.
When crawl is that the front-end code that do not update that terminal is sent runs the request message to be updated obtained to breakpoint location
When, equipment to be tested is server to be tested.Request message to be updated is modified by packet catcher, so that without waiting for front end generation
Code, which updates, to be completed, and can carry out back end test, Neng Gougeng to the back-end code to be tested disposed in back-end server to be tested
Add discovery rear end defect in time, shortens test period.Back end test includes but is not limited to performance test, volume test and steady
Qualitative test etc..
When crawl is that the back-end code that do not update that back-end server is sent runs the sound to be updated obtained to breakpoint location
When answering message, equipment to be tested is terminal to be tested.Response message to be updated is modified by packet catcher, so that without waiting for after
It holds code update to complete, head end test can be carried out to the front-end code to be tested disposed in terminal to be tested, it can be more
Front end defect is found in time, shortens test period.Head end test includes but is not limited to page presentation and page jump
Test.
In above-mentioned code test method, proxy server receives the code tester comprising parameter identification and breakpoint location data
After request, target component corresponding with parameter identification can be obtained.Proxy server can also be according to breakpoint location data grabber not
More fresh code runs the message to be updated obtained to corresponding breakpoint location, and updates the report to be updated according to the target component of acquisition
Text, message after being updated.Message after update is sent in equipment to be tested by proxy server, so that equipment to be tested is based on
Message tests code to be tested after update.Front and back end is separated by proxy server, in front and back end, code is not simultaneously
It updates under performance, code tester can be carried out in advance to the one end completed is updated, so as to find generation much sooner
Code defect, shortens the code tester period, so as to shorten the system upgrade time.
In one embodiment, code tester request is identified comprising target rear end, crawl back-end server send not more
New back-end code runs the response message to be updated obtained to breakpoint location, comprising: grabs the phase that multiple back-end servers are sent
Back-end code is answered to run the response message to be screened obtained to breakpoint location;Target rear end mark is extracted from response message to be screened
Corresponding response message to be updated is known, using remaining response message to be screened as response message to be sent;Message is sent out after updating
It send to equipment to be tested, comprising: message after update and response message to be sent are sent to terminal to be tested.
Proxy server can be docked with multiple back-end servers.The response message that can be sent for all back-end servers
Breakpoint is all set, and breakpoint is all arranged in the response message that can also be sent to specific back-end server.Proxy server can receive
Breakpoint setup request illustrates to need in corresponding breakpoint location when only including breakpoint location data in breakpoint setup request
Break all sessions, grabs the message of all sessions;When being identified in breakpoint setup request comprising breakpoint location data and target rear end
When, illustrate to need that only corresponding session can be identified in interrupt targets rear end in corresponding breakpoint location.Target rear end mark can be with
It is web page address.
Proxy server can be updated to based on whole response messages that breakpoint location grabs, and can also be rung to part
Message is answered to be updated.It, then can will be after the back-end server when the back-end code of certain back-end server is not more fresh code
End mark is identified as target rear end.The target rear end mark that code tester request includes indicates need to be to target rear end mark pair
The response message to be updated answered is updated.When system to be upgraded is related to multiple back-end servers, proxy server can be in sound
Breakpoint location grabs the response message to be screened that all back-end servers are sent after answering, but is wherein only to identify with target rear end
Corresponding response message to be screened is response message to be updated, remaining response message to be screened all can be used as response report to be sent
Text.It, can be same by message after the update obtained after update and response message to be sent after the completion of response message to be updated update
Step is sent to terminal to be tested by preset transmission sequence.
In one embodiment, parameter identification includes interface document mark, obtains target component corresponding with parameter identification,
It include: acquisition new version interface document corresponding with interface document mark and legacy version interface document;It is connect by comparing new version
Mouth document and legacy version interface document, extract updated target component.
Interface document is the document for describing discrepancy parameter when front and back end interactively communicates.It can according to interface document mark
To obtain new version interface document and legacy version interface document, new version interface document refers to renewal time nearest latest edition
Interface document, legacy version interface document refers to the interface document of the previous version of new version interface document.By comparing new edition
This interface document and legacy version interface document can determine the target component that needs update, and can also identify target component
Updating type.
In one embodiment, message after update is sent to terminal to be tested, so that terminal to be tested is based on after updating
Message tests front-end code to be tested, comprising: terminal obtains message after update, and message includes HTML (super literary after update
This markup language) code and CSS file (Cascading Style Sheets, cascading style sheets);Terminal is by HTML code solution
Analyse into dom tree (DOM Document Object Model);CSS file is loaded and parsed, is formed CSSOM tree (cascading style sheets object model);Base
In dom tree and CSSOM tree, render tree is created, render tree refers to the tree being made of the object of one group of rendering to be generated;Calculate rendering
The coordinate of each element on tree, including from root rendering objects, that is, html document root element<html>is corresponded to, then next stage
Rendering objects such as correspond to<body>element, so recurrence layer by layer, successively calculate the geological information of each rendering objects, wrap
Include the positions and dimensions of rendering objects;It traverses render tree and draws all nodes, corresponding pattern is applicable in for each node, by wash with watercolours
Element on dye tree is shown in a browser.Carrying out test to front-end code to be tested includes being imitated by artificial judgment showing interface
Fruit, if messy code, entanglement occur;Terminal can also detect page presentation parameter automatically, including response time, the page show completion rate
And page elements downloading time delay etc..
In one embodiment, another code test method is provided as shown in Figure 4, is applied in Fig. 1 in this way
Proxy server 104 for be illustrated, comprising the following steps:
Step 402, code tester request is received;Include target rear end mark, parameter identification and disconnected in code tester request
Point position data, breakpoint location data are corresponding with breakpoint location after response.
Step 404, new version interface document corresponding with interface document mark and legacy version interface document are obtained.
Step 406, by comparing new version interface document and legacy version interface document, updated target component is extracted.
Step 408, breakpoint location after the corresponding back-end code that multiple back-end servers are sent is run to response is grabbed to obtain
Response message to be screened.
Step 410, target rear end is extracted from response message to be screened and identify corresponding response message to be updated, by remaining
Response message to be screened is as response message to be sent.
Step 412, message to be updated, message after being updated are updated according to target component.
Step 414, message after update and response message to be sent are sent to terminal to be tested, so that terminal to be tested
Front-end code to be tested is tested based on message after update and response message to be sent.
In above-mentioned code test method, proxy server is received comprising target rear end mark, parameter identification and breakpoint location
After the code tester request of data, the interface document of new and old edition corresponding with parameter identification can be obtained, by comparing new and old
The interface document of version extracts target component.Multiple back-end services that proxy server can be docked according to breakpoint location data grabber
The message to be screened that breakpoint location obtains after the back-end code of device is run to response, and updated according to the target component of acquisition wait sieve
It applies for target rear end in text and identifies corresponding message to be updated, message after being updated.Proxy server will update after message and
Remaining message to be sent is sent in terminal to be tested, so that terminal to be tested is based on message after updating to front end generation to be tested
Code is tested.System be related to multiple back-end servers, back-end server back-end code simultaneously all update complete
In the case of, front and back end is separated by proxy server, code tester can be carried out in advance to the front-end code completed is updated, from
And front-end code defect can be found much sooner, the code tester period is shortened, so as to shorten the system upgrade time.
It should be understood that although each step in the flow chart of Fig. 2 and 4 is successively shown according to the instruction of arrow,
It is these steps is not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
There is no stringent sequences to limit for rapid execution, these steps can execute in other order.Moreover, in Fig. 2 and 4 at least
A part of step may include that perhaps these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps
Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to
Secondary progress, but in turn or can replace at least part of the sub-step or stage of other steps or other steps
Ground executes.
In one embodiment, as shown in figure 5, providing a kind of code tester device 500, comprising: receiving module 502,
For receiving code tester request;It include parameter identification and breakpoint location data in code tester request;Breakpoint location data with
Breakpoint location is corresponding;Module 504 is obtained, for obtaining target component corresponding with parameter identification;Handling module 506, is used for
More fresh code does not run the message to be updated obtained to breakpoint location for crawl;Update module 508, for being updated according to target component
Message to be updated, message after being updated;Test module 510 is sent to equipment to be tested for message after updating, so as to
Test equipment is based on message after updating and tests code to be tested.
In one embodiment, the front-end code that do not update that handling module 506 is also used to grab terminal transmission is run to disconnected
The request message to be updated that point position obtains;Message is sent to server to be tested after test module 510 is also used to update, with
Make server to be tested be based on message after updating to test back-end code to be tested.
In one embodiment, the back-end code that do not update that handling module 506 is also used to grab back-end server transmission is transported
The response message to be updated that row to breakpoint location obtains;Message is sent to end to be tested after test module 510 is also used to update
End, so that terminal to be tested is based on message after updating and tests front-end code to be tested.
In one embodiment, code tester request is identified comprising target rear end, and handling module 506 is also used to grab multiple
The corresponding back-end code that back-end server is sent runs the response message to be screened obtained to breakpoint location;It is reported from response to be screened
Target rear end is extracted in text and identifies corresponding response message to be updated, is reported remaining response message to be screened as response to be sent
Text;Message and response message to be sent are sent to terminal to be tested after test module 510 is also used to update.
In one embodiment, parameter identification includes interface document mark, obtains module 504 and is also used to obtain and interface text
Shelves identify corresponding new version interface document and legacy version interface document;It is connect by comparing new version interface document and legacy version
Mouth document, extracts updated target component.
In one embodiment, test module 510 is also used to identify the corresponding updating type of target component;Work as updating type
When to delete, the target component for including in message to be updated is deleted, message after being updated;When updating type is modification, look into
Parameter to be updated corresponding with target component in message to be updated is looked for, parameter to be updated is replaced with into target component, is updated
Message afterwards;When updating type is newly-increased, update corresponding with target component position in message to be updated is searched, is updating position
Add target component, message after being updated.
Specific about code tester device limits the restriction that may refer to above for code test method, herein not
It repeats again.Modules in above-mentioned code tester device can be realized fully or partially through software, hardware and combinations thereof.On
Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be proxy server, in
Portion's structure chart can be as shown in Figure 6.The computer equipment includes that the processor, memory, network connected by system bus connects
Mouth and database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The storage of the computer equipment
Device includes non-volatile memory medium, built-in storage.The non-volatile memory medium be stored with operating system, computer program and
Database.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.It should
The database of computer equipment is for storing the data such as target component, message to be updated.It can also be deployed with and grab on proxy server
Job contract tool.The network interface of the computer equipment is used to communicate with external terminal by network connection.The computer program quilt
To realize a kind of code test method when processor executes.
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with
The step of computer program, which realizes the code test method in above-mentioned each embodiment when executing computer program.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program realizes the step of code test method in above-mentioned each embodiment when being executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of code test method, which comprises
Receive code tester request;It include parameter identification and breakpoint location data, the breakpoint bit in the code tester request
It is corresponding with breakpoint location to set data;
Obtain target component corresponding with the parameter identification;
More fresh code does not run the message to be updated obtained to the breakpoint location for crawl;
The message to be updated, message after being updated are updated according to the target component;
Message after the update is sent to equipment to be tested, so that message is treated after the equipment to be tested is based on the update
Test code is tested.
2. the method according to claim 1, wherein more fresh code is not run to the breakpoint location for the crawl
Obtained message to be updated, comprising:
The front-end code that do not update that crawl terminal is sent runs the request message to be updated obtained to the breakpoint location;
It is described that message after the update is sent to equipment to be tested, so that the equipment to be tested is based on message after the update
Code to be tested is tested, comprising:
Message after update is sent to server to be tested, so that message is treated after the server to be tested is based on the update
Test back-end code is tested.
3. the method according to claim 1, wherein more fresh code is not run to the breakpoint location for the crawl
Obtained message to be updated, comprising:
The back-end code that do not update that crawl back-end server is sent runs the response message to be updated obtained to the breakpoint location;
It is described that message after the update is sent to equipment to be tested, so that the equipment to be tested is based on message after the update
Code to be tested is tested, comprising:
Message after update is sent to terminal to be tested, so that the terminal to be tested is based on message after the update to be tested
Front-end code is tested.
4. according to the method described in claim 3, it is characterized in that, code tester request includes target rear end mark, institute
It states the back-end code that do not update that crawl back-end server is sent and runs the response message to be updated obtained to the breakpoint location, wrap
It includes:
It grabs the corresponding back-end code that multiple back-end servers are sent and runs the response report to be screened obtained to the breakpoint location
Text;
Target rear end is extracted from the response message to be screened and identifies corresponding response message to be updated, by remaining sound to be screened
Answer message as response message to be sent;
It is described that message after the update is sent to equipment to be tested, comprising:
Message after the update and the response message to be sent are sent to terminal to be tested.
5. the method according to claim 1, wherein the parameter identification include interface document mark, it is described to obtain
Take target component corresponding with the parameter identification, comprising:
Obtain new version interface document corresponding with interface document mark and legacy version interface document;
By comparing the new version interface document and the legacy version interface document, updated target component is extracted.
6. the method according to claim 1, wherein described update the report to be updated according to the target component
Text, message after being updated, comprising:
Identify the corresponding updating type of the target component;
When updating type is to delete, the target component for including in the message to be updated, message after being updated are deleted;
When updating type is modification, parameter to be updated corresponding with the target component in the message to be updated is searched, it will
The parameter to be updated replaces with the target component, message after being updated;
When updating type is newly-increased, update corresponding with target component position in the message to be updated is searched, in institute
It states and updates the position addition target component, message after being updated.
7. a kind of code tester device, which is characterized in that described device includes:
Receiving module, for receiving code tester request;It include parameter identification and breakpoint location number in the code tester request
According to;The breakpoint location data are corresponding with breakpoint location;
Module is obtained, for obtaining target component corresponding with the parameter identification;
Handling module runs the message to be updated obtained to the breakpoint location for grabbing not more fresh code;
Update module, for updating the message to be updated, message after being updated according to the target component;
Test module, for message after the update to be sent to equipment to be tested, so that the equipment to be tested is based on described
Message tests code to be tested after update.
8. the apparatus according to claim 1, which is characterized in that the handling module is also used to grab back-end server transmission
The back-end code that do not update run the response message to be updated obtained to the breakpoint location;
Message is sent to terminal to be tested after the test module is also used to update, so that the terminal to be tested is based on described
Message tests front-end code to be tested after update.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 6 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 6 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811545376.5A CN109710522A (en) | 2018-12-17 | 2018-12-17 | Code test method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811545376.5A CN109710522A (en) | 2018-12-17 | 2018-12-17 | Code test method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109710522A true CN109710522A (en) | 2019-05-03 |
Family
ID=66256649
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811545376.5A Pending CN109710522A (en) | 2018-12-17 | 2018-12-17 | Code test method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109710522A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110399293A (en) * | 2019-06-21 | 2019-11-01 | 平安科技(深圳)有限公司 | System detection method, device, computer equipment and storage medium |
CN110427324A (en) * | 2019-07-30 | 2019-11-08 | 中国工商银行股份有限公司 | Joint debugging system, joint debugging method, computer equipment and storage medium |
CN110457228A (en) * | 2019-08-22 | 2019-11-15 | 携程计算机技术(上海)有限公司 | The comparison method and system of interface returned packet |
CN111651365A (en) * | 2020-07-01 | 2020-09-11 | 中国银行股份有限公司 | Automatic interface testing method and device |
CN111930612A (en) * | 2020-07-09 | 2020-11-13 | 北京皮尔布莱尼软件有限公司 | Method and device for detecting code updating correctness and computing equipment |
CN112202636A (en) * | 2020-09-29 | 2021-01-08 | 中国银行股份有限公司 | Communication test method and system |
CN113553260A (en) * | 2021-07-22 | 2021-10-26 | 工银科技有限公司 | Test method, test apparatus, device, medium, and program product |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090006841A1 (en) * | 2007-06-29 | 2009-01-01 | Verizon Services Corp. | System and method for testing network firewall for denial-of-service (dos) detection and prevention in signaling channel |
WO2010122228A1 (en) * | 2009-04-22 | 2010-10-28 | Ip Networks Oy | Testing apparatus and method |
WO2016004657A1 (en) * | 2014-07-11 | 2016-01-14 | 电子科技大学 | Device for automatically generating test cases for embedded software and method thereof |
CN108400978A (en) * | 2018-02-07 | 2018-08-14 | 深圳壹账通智能科技有限公司 | Leak detection method, device, computer equipment and storage medium |
-
2018
- 2018-12-17 CN CN201811545376.5A patent/CN109710522A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090006841A1 (en) * | 2007-06-29 | 2009-01-01 | Verizon Services Corp. | System and method for testing network firewall for denial-of-service (dos) detection and prevention in signaling channel |
WO2010122228A1 (en) * | 2009-04-22 | 2010-10-28 | Ip Networks Oy | Testing apparatus and method |
WO2016004657A1 (en) * | 2014-07-11 | 2016-01-14 | 电子科技大学 | Device for automatically generating test cases for embedded software and method thereof |
CN108400978A (en) * | 2018-02-07 | 2018-08-14 | 深圳壹账通智能科技有限公司 | Leak detection method, device, computer equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
陈林等: "一种基于嵌入式***的远程程序更新机制", 《微计算机信息》, no. 26, 30 September 2007 (2007-09-30), pages 4 - 6 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110399293A (en) * | 2019-06-21 | 2019-11-01 | 平安科技(深圳)有限公司 | System detection method, device, computer equipment and storage medium |
CN110399293B (en) * | 2019-06-21 | 2024-05-03 | 平安科技(深圳)有限公司 | System test method, device, computer equipment and storage medium |
CN110427324A (en) * | 2019-07-30 | 2019-11-08 | 中国工商银行股份有限公司 | Joint debugging system, joint debugging method, computer equipment and storage medium |
CN110427324B (en) * | 2019-07-30 | 2023-09-08 | 中国工商银行股份有限公司 | Joint debugging system, joint debugging method, computer equipment and storage medium |
CN110457228B (en) * | 2019-08-22 | 2022-12-20 | 携程计算机技术(上海)有限公司 | Method and system for comparing interface return messages |
CN110457228A (en) * | 2019-08-22 | 2019-11-15 | 携程计算机技术(上海)有限公司 | The comparison method and system of interface returned packet |
CN111651365A (en) * | 2020-07-01 | 2020-09-11 | 中国银行股份有限公司 | Automatic interface testing method and device |
CN111651365B (en) * | 2020-07-01 | 2024-04-19 | 中国银行股份有限公司 | Automatic interface testing method and device |
CN111930612B (en) * | 2020-07-09 | 2024-03-19 | 北京皮尔布莱尼软件有限公司 | Code updating correctness detection method and device and computing equipment |
CN111930612A (en) * | 2020-07-09 | 2020-11-13 | 北京皮尔布莱尼软件有限公司 | Method and device for detecting code updating correctness and computing equipment |
CN112202636B (en) * | 2020-09-29 | 2022-06-17 | 中国银行股份有限公司 | Communication test method and system |
CN112202636A (en) * | 2020-09-29 | 2021-01-08 | 中国银行股份有限公司 | Communication test method and system |
CN113553260A (en) * | 2021-07-22 | 2021-10-26 | 工银科技有限公司 | Test method, test apparatus, device, medium, and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109710522A (en) | Code test method, device, computer equipment and storage medium | |
US11151083B2 (en) | Generating target application packages for groups of computing devices | |
US8959000B2 (en) | Integrated testing systems and methods | |
CN108595329A (en) | A kind of application testing method, device and computer storage media | |
CN108804618A (en) | Configuration method for database, device, computer equipment and storage medium | |
EP2545445A2 (en) | Virtual software application deployment configurations | |
US20130191814A1 (en) | Test scenario generation method, test scenario generation system, and test scenario generation program | |
CN108600311B (en) | Method and device for simulating interface data by client | |
CN106502746A (en) | The packaging method and device of application program | |
US11436133B2 (en) | Comparable user interface object identifications | |
CN112650688B (en) | Automated regression testing method, associated device and computer program product | |
CN113094255A (en) | Simulation test method, device and system for data interface | |
CN106815142A (en) | A kind of method for testing software and system | |
CN109144799A (en) | Integrated testing method, apparatus, computer equipment and storage medium | |
CN109857391A (en) | Processing method and processing device, storage medium and the electronic device of data | |
CN112363953A (en) | Interface test case generation method and system based on crawler technology and rule engine | |
CN113641582A (en) | Mixed-mode mobile application debugging method and system | |
CN110515514A (en) | A kind of data processing method, device and storage medium | |
CN110334302A (en) | Complicated Web application front end motion time analyses method | |
CN106713001A (en) | Network inspection method and apparatus | |
CN112433953A (en) | Embedded automatic testing method, device, equipment and medium based on network game client | |
CN116719735A (en) | Test case generation method and device | |
CN113641580B (en) | Mixed mode mobile application debugging method and system | |
CN110232019A (en) | Page test method and Related product | |
JP2009104393A (en) | Software trouble ticket management system and method, and program |
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 |