CN104598382A - Test control method and device - Google Patents
Test control method and device Download PDFInfo
- Publication number
- CN104598382A CN104598382A CN201510048216.XA CN201510048216A CN104598382A CN 104598382 A CN104598382 A CN 104598382A CN 201510048216 A CN201510048216 A CN 201510048216A CN 104598382 A CN104598382 A CN 104598382A
- Authority
- CN
- China
- Prior art keywords
- source code
- tested program
- task
- plan
- 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.)
- Granted
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides a test control method and device. The method and the device are favorable for reducing the test manpower consumption and improving the test efficiency. The test control method comprises the following steps that the deployment position of a tested program on a network is recorded; a source code of the tested program is obtained and is converted into a network application program file to be tested, and then, the network application program file is stored to the deployment position; a plan or a task mark used for testing the tested program is provided for the test device so that the test device executes the plan or the task; the result for executing the plan or the task by the test device is inquired and output.
Description
Technical field
The present invention relates to field of computer technology, particularly a kind of test control method and device.
Background technology
In the process of software development, programmer, after writing source code, compiles it as tested program, then can test.When testing, test script can be selected by hand by tester, utilizing this script to test tested program by proving installation; Also can be tested with the preassigned script of tester by proving installation self-timing.
Along with the complicated of application system and the development of Distributed Application, it is higher that above-mentioned way makes to test required manpower, inefficiency.
Summary of the invention
In view of this, the invention provides a kind of test control method and device, contribute to alleviating test manpower costs, improve testing efficiency.
For achieving the above object, according to an aspect of the present invention, a kind of test control method is provided.
Test control method of the present invention comprises: the deployed position of record tested program on network; Obtain the source code of tested program and be converted to web application file to be tested, being then saved in described deployed position; There is provided to proving installation and test the plan of described tested program or the mark of task, perform described plan or task for this proving installation; Inquire about and export the result that described proving installation performs described plan or task.
Alternatively, the step recording the deployed position of tested program on network comprises: the assigned catalogue recording the given server for preserving tested program.
Alternatively, the step obtaining the source code of tested program comprises: from the device preserving source code, read the source code upgraded in this device by the moment of presetting; Or the step obtaining the source code of tested program comprises: detect the source code whether having renewal in the device preserving source code, if so, then read this source code.
Alternatively, before providing the step of testing the plan of described tested program or the mark of task to proving installation, also comprise: replace with the configuration information preserved in advance the configuration information be saved in the described web application file of described deployed position.
According to a further aspect in the invention, a kind of test control device is provided.
Test control device of the present invention comprises: logging modle, for recording the deployed position of tested program on network; Acquisition module, for obtaining the source code of tested program and being converted to web application file to be tested; Deployment module, for being saved in described deployed position by described web application file; Calling module, testing the plan of described tested program or the mark of task for providing to proving installation, performing described plan or task for this proving installation; Output module, for inquiring about and exporting the result that described proving installation performs described plan or task.
Alternatively, described logging modle is also for the assigned catalogue that records the given server for preserving tested program.
Alternatively, described acquisition module also for reading the source code upgraded in this device by the moment of presetting from the device preserving source code; Or described acquisition module also for detect preserve source code device in whether have the source code of renewal, if so, then read this source code.
Alternatively, described deployment module is also for replacing the configuration information be saved in the described web application file of described deployed position with the configuration information preserved in advance.
According to technical scheme of the present invention, the deployed position of record tested program on network, automatic acquisition source code also compiles packing and is deployed to this deployed position, then interface that proving installation provides is called to test, finally output test result, the source code write only need be saved in the device of specifying by the writer of such tested program source code, just just can receive test result without the need to other manual operations, achieve robotization continuance test, alleviate test manpower costs, improve testing efficiency.
Accompanying drawing explanation
Accompanying drawing is used for understanding the present invention better, does not form inappropriate limitation of the present invention.Wherein:
Fig. 1 is the schematic diagram of the key step of test control method according to the embodiment of the present invention;
Fig. 2 is the schematic diagram of a kind of idiographic flow of test control method according to the embodiment of the present invention;
Fig. 3 is the schematic diagram of the basic module of test control device according to the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, one exemplary embodiment of the present invention is explained, comprising the various details of the embodiment of the present invention to help understanding, they should be thought it is only exemplary.Therefore, those of ordinary skill in the art will be appreciated that, can make various change and amendment, and can not deviate from scope and spirit of the present invention to the embodiments described herein.Equally, for clarity and conciseness, the description to known function and structure is eliminated in following description.
In the embodiment of the present invention, software test is controlled mainly to comprise the link such as compiling packing, deployment, automatically test, makes test realize robotization, thus reduce required manpower, improve testing efficiency.Below be described in detail.Fig. 1 is the schematic diagram of the key step of test control method according to the embodiment of the present invention.The method can have been come by test control device.
Step S11: the deployed position of record tested program on network.The present embodiment provides the test control method of distributed application program, wherein realizes the assigned address that application package is automatically distributed to network, the assigned catalogue of such as given server.
Step S12: the source code obtaining tested program.Source code is just kept in relevant device after having been write, such as, in the Versions such as SVN.For realizing automatic test, some moment can be set, such as every night twelve-hour, to this moment test control device automatically from preserve source code device read the source code wherein upgraded.To current source code newly-increased again herein after the source code upgraded refers to and obtained last time.Also can detect by predetermined period the source code whether having renewal in the device preserving source code, if so, then read this source code.
Step S13: the source code of acquisition is converted to web application file to be tested.This step carries out compiling the process of packing.Maven plug-in unit mvn install order can be adopted to carry out compiling and break into war (web application file) bag.If compile unsuccessfully, this task termination, state is for run unsuccessfully.
Step S14: dispose web application file to be tested.Compile successfully, trigger the Shell script write in this step, copy above-mentioned war bag to record in step S11 deployed position, then by this war bag decompress(ion).For many tested program, the content that some configuration informations are wherein filled in when writing code may not be identical with the configuration needed during test, such as when writing code, the database name related in code is called A, but should usage data storehouse B when testing, need the corresponding contents in decompress(ion) bag to replace in this case.For other configuration informations, also use the configuration information preserved in advance to carry out such replacement if needed.
Step S15: provide the test plan of tested program or the mark of task to proving installation.After deployment success, java program can be called and send http get request, the mark (ID) of plan or task is imported into the automatic test platform as proving installation, the interface triggering automated execution is called when starting test, the mark of the plan that this automatic test platform i.e. basis is imported into or task, determine the test script that perform and the test data set that need use, then namely start test.
Step S16: inquire about and export the result of proving installation executive plan or task.In this step, if test is the script set under execution one plan, then go all tasks in Query Database under this plan with plan ID at set intervals, the task of inquiring about current execution is gone whether to complete according to task ID again, if the task under a plan all completes, then automatic test terminates.Test is the script set that will perform under a task, then whether go inquiry current task ID complete by task ID at set intervals, if complete, automatic test terminates.Above-mentioned query script is shown in Figure 2, and Fig. 2 is the schematic diagram of a kind of idiographic flow of test control method according to the embodiment of the present invention.When exporting the result of proving installation executive plan or task, by Email or other modes, this result can be sent to the writer of source code.
Fig. 3 is the schematic diagram of the basic module of test control device according to the embodiment of the present invention.As shown in Figure 3, the test control device 30 of the embodiment of the present invention mainly comprises logging modle 31, acquisition module 32, deployment module 33, calling module 34 and output module 35.Logging modle 31, for recording the deployed position of tested program on network, also can be used for the assigned catalogue of the given server recorded for preserving tested program; Acquisition module 32 is for obtaining the source code of tested program and being converted to web application file to be tested; Deployment module 33 is for being saved in deployed position by web application file, and the configuration information that also can be used for preserving in advance replaces the configuration information be saved in the web application file of this deployed position; Calling module 34, for providing the test plan of tested program or the mark of task to proving installation, performs this plan or task for this proving installation; Output module 35 is for inquiring about and exporting the result of this proving installation executive plan or task.
Acquisition module 32 also can be used for from the device preserving source code, reading the source code upgraded in this device by the moment of presetting; Or also can be used for detecting preserve source code device in whether have the source code of renewal, if so, then read this source code.
According to the technical scheme of the embodiment of the present invention, the deployed position of record tested program on network, automatic acquisition source code also compiles packing and is deployed to this deployed position, then interface that proving installation provides is called to test, finally output test result, the source code write only need be saved in the device of specifying by the writer of such tested program source code, just just can receive test result without the need to other manual operations, achieve robotization continuance test, alleviate test manpower costs, improve testing efficiency.
Below describe ultimate principle of the present invention in conjunction with specific embodiments, in apparatus and method of the present invention, obviously, each parts or each step can decompose and/or reconfigure.These decompose and/or reconfigure and should be considered as equivalents of the present invention.Further, the step performing above-mentioned series of processes can order naturally following the instructions perform in chronological order, but does not need necessarily to perform according to time sequencing.Some step can walk abreast or perform independently of one another.
Above-mentioned embodiment, does not form limiting the scope of the invention.It is to be understood that depend on designing requirement and other factors, various amendment, combination, sub-portfolio can be there is and substitute in those skilled in the art.Any amendment done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within scope.
Claims (8)
1. a test control method, is characterized in that, comprising:
The deployed position of record tested program on network;
Obtain the source code of tested program and be converted to web application file to be tested, being then saved in described deployed position;
There is provided to proving installation and test the plan of described tested program or the mark of task, perform described plan or task for this proving installation;
Inquire about and export the result that described proving installation performs described plan or task.
2. method according to claim 1, is characterized in that, the step of the deployed position of record tested program on network comprises: the assigned catalogue recording the given server for preserving tested program.
3. method according to claim 1, is characterized in that,
The step obtaining the source code of tested program comprises: from the device preserving source code, read the source code upgraded in this device by the moment of presetting;
Or the step obtaining the source code of tested program comprises: detect the source code whether having renewal in the device preserving source code, if so, then read this source code.
4. method according to claim 1, it is characterized in that, before providing the step of testing the plan of described tested program or the mark of task to proving installation, also comprise: replace with the configuration information preserved in advance the configuration information be saved in the described web application file of described deployed position.
5. a test control device, is characterized in that, comprising:
Logging modle, for recording the deployed position of tested program on network;
Acquisition module, for obtaining the source code of tested program and being converted to web application file to be tested;
Deployment module, for being saved in described deployed position by described web application file;
Calling module, testing the plan of described tested program or the mark of task for providing to proving installation, performing described plan or task for this proving installation;
Output module, for inquiring about and exporting the result that described proving installation performs described plan or task.
6. device according to claim 5, is characterized in that, described logging modle is also for the assigned catalogue that records the given server for preserving tested program.
7. device according to claim 5, is characterized in that,
Described acquisition module also for reading the source code upgraded in this device by the moment of presetting from the device preserving source code;
Or described acquisition module also for detect preserve source code device in whether have the source code of renewal, if so, then read this source code.
8. device according to claim 5, is characterized in that, described deployment module is also for replacing the configuration information be saved in the described web application file of described deployed position with the configuration information preserved in advance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510048216.XA CN104598382B (en) | 2015-01-30 | 2015-01-30 | A kind of test control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510048216.XA CN104598382B (en) | 2015-01-30 | 2015-01-30 | A kind of test control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104598382A true CN104598382A (en) | 2015-05-06 |
CN104598382B CN104598382B (en) | 2018-03-27 |
Family
ID=53124193
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510048216.XA Active CN104598382B (en) | 2015-01-30 | 2015-01-30 | A kind of test control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104598382B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978191A (en) * | 2015-06-24 | 2015-10-14 | 小米科技有限责任公司 | Application deployment method and server |
CN105426195A (en) * | 2015-12-14 | 2016-03-23 | 网易(杭州)网络有限公司 | Effect verification processing method and device based on software development |
CN106126432A (en) * | 2016-09-18 | 2016-11-16 | 网易(杭州)网络有限公司 | Development project is revised method of testing and the device of content |
CN107807877A (en) * | 2016-09-08 | 2018-03-16 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of code performance test |
CN109240905A (en) * | 2018-07-02 | 2019-01-18 | 链家网(北京)科技有限公司 | Method for testing software and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060150144A1 (en) * | 2005-01-04 | 2006-07-06 | Youngsoft Private Ltd. | System and method for application development and deployment |
CN101448178A (en) * | 2008-12-12 | 2009-06-03 | 天柏宽带网络科技(北京)有限公司 | Method and system for developing digital television gateway system |
CN102135883A (en) * | 2011-03-14 | 2011-07-27 | 山东大学 | Software-as-a-service (SaaS) application generation and deployment supporting method and device |
CN103984558A (en) * | 2014-05-30 | 2014-08-13 | 深圳市中兴移动通信有限公司 | Automatic construction device and method for Web item |
-
2015
- 2015-01-30 CN CN201510048216.XA patent/CN104598382B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060150144A1 (en) * | 2005-01-04 | 2006-07-06 | Youngsoft Private Ltd. | System and method for application development and deployment |
CN101448178A (en) * | 2008-12-12 | 2009-06-03 | 天柏宽带网络科技(北京)有限公司 | Method and system for developing digital television gateway system |
CN102135883A (en) * | 2011-03-14 | 2011-07-27 | 山东大学 | Software-as-a-service (SaaS) application generation and deployment supporting method and device |
CN103984558A (en) * | 2014-05-30 | 2014-08-13 | 深圳市中兴移动通信有限公司 | Automatic construction device and method for Web item |
Non-Patent Citations (1)
Title |
---|
SQG0085: "《http://sgq0085.iteye.com/blog/1865510》", 10 May 2013 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978191A (en) * | 2015-06-24 | 2015-10-14 | 小米科技有限责任公司 | Application deployment method and server |
CN104978191B (en) * | 2015-06-24 | 2018-06-19 | 小米科技有限责任公司 | Using dispositions method and service device |
CN105426195A (en) * | 2015-12-14 | 2016-03-23 | 网易(杭州)网络有限公司 | Effect verification processing method and device based on software development |
CN107807877A (en) * | 2016-09-08 | 2018-03-16 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of code performance test |
CN106126432A (en) * | 2016-09-18 | 2016-11-16 | 网易(杭州)网络有限公司 | Development project is revised method of testing and the device of content |
CN109240905A (en) * | 2018-07-02 | 2019-01-18 | 链家网(北京)科技有限公司 | Method for testing software and system |
Also Published As
Publication number | Publication date |
---|---|
CN104598382B (en) | 2018-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102289378B (en) | Method for automatically generating APP (Application) | |
CN103955363B (en) | A kind of manufacture method of program upgrade installation package | |
US9348582B2 (en) | Systems and methods for software dependency management | |
CN104598382A (en) | Test control method and device | |
CN109739523B (en) | Application program packaging method and device, storage medium and terminal | |
CN102035892A (en) | System and method for automatically releasing operating system version and automatically updating software package | |
CN105426310B (en) | A kind of method and apparatus for the performance for detecting target process | |
CN102156643A (en) | Software integration method and system thereof | |
CN103905258A (en) | Method and apparatus for testing data uploading function of client | |
CN110032388A (en) | A kind of building of delta file, publication, method for down loading and device | |
CN104317618A (en) | Firmware partitioning method and device | |
CN113704110B (en) | Automatic testing method and device for user interface | |
CN104216719A (en) | Method and device for updating android system | |
CN107391112A (en) | A kind of FileVersion detection method and its special purpose device | |
CN105512044A (en) | Method and system for updating object base used for keyword drive test | |
CN101650653A (en) | Daily constructing method and device | |
CN104468189B (en) | A kind of method for the automatic upgrading BIOS of different clients version | |
MX2022008863A (en) | Electricity meter upgrading method and system, smart meter, and storage medium. | |
CN104133699A (en) | Equipment system software upgrading method and system | |
CN108037941A (en) | Application program update method, electronic equipment based on public plug-in unit, storage medium | |
CN109542415A (en) | The code merging method and relevant device for supporting application program to research and develop parallel | |
CN104881311A (en) | Method and apparatus for judging version compatibility | |
CN110990051B (en) | Maintenance method, device, medium and equipment for software package dependency relationship | |
CN108255735B (en) | Associated environment testing method, electronic device and computer readable storage medium | |
CN103761612A (en) | Project release method and system |
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 |