CN104978191A - Application deployment method and server - Google Patents
Application deployment method and server Download PDFInfo
- Publication number
- CN104978191A CN104978191A CN201510353829.4A CN201510353829A CN104978191A CN 104978191 A CN104978191 A CN 104978191A CN 201510353829 A CN201510353829 A CN 201510353829A CN 104978191 A CN104978191 A CN 104978191A
- Authority
- CN
- China
- Prior art keywords
- application
- deployed
- test case
- test
- deployment
- 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
- Stored Programmes (AREA)
Abstract
本公开是关于一种应用部署方法和服务器,该方法包括:接收应用部署指令,获取待部署应用,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录;获取与所述待部署应用对应的测试用例;对所述待部署应用进行编译,将编译后的待部署应用和所述测试用例发送给各业务服务器,以使所述各业务服务器将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,并运行所述测试用例对所述编译后的待部署应用进行测试。该自动部署和测试过程中,无需人工干预,避免人工部署、测试容易出错的问题,提高应用部署和测试效率的同时,保证了应用部署和测试的可靠性。
The present disclosure relates to an application deployment method and a server. The method includes: receiving an application deployment instruction and obtaining an application to be deployed, the application to be deployed includes source code and a configuration file, and the configuration file contains the application to be deployed Deployment directory; Obtain the test case corresponding to the application to be deployed; Compile the application to be deployed, and send the compiled application to be deployed and the test case to each business server, so that each business server The compiled application to be deployed and the test case are stored in the deployment directory, and the test case is run to test the compiled application to be deployed. In the process of automatic deployment and testing, manual intervention is not required, problems of manual deployment and testing that are prone to errors are avoided, and the efficiency of application deployment and testing is improved while reliability of application deployment and testing is ensured.
Description
技术领域technical field
本公开涉及通信技术领域,尤其涉及一种应用部署方法和服务器。The present disclosure relates to the technical field of communications, and in particular to an application deployment method and server.
背景技术Background technique
随着分布式系统在不同行业的广泛应用,在信息技术领域,为了保证系统工作的健壮性、稳定性,服务提供商一般会将提供某种服务的应用部署在分布式系统中,以供广大用户使用。其中,分布式系统中往往包含有多台用于部署一种或多种应用的服务器。With the widespread application of distributed systems in different industries, in the field of information technology, in order to ensure the robustness and stability of system work, service providers generally deploy applications that provide certain services in distributed systems for the general public. user use. Wherein, a distributed system often includes multiple servers for deploying one or more applications.
发明内容Contents of the invention
为克服相关技术中存在的问题,本公开提供一种应用部署方法和服务器,用以实现应用在分布式系统中的自动部署、测试,以提高应用部署、测试效率和可靠性。In order to overcome the problems existing in related technologies, the present disclosure provides an application deployment method and a server to realize automatic deployment and testing of applications in a distributed system, so as to improve the efficiency and reliability of application deployment and testing.
根据本公开实施例的第一方面,提供一种应用部署方法,包括:According to a first aspect of an embodiment of the present disclosure, an application deployment method is provided, including:
接收应用部署指令,获取待部署应用,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录;receiving an application deployment instruction, and obtaining an application to be deployed, wherein the application to be deployed includes source code and a configuration file, and the configuration file includes a deployment directory of the application to be deployed;
获取与所述待部署应用对应的测试用例;对所述待部署应用进行编译;Obtaining a test case corresponding to the application to be deployed; compiling the application to be deployed;
将编译后的待部署应用和所述测试用例发送给各业务服务器,以使所述各业务服务器将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,并运行所述测试用例对所述编译后的待部署应用进行测试。Send the compiled application to be deployed and the test case to each service server, so that each service server will store the compiled application to be deployed and the test case in the deployment directory, and run The test case tests the compiled application to be deployed.
其中,所述应用部署指令中包括所述待部署应用的应用标识、版本号和描述文件;所述获取与所述待部署应用对应的测试用例,包括:Wherein, the application deployment instruction includes the application identification, version number and description file of the application to be deployed; the acquisition of the test case corresponding to the application to be deployed includes:
确定是否存在与所述待部署应用对应的历史应用,所述历史应用是应用标识与所述待部署应用的应用标识相同且版本号低于所述待部署应用的版本号的应用;Determine whether there is a historical application corresponding to the application to be deployed, where the historical application is an application whose application identifier is the same as that of the application to be deployed and whose version number is lower than the version number of the application to be deployed;
若存在与所述待部署应用对应的历史应用,则获取与所述历史应用对应的历史描述文件,所述历史描述文件是所述历史应用的描述文件;If there is a historical application corresponding to the application to be deployed, obtaining a historical description file corresponding to the historical application, where the historical description file is a description file of the historical application;
根据所述历史描述文件与所述待部署应用的描述文件,获取与所述待部署应用对应的测试用例。Acquire a test case corresponding to the application to be deployed according to the history description file and the description file of the application to be deployed.
具体来说,所述根据所述历史描述文件与所述待部署应用的描述文件,获取与所述待部署应用对应的测试用例,包括:Specifically, the acquiring a test case corresponding to the application to be deployed according to the history description file and the description file of the application to be deployed includes:
通过比较所述历史描述文件与所述待部署应用的描述文件,确定所述待部署应用中是否存在模块功能与所述历史应用的各功能模块不同的差异功能模块;By comparing the historical description file with the description file of the application to be deployed, determine whether there is a difference function module in the application to be deployed that has a module function different from that of each functional module of the historical application;
若不存在所述差异功能模块,则获取所述历史应用对应的测试用例作为与所述待部署应用对应的测试用例;If the difference function module does not exist, obtaining the test case corresponding to the historical application as the test case corresponding to the application to be deployed;
若存在所述差异功能模块,则获取与所述差异功能模块对应的差异测试用例,并根据所述差异测试用例更新所述历史应用对应的测试用例,将更新后的历史应用对应的测试用例作为与所述待部署应用对应的测试用例。If the difference function module exists, obtain the difference test case corresponding to the difference function module, and update the test case corresponding to the historical application according to the difference test case, and use the test case corresponding to the updated historical application as A test case corresponding to the application to be deployed.
进一步地,所述方法还包括:Further, the method also includes:
所述对所述待部署应用进行编译之前,接收编译指令,所述编译指令中包括操作者的认证信息;Before compiling the application to be deployed, receiving a compiling instruction, the compiling instruction includes operator authentication information;
根据所述认证信息对所述操作者进行身份认证,若认证通过,则执行所述对所述待部署应用进行编译的步骤。The operator is authenticated according to the authentication information, and if the authentication is passed, the step of compiling the application to be deployed is executed.
根据本公开实施例的第二方面,提供另一种应用部署方法,包括:According to the second aspect of the embodiments of the present disclosure, another application deployment method is provided, including:
接收管理服务器发送的编译后的待部署应用以及与所述待部署应用对应的测试用例;其中,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录。Receive the compiled application to be deployed and the test case corresponding to the application to be deployed sent by the management server; wherein the application to be deployed includes source code and configuration files, and the configuration file includes the application to be deployed Deployment directory.
将所述编译后的待部署应用和所述测试用例存入到所述部署目录下。The compiled application to be deployed and the test case are stored in the deployment directory.
运行所述测试用例对所述编译后的待部署应用进行测试。Running the test case to test the compiled application to be deployed.
其中,所述部署目录包括临时目录和正式目录;所述将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,包括:Wherein, the deployment directory includes a temporary directory and a formal directory; and storing the compiled application to be deployed and the test case into the deployment directory includes:
将所述编译后的待部署应用和所述测试用例存入到所述临时目录下。The compiled application to be deployed and the test case are stored in the temporary directory.
所述运行所述测试用例对所述编译后的待部署应用进行测试,包括:Said running said test case tests said compiled application to be deployed, including:
在所述临时目录下运行所述测试用例对所述编译后的待部署应用进行测试。Running the test case in the temporary directory to test the compiled application to be deployed.
进一步地,所述方法还包括:Further, the method also includes:
若在所述临时目录下运行所述测试用例对所述编译后的待部署应用进行测试通过,则将所述编译后的待部署应用存入到所述正式目录下,并删除存入到所述临时目录中的所述编译后的待部署应用和所述测试用例。If the test case is run in the temporary directory and the compiled application to be deployed is tested and passed, then the compiled application to be deployed is stored in the official directory, and deleted and stored in the The compiled application to be deployed and the test case in the temporary directory.
其中,所述测试用例包括单元测试用例和基础环境测试用例。Wherein, the test cases include unit test cases and basic environment test cases.
具体来说,所述运行所述测试用例对所述编译后的待部署应用进行测试,包括:Specifically, the running of the test case tests the compiled application to be deployed, including:
运行所述基础环境测试用例,对所述待部署应用的基础运行环境进行测试。Run the basic environment test case to test the basic operating environment of the application to be deployed.
若所述基础环境测试用例测试通过,则运行所述单元测试用例,对所述待部署应用的各功能模块进行测试。If the basic environment test case passes, the unit test case is run to test each functional module of the application to be deployed.
根据本公开实施例的第三方面,提供一种应用部署管理服务器,包括:According to a third aspect of the embodiments of the present disclosure, an application deployment management server is provided, including:
第一接收模块,被配置为接收应用部署指令。The first receiving module is configured to receive an application deployment instruction.
第一获取模块,被配置为获取待部署应用,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录。The first acquiring module is configured to acquire the application to be deployed, the application to be deployed includes source code and a configuration file, and the configuration file includes a deployment directory of the application to be deployed.
第二获取模块,被配置为获取与所述待部署应用对应的测试用例。The second acquiring module is configured to acquire the test case corresponding to the application to be deployed.
编译模块,被配置为对所述待部署应用进行编译。The compiling module is configured to compile the application to be deployed.
发送模块,被配置为将编译后的待部署应用和所述测试用例发送给各业务服务器,以使所述各业务服务器将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,并运行所述测试用例对所述编译后的待部署应用进行测试。The sending module is configured to send the compiled application to be deployed and the test case to each service server, so that each service server stores the compiled application to be deployed and the test case in the deployment directory, and run the test case to test the compiled application to be deployed.
其中,所述应用部署指令中包括所述待部署应用的应用标识、版本号和描述文件。Wherein, the application deployment instruction includes the application identification, version number and description file of the application to be deployed.
所述第二获取模块包括:The second acquisition module includes:
第一确定子模块,被配置为确定是否存在与所述待部署应用对应的历史应用,所述历史应用是应用标识与所述待部署应用的应用标识相同且版本号低于所述待部署应用的版本号的应用。The first determining submodule is configured to determine whether there is a historical application corresponding to the application to be deployed, and the historical application has the same application identifier as the application identifier of the application to be deployed and a version number lower than the application to be deployed The version number of the application.
第一获取子模块,被配置为在存在与所述待部署应用对应的历史应用时,获取与所述历史应用对应的历史描述文件,所述历史描述文件是所述历史应用的描述文件。The first obtaining submodule is configured to obtain a history description file corresponding to the history application when there is a history application corresponding to the application to be deployed, and the history description file is a description file of the history application.
第二获取子模块,被配置为根据所述历史描述文件与所述待部署应用的描述文件,获取与所述待部署应用对应的测试用例。The second acquiring submodule is configured to acquire the test case corresponding to the application to be deployed according to the history description file and the description file of the application to be deployed.
具体地,所述第二获取子模块包括:Specifically, the second acquisition submodule includes:
确定子模块,被配置为通过比较所述历史描述文件与所述待部署应用的描述文件,确定所述待部署应用中是否存在模块功能与所述历史应用的各功能模块不同的差异功能模块。The determining submodule is configured to determine whether there is a difference function module in the application to be deployed that has a module function different from that of each function module of the historical application by comparing the history description file with the description file of the application to be deployed.
第一获取子模块,被配置为在不存在所述差异功能模块时,获取所述历史应用对应的测试用例作为与所述待部署应用对应的测试用例。The first obtaining submodule is configured to obtain the test case corresponding to the historical application as the test case corresponding to the application to be deployed when the difference function module does not exist.
第二获取子模块,被配置为在存在所述差异功能模块时,获取与所述差异功能模块对应的差异测试用例,并根据所述差异测试用例更新所述历史应用对应的测试用例,将更新后的历史应用对应的测试用例作为与所述待部署应用对应的测试用例。The second obtaining submodule is configured to obtain the difference test case corresponding to the difference function module when the difference function module exists, and update the test case corresponding to the historical application according to the difference test case, and update The test case corresponding to the later historical application is used as the test case corresponding to the application to be deployed.
进一步地,所述管理服务器还包括:Further, the management server also includes:
第二接收模块,被配置为所述编译模块对所述待部署应用进行编译之前,接收编译指令,所述编译指令中包括操作者的认证信息。The second receiving module is configured to receive a compilation instruction before the compilation module compiles the application to be deployed, and the compilation instruction includes operator authentication information.
认证模块,被配置为根据所述认证信息对所述操作者进行身份认证;在认证通过时,触发所述编译模块。The authentication module is configured to authenticate the operator according to the authentication information; when the authentication is passed, the compiling module is triggered.
根据本公开实施例的第四方面,提供一种应用部署业务服务器,包括:According to a fourth aspect of the embodiments of the present disclosure, an application deployment service server is provided, including:
接收模块,被配置为接收管理服务器发送的编译后的待部署应用以及与所述待部署应用对应的测试用例;其中,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录。The receiving module is configured to receive the compiled application to be deployed and the test case corresponding to the application to be deployed sent by the management server; wherein, the application to be deployed includes source code and configuration files, and the configuration files include The deployment directory of the application to be deployed.
存储模块,被配置为将所述编译后的待部署应用和所述测试用例存入到所述部署目录下。The storage module is configured to store the compiled application to be deployed and the test case in the deployment directory.
测试模块,被配置为运行所述测试用例对所述编译后的待部署应用进行测试。The test module is configured to run the test case to test the compiled application to be deployed.
其中,所述部署目录包括临时目录和正式目录;所述存储模块包括:Wherein, the deployment directory includes a temporary directory and an official directory; the storage module includes:
第一存储子模块,被配置为将所述编译后的待部署应用和所述测试用例存入到所述临时目录下。The first storage submodule is configured to store the compiled application to be deployed and the test case in the temporary directory.
所述测试模块,被配置为在所述临时目录下运行所述测试用例对所述编译后的待部署应用进行测试。The test module is configured to run the test case in the temporary directory to test the compiled application to be deployed.
进一步地,所述存储模块还包括:Further, the storage module also includes:
第二存储子模块,被配置为在所述临时目录下运行所述测试用例对所述编译后的待部署应用进行测试通过时,将所述编译后的待部署应用存入到所述正式目录下。The second storage submodule is configured to store the compiled application to be deployed in the official directory when the test case passes the compiled application to be deployed by running the test case in the temporary directory Down.
所述业务服务器还包括:The service server also includes:
删除模块,被配置为删除存入到所述临时目录中的所述编译后的待部署应用和所述测试用例。The deletion module is configured to delete the compiled application to be deployed and the test case stored in the temporary directory.
其中,所述测试用例包括单元测试用例和基础环境测试用例。Wherein, the test cases include unit test cases and basic environment test cases.
其中,所述测试模块包括:Wherein, the test module includes:
第一测试子模块,被配置为运行所述基础环境测试用例,对所述待部署应用的基础运行环境进行测试。The first test submodule is configured to run the basic environment test case to test the basic operating environment of the application to be deployed.
第二测试子模块,被配置为在所述基础环境测试用例测试通过时,运行所述单元测试用例,对所述待部署应用的各功能模块进行测试。The second test submodule is configured to run the unit test case to test each functional module of the application to be deployed when the basic environment test case passes the test.
根据本公开实施例的第五方面,提供另一种应用部署管理服务器,包括:According to a fifth aspect of the embodiments of the present disclosure, another application deployment management server is provided, including:
处理器;processor;
被配置为存储处理器可执行指令的存储器;memory configured to store processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
接收应用部署指令,获取待部署应用,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录;receiving an application deployment instruction, and obtaining an application to be deployed, wherein the application to be deployed includes source code and a configuration file, and the configuration file includes a deployment directory of the application to be deployed;
获取与所述待部署应用对应的测试用例;对所述待部署应用进行编译;Obtaining a test case corresponding to the application to be deployed; compiling the application to be deployed;
将编译后的待部署应用和所述测试用例发送给各业务服务器,以使所述各业务服务器将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,并运行所述测试用例对所述编译后的待部署应用进行测试。Send the compiled application to be deployed and the test case to each service server, so that each service server will store the compiled application to be deployed and the test case in the deployment directory, and run The test case tests the compiled application to be deployed.
根据本公开实施例的第六方面,提供另一种应用部署业务服务器,包括:According to the sixth aspect of the embodiments of the present disclosure, another application deployment service server is provided, including:
处理器;processor;
被配置为存储处理器可执行指令的存储器;memory configured to store processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
接收管理服务器发送的编译后的待部署应用以及与所述待部署应用对应的测试用例;其中,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录;Receive the compiled application to be deployed and the test case corresponding to the application to be deployed sent by the management server; wherein the application to be deployed includes source code and configuration files, and the configuration file includes the application to be deployed deployment directory;
将所述编译后的待部署应用和所述测试用例存入到所述部署目录下;storing the compiled application to be deployed and the test case in the deployment directory;
运行所述测试用例对所述编译后的待部署应用进行测试。Running the test case to test the compiled application to be deployed.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
通过在应用的配置文件中设置该应用部署在分布式系统的各业务服务器中的部署目录,使得各业务服务器自动部署该应用在该部署目录下,保证了该应用在所有业务服务器中的部署路径一致;而且,通过获取与该应用对应的测试用例,并将测试用例也发送给各业务服务器,使得各业务服务器将该测试用例和该应用一并存入上述部署目录中,各业务服务器自动启动运行该测试用例对该应用进行测试。该自动部署和测试过程中,无需人工干预,避免人工部署、测试容易出错的问题,提高应用部署和测试效率的同时,保证了应用部署和测试的可靠性。By setting the deployment directory where the application is deployed in each business server of the distributed system in the configuration file of the application, each business server automatically deploys the application in the deployment directory, ensuring the deployment path of the application in all business servers Consistent; and, by obtaining the test case corresponding to the application, and sending the test case to each business server, so that each business server stores the test case and the application together in the above-mentioned deployment directory, and each business server automatically starts Run the test case to test the application. In the process of automatic deployment and testing, manual intervention is not required, problems of manual deployment and testing that are prone to errors are avoided, and the efficiency of application deployment and testing is improved while reliability of application deployment and testing is ensured.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
图1是本公开一示例性实施例示出的应用场景示意图;Fig. 1 is a schematic diagram of an application scenario shown in an exemplary embodiment of the present disclosure;
图2是根据一示例性实施例示出的一种应用部署方法实施例一的流程图;Fig. 2 is a flow chart of Embodiment 1 of an application deployment method according to an exemplary embodiment;
图3是根据一示例性实施例示出的一种应用部署方法实施例二的流程图;Fig. 3 is a flow chart of Embodiment 2 of an application deployment method according to an exemplary embodiment;
图4是根据一示例性实施例示出的一种应用部署方法的实施例三的流程图;Fig. 4 is a flow chart of Embodiment 3 of an application deployment method according to an exemplary embodiment;
图5是根据一示例性实施例示出的一种应用部署方法的实施例四的流程图;Fig. 5 is a flow chart of Embodiment 4 of an application deployment method according to an exemplary embodiment;
图6是根据一示例性实施例示出的一种应用部署方法的实施例五的流程图;Fig. 6 is a flow chart of Embodiment 5 of an application deployment method according to an exemplary embodiment;
图7是根据一示例性实施例示出的一种应用部署方法的信令交互图;Fig. 7 is a signaling interaction diagram of an application deployment method according to an exemplary embodiment;
图8是根据一示例性实施例示出的一种应用部署管理服务器实施例一的框图;Fig. 8 is a block diagram of Embodiment 1 of an application deployment management server according to an exemplary embodiment;
图9是根据一示例性实施例示出的一种应用部署管理服务器实施例二的框图;Fig. 9 is a block diagram of Embodiment 2 of an application deployment management server according to an exemplary embodiment;
图10是根据一示例性实施例示出的一种应用部署管理服务器实施例三的框图;Fig. 10 is a block diagram of Embodiment 3 of an application deployment management server according to an exemplary embodiment;
图11是根据一示例性实施例示出的一种应用部署业务服务器实施例一的框图;Fig. 11 is a block diagram of Embodiment 1 of an application deployment service server according to an exemplary embodiment;
图12是根据一示例性实施例示出的一种应用部署业务服务器实施例二的框图;Fig. 12 is a block diagram of Embodiment 2 of an application deployment service server according to an exemplary embodiment;
图13是根据一示例性实施例示出的一种应用部署管理服务器的框图;Fig. 13 is a block diagram of an application deployment management server according to an exemplary embodiment;
图14是根据一示例性实施例示出的一种应用部署业务服务器的框图;Fig. 14 is a block diagram of an application deployment service server according to an exemplary embodiment;
图15是根据一示例性实施例示出的一种应用部署管理服务器的框图;Fig. 15 is a block diagram of an application deployment management server according to an exemplary embodiment;
图16是根据一示例性实施例示出的一种应用部署业务服务器的框图。Fig. 16 is a block diagram of an application deployment service server according to an exemplary embodiment.
通过上述附图,已示出本公开明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本公开构思的范围,而是通过参考特定实施例为本领域技术人员说明本公开的概念。By means of the above-mentioned drawings, certain embodiments of the present disclosure have been shown and will be described in more detail hereinafter. These drawings and written description are not intended to limit the scope of the disclosed concept in any way, but to illustrate the disclosed concept for those skilled in the art by referring to specific embodiments.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.
首先,先介绍本公开各实施例所适用的应用场景。First, the applicable application scenarios of the embodiments of the present disclosure are introduced.
图1是本公开一示例性实施例示出的应用场景示意图,如图1所示,本公开各实施例提高的应用部署方法是适用于分布式系统中的应用分布式部署场景。该分布式系统中包括如图1所示的N个业务服务器和一个管理服务器,其中N为大于1的整数。其中,该管理服务器从功能上可以拆分为两个独立的服务器,分别为代码服务器和编译服务器。这两个服务器可以分别独立设置,也可以集成设置在一起构成上述管理服务器。由于该管理服务器的具体实现形式对本公开实施例的应用部署方法影响不大,因此,以下各实施例中除图2所示实施例中特别说明外,均以管理服务器整体的形式来描述,不具体区分为代码服务器和编译服务器。Fig. 1 is a schematic diagram of an application scenario shown in an exemplary embodiment of the present disclosure. As shown in Fig. 1 , the improved application deployment method in each embodiment of the present disclosure is applicable to a distributed application deployment scenario in a distributed system. The distributed system includes N service servers and one management server as shown in FIG. 1 , where N is an integer greater than 1. Wherein, the management server can be split into two independent servers functionally, namely a code server and a compilation server. The two servers can be set independently, or can be integrated together to form the above-mentioned management server. Since the specific implementation form of the management server has little influence on the application deployment method of the embodiment of the present disclosure, therefore, in the following embodiments, except for the special description in the embodiment shown in FIG. Specifically, it is divided into code server and compilation server.
下面结合各个具体的实施例对本公开应用部署方法进行详细介绍。The application deployment method of the present disclosure will be described in detail below in conjunction with various specific embodiments.
图2是根据一示例性实施例示出的一种应用部署方法实施例一的流程图,如图2所示,本实施例涉及的应用部署方法可以由图1所示中的管理服务器来执行。具体的,该应用部署方法包括以下步骤:Fig. 2 is a flow chart of Embodiment 1 of an application deployment method according to an exemplary embodiment. As shown in Fig. 2 , the application deployment method involved in this embodiment may be executed by the management server shown in Fig. 1 . Specifically, the application deployment method includes the following steps:
在步骤S101中,接收应用部署指令,获取待部署应用,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录。In step S101, an application deployment instruction is received, and an application to be deployed is acquired. The application to be deployed includes a source code and a configuration file, and the configuration file includes a deployment directory of the application to be deployed.
在步骤S102中,获取与所述待部署应用对应的测试用例。In step S102, a test case corresponding to the application to be deployed is obtained.
在步骤S103中,对所述待部署应用进行编译。In step S103, compile the application to be deployed.
在步骤S104中,将编译后的待部署应用和所述测试用例发送给各业务服务器,以使所述各业务服务器将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,并运行所述测试用例对所述编译后的待部署应用进行测试。In step S104, send the compiled application to be deployed and the test case to each service server, so that each service server will store the compiled application to be deployed and the test case into the deployment directory, and run the test case to test the compiled application to be deployed.
目前,各个应用服务提供商总是不断推陈出新各种各样的网络应用,比如目前用于人们即时通信的微信,论坛、微博等等。每当应用的开发人员完成相关应用的开发之后,需要将该应用部署在上述分布式系统中的业务服务器中,以提供给广大用户访问使用。At present, various application service providers are always constantly introducing various network applications, such as WeChat, forums, Weibo, etc., which are currently used for people's instant messaging. Whenever the developer of the application completes the development of the relevant application, the application needs to be deployed in the service server in the above-mentioned distributed system, so as to provide it for access and use by a large number of users.
具体来说,应用开发人员可以将开发完成的应用发送到分布式系统中的管理服务器中。Specifically, the application developer can send the developed application to the management server in the distributed system.
本实施例中,以管理服务器包括图1所示的代码服务器和编译服务器对管理服务器的工作过程进行细致说明。但是,可以理解的是,该管理服务器也可以集成上述两个服务器的功能,作为唯一的整体执行本实施例中的工作过程。In this embodiment, the working process of the management server is described in detail by taking the management server including the code server and the compiling server shown in FIG. 1 . However, it can be understood that the management server can also integrate the functions of the above two servers, and execute the working process in this embodiment as a unique whole.
在具体介绍本实施例前,首先,值得说明的是,上述步骤S102和步骤S103之间不具有严格的时序限定关系,即既可以先获取测试用例,之后再对待部署应用进行编译;也可以先对待部署应用进行编译,再获取测试用例;还可以在获取测试用例的同时,对待部署应用进行编译,此时分别由上述管理服务器的两个进程或者分别由上述代码服务器和编译服务器执行不同的操作。Before introducing this embodiment in detail, first of all, it is worth noting that there is no strict timing relationship between the above step S102 and step S103, that is, the test case can be obtained first, and then the application to be deployed can be compiled; Compile the application to be deployed, and then obtain the test case; it is also possible to compile the application to be deployed while obtaining the test case. At this time, the two processes of the above-mentioned management server or the above-mentioned code server and compilation server perform different operations respectively. .
具体来说,本实施例中,代码服务器可以用于接收应用开发人员发送的应用部署指令,该应用部署指令中包括已经开发完成的待部署应用。因此,代码服务器接收并存储应用开发人员发送的待部署应用。运维人员登录编译服务器后,通过与代码服务器进行交互,可以从代码服务器中获取当前需要部署的应用即待部署应用。Specifically, in this embodiment, the code server may be configured to receive an application deployment instruction sent by an application developer, and the application deployment instruction includes a developed application to be deployed. Therefore, the code server receives and stores the application to be deployed sent by the application developer. After logging in to the compilation server, the operation and maintenance personnel can interact with the code server to obtain the application that needs to be deployed currently, that is, the application to be deployed.
本实施例中,该待部署应用中除了包含有该应用的源代码之外,还包括该应用的配置文件。In this embodiment, besides the source code of the application, the application to be deployed also includes the configuration file of the application.
其中,应用的配置文件中包含应用程序特定的设置。该文件包含公共语言运行库读取的配置设置(如程序集绑定策略、远程处理对象等等),以及应用程序可以读取的设置。Among other things, the application's configuration file contains application-specific settings. This file contains configuration settings that the common language runtime reads (such as assembly binding policies, remoting objects, and so on), as well as settings that applications can read.
本实施例中,该配置文件中包含有该待部署应用在各业务服务器中的部署目录,该部署目录可以预先设定。In this embodiment, the configuration file includes the deployment directory of the application to be deployed in each service server, and the deployment directory can be preset.
如前所述,为了保证应用在各业务服务器中部署之后能够正常运行,从而为广大用户提供相应的服务,需要预先对该应用进行测试,比如需要对该应用进行业务服务器基础环境测试、单元测试等等。As mentioned above, in order to ensure that the application can run normally after being deployed in each business server, so as to provide corresponding services for the majority of users, it is necessary to test the application in advance, such as the basic environment test of the business server and unit test for the application. etc.
其中,单元测试(unit testing):是指对软件中的最小可测试单元进行检查和验证。对于单元测试中单元的含义,C语言中单元指一个函数,Java里单元指一个类,图形化的软件中可以指一个窗口或一个菜单等。总的来说,单元就是人为规定的最小的被测功能模块。其中,由于该应用在开发过程中,很可能是基于某些公共组件、某些第三方组件或者是某些架构进行开发的。为了使得该应用能够正常运行使用,需要部署该应用的各业务服务器能够支持这些公共组件、第三方组件、架构,即各业务服务器需要提供该应用所必须的基础环境。因此,需要对各业务服务器是否提供这些基础环境进行测试。Among them, unit testing (unit testing): refers to the inspection and verification of the smallest testable unit in the software. Regarding the meaning of a unit in unit testing, a unit in C language refers to a function, a unit in Java refers to a class, and a unit in graphical software refers to a window or a menu, etc. In general, a unit is the smallest functional module to be tested that is artificially specified. Wherein, during the development process of the application, it is likely to be developed based on some public components, some third-party components or some architectures. In order to enable the application to run normally, each business server that deploys the application needs to be able to support these public components, third-party components, and architecture, that is, each business server needs to provide the basic environment necessary for the application. Therefore, it is necessary to test whether each service server provides these basic environments.
为了实现对该应用的自动测试,本实施例中,管理服务器,具体是上述代码服务器需要先获得与该应用对应的测试用例,其中,该测试用例便包括用于进行单元测试的单元测试用例,以及用于对各业务服务器的基础运行环境进行测试的基础环境测试用例。In order to realize automatic testing of the application, in this embodiment, the management server, specifically the above-mentioned code server, needs to first obtain a test case corresponding to the application, wherein the test case includes a unit test case for unit testing, And basic environment test cases for testing the basic operating environment of each business server.
值得说明的是,上述测试用例的生成方式不是本公开所要保护的重点,因此不过多描述该测试用例的生成过程。而在实际中,测试用例一般是由专门的应用测试人员预先编写设计完成的。因此,本实施例中,假设与上述待部署的应用的测试用例进行设计完成并存储在一个比如测试用例数据库,则代码服务器可以查询获得与该应用对应的测试用例。比如说,代码服务器通过以该应用的标识信息为索引在测试用例数据库中查询匹配的测试用例。相应的,可以理解的是,应用开发人员除了将该待部署应用发送给代码服务器外,还携带有该应用的标识信息,比如该应用的名称等。It is worth noting that the above-mentioned method of generating the test case is not the focus of protection in this disclosure, so the process of generating the test case will not be described too much. In practice, test cases are generally pre-written and designed by specialized application testers. Therefore, in this embodiment, assuming that the test case of the above-mentioned application to be deployed is designed and stored in a test case database, for example, the code server can query to obtain the test case corresponding to the application. For example, the code server searches the test case database for matching test cases by using the identification information of the application as an index. Correspondingly, it can be understood that, in addition to sending the application to be deployed to the code server, the application developer also carries identification information of the application, such as the name of the application.
从而,在代码服务器获得了与该待部署的应用对应的测试用例之后,将该待部署应用与该测试用例关联存储。Therefore, after the code server obtains the test case corresponding to the application to be deployed, the application to be deployed is stored in association with the test case.
在实际的应用部署过程中,需要先将待部署的应用进行编译,编译通过后才进行向各业务服务器中部署的处理。因此,在管理服务器以独自的一个整体表示的情况下,管理服务器在接收到运维人员针对该待部署应用的编译指令之后,进行该应用的编译过程。其中,编译是指利用编译程序从源语言编写的源程序(源代码)产生目标程序的过程。In the actual application deployment process, it is necessary to compile the application to be deployed first, and then deploy it to each service server after the compilation is passed. Therefore, in the case that the management server is represented as an independent whole, the management server performs the compilation process of the application after receiving the compilation instruction of the operation and maintenance personnel for the application to be deployed. Here, compiling refers to a process of generating an object program from a source program (source code) written in a source language by using a compiler.
在管理服务器以上述代码服务器和编译服务器表示的情况下,编译服务器需从代码服务器中获得该待部署应用以及对应的测试用例,进而对该应用进行编译处理。具体的,该代码服务器可以在获得与该待部署应用对应的测试用例之后,自动触发向编译服务器发送该应用和该测试用例;或者,编译服务器可以周期性地向代码服务器发送查询请求,以查询代码服务器中是否存在需要部署的应用,如果有,则该代码服务器反馈给编译服务器相应的待部署应用以及对应的测试用例。In the case where the management server is represented by the above-mentioned code server and compilation server, the compilation server needs to obtain the application to be deployed and the corresponding test case from the code server, and then compile the application. Specifically, after obtaining the test case corresponding to the application to be deployed, the code server can automatically trigger sending the application and the test case to the compilation server; or, the compilation server can periodically send a query request to the code server to query Whether there is an application to be deployed in the code server, and if so, the code server feeds back the corresponding application to be deployed and the corresponding test case to the compilation server.
如果该待部署应用编译通过,则该编译服务器将该编译后的应用和对应的测试用例发送给各业务服务器,各业务服务器将接收到的应用和测试用例存储在该应用的配置文件中所描述的部署目录下,从而,各个业务服务器自动将该应用和测试用例均部署在相同的目录下,并启动运行该测试用例以完成对该应用能够正常运行的测试。如果测试通过,则部署完成,否则反馈给编译服务器告警提示,以使得运维人员对测试异常的业务服务器进行检测维护。If the application to be deployed is compiled successfully, the compilation server sends the compiled application and the corresponding test case to each business server, and each business server stores the received application and test case in the configuration file described in the application Therefore, each service server automatically deploys the application and the test case in the same directory, and starts and runs the test case to complete the test that the application can run normally. If the test passes, the deployment is complete; otherwise, an alarm is sent to the compilation server, so that the operation and maintenance personnel can detect and maintain the abnormal business server.
本实施例中,通过在应用的配置文件中设置该应用部署在分布式式系统的各业务服务器中的部署目录,使得各业务服务器自动部署该应用在该部署目录下,保证了该应用在所有业务服务器中的部署路径一致;而且,在获得与该应用对应的测试用例之后,将测试用例也发送给各业务服务器,使得各业务服务器将该测试用例与该应用一并存入上述部署目录中,各业务服务器自动启动运行该测试用例对该应用进行测试。该自动部署和测试过程中,无需人工干预,避免人工部署、测试容易出错的问题,提高应用部署和测试效率的同时,保证了应用部署和测试的可靠性。In this embodiment, by setting the deployment directory where the application is deployed in each business server of the distributed system in the configuration file of the application, each business server automatically deploys the application in the deployment directory, ensuring that the application is deployed in all The deployment path in the business server is consistent; and, after obtaining the test case corresponding to the application, the test case is also sent to each business server, so that each business server stores the test case and the application together in the deployment directory , each business server automatically starts running the test case to test the application. In the process of automatic deployment and testing, manual intervention is not required, problems of manual deployment and testing that are prone to errors are avoided, and the efficiency of application deployment and testing is improved while reliability of application deployment and testing is ensured.
图3是根据一示例性实施例示出的一种应用部署方法实施例二的流程图,本实施例对图2所示实施例中的步骤102给出另一种实现方式。如图3所示,本实施例提供的所述应用部署方法具体可以包括如下步骤:Fig. 3 is a flow chart of Embodiment 2 of an application deployment method according to an exemplary embodiment. This embodiment provides another implementation manner for step 102 in the embodiment shown in Fig. 2 . As shown in Figure 3, the application deployment method provided in this embodiment may specifically include the following steps:
在步骤201中,接收应用部署指令,获取待部署应用,所述应用部署指令中包括所述待部署应用的应用标识、版本号和描述文件。In step 201, an application deployment instruction is received, and an application to be deployed is acquired, and the application deployment instruction includes an application identifier, a version number, and a description file of the application to be deployed.
在步骤202中,确定是否存在与所述待部署应用对应的历史应用,所述历史应用是应用标识与所述待部署应用的应用标识相同且版本号低于所述待部署应用的版本号的应用,若存在与所述待部署应用对应的历史应用,则执行步骤203。In step 202, it is determined whether there is a historical application corresponding to the application to be deployed, and the historical application has the same application identification as the application identification of the application to be deployed and the version number is lower than the version number of the application to be deployed application, if there is a historical application corresponding to the application to be deployed, step 203 is executed.
在步骤203中,获取与所述历史应用对应的历史描述文件,所述历史描述文件是所述历史应用的描述文件。In step 203, a history description file corresponding to the history application is acquired, where the history description file is a description file of the history application.
在步骤204中,根据所述历史描述文件与所述待部署应用的描述文件,获取与所述待部署应用对应的测试用例。In step 204, a test case corresponding to the application to be deployed is acquired according to the history description file and the description file of the application to be deployed.
本实施例中,在管理服务器接收到的应用部署指令中包括除了包括待部署应用外,还可以包括该应用的应用标识、版本号和描述文件。In this embodiment, besides the application to be deployed, the application deployment instruction received by the management server may also include the application identification, version number and description file of the application.
其中,该应用标识和版本号用于唯一表示该应用,因为应用会有升级、更新,同一个应用会有不同的版本号。其中,该应用的描述文件是对该应用所提供的功能,该应用中包含的各个功能模块的描述。Wherein, the application identifier and version number are used to uniquely represent the application, because the application will be upgraded and updated, and the same application will have different version numbers. Wherein, the description file of the application is a description of the functions provided by the application and each functional module included in the application.
另外,在管理服务器中保存有已经部署过的已部署应用的应用标识、版本号、描述文件、测试用例的信息,这些信息可以存储在一个数据库中。In addition, the management server stores the application identification, version number, description file, and test case information of deployed applications that have been deployed, and these information can be stored in a database.
因此,当管理服务器接收到上述应用部署指令后,根据当前待部署应用的应用标识和版本号从上述数据库中查询是否存在与该当前待部署应用的应用标识相同,且版本号低于当前待部署应用的版本号的历史应用即已部署应用。Therefore, when the management server receives the above-mentioned application deployment instruction, it queries from the above-mentioned database according to the application ID and version number of the current application to be deployed whether there is an The historical application of the version number of the application is the deployed application.
其中,值得说明的是,如果上述数据库中存储有一个应用的多个版本,则上述查询的过程中,尤其是查询获得比当前待部署应用的版本号低一个版本号的对应历史应用。Wherein, it is worth noting that if multiple versions of an application are stored in the above database, during the above query process, especially the query obtains the corresponding historical application with a version number lower than the version number of the current application to be deployed.
如果管理服务器查询确定不存在与待部署应用对应的历史应用,则可以与测试用例生成平台交互以获得与待部署应用对应的测试用例;如果管理服务器查询确定存在与待部署应用对应的历史应用,则其从上述数据库中获取该历史应用的描述文件即历史描述文件。If the management server query determines that there is no historical application corresponding to the application to be deployed, it can interact with the test case generation platform to obtain a test case corresponding to the application to be deployed; if the management server query determines that there is a historical application corresponding to the application to be deployed, Then it acquires the description file of the historical application, ie, the history description file, from the above database.
进而,管理服务器通过比较该历史描述文件和待部署应用的描述文件,以确定两个描述文件是否一致,并根据比较结果采用不同的方式获取与待部署应用对应的测试用例。Furthermore, the management server compares the historical description file with the description file of the application to be deployed to determine whether the two description files are consistent, and obtains test cases corresponding to the application to be deployed in different ways according to the comparison result.
具体来说,如果两个描述文件中所描述的应用功能、包含的功能模块、每个功能模块的作用或实现方式都一致,即如果确定待部署应用中不存在模块功能与该历史应用的各功能模块不同的差异功能模块,则说明可以采用该历史应用对应的测试用例作为与待部署应用对应的测试用例。否则,若待部署应用与该历史应用中存在差异功能模块,则通过获取增量测试用例的方式获取该待部署应用所对应的测试用例。Specifically, if the application functions described in the two description files, the included function modules, and the functions or implementation methods of each function module are consistent, that is, if it is determined that there is no module function in the application to be deployed that is different from each of the historical application Different functional modules with different functional modules indicate that the test case corresponding to the historical application can be used as the test case corresponding to the application to be deployed. Otherwise, if there are different functional modules between the application to be deployed and the historical application, the test case corresponding to the application to be deployed is obtained by obtaining an incremental test case.
具体地,管理服务器首先通过上述数据库获得该历史应用的测试用例,再获取与差异功能模块对应的差异测试用例,进而根据差异测试用例更新历史应用对应的测试用例,将更新后的历史应用对应的测试用例作为与待部署应用对应的测试用例。Specifically, the management server first obtains the test case of the historical application through the above database, and then obtains the difference test case corresponding to the difference function module, and then updates the test case corresponding to the historical application according to the difference test case, and updates the corresponding test case of the updated historical application. The test case serves as a test case corresponding to the application to be deployed.
其中,获取与差异功能模块对应的差异测试用例,比如可以通过与测试用例生成平台交互来获得。通过向测试用例生成平台发送上述差异功能模块,使得测试用例设计人员设计完成与该差异功能模块测试对应的差异测试用例,并通过测试用例生成平台反馈给管理服务器。Wherein, obtaining the difference test case corresponding to the difference function module may be obtained by, for example, interacting with the test case generation platform. By sending the above-mentioned difference function module to the test case generation platform, the test case designer can design and complete the difference test case corresponding to the difference function module test, and feed back to the management server through the test case generation platform.
其中,根据差异测试用例更新历史应用对应的测试用例,具体包括:如果差异功能模块是相对于历史应用而附加的功能模块,则将该差异测试用例添加到历史应用对应的测试用例中,完成更新;如果差异功能模块是相对于历史应用中的某已有功能模块的改变,则从历史应用对应的测试用例中添加该差异测试用例,同时可以将历史应用对应的测试用例中用于测试与该差异功能模块对应的功能模块的测试用例删除,完成更新。Among them, update the test case corresponding to the historical application according to the difference test case, specifically including: if the difference function module is an additional function module relative to the history application, add the difference test case to the test case corresponding to the history application to complete the update ; If the difference function module is a change relative to an existing function module in the historical application, add the difference test case from the test case corresponding to the historical application, and at the same time use the test case corresponding to the historical application to test the same The test case of the function module corresponding to the difference function module is deleted, and the update is completed.
本实施例中,管理服务器中存储有已部署的各应用的相关信息,从而使得在后续部署升级的应用时,能够借助对应的已部署应用的测试用例,通过获取差异测试用例的方式降低针对每个应用需要进行独立的全部测试用例的设计所带来的工作量,能够进一步提高应用部署的效率。In this embodiment, the management server stores relevant information of each application that has been deployed, so that when the upgraded application is deployed subsequently, it is possible to use the test cases of the corresponding deployed applications to reduce the number of tests for each application by obtaining different test cases. An application needs to carry out the workload brought by the independent design of all test cases, which can further improve the efficiency of application deployment.
图4是根据一示例性实施例示出的一种应用部署方法实施例三的流程图,在上述实施例的基础上,如图4所示,本实施例中,在上述步骤103对所述待部署应用进行编译之前,还包括如下步骤:Fig. 4 is a flow chart of Embodiment 3 of an application deployment method according to an exemplary embodiment. On the basis of the above embodiment, as shown in Fig. 4 , in this embodiment, the Before deploying the application for compilation, the following steps are also included:
在步骤301中,接收编译指令,所述编译指令中包括编译操作者的认证信息;In step 301, a compiling instruction is received, and the compiling instruction includes authentication information of a compiling operator;
在步骤302中,根据所述认证信息对所述编译操作者进行身份认证,确定认证是否通过,若认证通过,则执行步骤103,若认证不通过,则结束。In step 302, the compilation operator is authenticated according to the authentication information, and it is determined whether the authentication is passed. If the authentication is passed, step 103 is executed, and if the authentication is not passed, the process ends.
由于上述运维人员作为编译操作者以及向各业务服务器发送编译通过后的应用和测试用例的操作者,由于该应用对于应用提供商来说具有重要价值,因此,为了避免非授权人员的恶意操作,可以对运维人员进行身份认证。Since the above-mentioned operation and maintenance personnel are compiling operators and operators who send compiled applications and test cases to each business server, and because the application is of great value to application providers, in order to avoid malicious operations by unauthorized personnel , the operation and maintenance personnel can be authenticated.
具体来说,管理服务器中可以预先存储已授权人员的认证信息,该认证信息比如是登录账号和密码。因此,当运维人员即当前操作者登录管理服务器时,如果其输入的登录账号和密码为已授权的账号和密码中的一个,则认为该操作者通过认证。Specifically, the management server may pre-store authentication information of authorized personnel, such as login account number and password. Therefore, when the operation and maintenance personnel, that is, the current operator, logs in to the management server, if the login account and password entered by him are one of the authorized account and password, the operator is deemed to have passed the authentication.
可以理解的是,该身份认证方式比如还可以是验证码、指纹等方式,不做具体限定。It can be understood that the identity authentication method may also be, for example, a verification code, a fingerprint, etc., and is not specifically limited.
以上,从管理服务器的角度介绍了在分布式系统的各业务服务器中部署应用的过程,下面结合几个实施例从各业务服务器的角度,介绍应用部署的具体过程。Above, the process of deploying the application in each service server of the distributed system is introduced from the perspective of the management server. The following describes the specific process of application deployment from the perspective of each service server in combination with several embodiments.
图5是根据一示例性实施例示出的一种应用部署方法的实施例四的流程图,如图5所示,该应用部署方法包括如下步骤:Fig. 5 is a flow chart of Embodiment 4 of an application deployment method according to an exemplary embodiment. As shown in Fig. 5, the application deployment method includes the following steps:
在步骤401中,接收管理服务器发送的编译后的待部署应用以及与所述待部署应用对应的测试用例;其中,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录。In step 401, the compiled application to be deployed and the test case corresponding to the application to be deployed are received from the management server; wherein, the application to be deployed includes source code and a configuration file, and the configuration file contains all Describe the deployment directory of the application to be deployed.
在步骤402中,将所述编译后的待部署应用和所述测试用例存入到所述部署目录下。In step 402, the compiled application to be deployed and the test case are stored in the deployment directory.
在步骤403中,运行所述测试用例对所述编译后的待部署应用进行测试。In step 403, run the test case to test the compiled application to be deployed.
如前述各实施例中所述的,管理服务器在接收到应用部署指令后,获得与待部署应用对应的测试用例,在完成对待部署应用的编译等处理之后,将待部署应用和测试用例发送给各业务服务器,其中,待部署应用的配置文件中包含待部署应用的部署目录。As described in the foregoing embodiments, after receiving the application deployment instruction, the management server obtains the test case corresponding to the application to be deployed, and after completing processing such as compiling the application to be deployed, sends the application to be deployed and the test case to For each service server, the configuration file of the application to be deployed includes a deployment directory of the application to be deployed.
从而,各业务服务器在接收到管理服务器发送的上述编译后的待部署应用和测试用例之后,将该编译后的待部署应用和测试用例存入到该部署目录下,从而,每个业务服务器都将待部署应用和测试用例部署在相同的部署目录下,避免人工部署时容易出错的问题,比如存错目录、对待部署应用或测试用例进行了误操作等。Therefore, after each service server receives the above-mentioned compiled application to be deployed and test case sent by the management server, it stores the compiled application and test case to be deployed in the deployment directory, so that each service server has Deploy the application to be deployed and the test case in the same deployment directory to avoid errors that are prone to errors during manual deployment, such as storing the wrong directory, misoperation of the application or test case to be deployed, etc.
进而,每个业务服务器从该部署目录中启动运行测试用例,已完成对该待部署应用能否正常运行的测试。Furthermore, each business server starts and runs a test case from the deployment directory, and has completed testing whether the application to be deployed can run normally.
其中,本实施例中,测试用例主要包括单元测试用例和基础环境测试用例。这两个测试用例的执行顺序是,优先执行基础环境测试用例,对所述待部署应用的基础运行环境进行测试,如果基础环境测试通过,则执行单元测试用例,对所述待部署应用的各功能模块进行测试;如果基础环境测试用例测试未通过,则向管理服务器发出告警提示,以提示运维人员出现了什么样的测试问题。相应的,如果在执行单元测试用例时,单元测试通过,则说明该待部署应用能够在业务服务器中正常运行,部署结束,如果单元测试没有通过,则向管理服务器发出告警提示,以提示运维人员出现了什么样的单元测试问题。Wherein, in this embodiment, the test cases mainly include unit test cases and basic environment test cases. The execution order of these two test cases is that the basic environment test case is executed first, and the basic operating environment of the application to be deployed is tested. If the basic environment test passes, the unit test case is executed, and each of the described application to be deployed is tested. Function modules are tested; if the basic environment test case test fails, an alarm prompt is sent to the management server to remind the operation and maintenance personnel of what kind of test problems have occurred. Correspondingly, if the unit test passes when the unit test case is executed, it means that the application to be deployed can run normally in the business server, and the deployment is completed. If the unit test fails, an alarm prompt will be sent to the management server to remind the operation and maintenance What kind of unit testing problems do people have.
本实施例中,各业务服务器在接收到管理服务器发送的携带有部署目标的待部署应用及其对应的测试用例后,自动将该待部署应用存入即部署到该目录下,并自动运行测试用例对该应用进行测试。该自动部署和测试过程中,无需人工干预,避免人工部署、测试容易出错的问题,提高应用部署和测试效率的同时,保证了应用部署和测试的可靠性。In this embodiment, after each service server receives the application to be deployed with the deployment target and its corresponding test case sent by the management server, it automatically stores the application to be deployed in the directory, and automatically runs the test. The use case tests the application. In the process of automatic deployment and testing, manual intervention is not required, problems of manual deployment and testing that are prone to errors are avoided, and the efficiency of application deployment and testing is improved while reliability of application deployment and testing is ensured.
图6是根据一示例性实施例示出的一种应用部署方法的实施例五的流程图,如图6所示,该方法具体包括如下的步骤:Fig. 6 is a flow chart of Embodiment 5 of an application deployment method according to an exemplary embodiment. As shown in Fig. 6, the method specifically includes the following steps:
在步骤501中,接收管理服务器发送的编译后的待部署应用以及与所述待部署应用对应的测试用例;其中,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录,所述部署目录包括临时目录和正式目录。In step 501, the compiled application to be deployed and the test case corresponding to the application to be deployed are received from the management server; wherein, the application to be deployed includes source code and a configuration file, and the configuration file contains all The deployment directory of the application to be deployed is described, and the deployment directory includes a temporary directory and an official directory.
在步骤502中,将所述编译后的待部署应用和所述测试用例存入到所述临时目录下。In step 502, the compiled application to be deployed and the test case are stored in the temporary directory.
在步骤503中,在所述临时目录下运行所述测试用例对所述编译后的待部署应用进行测试。In step 503, run the test case in the temporary directory to test the compiled application to be deployed.
在步骤504中,若在所述临时目录下运行所述测试用例对所述编译后的待部署应用进行测试通过,则将所述编译后的待部署应用存入到所述正式目录下,并删除存入到所述临时目录中的所述编译后的待部署应用和所述测试用例。In step 504, if running the test case in the temporary directory to pass the test of the compiled application to be deployed, then store the compiled application to be deployed in the official directory, and Deleting the compiled application to be deployed and the test case stored in the temporary directory.
本实施例中,之所以设置临时目录和正式目录是基于以下的考虑,其中,正式目录是与临时目录不同的目录。In this embodiment, the temporary directory and the official directory are set based on the following considerations, wherein the official directory is a directory different from the temporary directory.
由于在运行测试用例对待部署应用进行测试的过程中,会产生很多临时性文件、系统碎片等垃圾文件,这些垃圾文件不但会占用业务服务器一定的存储空间,也会导致后续应用正式运行使用时运行环境不干净。因此,为了保证后续的应用正式使用时的高效可靠,本实施例中采用了设置两个目录的方式。During the process of running test cases to test the application to be deployed, many temporary files, system fragments and other junk files will be generated. These junk files will not only occupy a certain storage space of the business server, but also cause subsequent applications to run The environment is not clean. Therefore, in order to ensure the efficiency and reliability of subsequent applications when they are officially used, the method of setting two directories is adopted in this embodiment.
具体来说,首先,各业务服务器将待部署应用和测试用例都存储在临时目录中,其中,该临时目录的选择依据是,选择业务服务器的操作系统在重启后便会消失的目录,即非永久性目录。进而,业务服务器在该临时目录下运行测试用例完成对待部署应用的测试,如果测试通过,即如果基础环境测试通过、单元测试也通过,则业务服务器将该待部署应用转存到正式目录中,进而可以重启业务服务器,激活应用可以正式使用。该正式目录与临时目录相对,是永久性目录。并且,业务服务器删除存入到临时目录中的待部署应用和测试用例,从而将产生的上述大部分垃圾文件均删除掉,保证应用正式运行时运行环境的干净。Specifically, firstly, each business server stores applications and test cases to be deployed in a temporary directory, wherein the basis for selecting the temporary directory is to select a directory that will disappear after the operating system of the business server is permanent directory. Furthermore, the business server runs the test case in the temporary directory to complete the test of the application to be deployed. If the test passes, that is, if the basic environment test passes and the unit test also passes, the business server transfers the application to be deployed to the official directory. Then the business server can be restarted, and the activated application can be officially used. The official directory, as opposed to the temporary directory, is a permanent directory. In addition, the business server deletes the applications and test cases to be deployed stored in the temporary directory, thereby deleting most of the above-mentioned garbage files generated, so as to ensure that the operating environment is clean when the application is officially running.
以上分别从管理服务器和业务服务器的角度对本公开提供的应用部署方法进行了说明,下面结合图7,简单介绍本公开在分布式系统中部署应用时,管理服务器与业务服务器的主要交互过程,其中,本实施例中以管理服务器包括代码服务器和编译服务器为例说明。The application deployment method provided by the present disclosure has been described above from the perspectives of the management server and the business server respectively. The following is a brief introduction of the main interaction process between the management server and the business server when the application is deployed in a distributed system in the present disclosure in conjunction with FIG. 7 . In this embodiment, the management server includes a code server and a compilation server as an example for illustration.
图7是根据一示例性实施例示出的一种应用部署方法的信令交互图,如图7所示,该交互过程包括:Fig. 7 is a signaling interaction diagram of an application deployment method according to an exemplary embodiment. As shown in Fig. 7, the interaction process includes:
在步骤601中,代码服务器接收应用部署指令,该应用部署指令中包括待部署应用,该待部署应用中包括源代码和配置文件,配置文件中包括待部署应用的部署目录。In step 601, the code server receives an application deployment instruction, the application deployment instruction includes an application to be deployed, the application to be deployed includes a source code and a configuration file, and the configuration file includes a deployment directory of the application to be deployed.
在步骤602中,代码服务器获取与该待部署应用对应的测试用例。In step 602, the code server obtains the test case corresponding to the application to be deployed.
在步骤603中,编译服务器从代码服务器中获得所述待部署应用和所述测试用例。In step 603, the compilation server obtains the application to be deployed and the test case from the code server.
在步骤604中,编译服务器接收操作者的编译指令,根据该编译指令编译所述待部署应用。In step 604, the compilation server receives a compilation instruction from the operator, and compiles the application to be deployed according to the compilation instruction.
在步骤605中,编译服务器将编译后的待部署应用和所述测试用例分别发送给各业务服务器。In step 605, the compiling server sends the compiled application to be deployed and the test case to each service server respectively.
在步骤606中,各业务服务器将编译后的待部署应用和所述测试用例存储在部署目录中,并运行所述测试用例。In step 606, each service server stores the compiled application to be deployed and the test case in the deployment directory, and runs the test case.
综上所述,管理服务器通过获取携带有部署目录的待部署应用以及其对应的测试用例,进而将该待部署应用和测试用例分别发给各业务服务器,使得各业务服务器自动部署该应用在该部署目录下,保证了该应用在所有业务服务器中的部署路径一致;而且,通过将与该应用对应的测试用例一并发送给各业务服务器,使得各业务服务器将该测试用例一并存入上述部署目录中,各业务服务器自动启动运行该测试用例对该应用进行测试。该自动部署和测试过程中,无需人工干预,避免人工部署、测试容易出错的问题,提高应用部署和测试效率的同时,保证了应用部署和测试的可靠性。To sum up, the management server obtains the application to be deployed with the deployment directory and its corresponding test case, and then sends the application to be deployed and the test case to each business server, so that each business server automatically deploys the application in the Under the deployment directory, the deployment path of the application in all business servers is guaranteed to be consistent; moreover, by sending the test case corresponding to the application to each business server, each business server will store the test case in the above In the deployment directory, each business server automatically starts and runs the test case to test the application. In the process of automatic deployment and testing, manual intervention is not required, problems of manual deployment and testing that are prone to errors are avoided, and the efficiency of application deployment and testing is improved while reliability of application deployment and testing is ensured.
以上描述了应用部署方法的实现过程,该过程可以由分布式系统中的管理服务器和业务服务器来实现,以下将对管理服务器和业务服务器的内部功能和结构进行说明。The implementation process of the application deployment method is described above, which can be realized by the management server and service server in the distributed system. The internal functions and structures of the management server and service server will be described below.
图8是根据一示例性实施例示出的一种应用部署管理服务器实施例一的框图,如图8所示,该管理服务器包括:第一接收模块11、第一获取模块12、第二获取模块13、编译模块14和发送模块15。Fig. 8 is a block diagram of Embodiment 1 of an application deployment management server according to an exemplary embodiment. As shown in Fig. 8, the management server includes: a first receiving module 11, a first obtaining module 12, and a second obtaining module 13. Compiling module 14 and sending module 15.
第一接收模块11,被配置为接收应用部署指令。The first receiving module 11 is configured to receive an application deployment instruction.
第一获取模块12,被配置为获取待部署应用,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录。The first acquiring module 12 is configured to acquire the application to be deployed, the application to be deployed includes source code and a configuration file, and the configuration file includes a deployment directory of the application to be deployed.
第二获取模块13,被配置为获取与所述待部署应用对应的测试用例。The second obtaining module 13 is configured to obtain test cases corresponding to the application to be deployed.
编译模块14,被配置为对所述待部署应用进行编译。The compiling module 14 is configured to compile the application to be deployed.
发送模块15,被配置为将编译后的待部署应用和所述测试用例发送给各业务服务器,以使所述各业务服务器将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,并运行所述测试用例对所述编译后的待部署应用进行测试。The sending module 15 is configured to send the compiled application to be deployed and the test case to each service server, so that each service server stores the compiled application to be deployed and the test case in the In the above deployment directory, and run the test case to test the compiled application to be deployed.
图9是根据一示例性实施例示出的一种应用部署管理服务器实施例二的框图,如图9所示,在图8所示实施例的基础上,所述应用部署指令中还包括所述待部署应用的应用标识、版本号和描述文件。所述第二获取模块13包括:第一确定子模块131、第一获取子模块132和第二获取子模块133,其中,所述第二获取子模块133包括:确定子模块1331、第一获取子模块1332和第二获取子模块1333。Fig. 9 is a block diagram of Embodiment 2 of an application deployment management server according to an exemplary embodiment. As shown in Fig. 9, on the basis of the embodiment shown in Fig. 8, the application deployment instruction further includes the The application ID, version number and description file of the application to be deployed. The second acquisition module 13 includes: a first determination submodule 131, a first acquisition submodule 132 and a second acquisition submodule 133, wherein the second acquisition submodule 133 includes: a determination submodule 1331, a first acquisition submodule 133 The submodule 1332 and the second acquisition submodule 1333.
第一确定子模块131,被配置为确定是否存在与所述待部署应用对应的历史应用,所述历史应用是应用标识与所述待部署应用的应用标识相同且版本号低于所述待部署应用的版本号的应用。The first determining submodule 131 is configured to determine whether there is a historical application corresponding to the application to be deployed, and the historical application has the same application ID as the application ID of the application to be deployed and a version number lower than the application ID of the application to be deployed Application version number of the application.
第一获取子模块132,被配置为在存在与所述待部署应用对应的历史应用时,获取与所述历史应用对应的历史描述文件,所述历史描述文件是所述历史应用的描述文件。The first obtaining submodule 132 is configured to obtain a history description file corresponding to the history application when there is a history application corresponding to the application to be deployed, and the history description file is a description file of the history application.
第二获取子模块133,被配置为根据所述历史描述文件与所述待部署应用的描述文件,获取与所述待部署应用对应的测试用例。The second acquiring submodule 133 is configured to acquire the test case corresponding to the application to be deployed according to the history description file and the description file of the application to be deployed.
其中,确定子模块1331,被配置为通过比较所述历史描述文件与所述待部署应用的描述文件,确定所述待部署应用中是否存在模块功能与所述历史应用的各功能模块不同的差异功能模块。Wherein, the determination submodule 1331 is configured to determine whether there is a difference in the function of the module in the application to be deployed by comparing the description file of the history description file with the description file of the application to be deployed. functional module.
第一获取子模块1332,被配置为在不存在所述差异功能模块时,获取所述历史应用对应的测试用例作为与所述待部署应用对应的测试用例。The first obtaining submodule 1332 is configured to obtain the test case corresponding to the historical application as the test case corresponding to the application to be deployed when the difference function module does not exist.
第二获取子模块1333,被配置为在存在所述差异功能模块时,获取与所述差异功能模块对应的差异测试用例,并根据所述差异测试用例更新所述历史应用对应的测试用例,将更新后的历史应用对应的测试用例作为与所述待部署应用对应的测试用例。The second obtaining submodule 1333 is configured to obtain the difference test case corresponding to the difference function module when the difference function module exists, and update the test case corresponding to the historical application according to the difference test case, and The test case corresponding to the updated historical application is used as the test case corresponding to the application to be deployed.
图10是根据一示例性实施例示出的一种应用部署管理服务器实施例三的框图,如图10所示,在图8所示实施例的基础上,所述管理服务器还包括:第二接收模块21和认证模块22。Fig. 10 is a block diagram of Embodiment 3 of an application deployment management server according to an exemplary embodiment. As shown in Fig. 10 , on the basis of the embodiment shown in Fig. 8 , the management server further includes: a second receiving module 21 and authentication module 22.
第二接收模块21,被配置为所述编译模块14对所述待部署应用进行编译之前,接收编译指令,所述编译指令中包括操作者的认证信息;The second receiving module 21 is configured to receive a compilation instruction before the compilation module 14 compiles the application to be deployed, and the compilation instruction includes operator authentication information;
认证模块22,被配置为根据所述认证信息对所述操作者进行身份认证;An authentication module 22 configured to authenticate the operator according to the authentication information;
在认证通过时,触发所述编译模块13。When the authentication is passed, the compilation module 13 is triggered.
综上所述,本公开实施例提供的应用部署管理服务器,能够实现对待部署应用及其测试用例的获取、存储、编译以及向各业务服务器的分发部署,实现对应用部署过程的统一自动调度,无需人工逐一地在各业务服务器中部署应用以及对应用进行测试。而且,该管理服务器能够基于自身中存储的已部署应用,进行待部署应用的测试用例的差异化获取,进一步提高应用部署效率。To sum up, the application deployment management server provided by the embodiment of the present disclosure can realize the acquisition, storage, compilation and distribution and deployment of the application to be deployed and its test cases to each business server, and realize the unified automatic scheduling of the application deployment process. There is no need to manually deploy and test applications in each service server one by one. Moreover, the management server can obtain differentiated test cases of applications to be deployed based on deployed applications stored in itself, thereby further improving application deployment efficiency.
图11是根据一示例性实施例示出的一种应用部署业务服务器实施例一的框图,如图11所示,该业务服务器包括:接收模块31、存储模块32和测试模块33。FIG. 11 is a block diagram of Embodiment 1 of an application deployment service server according to an exemplary embodiment. As shown in FIG. 11 , the service server includes: a receiving module 31 , a storage module 32 and a testing module 33 .
接收模块31,被配置为接收管理服务器发送的编译后的待部署应用以及与所述待部署应用对应的测试用例;其中,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录。The receiving module 31 is configured to receive the compiled application to be deployed and the test case corresponding to the application to be deployed sent by the management server; wherein, the application to be deployed includes source code and configuration files, and the configuration files include A deployment directory containing the application to be deployed.
存储模块32,被配置为将所述编译后的待部署应用和所述测试用例存入到所述部署目录下。The storage module 32 is configured to store the compiled application to be deployed and the test case in the deployment directory.
测试模块33,被配置为运行所述测试用例对所述编译后的待部署应用进行测试。The testing module 33 is configured to run the test case to test the compiled application to be deployed.
图12是根据一示例性实施例示出的一种应用部署业务服务器实施例二的框图,如图12所示,在图11所示实施例的基础上,所述部署目录包括临时目录和正式目录,所述存储模块32包括:第一存储子模块321和第二存储子模块322。Fig. 12 is a block diagram of Embodiment 2 of an application deployment service server according to an exemplary embodiment. As shown in Fig. 12, on the basis of the embodiment shown in Fig. 11, the deployment directory includes a temporary directory and an official directory , the storage module 32 includes: a first storage sub-module 321 and a second storage sub-module 322 .
第一存储子模块321,被配置为将所述编译后的待部署应用和所述测试用例存入到所述临时目录下。The first storage submodule 321 is configured to store the compiled application to be deployed and the test case in the temporary directory.
所述测试模块33,被配置为在所述临时目录下运行所述测试用例对所述编译后的待部署应用进行测试。The test module 33 is configured to run the test case in the temporary directory to test the compiled application to be deployed.
第二存储子模块322,被配置为在所述临时目录下运行所述测试用例对所述编译后的待部署应用进行测试通过时,将所述编译后的待部署应用存入到所述正式目录下。The second storage submodule 322 is configured to store the compiled application to be deployed in the official Under contents.
所述业务服务器还包括:删除模块34。The service server also includes: a deletion module 34 .
删除模块34,被配置为删除存入到所述临时目录中的所述编译后的待部署应用和所述测试用例。The deletion module 34 is configured to delete the compiled application to be deployed and the test case stored in the temporary directory.
其中,所述测试用例包括单元测试用例和基础环境测试用例。Wherein, the test cases include unit test cases and basic environment test cases.
所述测试模块33包括:第一测试子模块331和第二测试子模块332。The testing module 33 includes: a first testing submodule 331 and a second testing submodule 332 .
第一测试子模块331,被配置为运行所述基础环境测试用例,对所述待部署应用的基础运行环境进行测试。The first test submodule 331 is configured to run the basic environment test case to test the basic operating environment of the application to be deployed.
第二测试子模块332,被配置为在所述基础环境测试用例测试通过时,运行所述单元测试用例,对所述待部署应用的各功能模块进行测试。The second test submodule 332 is configured to run the unit test case to test each functional module of the application to be deployed when the basic environment test case passes the test.
综上所述,本公开实施例提供的各应用部署业务服务器,能够基于管理服务器的统一分发,将待部署应用自动存入相应的部署目录下,并自动运行测试用例完成对该应用的自动测试,提高了应用部署效率。另外,设置了临时目录和正式目录,将待部署应用和测试用例在临时目录中存储并测试,进而将测试通过的该应用和测试用例从临时目录中删除,将待部署应用转存在正式目录中,进一步保证业务服务器运行应用时运行环境的干净,提高应用运行效率。To sum up, the application deployment service servers provided by the embodiments of the present disclosure can automatically store the application to be deployed in the corresponding deployment directory based on the unified distribution of the management server, and automatically run the test case to complete the automatic test of the application , improving the efficiency of application deployment. In addition, a temporary directory and an official directory are set up, and the application to be deployed and the test case are stored and tested in the temporary directory, and the application and the test case that pass the test are deleted from the temporary directory, and the application to be deployed is transferred to the official directory , to further ensure the cleanness of the running environment when the business server runs the application, and improve the running efficiency of the application.
关于上述实施例中的装置,其中各个模块、子模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above embodiments, the specific manner in which each module and sub-module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
以上描述了应用部署管理服务器的内部功能和结构,如图13所示,实际中,该管理服务器可实现为:The above describes the internal functions and structure of the application deployment management server, as shown in Figure 13. In practice, the management server can be implemented as:
处理器;processor;
被配置为存储处理器可执行指令的存储器;memory configured to store processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
接收应用部署指令,获取待部署应用,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录;receiving an application deployment instruction, and obtaining an application to be deployed, wherein the application to be deployed includes source code and a configuration file, and the configuration file includes a deployment directory of the application to be deployed;
获取与所述待部署应用对应的测试用例;对所述待部署应用进行编译;Obtaining a test case corresponding to the application to be deployed; compiling the application to be deployed;
将编译后的待部署应用和所述测试用例发送给各业务服务器,以使所述各业务服务器将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,并运行所述测试用例对所述编译后的待部署应用进行测试。Send the compiled application to be deployed and the test case to each service server, so that each service server will store the compiled application to be deployed and the test case in the deployment directory, and run The test case tests the compiled application to be deployed.
以上描述了应用部署业务服务器的内部功能和结构,如图14所示,实际中,该管理服务器可实现为:The above describes the internal functions and structure of the application deployment business server, as shown in Figure 14. In practice, the management server can be implemented as:
处理器;processor;
被配置为存储处理器可执行指令的存储器;memory configured to store processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
接收管理服务器发送的编译后的待部署应用以及与所述待部署应用对应的测试用例;其中,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录;Receive the compiled application to be deployed and the test case corresponding to the application to be deployed sent by the management server; wherein the application to be deployed includes source code and configuration files, and the configuration file includes the application to be deployed deployment directory;
将所述编译后的待部署应用和所述测试用例存入到所述部署目录下;storing the compiled application to be deployed and the test case in the deployment directory;
运行所述测试用例对所述编译后的待部署应用进行测试。Running the test case to test the compiled application to be deployed.
图15是根据一示例性实施例示出的一种应用部署管理服务器1500的框图。参照图15,该管理服务器1500包括处理组件1522,其进一步包括一个或处理器,以及由存储器1532所代表的存储器资源,用于存储可由处理组件1522的执行的指令,例如应用程序。存储器1532中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1522被配置为执行指令,以执行上述方法:Fig. 15 is a block diagram of an application deployment management server 1500 according to an exemplary embodiment. Referring to FIG. 15, the management server 1500 includes a processing component 1522, which further includes a processor, and a memory resource represented by a memory 1532 for storing instructions executable by the processing component 1522, such as application programs. The application programs stored in memory 1532 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1522 is configured to execute instructions to perform the method described above:
接收应用部署指令,获取待部署应用,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录;receiving an application deployment instruction, and obtaining an application to be deployed, wherein the application to be deployed includes source code and a configuration file, and the configuration file includes a deployment directory of the application to be deployed;
获取与所述待部署应用对应的测试用例;对所述待部署应用进行编译;Obtaining a test case corresponding to the application to be deployed; compiling the application to be deployed;
将编译后的待部署应用和所述测试用例发送给各业务服务器,以使所述各业务服务器将所述编译后的待部署应用和所述测试用例存入到所述部署目录下,并运行所述测试用例对所述编译后的待部署应用进行测试。Send the compiled application to be deployed and the test case to each service server, so that each service server will store the compiled application to be deployed and the test case in the deployment directory, and run The test case tests the compiled application to be deployed.
管理服务器1500还可以包括一个电源组件1526被配置为执行管理服务器1500的电源管理,一个有线或无线网络接口1550被配置为将管理服务器1500连接到网络,和一个输入输出(I/O)接口1558。管理服务器1500可以操作基于存储在存储器1532的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。Management server 1500 may also include a power component 1526 configured to perform power management of management server 1500, a wired or wireless network interface 1550 configured to connect management server 1500 to a network, and an input output (I/O) interface 1558 . The management server 1500 can operate based on an operating system stored in the memory 1532, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
图16是根据一示例性实施例示出的一种应用部署业务服务器1600的框图。参照图16,该管理服务器1600包括处理组件1622,其进一步包括一个或处理器,以及由存储器1632所代表的存储器资源,用于存储可由处理组件1622的执行的指令,例如应用程序。存储器1632中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1622被配置为执行指令,以执行上述方法:Fig. 16 is a block diagram of an application deployment service server 1600 according to an exemplary embodiment. Referring to FIG. 16, the management server 1600 includes a processing component 1622, which further includes a processor, and a memory resource represented by a memory 1632 for storing instructions executable by the processing component 1622, such as application programs. The application programs stored in memory 1632 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1622 is configured to execute instructions to perform the above method:
接收管理服务器发送的编译后的待部署应用以及与所述待部署应用对应的测试用例;其中,所述待部署应用中包括源代码和配置文件,所述配置文件中包含所述待部署应用的部署目录;Receive the compiled application to be deployed and the test case corresponding to the application to be deployed sent by the management server; wherein the application to be deployed includes source code and configuration files, and the configuration file includes the application to be deployed deployment directory;
将所述编译后的待部署应用和所述测试用例存入到所述部署目录下;storing the compiled application to be deployed and the test case in the deployment directory;
运行所述测试用例对所述编译后的待部署应用进行测试。Running the test case to test the compiled application to be deployed.
管理服务器1600还可以包括一个电源组件1626被配置为执行管理服务器1600的电源管理,一个有线或无线网络接口1650被配置为将管理服务器1600连接到网络,和一个输入输出(I/O)接口1658。管理服务器1600可以操作基于存储在存储器1632的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。Management server 1600 may also include a power supply component 1626 configured to perform power management of management server 1600, a wired or wireless network interface 1650 configured to connect management server 1600 to a network, and an input output (I/O) interface 1658 . The management server 1600 can operate based on an operating system stored in the memory 1632, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510353829.4A CN104978191B (en) | 2015-06-24 | 2015-06-24 | Using dispositions method and service device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510353829.4A CN104978191B (en) | 2015-06-24 | 2015-06-24 | Using dispositions method and service device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN104978191A true CN104978191A (en) | 2015-10-14 |
| CN104978191B CN104978191B (en) | 2018-06-19 |
Family
ID=54274729
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510353829.4A Expired - Fee Related CN104978191B (en) | 2015-06-24 | 2015-06-24 | Using dispositions method and service device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104978191B (en) |
Cited By (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106528404A (en) * | 2016-09-30 | 2017-03-22 | 腾讯科技(深圳)有限公司 | Mobile application test method and apparatus |
| CN107943486A (en) * | 2017-12-19 | 2018-04-20 | 北京星河星云信息技术有限公司 | A kind of multilingual code compiling method, distribution method, device and system |
| CN108228452A (en) * | 2017-12-28 | 2018-06-29 | 微梦创科网络科技(中国)有限公司 | A kind of test method and test device based on simple factory mode |
| CN108959086A (en) * | 2018-06-29 | 2018-12-07 | 北京金山数字娱乐科技有限公司 | Program bag tests dispositions method, device, system, electronic equipment and storage medium |
| CN109032643A (en) * | 2018-07-26 | 2018-12-18 | 北京百度网讯科技有限公司 | The method and apparatus of software upgrading |
| CN109120432A (en) * | 2018-07-18 | 2019-01-01 | 北京奇艺世纪科技有限公司 | A kind of failed server localization method and device |
| CN109614109A (en) * | 2018-11-16 | 2019-04-12 | 中国银行股份有限公司 | Using dispositions method, device and system |
| CN109814874A (en) * | 2019-02-20 | 2019-05-28 | 湖南国科微电子股份有限公司 | A kind of compiling result output control method, system and application |
| CN109858226A (en) * | 2019-01-31 | 2019-06-07 | 叶春林 | The safeguards system of networking storage safety |
| CN109885476A (en) * | 2018-12-14 | 2019-06-14 | 平安万家医疗投资管理有限责任公司 | Automated testing method and device, terminal and computer-readable storage medium |
| CN110392080A (en) * | 2018-04-20 | 2019-10-29 | 杭州海康威视系统技术有限公司 | A kind of dispositions method based on distributed system, device and distributed system |
| CN111124934A (en) * | 2019-12-31 | 2020-05-08 | 中国银行股份有限公司 | JAVA application deployment state detection method and device |
| CN111242577A (en) * | 2020-01-13 | 2020-06-05 | 中国建设银行股份有限公司 | RPA process automation robot deployment method and device and electronic equipment |
| CN111414172A (en) * | 2020-03-18 | 2020-07-14 | 时时同云科技(成都)有限责任公司 | Application software automatic deployment and publishing system and method |
| US10908892B2 (en) | 2019-03-12 | 2021-02-02 | International Business Machines Corporation | Generating and deploying object code files compiled on build machines |
| CN112328217A (en) * | 2020-11-03 | 2021-02-05 | 中国平安人寿保险股份有限公司 | Code deployment method, device, system, computer equipment and medium |
| CN112612666A (en) * | 2020-12-29 | 2021-04-06 | 上海法雷奥汽车电器系统有限公司 | Test control method and device, computer equipment and readable storage medium |
| CN114489687A (en) * | 2022-02-17 | 2022-05-13 | 平安国际智慧城市科技股份有限公司 | A method and related device for deploying a business instance |
| CN114637511A (en) * | 2022-02-21 | 2022-06-17 | 北京奕斯伟计算技术有限公司 | Code testing system, method, device, electronic equipment and readable storage medium |
| CN114924755A (en) * | 2022-05-23 | 2022-08-19 | 深圳微言科技有限责任公司 | An application deployment method and system |
| CN116541308A (en) * | 2023-07-03 | 2023-08-04 | 芯耀辉科技有限公司 | Regression testing method and system |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050289536A1 (en) * | 2004-06-23 | 2005-12-29 | International Business Machines Coporation | Automated deployment of an application |
| CN101420325A (en) * | 2008-11-21 | 2009-04-29 | 华为技术有限公司 | Automatic deployment method, apparatus and system for software package |
| CN103198010A (en) * | 2012-01-06 | 2013-07-10 | 腾讯科技(深圳)有限公司 | Software testing method, device and system |
| CN103581247A (en) * | 2012-07-30 | 2014-02-12 | 杭州洱海科技有限公司 | Method for testing distributed type Web based on cloud computing environment |
| CN104391795A (en) * | 2014-12-03 | 2015-03-04 | 北京京东尚科信息技术有限公司 | Method and system for automatically testing coverage rate in distributed system |
| CN104598382A (en) * | 2015-01-30 | 2015-05-06 | 北京京东尚科信息技术有限公司 | Test control method and device |
-
2015
- 2015-06-24 CN CN201510353829.4A patent/CN104978191B/en not_active Expired - Fee Related
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050289536A1 (en) * | 2004-06-23 | 2005-12-29 | International Business Machines Coporation | Automated deployment of an application |
| CN101420325A (en) * | 2008-11-21 | 2009-04-29 | 华为技术有限公司 | Automatic deployment method, apparatus and system for software package |
| CN103198010A (en) * | 2012-01-06 | 2013-07-10 | 腾讯科技(深圳)有限公司 | Software testing method, device and system |
| CN103581247A (en) * | 2012-07-30 | 2014-02-12 | 杭州洱海科技有限公司 | Method for testing distributed type Web based on cloud computing environment |
| CN104391795A (en) * | 2014-12-03 | 2015-03-04 | 北京京东尚科信息技术有限公司 | Method and system for automatically testing coverage rate in distributed system |
| CN104598382A (en) * | 2015-01-30 | 2015-05-06 | 北京京东尚科信息技术有限公司 | Test control method and device |
Cited By (30)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106528404A (en) * | 2016-09-30 | 2017-03-22 | 腾讯科技(深圳)有限公司 | Mobile application test method and apparatus |
| CN106528404B (en) * | 2016-09-30 | 2019-03-29 | 腾讯科技(深圳)有限公司 | Mobile applications test method and device |
| US10698797B2 (en) | 2016-09-30 | 2020-06-30 | Tencent Technology (Shenzhen) Company Limited | Mobile application program testing method, server, terminal, and storage medium |
| CN107943486A (en) * | 2017-12-19 | 2018-04-20 | 北京星河星云信息技术有限公司 | A kind of multilingual code compiling method, distribution method, device and system |
| CN107943486B (en) * | 2017-12-19 | 2020-12-18 | 北京微网通联股份有限公司 | Multi-language code compiling method, multi-language code distributing method, multi-language code compiling device, multi-language code distributing device and multi-language code system |
| CN108228452A (en) * | 2017-12-28 | 2018-06-29 | 微梦创科网络科技(中国)有限公司 | A kind of test method and test device based on simple factory mode |
| CN108228452B (en) * | 2017-12-28 | 2021-04-06 | 微梦创科网络科技(中国)有限公司 | Test method and test device based on simple factory mode |
| CN110392080A (en) * | 2018-04-20 | 2019-10-29 | 杭州海康威视系统技术有限公司 | A kind of dispositions method based on distributed system, device and distributed system |
| CN110392080B (en) * | 2018-04-20 | 2023-06-06 | 杭州海康威视系统技术有限公司 | Deployment method and device based on distributed system and distributed system |
| CN108959086A (en) * | 2018-06-29 | 2018-12-07 | 北京金山数字娱乐科技有限公司 | Program bag tests dispositions method, device, system, electronic equipment and storage medium |
| CN109120432B (en) * | 2018-07-18 | 2021-10-15 | 北京奇艺世纪科技有限公司 | Fault server positioning method and device |
| CN109120432A (en) * | 2018-07-18 | 2019-01-01 | 北京奇艺世纪科技有限公司 | A kind of failed server localization method and device |
| CN109032643A (en) * | 2018-07-26 | 2018-12-18 | 北京百度网讯科技有限公司 | The method and apparatus of software upgrading |
| CN109614109B (en) * | 2018-11-16 | 2022-02-01 | 中国银行股份有限公司 | Application deployment method, device and system |
| CN109614109A (en) * | 2018-11-16 | 2019-04-12 | 中国银行股份有限公司 | Using dispositions method, device and system |
| CN109885476A (en) * | 2018-12-14 | 2019-06-14 | 平安万家医疗投资管理有限责任公司 | Automated testing method and device, terminal and computer-readable storage medium |
| CN109858226A (en) * | 2019-01-31 | 2019-06-07 | 叶春林 | The safeguards system of networking storage safety |
| CN109814874A (en) * | 2019-02-20 | 2019-05-28 | 湖南国科微电子股份有限公司 | A kind of compiling result output control method, system and application |
| CN109814874B (en) * | 2019-02-20 | 2023-03-24 | 湖南国科微电子股份有限公司 | Compilation result output control method, system and application |
| US10908892B2 (en) | 2019-03-12 | 2021-02-02 | International Business Machines Corporation | Generating and deploying object code files compiled on build machines |
| CN111124934A (en) * | 2019-12-31 | 2020-05-08 | 中国银行股份有限公司 | JAVA application deployment state detection method and device |
| CN111242577A (en) * | 2020-01-13 | 2020-06-05 | 中国建设银行股份有限公司 | RPA process automation robot deployment method and device and electronic equipment |
| CN111414172A (en) * | 2020-03-18 | 2020-07-14 | 时时同云科技(成都)有限责任公司 | Application software automatic deployment and publishing system and method |
| CN112328217A (en) * | 2020-11-03 | 2021-02-05 | 中国平安人寿保险股份有限公司 | Code deployment method, device, system, computer equipment and medium |
| CN112612666A (en) * | 2020-12-29 | 2021-04-06 | 上海法雷奥汽车电器系统有限公司 | Test control method and device, computer equipment and readable storage medium |
| CN114489687A (en) * | 2022-02-17 | 2022-05-13 | 平安国际智慧城市科技股份有限公司 | A method and related device for deploying a business instance |
| CN114637511A (en) * | 2022-02-21 | 2022-06-17 | 北京奕斯伟计算技术有限公司 | Code testing system, method, device, electronic equipment and readable storage medium |
| CN114924755A (en) * | 2022-05-23 | 2022-08-19 | 深圳微言科技有限责任公司 | An application deployment method and system |
| CN116541308A (en) * | 2023-07-03 | 2023-08-04 | 芯耀辉科技有限公司 | Regression testing method and system |
| CN116541308B (en) * | 2023-07-03 | 2023-10-24 | 芯耀辉科技有限公司 | A regression testing method and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104978191B (en) | 2018-06-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104978191B (en) | Using dispositions method and service device | |
| CN110569035B (en) | Code compiling method, device, equipment and storage medium of software development project | |
| CN104573525B (en) | A kind of specific information service software leak repair system based on white list | |
| US9372784B2 (en) | Test system configuration method and system | |
| US9971595B1 (en) | Techniques for automated database deployment | |
| US20160378458A1 (en) | Method and device for system application installation package, and terminal | |
| US12164898B2 (en) | Automated deployment of changes to applications on a cloud computing platform | |
| CN107678748B (en) | Source code file compiling method and device | |
| US11544050B1 (en) | Software patch automation | |
| US20090307763A1 (en) | Automated Test Management System and Method | |
| US11645086B2 (en) | System and method for implementing a filesystem agent management solution | |
| CN105389263B (en) | Application software authority monitoring method, system and equipment | |
| US11816499B2 (en) | Transition manager system | |
| CN109284106A (en) | Method for release management, electronic device and the readable storage medium storing program for executing of business rule | |
| WO2012068850A1 (en) | Method and system for constructing software version | |
| CN113434158A (en) | User-defined management method, device, equipment and medium for big data component | |
| CN113342323A (en) | Method and device for software online development | |
| Fazzini et al. | Apimigrator: an api-usage migration tool for android apps | |
| CN110543323B (en) | Application program repairing method and device | |
| CN106909434B (en) | Method and device for detecting undefined function in executable program | |
| US9946534B1 (en) | Techniques for automated database deployment | |
| CN109933976B (en) | Android application similarity detection method, mobile terminal and storage device | |
| CN119225925A (en) | Service management method, device, electronic device and storage medium | |
| TWI730415B (en) | Detection system, detection method, and an update verification method performed by using the detection method | |
| CN108170420A (en) | Construction method, device and the computer readable storage medium of application package |
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 | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180619 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |