CN104331369B - Page detection method and device, server based on browser - Google Patents
Page detection method and device, server based on browser Download PDFInfo
- Publication number
- CN104331369B CN104331369B CN201410677606.9A CN201410677606A CN104331369B CN 104331369 B CN104331369 B CN 104331369B CN 201410677606 A CN201410677606 A CN 201410677606A CN 104331369 B CN104331369 B CN 104331369B
- Authority
- CN
- China
- Prior art keywords
- test case
- server
- information
- browser
- test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The invention discloses a kind of page detection method based on browser and devices, server, this method comprises: when user accesses test case system in server by browser, search information is sent to server, test case corresponding with described search information is returned to request server, test case is what the server was searched in the test case data library of the test case system;Receive the test case corresponding with described search information that server is returned according to described search information;Test case corresponding with search information is shown on the default display position of the browser;Execute the test case of display.This method makes user access the test case system in server by browser, to obtain test case corresponding with information is searched for, test case can be obtained on multiple browsers by realizing user, it can cooperate between user, to reduce the cost in test process, testing efficiency is improved.
Description
Technical field
The present invention relates to network optimization fields, and in particular to a kind of page detection method and device, clothes based on browser
Business device.
Background technique
During test software product, usually requires to be designed in advance according to specific software product and write test use
Example simultaneously forms file, during test software, according to designing the test case write before to each of software product
Function carries out test verifying.
Currently, common test case can largely be multiplexed original test case or according to software product increase newly demand or
The content of change edits original test case, to test used test case as a new round.Existing survey
Example on probation is usually to pass through Excel or Word file format storage and management, and the file of a large amount of test case is fallen in
It is stored on the computer of each dispersion, but this storage can not carry out unified storage, only be stored in tester's
In local computer, this results in the quantity of test case is very more, and in addition during collecting test case
It can not cooperate on the computer of one not stored test case, therefore, take a substantial amount of time during the test and people
Power cost.
Summary of the invention
For the defects in the prior art, the present invention provides a kind of page detection method based on browser and device,
Server realizes the collaborative work between user, reduces the cost in test process, improves testing efficiency.
In a first aspect, the present invention provides a kind of page detection method based on browser, comprising:
When user accesses test case system in server by browser, Xiang Suoshu server sends search information,
To request the server to return to test case corresponding with described search information, the test case is the server in institute
It states and searches in the test case data library of test case system;
Receive the test case corresponding with described search information that the server is returned according to described search information;
Test case corresponding with described search information is shown on the default display position of the browser;
Execute the test case of display.
Optionally, before the step of test case for executing display, the method also includes:
The test case is edited in the browser;And
The storage request for saving edited test case is sent, to the server to request the server according to depositing
The test case is stored in test case data library by storage request;
Correspondingly, the test case for executing display, comprising:
Test case after executive editor.
Optionally, described to show test case corresponding with described search information in the default display position of the browser
After the step set, the method also includes:
The test case of display is collected in the browser.
Optionally, described search information includes: product belonging to the test case and/or project information;
Before described the step of sending search information to server, the method also includes:
Receive product and/or project belonging to test case described in the browser side of user's selection;
It is described to send search information to server, comprising:
Product belonging to the test case and/or project information are sent to the server, to request the server
Test case corresponding with the product and/or project is returned to, the test case is the server in the test case
It corresponds in database and searches in the product and/or project;
Optionally, the method also includes:
Receive test case information, parameter value and/or the encryption information of user's input;
The test case information, parameter value and/or encryption information are sent into the server, to request the server
Test case is generated according to the test case information, parameter value and/or encryption information;
Receive and show the test case for the generation that the server is sent.
Optionally, the method also includes:
In the browser side, display executes the test result of the test case, and
The result for sending the test result for saving the test case to the server saves request, to request the clothes
Business device saves request according to result and the test result of the test case is stored in the test case data library.
Optionally, it includes: the information that the test result is stored according to predetermined format that the result, which saves request,.
Optionally, if being stored with edited test case in the test case data library, the browser is received
The prompt information of the storage that the server the is sent test case failure, and show the prompt information.
Optionally, before Xiang Suoshu server sends the step of search information, the method also includes:
Logging request is sent to the server, to request whether the server determines user according to the logging request
The test case system can be logged in, the logging request includes: the uniform resource locator of the test case system
(Uniform Resource Locator, abbreviation URL);
If the server determines that user can log in the test case system, Xiang Suoshu according to the logging request
The webpage information of browser transmission test case system.
Second aspect, the present invention also provides one kind to be based on browsing device net page detection method, the test case system of server
Test case and the corresponding test result of test case are stored in system;The described method includes:
The search information that user is sent by browser is received, according to described search information in the test case system
Search test case corresponding with described search information;
The test case of lookup is sent into the browser, so that the browser is by the test case of lookup preset
Display position is shown.
Optionally, the method also includes:
The storage request that the browser is sent is received, is compiled according to the user that the storage request sends the browser
Test case after volume is stored in the test case data library of the test case system.
Optionally, the edited test case of user for being sent the browser according to the storage request stores
In the test case data library of the test case system, comprising:
It is requested the edited test case of user that the browser is sent being stored in test case according to the storage
In database under product belonging to the test case and/or project;
And/or
If described search information includes: product belonging to the test case and/or project information;
Then, described to search survey corresponding with described search information in the test case system according to described search information
Example on probation, comprising:
It is searched under the product and/or project in the test case system according to the product and/or project information
All test cases.
Optionally, the method also includes:
The server receives test case information, parameter value and/or the encryption information that user is inputted by browser, root
According to the test case information, parameter value and/or encryption information, test case is generated;
The test case of generation is sent into the browser, so that the browser shows the test case of generation.
Optionally, the browser execute display test case, and obtain the test case test result it
Afterwards, the method also includes:
The result for receiving the test result that the browser is sent saves request, and saving request according to the result will
The test result is stored in the test case data library of the test case system.
Optionally, it includes: the information that the test result is stored according to predetermined format that the result, which saves request,;
The predetermined format are as follows: the executor-of the m- test result test knot when execution of the test result
The routing information of fruit.
Optionally, in server test case edited according to storage request storage user, institute is determined
Stating in the test case data library of test case system has had identical test case, then sends the survey to the browser
The prompt information of example failure on probation, so that the browser shows the prompt information.
Optionally, before described the step of receiving the search information that user is sent by browser, the method also includes:
The server receives the logging request that the user that the browser is sent logs in the test case system, according to
The logging request determines whether user can log in the test case system, and the logging request includes: that the test is used
The URL of example system.
The third aspect, the webpage test device based on browser that the present invention also provides a kind of, comprising:
Transmission unit, for being sent to server when user accesses test case system in server by browser
Information is searched for, to request the server to return to test case corresponding with described search information, the test case is described
What server was searched in the test case data library of the test case system;
Receiving unit, for receive the server returned according to described search information it is corresponding with described search information
Test case;
Display unit, for showing corresponding with described search information in the default display position of the browser;
Execution unit, for executing the test case of display.
Optionally, described device further include:
Edit cell, the test case shown for editing display unit in the browser;
The transmission unit is also used to send the preservation edited test case of edit cell to the server
Storage request, to request the server that the test case is stored in test case data library according to storage request;
The execution unit is specifically used for executing the edited test case of edit cell.
Optionally, the method also includes:
Unit is collected, for collecting the test case shown in the browser.
Optionally, described search information includes: product belonging to the test case and/or project information;
The receiving unit is also used to before the transmission unit sends described search information, receives user's selection
Product and/or project belonging to test case described in the browser side;
The transmission unit, specifically for sending product belonging to the test case and/or project to the server
Information.
Optionally, the receiving unit is also used to receive test case information, parameter value and/or the encryption of user's input
Information;
The transmission unit is also used to the received test case information of the receiving unit, parameter value and/or adds
Confidential information sends the server, to request the server according to the test case information, parameter value and/or encryption information
Generate test case;
The receiving unit is also used to receive the test case that the server that the server is sent generates;
The display unit is also used to show the received test case of the receiving unit.
Optionally, the display unit is also used to show the test knot of the execution test case in the browser side
Fruit;
The transmission unit, the result for being also used to send the test result for saving the test case to the server are protected
Request is deposited, the test result of the test case is stored in the test to request the server to save request according to result
In case data library.
Optionally, it includes: the information that the test result is stored according to predetermined format that the result, which saves request,.
Optionally, when being stored with edited test case in the test case data library, the receiving unit, also
For receiving the prompt information for the storage test case failure that the server is sent, the prompt information is the service
What device was sent when storing the test case of the edit cell editor according to the storage request;
The display unit is also used to show the received prompt information of the receiving unit.
Optionally, the transmission unit is also used to before sending described search information, and Xiang Suoshu server, which is sent, to be logged in
Request, to request the server to determine whether user can log in the test case system, institute according to the logging request
State the URL that logging request includes: the test case system;
Receiving unit is also used to after the transmission unit sends logging request, and the server determines that user can
When logging in the test case system, the webpage information for the test case system that the server is sent is received.
Fourth aspect is stored with survey in the test case system of the server the present invention also provides a kind of server
Example and the corresponding test result of test case on probation;The server includes:
Receiving unit, the search information sent for receiving user by browser;
Searching unit, for being searched in the test case system according to described search information and described search information pair
The test case answered;
Transmission unit, test case for that will search send the browser, so that the browser is by the survey of lookup
Example on probation is shown in preset display position.
Optionally, the receiving unit is also used to receive the storage request that the browser is sent;
Storage unit, for being edited the user that the browser is sent according to the received storage request of the receiving unit
Test case afterwards is stored in the test case data library of the test case system.
Optionally, the storage unit, specifically for by the edited test case of user according to belonging to test case
Product and/or project store test case;
And/or
When described search information includes: product belonging to the test case and/or project information, the lookup is single
Member, specifically for being searched under the product and/or project in the test case system according to the product and/or project information
All test cases.
Optionally, the receiving unit is also used to receive test case information, parameter value that user is inputted by browser
And/or encryption information;
The server further include:
Generation unit, for being believed according to the received test case information of the receiving unit, parameter value and/or encryption
Breath generates test case;
The transmission unit, the test case for being also used to generate the generation unit sends the browser, so that institute
Browser is stated to show the test case of generation.
Optionally, the test case of display is executed in the browser side, and obtains the test result of the test case
Later, the receiving unit, the result for being also used to receive the test result that the browser is sent save request;
Storage unit is also used to be saved according to the received result of the receiving unit and requests for the test result to be stored in
In the test case data library of the test case system.
Optionally, it includes: the information that the test result is stored according to predetermined format that the result, which saves request,;
The predetermined format are as follows: the executor-of the m- test result test knot when execution of the test result
The routing information of fruit.
Optionally, the server further include:
Determination unit, for according to the received storage request storage edited test case of user of the receiving unit
When, determine in the test case data library of the test case system whether there is identical test case;
The transmission unit, be also used to the determination unit determine in the test case data library had it is identical
When test case, Xiang Suoshu browser sends the prompt information of test case failure, so that described in the browser shows
Prompt information.
As shown from the above technical solution, a kind of page detection method and device, clothes based on browser provided by the invention
Business device, this method makes user access the test case system in server by browser, corresponding with information is searched for obtain
Test case, test case can be obtained on multiple browsers by realizing user, can cooperate between user,
To reduce the cost in test process.
Detailed description of the invention
Fig. 1 is the flow diagram for the page detection method based on browser that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides the page detection method based on browser flow diagram;
Fig. 3 be another embodiment of the present invention provides the page detection method based on browser flow diagram;
Fig. 4 A be another embodiment of the present invention provides the page detection method based on browser flow diagram;
Fig. 4 B is the test case shown in one embodiment of the invention and implementing result schematic diagram;
Fig. 5 be another embodiment of the present invention provides the webpage test device based on browser structural schematic diagram;
Fig. 6 is the structural schematic diagram for the webpage test device based on browser that one embodiment of the invention provides;
Fig. 7 is the structural schematic diagram for the server that one embodiment of the invention provides.
Specific embodiment
With reference to the accompanying drawing, the specific embodiment of invention is further described.Following embodiment is only used for more clear
Illustrate to Chu technical solution of the present invention, and not intended to limit the protection scope of the present invention.
Currently, tester is commonly used such as curl, fiddler, postman in the interface testing of software test
Tool writes the test case being mainly made of order line.For example, test case can be a text document, wherein with character
Form describes several order lines (order line is equivalent to the sentence for describing and which kind of tool executing which kind of operation using);It is executing
When, each order line can be read by row and is executed, and corresponding implementing result may finally be obtained.It is specific by taking curl as an example below
Introduce the order line of composition test case:
Curl is using URL (Uniform Resource Locator, uniform resource locator) grammer in order line side
The open source file transfer conveyance to work under formula.The usage of curl are as follows:
curl[options][URL...]
Wherein, " [options] " is the parameter that downloading needs, about more than 80, each function of curl be entirely according to
It is completed by these parameters, the use of design parameter can refer to the help of curl.For example, using order line:
curl-i http://curl.haxx.se
The page pointed by " http://curl.haxx.se " will be obtained.Equally, if " [URL] " here is directed toward
Be that a file or a width figure can be directly downloaded to local;If that downloading is HTML (HyperText Markup
Language, hypertext markup language) document, then being default to not show top of file.But since ginseng is used herein
Number "-i ", file will all be shown after executing this order line;Similarly, if only needing to show top of file, then can incite somebody to action
Parameter "-i " replaces with "-l ".
Currently, the type for the order line for including in test case is following one or more: curl, fiddler,
postman.Certainly, the tool that the type of order line and while writing test case can be used can also be not limited only to this.
However, tester needs to design and write various test cases in the interface testing of software test,
Then the correctness of interface function is verified by the way that parameter value is arranged, also needed after having verified test case and result into
The unified storage of row, can directly store the test case and test result that write at present, but this storage is
It is stored in the local computer of some tester, when other testers need to test, and test interface needs are used
When the test case write, then original test case write can not be shared, cause not being total between tester
All test cases are enjoyed, can not be cooperated, this just needs other testers that must rewrite survey with regard to test interface
Example on probation is tested, and is during the test taken a substantial amount of time and human cost.
In view of the foregoing drawbacks, the embodiment of the present invention proposes a kind of page detection method based on browser, referring to such as Fig. 1
Shown in a kind of flow diagram of the page detection method based on browser, this method comprises the following steps:
101, when user accesses test case system in server by browser, Xiang Suoshu server sends search letter
Breath, to request the server to return to test case corresponding with described search information, the test case is the server
It is searched in the test case data library of the test case system.
For example, multiple tests are stored in above-mentioned server in the test case data library of test case system to use
Example, user can call needs by the test case system in browser login service device when needing to call test case
Test is used.
Search information in concrete application, in step 101 can include: product belonging to the test case, project information,
Key message etc..
102, the test case corresponding with described search information that the server is returned according to described search information is received;
Multiple test cases are stored in the test case system of server in the present embodiment, those test cases can be phase
Close what tester edited and stored in advance.Particularly, in test case system, according to relevant production when each test case
Product/project information carries out classification storage, to facilitate other tester's subsequent calls or check.
For example, server can be searched according to product belonging to test case in information or project information lookup is searched for this
The corresponding test case of rope information.
103, test case corresponding with described search information is shown on the default display position of the browser.
For example, browser interface can have multiple data frames, and test case corresponding with described search information is shown in
In data frame for showing test case;That is, test case can be shown in the clear of user's operation after user obtains test case
It lookes in the data frame at device interface.
For example, the test case shown in browser can are as follows:
Curl-w% (http_code) http://api.xxx.cn? devname=AAAA;
Curl-w% (http_code) http://api.xxx.cn? devname=12345;
Curl-w% (http_code) http://api.xxx.cn? devname=Chinese character;
Curl-w% (http_code) http://api.xxx.cn? devname=!@# $ %,
104, the test case of display is executed.
In practical applications, tester calls test case to be mainly used for testing, for this purpose, being shown in tester
After the test case shown, the test case that those displays can be performed carries out the interface testing of software.
The page detection method based on browser in the present embodiment, so that tester accesses server by browser
In test case system, to obtain test case corresponding with information is searched for, realizing tester can be in any client
The test case of needs is obtained in end, multiple testers can be online simultaneously, cooperates, to reduce in test process
Cost improves testing efficiency.
In another embodiment, tester, can be according to test need in the test case shown on viewing browser
Judge whether to need to modify test case, it, then can be to the test case shown in browser if necessary to modify test case
It is edited.As shown in Fig. 2, page detection method may also include following step 103a and step before step 104
103b:
103a: the test case shown in tester's editable browser is edited in the browser in a browser
The test case of display.
Tester edits the test case of display in the present embodiment, as tester modifies the ginseng of the test case of display
Numerical value, or the test case of part display is deleted, alternatively, addition partial test use-case etc..Tester can in the present embodiment
The test case of needs is edited according to actual needs.
103b: the storage request for saving edited test case is sent to server, with request server according to storage
Test case is stored in test case data library by request.
In general, can be by product/item belonging to the edited test case storage of tester in the database test case
Mesh is under classification.For example, test case is stored in test case data library by server according to storage request
Caseout.txt file, which can number or other modes have recorded it is every in each test case
One order line.
Correspondingly, aforementioned step 104 can be following step 104 ':
104 ': the test case after executive editor.
In the present embodiment, tester can call the test case in test case system by browser, and then save
The time of test case is edited, and can also edit relevant test parameter in the test case of calling, test can be saved as a result,
The time of personnel and cost improve testing efficiency.
Further, edited test case is stored in server side test case system by browser by tester
System, facilitates checking for follow-up test personnel, and can also increase the content of test case in test case system, saves follow-up test
The cost of personnel improves testing efficiency.
In general, edited test case is saved to server after the test case that can be shown in editor's browser,
But in other embodiments, step 103b shown in Fig. 2 can not also be executed.It is shown that is, tester edits in browser
Test case after, test case that can directly after executive editor does not send to server and stores edited test case
Storage request.
In addition, after tester shows test case by browser in any client, for convenience of subsequent direct
It checks, the test case of display can be collected in a browser, for example, the collection display in the sidebar (such as collection) of browser
Test case, facilitate and subsequent check and call.Certainly, tester can also collect edited test case in Fig. 2.
And then checked at any time convenient for tester, the time for searching test case is greatly reduced, the work effect of tester is improved
Rate.
It is understood that tester can also carry out delete operation to test case of the addition in collection.Or
Person directly carries out entire collection the operation such as to delete.The above-mentioned page detection method based on browser, so that tester is logical
The test case system crossed in browser access server realizes test to obtain test case corresponding with information is searched for
Personnel can obtain the test case of needs in any client, and multiple testers can be online simultaneously, cooperate, from
And the cost in test process is reduced, improve testing efficiency.
Fig. 3 shows the page detection method provided in an embodiment of the present invention based on browser, as shown in figure 3, this method
Specifically comprise the following steps:
301, browser sends logging request to the server, to request the server true according to the logging request
Determine whether user can log in the test case system.
Wherein, the logging request includes: the URL of the test case system;
If 302, the server determines that user can log in the test case system according to the logging request, to
The browser sends the webpage information of test case system.
303, by the webpage information of test case system in browser, Xiang Suoshu server sends search information, to ask
The server is asked to return to test case corresponding with described search information.
For example, after the webpage information for showing test case system in a browser, the browser receive can user/
Product and/or project belonging to test case described in the browser side that tester selects in webpage;
Correspondingly, search information is sent to server, specifically: Xiang Suoshu server is sent belonging to the test case
Product and/or project information, it is described to request the server to return to test case corresponding with the product and/or project
The test case server is corresponded in the product and/or project in the test case data library and is searched.
Optionally, in other embodiments, search information can further include the test case information of tester's input (as closed
Key order etc.), parameter value and/or encryption information;
It in turn include test case information, the parameter value, encryption of tester's input to the search information that server is sent
It is one or more in the information such as product belonging to information, test case and/or project information.
Server, can be according to the test case in search information after receiving the search information including test case information
Information searches the test case to match with test case information in test case data library;Alternatively,
Server can be used according to the parameter value in search information in test after receiving the search information including parameter value
The test case comprising the parameter value is searched in example database, alternatively,
Server exists after receiving the search information including encryption information according to the key of encryption information in search information
Searching in test case data library can be using the test case of key decryption.
Server can be searched in test case data library according to the information in search information as a result, meets tester's need
The test case asked.
304, browser shows test case corresponding with described search information in the default display position of the browser
It sets, and to the test case for executing display.
It will be appreciated that in this step, browser can will search for the corresponding test case of information and show in browser circle
On the default display position in face, if user needs to be implemented those test cases and tests test interface, capable of emitting execution
Order is shown in browser interface as triggered corresponding with those test cases testing button in browser interface with executing
Test case.
305, the test result of the test case of execution display is shown in browser side.
The display mode of test result can be as shown in Figure 4 B.Each column in Fig. 4 B all includes the character representation of test case
And corresponding implementing result (implementing result that such as " status code " and " result 1 " are " use-case 1 ").
306, browser saves request to the result that server sends the test result for saving test case, to request to service
Device saves request according to result and the test result of test case is stored in test case data library.
For example, in the result.txt file that test result can be stored in test case data library.
In general, result saves request can include: according to the information of predetermined format storage test result, survey can be facilitated as a result,
Examination personnel are when subsequent calls test result is checked it can be seen that the test result of some test case and the test case.
The present embodiment can reduce the workload of tester, improve testing efficiency.
Fig. 4 A shows the page detection method provided in an embodiment of the present invention based on browser, as shown in Figure 4 A, Fig. 4 A
Shown in method include above-mentioned Fig. 1 to method flow shown in Fig. 3, the Fig. 1 is into method flow corresponding diagram 4A shown in Fig. 3
Second area information.
Test case in the present embodiment is stored in the test case data library of server, and user can pass through any client
Browser in end is checked/is called.
That is, the first area shown in Fig. 4 A, user can increase test case newly after logging in test case system,
Such as newly-increased URL, POST parameter for needing to fill in tested interface, and the replacement of parameter, others Curl order are improved, if any encryption
It also needs to be configured encryption.Then use-case is saved.
The second area shown in Fig. 4 A after user logs in test case system, existing test case can be used to be surveyed
Examination, such as executes after existing test case can search test case directly in product and project and directly runs, can also be
It is modified in the test case saved.Such as find test case system provide parameter value be unsatisfactory for testing requirement can " from
Custom parameter value is filled in dynamicization test parameter ".
Either implementation of test cases system included parameter value or the customized parameter value of tester, can will all use
Example and destination file are stored in the file specified, and storage file name, executor and the execution time in the database, so as to
It checks.
It can following steps for the information of the first area in Fig. 4 A.
A01, user log in the webpage of test case system by browser;
A02, user input related parameter values, test case information in the webpage of browser side, so that browser will be used
The related parameter values of family input, test case information sending server, with request server according to related parameter values, test case
Information generates test case;
A03, browser receive the test case of server transmission generated according to related parameter values, test case information simultaneously
Display.
The information such as encryption information and use-case title are arranged in the test case that A04, user can generate according to server, will be arranged
The test case of encryption information and use-case title is saved, and is such as sent to server and is saved request, so that server is according to guarantor
It deposits request and saves the test case generated.
In general, server saves test case according to product and/or project and scheduled storage format.
Certainly, in a particular application, if the test case that user checks that server generates does not meet testing requirement, may be used also
Test case is edited and completed, to obtain the test case for meeting testing requirement, the test case for meeting testing requirement is arranged
Encryption information and test case title etc. are so that server is saved.
If being stored with the test case or edited test case of generation in the test case data library of server side,
Then browser also can receive the prompt information for the storage test case failure that server is sent, and show the prompt information.
If the test case for not having storage to generate in the test case data library of server side, can directly save, and
Test case, which is sent, to browser saves successful information.
Specifically, test case can be saved in the specified file of server side, which is stored with
The relevant test case of test case after being write to this, so that tester is easy to search similar test case and passes through
It writes the time, write the relevant project of type, test case etc. and distinguishing.
It can refer to Fig. 1 to process illustrated in fig. 3 for the information of the second area in Fig. 4 A.
User can log in the webpage of test case system, call or check test case, using the test case of calling
Test interface is tested.If the parameter value in the test case called does not meet testing requirement, user is in browser
Parameter value is changed at interface again, to obtain the test case for meeting testing requirement, is saved and is executed the test case, surveyed
It can carry out saving the test result after the test result of example on probation.
For example, according to executor, executing the information formats such as time, the product of execution and/or project to test result progress
Storage, in order to which other testers check and share.
The above method realizes user can obtain test case in the browser of multiple client, can be between user
It cooperates, to reduce the cost in test process.Further, the above method can also add test case
Close equal operation, realizes the flexible utilization of test case.
The executing subject of method can be browser in Fig. 1 to Fig. 4 A, and the executing subject of following methods shown in fig. 5 is service
Device.Browser in any client can be interacted with server, and realizing can cooperate between tester simultaneously, and have
Effect reduces the cost in test process, realizes the flexible utilization of test case.
Fig. 5 shows the page detection method based on browser of one embodiment of the invention offer, as shown in figure 5, this reality
The page detection method for applying example is as described below.
In the present embodiment, test case and the corresponding survey of test case are stored in the test case system of server
Test result.
501, server receives the search information that user is sent by browser, according to described search information in the test
Test case corresponding with described search information is searched in use-case system.
502, the test case of lookup is sent browser by server, so that the browser exists the test case of lookup
Preset display position is shown.
Optionally, when the search information includes product belonging to the test case and/or project information, server can
All tests under the product and/or project are searched in the test case system according to the product and/or project information
Use-case, and all test cases of lookup are sent into browser.
In practical applications, before aforementioned step 501, the above method may also include following steps not shown in the figure
Rapid 500:
500: server receives the logging request that the user that browser is sent logs in test case system, according to logging request
Determine whether user can log in test case system, the logging request includes: the URL of test case system.
When server determines that user can log in test case system according to logging request, test case is sent to browser
The webpage information of system, so tester can be searched in the webpage information for the test case system that browser is shown needed for
Product belonging to test case and/or project information, will pass through the search information that browser sends test case.
The server that test case is stored in the method for the present embodiment is interacted with browser, and realizing can between tester
To cooperate simultaneously, and the cost in test process is effectively reduced, realizes the flexible utilization of test case.
In addition, tester may also need to be compiled according to testing requirement after the test case that browser display is searched
The test case for collecting display, also needs to save the test case of editor as a result, server can also be used at this time
Receive the storage request that browser is sent, the edited survey of user for browser being sent according to the storage request
Example on probation is stored in the test case data library of test case system.
Specifically, the edited test case of user that server can send the browser according to the storage request
It is stored in test case data library under product belonging to the test case and/or project.
Certainly, in server test case edited according to storage request storage user, test case system is determined
Test case data library in whether had identical test case, if it is not, directly store, otherwise, to browser
The prompt information for sending test case failure, so that browser shows the prompt information.
In another possible implementation, if browser be sent to server be user input test case letter
Breath, parameter value and/or encryption information etc., server can also be used at this time
Receive user input by browser test case information, parameter extremely and/or encryption information, according to the test
Use-case information, parameter value and/or encryption information generate test case;
And the test case of generation is sent into the browser, so that browser shows the test case of generation.
In the third possible implementation, after above-mentioned browser shows test case, which can be clothes
Test case that business device generates or lookup, at this point, the test case shown in the browser can be performed in tester, and obtains
The test result of test case, if tester needs to save the test result of test case, correspondingly, server also be can be used
In
The result for receiving the test result that browser is sent saves request, saves request according to result and stores test result
In the test case data library of test case system
In general, result saves request can include: according to the information of predetermined format storage test result, for example, according to test
The formats such as executor-destination file path of m- test case store test result when as a result executing.Alternatively, according to test
The formats such as executor-test result routing information of m- test case store test result when as a result executing.
Server can store test case to be stored and/or survey result under a designated folder, and this document folder can
To be named and be stored in test case data library according to product and/or project information, according to the classification of test case point
It is not stored under different files, relevant test case can also be placed under a file, be conducive to distinguish.
The server that test case is stored in the method for the present embodiment is interacted with browser, and realizing can between tester
To cooperate simultaneously, and the cost in test process is effectively reduced, realizes the flexible utilization of test case.
Fig. 6 shows a kind of webpage test device based on browser provided in an embodiment of the present invention, as shown in fig. 6, should
Device includes: transmission unit 61, receiving unit 62, display unit 63 and execution unit 64;
Transmission unit 61, for being sent out to server when user accesses test case system in server by browser
Search information is sent, to request the server to return to test case corresponding with described search information, the test case is institute
State what server was searched in the test case data library of the test case system;
For example, multiple tests are stored in above-mentioned server in the test case data library of test case system to use
Example, user only needs to log in the system by browser when needing to test, for using the user of test case in the system
Test case can be encrypted, so that the test case of the encryption can be used in the other users having permission.
Above-mentioned search information includes: product belonging to the test case and/or project information.
Receiving unit 62, for receive the server returned according to described search information it is corresponding with described search information
Test case;
Display unit 63, for showing corresponding with described search information in the default display position of the browser
On;
Execution unit 64, for executing the test case of display.
In concrete application, the receiving unit 62, it may also be used for the transmission unit 61 send described search information it
Before, receive product and/or project belonging to test case described in the browser side of user's selection;The transmission unit 61,
Specifically for sending product belonging to the test case and/or project information to the server.
The above-mentioned webpage test device based on browser, so that user accesses the test case in server by browser
System, to obtain test case corresponding with information is searched for, test case can be obtained on multiple browsers by realizing user,
It can cooperate between user, to reduce the cost in test process.
The transmission unit 61 of above-mentioned apparatus is also used to before sending described search information, and the transmission of Xiang Suoshu server is stepped on
Record request, to request the server to determine whether user can log in the test case system according to the logging request,
The logging request includes: the URL of the test case system;
Receiving unit 62 is also used to after the transmission unit sends logging request, and the server determines user
When can log in the test case system, the webpage information for the test case system that the server is sent is received.
Above-mentioned apparatus is realized for the test case in test case data library, only after logging request confirmation, user
It is just available, play the role of safeguard protection test case.
In a particular application, described device further includes unshowned edit cell 65 in Fig. 6;
Edit cell 65, the test case shown for editing display unit in the browser;Collect unit
66, for collecting the test case shown in the browser.
Transmission unit 61 is also used to send depositing for the preservation edited test case of edit cell to the server
Storage request, to request the server that the test case is stored in test case data library according to storage request;
When being stored with edited test case in the test case data library, the receiving unit is also used to connect
Receive the prompt information for the storage test case failure that the server is sent, the prompt information be the server according to
It is sent when the test case of the storage request storage edit cell editor;Correspondingly, display unit 63 are also used to show
Show the received prompt information of the receiving unit.
Further, execution unit 64 are also used to execute the edited test case of the edit cell 65.
Optionally, tester can be performed those test cases and obtain test result, at this point, display unit 63 is also used to
The browser side display executes the test result of the test case;The transmission unit 61 is also used to the server
The result for sending the test result for saving the test case saves request, is requested with requesting the server to be saved according to result
The test result of the test case is stored in the test case data library.
For example, it includes: the information that the test result is stored according to predetermined format that the result, which saves request,.
In another achievable mode, the receiving unit 62 is also used to receive the test case letter of user's input
Breath, parameter value and/or encryption information;The transmission unit 61 is also used to the received test case of the receiving unit
Information, parameter value and/or encryption information send the server, with request the server according to the test case information,
Parameter value and/or encryption information generate test case;The receiving unit 62 is also used to receive the described of the server transmission
The test case that server generates;The display unit 63 is also used to show the received test case of the receiving unit.
Optionally, above-mentioned apparatus may also include collection unit not shown in the figure, which can be used for collecting browsing
The test case shown in device, to facilitate subsequent be directly viewable.
The webpage test device in browser of the present embodiment is located in browser, can be performed shown in aforementioned Fig. 1 to Fig. 4 A
Method flow, the present embodiment is not described here in detail.
Above-mentioned webpage test device makes tester access the test case system in server by browser, to obtain
Test case corresponding with search information is taken, the test use of needs can be obtained in any client by realizing tester
Example, multiple testers can be online simultaneously, cooperate, to reduce the cost in test process, improve testing efficiency.
Fig. 7 shows a kind of server provided in an embodiment of the present invention, stores in the test case system of the server
There are test case and the corresponding test result of test case;The server includes: receiving unit 71, searching unit 72, hair
Send unit 73.
Receiving unit 71, the search information sent for receiving user by browser;
Searching unit 72, for being searched in the test case system according to described search information and described search information
Corresponding test case;
Transmission unit 73, test case for that will search send the browser, so that the browser is by lookup
Test case is shown in preset display position.
For example, described search information can include: product belonging to the test case and/or project information, accordingly
Ground, searching unit 72 are specifically used for searching the product in the test case system according to the product and/or project information
And/or all test cases under project.
By being stored with test case in test case data library in above-mentioned server, facilitating multiple users can be total to
It enjoys, check and using the test case stored in the test case data library, save and largely rewrite test case
Time, improve testing efficiency.
Specifically, above-mentioned server further includes unshowned storage unit 74 in Fig. 7.
Receiving unit 71 above-mentioned is also used to receive the storage request that the browser is sent;
Storage unit 74, the user for being sent the browser according to the received storage request of the receiving unit compile
Test case after volume is stored in the test case data library of the test case system.
In a particular application, storage unit 74 are specifically used for the edited test case of user according to test case institute
The product and/or project of category store test case.
In another achievable mode, receiving unit 71 above-mentioned is also used to receive user and is inputted by browser
Test case information, parameter value and/or encryption information;
The server further includes unshowned in Fig. 7: generation unit 75;
Generation unit 75, for according to the received test case information of the receiving unit, parameter value and/or encryption
Information generates test case;
The transmission unit 73, the test case for being also used to generate the generation unit send the browser, so that
The browser shows the test case of generation.
Specifically, executing the test case of display in the browser side, and obtain the test result of the test case
Later, the receiving unit 71, the result for being also used to receive the test result that the browser is sent save request;
For example, it includes: the information that the test result is stored according to predetermined format that the result, which saves request,;It is described
Predetermined format are as follows: the path letter of the executor-test result of the m- test result when execution of the test result
Breath.
Storage unit 74 is also used to be saved according to the received result of the receiving unit and requests to store the test result
In the test case data library of the test case system.
In a particular application, the server further includes unshowned in Fig. 7: determination unit 76;
Determination unit 76, for being used according to the edited test of the received storage request storage user of the receiving unit
When example, determine in the test case data library of the test case system whether there is identical test case;
Transmission unit 73 is also used to determine in the test case data library there is identical survey in the determination unit
When example on probation, Xiang Suoshu browser sends the prompt information of the test case failure so that the browser show described in mention
Show information.
Aforementioned method flow shown in fig. 5 can be performed in server in the present embodiment, and the present embodiment is not described here in detail.
Above-mentioned server writes, modify etc. the test case of preservations by receiving browser end, needs for subsequent to similar
When project and/product are tested, test case is provided, it is convenient for users.And it can also be according to project and/product
Etc. differences, multiple files are respectively designated as, by identical items and/test case of product or the filename of predetermined storage format
Relevant test case is stored and is collected, so that it is corresponding with project and/product to greatly reduce user's lookup in test
Test case time, improve testing efficiency.
In addition, it is necessary to illustrate, Java language exploitation is can be used in the test case system in server, and browser side makes
With Jquery, Ajax, server side test case data library can be Mysql.Test case system can be located by Servlet
Service logic is managed, JSP and EL expression formula carrys out display data.
Wherein, packet important in service logic can include: cn.webTest.ajax, cn.webTest.controller,
Cn.webTest.Curl, cn.webTest.dao, cn.webTest.domain, cn.webTest.utils etc..
Wherein, cn.webTest.ajax is responsible for handling the ajax request in the webpage of browser, and returns to json data.
Cn.webTest.controller service logic is in this packet, including user's login, acquisition use-case list, add, edit,
It deletes, execute use-case, editor user, product and project, addition, deletion collection etc..Cn.webTest.Curl is responsible for executing Curl
It orders and returns the result.Cn.webTest.dao is responsible for the operation with database.The cn.webTest.domain package definition is originally
The object model used in system.Tool-class and method are contained in the cn.webTest.utils packet.
For example, above-mentioned browser can be Chrome kernel browser, which can be located in any client,
Server can be Tomcat server.
Only the test case system in server is illustrated in the present embodiment, does not limit specific processing business
The information of logic can be arranged according to actual needs.
In the present embodiment, server is interacted with the webpage detection device in browser, and tester is allowed to cooperate with work
Make, the test case and test result of each tester can be shared.Further, cleverer for the interface ciphering of encryption
It is living, the testing cost of tester is preferably reduced, testing efficiency is improved.
Similarly, it should be understood that disclose to simplify the present invention and help to understand one or more in each inventive aspect
A, in the above description of the exemplary embodiment of the present invention, each feature of the invention is grouped together into individually sometimes
In embodiment, figure or descriptions thereof.However, should not explain the method for the disclosure is in reflect an intention that be wanted
Ask protection the present invention claims features more more than feature expressly recited in each claim.More precisely, such as
As following claims reflect, inventive aspect is all features less than single embodiment disclosed above.
Therefore, it then follows thus claims of specific embodiment are expressly incorporated in the specific embodiment, wherein each right is wanted
Ask itself all as a separate embodiment of the present invention.
It will be understood by those skilled in the art that can be adaptively changed to the module in the equipment in embodiment
And they are provided in the different one or more equipment of the embodiment.Can in embodiment module or unit or
Component is combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or subgroups
Part.In addition to such feature and/or at least some of process or unit are mutually exclusive places, any combination can be used
To all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed any side
All process or units of method or equipment are combined.Unless expressly stated otherwise, this specification (is wanted including adjoint right
Ask, make a summary and attached drawing) disclosed in each feature can be replaced with an alternative feature that provides the same, equivalent, or similar purpose.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors
Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice
In the equipment of microprocessor or digital signal processor (DSP) to realize a kind of browser terminal according to an embodiment of the present invention
Some or all components some or all functions.The present invention is also implemented as executing side as described herein
Some or all device or device programs (for example, computer program and computer program product) of method.It is such
It realizes that program of the invention can store on a computer-readable medium, or can have the shape of one or more signal
Formula.Such signal can be downloaded from an internet website to obtain, and perhaps be provided on the carrier signal or with any other shape
Formula provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme should all cover within the scope of the claims and the description of the invention.
The invention also discloses A1, a kind of page detection method based on browser, comprising:
When user accesses test case system in server by browser, Xiang Suoshu server sends search information,
To request the server to return to test case corresponding with described search information, the test case is the server in institute
It states and searches in the test case data library of test case system;
Receive the test case corresponding with described search information that the server is returned according to described search information;
Test case corresponding with described search information is shown on the default display position of the browser;
Execute the test case of display.
Before the step of A2, method according to a1, the test case for executing display, the method also includes:
The test case is edited in the browser;And
The storage request for saving edited test case is sent, to the server to request the server according to depositing
The test case is stored in test case data library by storage request;
Correspondingly, the test case for executing display, comprising:
Test case after executive editor.
A3, method according to a1 or a2, it is described to show test case corresponding with described search information described
After step on the default display position of browser, the method also includes:
The test case of display is collected in the browser.
A4, according to any method of A1 to A3, described search information includes: product belonging to the test case
And/or project information;
Before described the step of sending search information to server, the method also includes:
Receive product and/or project belonging to test case described in the browser side of user's selection;
It is described to send search information to server, comprising:
Product belonging to the test case and/or project information are sent to the server, to request the server
Test case corresponding with the product and/or project is returned to, the test case is the server in the test case
It corresponds in database and searches in the product and/or project;
A5, according to any method of A1 to A4, the method also includes:
Receive test case information, parameter value and/or the encryption information of user's input;
The test case information, parameter value and/or encryption information are sent into the server, to request the server
Test case is generated according to the test case information, parameter value and/or encryption information;
Receive and show the test case for the generation that the server is sent.
A6, according to any method of A1 to A5, the method also includes:
In the browser side, display executes the test result of the test case, and
The result for sending the test result for saving the test case to the server saves request, to request the clothes
Business device saves request according to result and the test result of the test case is stored in the test case data library.
A7, the method according to A6, it includes: to store the test result according to predetermined format that the result, which saves request,
Information.
A8, the method according to A2, if being stored with edited test case, institute in the test case data library
It states browser and receives the prompt information for the storage test case failure that the server is sent, and show the prompt letter
Breath.
A9, according to any method of A1 to A8, before the step of Xiang Suoshu server sends search information, the side
Method further include:
Logging request is sent to the server, to request whether the server determines user according to the logging request
The test case system can be logged in, the logging request includes: the uniform resource locator of the test case system
URL;
If the server determines that user can log in the test case system, Xiang Suoshu according to the logging request
The webpage information of browser transmission test case system.
The invention also discloses
B10, a kind of page detection method based on browser are stored with test in the test case system of server and use
Example and the corresponding test result of test case;The described method includes:
The search information that user is sent by browser is received, according to described search information in the test case system
Search test case corresponding with described search information;
The test case of lookup is sent into the browser, so that the browser is by the test case of lookup preset
Display position is shown.
B11, method according to b10, the method also includes:
The storage request that the browser is sent is received, is compiled according to the user that the storage request sends the browser
Test case after volume is stored in the test case data library of the test case system.
B12, the method according to B11, it is described to request to edit the user that the browser is sent according to the storage
Test case afterwards is stored in the test case data library of the test case system, comprising:
It is requested the edited test case of user that the browser is sent being stored in test case according to the storage
In database under product belonging to the test case and/or project;
And/or
If described search information includes: product belonging to the test case and/or project information;
Then, described to search survey corresponding with described search information in the test case system according to described search information
Example on probation, comprising:
It is searched under the product and/or project in the test case system according to the product and/or project information
All test cases.
B13, according to any method of B10 to B12, the method also includes:
The server receives test case information, parameter value and/or the encryption information that user is inputted by browser, root
According to the test case information, parameter value and/or encryption information, test case is generated;
The test case of generation is sent into the browser, so that the browser shows the test case of generation.
B14, according to any method of B10 to B13, execute the test case of display in the browser, and obtain
After the test result of the test case, the method also includes:
The result for receiving the test result that the browser is sent saves request, and saving request according to the result will
The test result is stored in the test case data library of the test case system.
B15, method according to b14, it includes: to store the test knot according to predetermined format that the result, which saves request,
The information of fruit;
The predetermined format are as follows: the executor-of the m- test result test knot when execution of the test result
The routing information of fruit.
B16, the method according to B11 request the storage edited survey of user according to the storage in the server
When example on probation, determine in the test case data library of the test case system there is identical test case, then Xiang Suoshu
Browser sends the prompt information of the test case failure, so that the browser shows the prompt information.
B17, according to any method of B10 to 16, it is described to receive search information that user is sent by browser
Before step, the method also includes:
The server receives the logging request that the user that the browser is sent logs in the test case system, according to
The logging request determines whether user can log in the test case system, and the logging request includes: that the test is used
The uniform resource position mark URL of example system.
The invention also discloses
C18, a kind of webpage test device based on browser, comprising:
Transmission unit, for being sent to server when user accesses test case system in server by browser
Information is searched for, to request the server to return to test case corresponding with described search information, the test case is described
What server was searched in the test case data library of the test case system;
Receiving unit, for receive the server returned according to described search information it is corresponding with described search information
Test case;
Display unit, for showing corresponding with described search information in the default display position of the browser;
Execution unit, for executing the test case of display.
C19, the device according to C18, described device further include:
Edit cell, the test case shown for editing display unit in the browser;
The transmission unit is also used to send the preservation edited test case of edit cell to the server
Storage request, to request the server that the test case is stored in test case data library according to storage request;
The execution unit is specifically used for executing the edited test case of edit cell.
C20, the device according to C18 or C19, described device further include:
Unit is collected, for collecting the test case shown in the browser.
C21, according to any device of C18 to C20, described search information includes: production belonging to the test case
Product and/or project information;
The receiving unit is also used to before the transmission unit sends described search information, receives user's selection
Product and/or project belonging to test case described in the browser side;
The transmission unit, specifically for sending product belonging to the test case and/or project to the server
Information.
C22, according to any device of C18 to C21, the receiving unit is also used to receive the test of user's input
Use-case information, parameter value and/or encryption information;
The transmission unit is also used to the received test case information of the receiving unit, parameter value and/or adds
Confidential information sends the server, to request the server according to the test case information, parameter value and/or encryption information
Generate test case;
The receiving unit is also used to receive the test case that the server that the server is sent generates;
The display unit is also used to show the received test case of the receiving unit.
C23, according to any device of C18 to 2C2, the display unit is also used to show in the browser side
Execute the test result of the test case;
The transmission unit, the result for being also used to send the test result for saving the test case to the server are protected
Request is deposited, the test result of the test case is stored in the test to request the server to save request according to result
In case data library.
C24, the device according to C23, it includes: to store the test knot according to predetermined format that the result, which saves request,
The information of fruit.
C25, the device according to C19, when being stored with edited test case in the test case data library,
The receiving unit is also used to receive the prompt information for the storage test case failure that the server is sent, described to mention
Show that information is that the server is sent when storing the test case of the edit cell editor according to the storage request;
The display unit is also used to show the received prompt information of the receiving unit.
C26, according to any device of C18 to C25,
The transmission unit is also used to before sending described search information, and Xiang Suoshu server sends logging request, with
The server is requested to determine whether user can log in the test case system according to the logging request, the login is asked
Ask include: the test case system uniform resource position mark URL;
Receiving unit is also used to after the transmission unit sends logging request, and the server determines that user can
When logging in the test case system, the webpage information for the test case system that the server is sent is received.
The invention also discloses
D27, a kind of server are stored with test case and test case in the test case system of the server
Corresponding test result;The server includes:
Receiving unit, the search information sent for receiving user by browser;
Searching unit, for being searched in the test case system according to described search information and described search information pair
The test case answered;
Transmission unit, test case for that will search send the browser, so that the browser is by the survey of lookup
Example on probation is shown in preset display position.
D28, the server according to D27,
The receiving unit is also used to receive the storage request that the browser is sent;
Storage unit, for being edited the user that the browser is sent according to the received storage request of the receiving unit
Test case afterwards is stored in the test case data library of the test case system.
D29, the server according to D28, the storage unit, specifically for pressing the edited test case of user
Test case is stored according to product belonging to test case and/or project;
And/or
When described search information includes: product belonging to the test case and/or project information, the lookup is single
Member, specifically for being searched under the product and/or project in the test case system according to the product and/or project information
All test cases.
D30, according to any server of D27 to 29,
The receiving unit is also used to receive test case information, parameter value and/or add that user inputted by browser
Confidential information;
The server further include:
Generation unit, for being believed according to the received test case information of the receiving unit, parameter value and/or encryption
Breath generates test case;
The transmission unit, the test case for being also used to generate the generation unit sends the browser, so that institute
Browser is stated to show the test case of generation.
D31, according to any server of D27 to 30, execute the test case of display in the browser, and obtain
After the test result of the test case, the receiving unit is also used to receive the test knot that the browser is sent
The result of fruit saves request;
Storage unit is also used to be saved according to the received result of the receiving unit and requests for the test result to be stored in
In the test case data library of the test case system.
D32, the server according to D31, it includes: to store the test according to predetermined format that the result, which saves request,
As a result information;
The predetermined format are as follows: the executor-of the m- test result test knot when execution of the test result
The routing information of fruit.
D33, according to any server of D27 to D32, the server further include:
Determination unit, for according to the received storage request storage edited test case of user of the receiving unit
When, determine in the test case data library of the test case system whether there is identical test case;
The transmission unit, be also used to the determination unit determine in the test case data library had it is identical
When test case, Xiang Suoshu browser sends the prompt information of test case failure, so that described in the browser shows
Prompt information.
Claims (31)
1. a kind of page detection method based on browser characterized by comprising
When user accesses test case system in server by browser, Xiang Suoshu server sends search information, to ask
The server is asked to return corresponding with described search information for carrying out the test case of interface testing, the test case is
What the server was searched in the test case data library of the test case system;
Receive that the server returns according to described search information is corresponding with described search information for carrying out interface testing
Test case;
Test case corresponding with described search information is shown on the default display position of the browser, in the browsing
The test case of display is collected in device;
Execute the test case of display;
Wherein, described search information includes: product belonging to test case and/or project information;Alternatively, described search packet
It includes: test case information, parameter value and/or encryption information.
2. the method according to claim 1, wherein it is described execute display test case the step of before, institute
State method further include:
The test case is edited in the browser;And
The storage request for saving edited test case is sent, to the server to request the server to be asked according to storage
It asks and the test case is stored in test case data library;
Correspondingly, the test case for executing display, comprising:
Test case after executive editor.
3. the method according to claim 1, wherein it is described to server send search information the step of before,
The method also includes:
Receive the search information of test case described in the browser side of user's selection.
4. the method according to claim 1, wherein the method also includes:
Receive test case information, parameter value and/or the encryption information of user's input;
The test case information, parameter value and/or encryption information are sent into the server, with request the server according to
The test case information, parameter value and/or encryption information generate test case;
Receive and show the test case for the generation that the server is sent.
5. the method according to claim 1, wherein the method also includes:
In the browser side, display executes the test result of the test case, and
The result for sending the test result for saving the test case to the server saves request, to request the server
It saves request according to result the test result of the test case is stored in the test case data library.
6. according to the method described in claim 5, it is characterized in that, it includes: to deposit according to predetermined format that the result, which saves request,
Store up the information of the test result.
7. according to the method described in claim 2, it is characterized in that, if being stored in the test case data library edited
Test case, then the browser receives the prompt information for the storage test case failure that the server is sent, and shows
Show the prompt information.
8. method according to any one of claims 1 to 7, which is characterized in that Xiang Suoshu server sends the step of search information
Before rapid, the method also includes:
Logging request is sent to the server, to request the server determines whether user can be with according to the logging request
The test case system is logged in, the logging request includes: the uniform resource position mark URL of the test case system;
If the server determines that user can log in the test case system according to the logging request, to the browsing
The webpage information of device transmission test case system.
9. a kind of page detection method based on browser, which is characterized in that stored in the test case system of server useful
In the test case and the corresponding test result of test case that carry out interface testing;The described method includes:
The search information that user is sent by browser is received, is searched in the test case system according to described search information
The test case for being used to carry out interface testing corresponding with described search information;
The test case of lookup is sent into the browser, so that the browser is by the test case of lookup in preset display
Position is shown, the test case of display is collected in the browser;
Wherein, described search information includes: product belonging to test case and/or project information;Alternatively, described search packet
It includes: test case information, parameter value and/or encryption information.
10. according to the method described in claim 9, it is characterized in that, the method also includes:
The storage request that the browser is sent is received, after the user that the browser is sent being edited according to storage request
Test case be stored in the test case data library of the test case system.
11. according to the method described in claim 10, it is characterized in that, described request to send out the browser according to the storage
The edited test case of the user sent is stored in the test case data library of the test case system, comprising:
It is requested the edited test case of user that the browser is sent being stored in test case data according to the storage
In library under product belonging to the test case and/or project;
And/or
If described search information includes: product belonging to the test case and/or project information;
Then, described to search test use corresponding with described search information in the test case system according to described search information
Example, comprising:
It is searched in the test case system according to the product and/or project information all under the product and/or project
Test case.
12. according to the method described in claim 9, it is characterized in that, the method also includes:
The server receives test case information, parameter value and/or the encryption information that user is inputted by browser, according to institute
Test case information, parameter value and/or encryption information are stated, test case is generated;
The test case of generation is sent into the browser, so that the browser shows the test case of generation.
13. according to the method described in claim 9, and obtaining it is characterized in that, execute the test case of display in the browser
After the test result for obtaining the test case, the method also includes:
The result for receiving the test result that the browser is sent saves request, and saving request according to the result will be described
Test result is stored in the test case data library of the test case system.
14. according to the method for claim 13, which is characterized in that it includes: according to predetermined format that the result, which saves request,
Store the information of the test result;
The predetermined format are as follows: the executor-test result of the m- test result when execution of the test result
Routing information.
15. according to the method described in claim 10, it is characterized in that, requesting storage to be used according to the storage in the server
When the edited test case in family, determining has had identical test to use in the test case data library of the test case system
Example then sends the prompt information of the test case failure to the browser, so that the browser shows the prompt letter
Breath.
16. according to any method of claim 9 to 15, which is characterized in that the reception user is sent by browser
Search information the step of before, the method also includes:
The server receives the logging request that the user that the browser is sent logs in the test case system, according to described
Logging request determines whether user can log in the test case system, and the logging request includes: the test case system
The uniform resource position mark URL of system.
17. a kind of webpage test device based on browser characterized by comprising
Transmission unit, for sending and searching for server when user accesses test case system in server by browser
Information, it is corresponding with described search information for carrying out the test case of interface testing to request the server to return, it is described
Test case is what the server was searched in the test case data library of the test case system;
Receiving unit corresponding with described search information is used for for receive that the server returns according to described search information
Carry out the test case of interface testing;
Display unit, for showing corresponding with described search information in the default display position of the browser;
Unit is collected, for collecting the test case shown in the browser;
Execution unit, for executing the test case of display;
Wherein, described search information includes: product belonging to test case and/or project information;Alternatively, described search packet
It includes: test case information, parameter value and/or encryption information.
18. device according to claim 17, which is characterized in that described device further include:
Edit cell, the test case shown for editing display unit in the browser;
The transmission unit is also used to send the storage for saving the edited test case of edit cell to the server
Request, to request the server that the test case is stored in test case data library according to storage request;
The execution unit is specifically used for executing the edited test case of edit cell.
19. device according to claim 17, which is characterized in that the receiving unit is also used in the transmission unit
Before sending described search information, the search information of test case described in the browser side of user's selection is received.
20. device according to claim 17, which is characterized in that the receiving unit is also used to receive user's input
Test case information, parameter value and/or encryption information;
The transmission unit is also used to the received test case information of the receiving unit, parameter value and/or encryption letter
Breath sends the server, to request the server to be generated according to the test case information, parameter value and/or encryption information
Test case;
The receiving unit is also used to receive the test case that the server that the server is sent generates;
The display unit is also used to show the received test case of the receiving unit.
21. device according to claim 17, which is characterized in that the display unit is also used in the browser side
Display executes the test result of the test case;
The transmission unit, the result preservation for being also used to send the test result for saving the test case to the server are asked
It asks, the test result of the test case is stored in the test case to request the server to save request according to result
In database.
22. device according to claim 21, which is characterized in that it includes: according to predetermined format that the result, which saves request,
Store the information of the test result.
23. device according to claim 18, which is characterized in that after being stored with editor in the test case data library
Test case when, the receiving unit is also used to receive mentioning for the storage test case failure that the server is sent
Show that information, the prompt information are the test case that the server stores the edit cell editor according to the storage request
When send;
The display unit is also used to show the received prompt information of the receiving unit.
24. 7 to 23 any device according to claim 1, which is characterized in that
The transmission unit is also used to before sending described search information, and Xiang Suoshu server sends logging request, with request
The server determines whether user can log in the test case system, the logging request packet according to the logging request
It includes: the uniform resource position mark URL of the test case system;
Receiving unit is also used to after the transmission unit sends logging request, and the server determines that user can step on
When recording the test case system, the webpage information for the test case system that the server is sent is received.
25. a kind of server, which is characterized in that be stored in the test case system of the server for carrying out interface testing
Test case and the corresponding test result of test case;The server includes:
Receiving unit, the search information sent for receiving user by browser;
Searching unit, it is corresponding with described search information for being searched in the test case system according to described search information
For carrying out the test case of interface testing;
Transmission unit, the test case for that will search sends the browser, so that the browser uses the test of lookup
Example is shown in preset display position, and the test case of display is collected in the browser;
Wherein, described search information includes: product belonging to test case and/or project information;Alternatively, described search packet
It includes: test case information, parameter value and/or encryption information.
26. server according to claim 25, which is characterized in that
The receiving unit is also used to receive the storage request that the browser is sent;
Storage unit, the user for being sent the browser according to the received storage request of the receiving unit are edited
Test case is stored in the test case data library of the test case system.
27. server according to claim 26, which is characterized in that the storage unit, specifically for user is edited
Test case afterwards stores test case according to product belonging to test case and/or project;
And/or
When described search information includes: product belonging to the test case and/or project information, the searching unit, tool
Body is used to search the institute under the product and/or project in the test case system according to the product and/or project information
There is test case.
28. server according to claim 25, which is characterized in that
The receiving unit is also used to receive test case information, parameter value and/or encryption letter that user is inputted by browser
Breath;
The server further include:
Generation unit is used for according to the received test case information of the receiving unit, parameter value and/or encryption information,
Generate test case;
The transmission unit, the test case for being also used to generate the generation unit sends the browser, so that described clear
Device of looking at shows the test case of generation.
29. server according to claim 25, which is characterized in that the test case of display is executed in the browser,
And after obtaining the test result of the test case, the receiving unit is also used to receive the described of the browser transmission
The result of test result saves request;
Storage unit is also used to be stored in the test result according to the received result preservation request of the receiving unit described
In the test case data library of test case system.
30. server according to claim 29, which is characterized in that it includes: according to fixing in advance that the result, which saves request,
Formula stores the information of the test result;
The predetermined format are as follows: the executor-test result of the m- test result when execution of the test result
Routing information.
31. according to any server of claim 25 to 30, which is characterized in that the server further include:
Determination unit is used in test case edited according to the received storage request storage user of the receiving unit,
Determine in the test case data library of the test case system whether there is identical test case;
The transmission unit is also used to determine in the test case data library there is identical test in the determination unit
When use-case, Xiang Suoshu browser sends the prompt information of the test case failure, so that the browser shows the prompt
Information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410677606.9A CN104331369B (en) | 2014-11-21 | 2014-11-21 | Page detection method and device, server based on browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410677606.9A CN104331369B (en) | 2014-11-21 | 2014-11-21 | Page detection method and device, server based on browser |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104331369A CN104331369A (en) | 2015-02-04 |
CN104331369B true CN104331369B (en) | 2019-10-15 |
Family
ID=52406101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410677606.9A Active CN104331369B (en) | 2014-11-21 | 2014-11-21 | Page detection method and device, server based on browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104331369B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106708726A (en) * | 2015-11-17 | 2017-05-24 | 北京京东尚科信息技术有限公司 | Page compatibility testing system and method |
CN106874176B (en) * | 2015-12-14 | 2021-04-27 | 创新先进技术有限公司 | Intelligent test method and device |
CN106909578A (en) * | 2015-12-23 | 2017-06-30 | 北京奇虎科技有限公司 | Webpage loading method, browser and server |
CN106502914B (en) * | 2016-12-06 | 2018-11-23 | 武汉烽火网络有限责任公司 | The system and method for test case management and display |
CN108694104A (en) * | 2017-04-12 | 2018-10-23 | 北京京东尚科信息技术有限公司 | A kind of interface function contrast test method, apparatus, electronic equipment and storage medium |
CN107678951A (en) * | 2017-09-21 | 2018-02-09 | 平安科技(深圳)有限公司 | Test exemple automation management method, device, equipment and storage medium |
CN109614312A (en) * | 2018-10-23 | 2019-04-12 | 中国平安人寿保险股份有限公司 | Method for generating test case, device, electronic equipment and storage medium |
CN109582579B (en) * | 2018-11-30 | 2022-04-15 | 腾讯音乐娱乐科技(深圳)有限公司 | Application program testing method and device, electronic equipment and storage medium |
CN110188034A (en) * | 2019-05-10 | 2019-08-30 | 广州高鸿信息科技有限公司 | A kind of method for testing software based on information sharing |
CN112115058B (en) * | 2020-09-25 | 2024-03-29 | 建信金融科技有限责任公司 | Test method and device, test case generation method and device and test system |
CN112783767A (en) * | 2021-01-18 | 2021-05-11 | 深圳市泛海检测认证有限公司 | Method, device, equipment and storage medium for realizing control of test case management |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101448172A (en) * | 2007-11-27 | 2009-06-03 | 上海未来宽带技术及应用工程研究中心有限公司 | Method for automatically testing stability of set-top box in batches |
CN102662846A (en) * | 2012-04-24 | 2012-09-12 | 广东欧珀移动通信有限公司 | Testing method combining automatic tool and testing case |
CN102880535A (en) * | 2012-07-24 | 2013-01-16 | 北京播思软件技术有限公司 | Wireless automation testing device and method used for mobile equipment |
CN103377127A (en) * | 2012-04-28 | 2013-10-30 | 阿里巴巴集团控股有限公司 | Development testing system, testing method and device for webpage product |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104133765B (en) * | 2013-12-23 | 2015-10-28 | 腾讯科技(深圳)有限公司 | The test case sending method of network activity and test case server |
-
2014
- 2014-11-21 CN CN201410677606.9A patent/CN104331369B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101448172A (en) * | 2007-11-27 | 2009-06-03 | 上海未来宽带技术及应用工程研究中心有限公司 | Method for automatically testing stability of set-top box in batches |
CN102662846A (en) * | 2012-04-24 | 2012-09-12 | 广东欧珀移动通信有限公司 | Testing method combining automatic tool and testing case |
CN103377127A (en) * | 2012-04-28 | 2013-10-30 | 阿里巴巴集团控股有限公司 | Development testing system, testing method and device for webpage product |
CN102880535A (en) * | 2012-07-24 | 2013-01-16 | 北京播思软件技术有限公司 | Wireless automation testing device and method used for mobile equipment |
Also Published As
Publication number | Publication date |
---|---|
CN104331369A (en) | 2015-02-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104331369B (en) | Page detection method and device, server based on browser | |
USRE48681E1 (en) | System and method for tracking web interactions with real time analytics | |
US10083242B2 (en) | System and method for data-driven web page navigation control | |
US10216856B2 (en) | Mobilizing an existing web application | |
CN103631875B (en) | Method for carrying out network search on browser side and browser | |
CN103678487B (en) | Method and device for generating web page snapshot | |
CN108052334A (en) | Method for page jump, device, computer equipment and storage medium | |
CN110069683B (en) | Method and device for crawling data based on browser | |
Collins et al. | Android in practice | |
US20100070856A1 (en) | Method for Graphical Visualization of Multiple Traversed Breadcrumb Trails | |
Sciabarrà | LEARNING APACHE OPENWHISK: developing open serverless solutions | |
US20120173965A1 (en) | Dynamic web portal page | |
Day | The long-term preservation of web content | |
CN110263070A (en) | Event report method and device | |
CN110213105A (en) | It is a kind of cross-platform micro- using creation method | |
Gupta et al. | Mastering Elastic Stack | |
Mohan | Full Stack Testing | |
Kurtz | ASP. NET MVC 4 and the Web API: Building a REST Service from Start to Finish | |
CN112182338A (en) | Monitoring method and device for hosting platform | |
CN109145214A (en) | A kind of link filter method, apparatus, equipment and the medium of Website page | |
Yıldız et al. | Rumadai: A plug-in to record and replay client-side events of web sites with dynamic content | |
Koder | Increasing Full Stack Development Productivity via Technology Selection | |
Ala-Ilomäki | Application programming interface management for cloud entities of an enterprise resource planning software | |
JP5006471B2 (en) | Web service cooperation management system and method thereof | |
Pattankar et al. | Mastering Asp. net Web Api |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220713 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |