WO2017084275A1 - 软件开发一体化的方法及装置 - Google Patents

软件开发一体化的方法及装置 Download PDF

Info

Publication number
WO2017084275A1
WO2017084275A1 PCT/CN2016/082822 CN2016082822W WO2017084275A1 WO 2017084275 A1 WO2017084275 A1 WO 2017084275A1 CN 2016082822 W CN2016082822 W CN 2016082822W WO 2017084275 A1 WO2017084275 A1 WO 2017084275A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
source code
environment
compilation
test
Prior art date
Application number
PCT/CN2016/082822
Other languages
English (en)
French (fr)
Inventor
姬高峰
Original Assignee
乐视控股(北京)有限公司
乐视云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 乐视控股(北京)有限公司, 乐视云计算有限公司 filed Critical 乐视控股(北京)有限公司
Priority to US15/245,299 priority Critical patent/US20170147476A1/en
Publication of WO2017084275A1 publication Critical patent/WO2017084275A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Definitions

  • the embodiments of the present invention relate to the field of Internet technologies, and in particular, to a method and an apparatus for integrating software development.
  • Software development is the process of building a software system or a software part of a system based on user requirements.
  • the software development process usually involves several steps such as source code development, compilation, testing, and release.
  • the steps of compiling, testing, and releasing the online in the software development process are performed independently. Specifically, it is necessary to manually configure, compile, test, and release the running environment of the online link.
  • the compilation link needs to manually configure different compilation environments according to the language type of the source code; the test link requires the tester to deploy the test system version, language type, and specific test cases according to the characteristics of the source code.
  • the embodiment of the invention provides a method and a device for integrating software development, which are used to solve the problem of low efficiency of the existing software development process.
  • Embodiments of the present invention provide a method for integrating software development, including:
  • the basic information including an address of the source code and a language type of the source code
  • An embodiment of the present invention provides an apparatus for integrating software development, including:
  • An obtaining unit configured to acquire basic information of the source code, where the basic information includes an address of the source code and a language type of the source code;
  • a searching unit configured to search for the source code by using an address of the source code
  • a deployment unit configured to deploy a compilation environment and a test environment according to the language type, where the compilation environment and the test environment are respectively adapted to a language type of the source code;
  • a compiling unit configured to load the source code into the compiling environment for compiling, to obtain a code data package
  • a testing unit configured to load the code data packet into the test environment for testing
  • a publishing unit that is used to publish the code packets passed by the test.
  • the method and device for integrating software development provided by the embodiment of the invention can automatically obtain the source code through basic information of the externally set source code, and deploy the compilation environment and the test environment according to the language type in the source code basic information, and then the source The code is loaded into the compilation environment to compile, get the code data package, then load the code data package into the test environment for testing, and finally release the code passed the test.
  • the embodiment of the present invention can integrate the compiling, testing, and publishing links in the software development process onto a system platform, and each link is automatically implemented, and no manual operation environment of each link is required. Deployment saves time and reduces the probability of errors, thus improving the efficiency of software development.
  • FIG. 2 is a flowchart of another method for integrating software development according to an embodiment of the present invention.
  • FIG. 3 is a block diagram of a device for integrating software development according to an embodiment of the present invention.
  • FIG. 4 is a structural block diagram of another apparatus for software development integration according to an embodiment of the present invention.
  • the embodiment of the invention provides a method for integrating software development. As shown in FIG. 1 , the method includes:
  • the basic information of the source code is set and maintained by the outside.
  • the basic information of the source code includes the address of the source code, the language type of the source code, and the system to which the source code belongs.
  • the address refers to the address of the storage source code;
  • the language type refers to the computer language type used by the editing source code, including various advanced computer programming languages, such as C, C++, Java, etc.;
  • the system to which the source code belongs is divided into three types.
  • the core system, the business support system, and the peripheral system are different levels of different systems.
  • the source code is searched for from the basic information in step 101, and then the source code is obtained according to the storage address of the source code.
  • the build environment and test environment are first deployed before compiling and testing the source code.
  • the compilation environment and test environment for source code adaptation of different language types are different, so it is necessary to deploy the suitable compilation environment and test environment according to the language type of the source code.
  • This embodiment can deploy a compilation environment and a test environment suitable for various language types, so that source code of any language type can be compiled and tested later.
  • the source code can be compiled after deploying the appropriate build environment. Compilation refers to the transformation of a high-level computer language used by source code into a binary language that a computer can recognize. Specifically, the source code acquired by step 102 is loaded into the compilation environment adapted to the source code obtained in step 103 for compilation.
  • the compilation process mainly includes: lexical analysis, syntax analysis, semantic checking, and intermediate code generation, code optimization, and object code generation.
  • the main compilation is to analyze the source code through the compiler and generate the target code.
  • the compiler is designed by the programmer in advance. It can be called directly when it is used; the generated object code is the code data package in this embodiment.
  • the code data packet obtained in step 104 is loaded into the test environment obtained in step 103.
  • the test in this example is an automated test process, and the automated test relies on a set of programs that can implement automated tests, and the automated test program is The technicians edited well in advance.
  • the automated test program can be reused.
  • the code data package passed the test is released online.
  • On-line publishing is to deploy the code packets passed by the test to the actual computer system, so the test of the code packets is a prerequisite for online release. It should be noted that the test pass does not mean that there will be no running abnormality after the release of the online release. Therefore, it is necessary to monitor the operation of all actual computer systems in real time during the release of the code, so that the code data can be ensured.
  • the package was found to be abnormal in time during the release process, and the outside was notified in time.
  • a certain link in FIG. 1 may be selected according to the level of the system to which it belongs.
  • the core system belongs to the level 0 system
  • the service support system belongs to the level 1 system
  • the peripheral system belongs to the level 2 system
  • the level 0 and level 1 systems need to carry out all the links in Figure 1, and the level 2 system can only carry out the on-line release link. .
  • the software development integration method provided by the embodiment of the invention can automatically obtain the source code through the basic information of the externally set source code, and deploy the compilation environment and the test environment according to the language type in the source code basic information, and then load the source code. Compile in the compilation environment, get the code data package, then load the code data package into the test environment for testing, and finally release the code passed the test.
  • the embodiment of the present invention can integrate the compiling, testing, and publishing links in the software development process onto a system platform, and each link is automatically implemented, and no manual operation environment of each link is required. Deployment saves time and reduces the probability of errors, thus improving the efficiency of software development.
  • Obtaining the deployment method means obtaining the deployment mode of the external selection.
  • the deployment mode in this embodiment is classified according to the carrier running the code, including Panda Tomcat, Apache Apache, and the like. External can choose different deployment methods.
  • the deployment method is related to the deployment test environment that follows.
  • the implementation manner of obtaining the basic information of the source code in this step is the same as the implementation manner of the step 101 in FIG. 1 , and details are not described herein again.
  • step 102 in FIG. 1 The implementation of this step is the same as the implementation of step 102 in FIG. 1 , and details are not described herein again.
  • the compilation environment is related to the language type, so you need to choose the appropriate compilation environment according to the language type of the source code.
  • step 104 The implementation of this step is the same as the implementation of step 104 in FIG. 1 , and details are not described herein again.
  • compilation errors that occur include code errors, no comments, and no test cases.
  • Compilation errors are determined by code review rules, and all compilation errors are recorded to generate a code violation report.
  • the code violation report will record in detail where the compilation error occurred and the type of compilation error.
  • step 105 in FIG. 1 The implementation of this step is the same as the implementation of step 105 in FIG. 1 , and details are not described herein again.
  • the code data package passed the test is released online.
  • test code packets There are two ways to release the test code packets that are passed online:
  • Grayscale release refers to the distribution of code data packets to a part of the computer system, and then gradually expand the scope of the release until the code data package is distributed to all computer systems. Specifically, all computer systems can be divided into several when implementing the wholesale code data package. Different groups are then released step by step. The packets may be grouped according to an Internet Protocol Address (IP) address, or grouped according to different computer rooms where the user is located.
  • IP Internet Protocol Address
  • the implementation of the grayscale distribution is specifically described by the different computer room where the computer system is located. If the user is divided into three computer rooms, the specific implementation process is as follows: the code data packet passed through the test is first released to the computer system of the first computer room. And real-time monitoring of the operation of the computer system; if the computer system in the first computer room can meet the desired operational requirements, the code data package is released to the computer system in the second computer room, and then real-time monitoring in the first and second computer rooms Computer system; if the computer systems in the No. 1 and No. 2 computer rooms meet the expected operational requirements, the code data package is released to the computer system of the No. 3 computer room, and the real-time monitoring of the computer system in the No. 3 computer room is also required. happening.
  • each part may be artificially controlled, and each time interval may be different.
  • a shared communication interface is provided externally, and the shared communication interface integrates cloud sharing and real-time chat tools to realize external communication and source code sharing.
  • Another added live chat tool is used to communicate between employees, mainly about the comments and communication of the source code in the code base.
  • the embodiment further provides a function of code integration, that is, when externally modifying the source code, the code integration of the source code is automatically completed, and the integrated code is automatically compiled, if the process is compiled. When an error is found, a code violation report is also generated. If you want to complete a software compilation, testing, and release process for the integrated code, you need to follow the complete process of Figure 1 or Figure 2.
  • another embodiment of the embodiment of the present invention further provides a device for integrating software development.
  • the device includes: an acquiring unit. 31. Query unit 32, deployment unit 33, compilation unit 34, test unit 35, and release Unit 36.
  • the obtaining unit 31 is configured to obtain basic information of the source code, where the basic information includes an address of the source code and a language type of the source code.
  • the basic information of the source code acquired by the acquisition unit also includes the system to which the source code belongs.
  • the address in the basic information refers to the address where the source code is stored;
  • the language type refers to the computer language type used by the editing source code, including various advanced computer programming languages;
  • the system to which the source code belongs is divided into three types, namely, the core system, Business support systems, peripheral systems, different systems have different levels.
  • the searching unit 32 is configured to find the source code by using the address of the source code.
  • the deployment unit 33 is configured to deploy the compilation environment and the test environment according to the language type, and the compilation environment and the test environment are respectively adapted to the language type environment of the source code.
  • the build environment and test environment are first deployed before compiling and testing the source code.
  • the compilation environment and test environment for source code adaptation of different language types are different, so it is necessary to deploy the suitable compilation environment and test environment according to the language type of the source code.
  • This embodiment can deploy a compilation environment and a test environment suitable for various language types, so that source code of any language type can be compiled and tested later.
  • the compiling unit 34 is configured to load the source code into the compiling environment to compile, and obtain a code data packet.
  • the source code acquired by the obtaining unit is loaded into the compilation environment of the deployment unit deployment for compilation.
  • the compilation process mainly includes: lexical analysis, syntax analysis, semantic checking, and intermediate code generation, code optimization, and object code generation.
  • the main compilation is to analyze the source code through the compiler and generate the target code.
  • the generated object code is the code data packet in this embodiment.
  • the testing unit 35 is configured to load the code data package into the test environment for testing.
  • the code data package obtained by the compilation unit is loaded into the test environment of the deployment unit deployment for testing.
  • the test in this example is an automated test process, and the automated test relies on a set of programs that can implement automated testing, and the automated test program is The technician has already edited it in advance.
  • the automated test program can be reused.
  • the issuing unit 36 is configured to post the code data packet passed by the test.
  • the manner in which the code data packet passed the test is posted online includes the following two types: Not all releases and grayscale releases. All releases refer to the code packets that pass the test and are distributed to all computer systems at once.
  • Grayscale publishing is the grayscale publishing refers to the distribution of code data packets to a part of the computer system, and then gradually expand the scope of the distribution until the code data package is distributed to all computer systems. Specifically, all the computer systems can be divided into different groups when implementing the wholesale code data package, and then gradually distributed according to the group. The packets may be grouped according to IP addresses, or grouped according to different computer rooms where the computer system is located.
  • the apparatus further includes:
  • the generating unit 37 is configured to generate a code violation report after the code data package is obtained, and the code violation report is used to record the code error information detected during the compilation process.
  • compilation errors that occur include code errors, no comments, and no test cases.
  • Compilation errors are determined by code review rules, and all compilation errors are recorded to generate a code violation report.
  • the code violation report will record in detail where the compilation error occurred and the type of compilation error.
  • the obtaining module 331 is configured to obtain a deployment mode, and the deployment mode is an externally selected deployment mode.
  • Obtaining the deployment method means obtaining the deployment mode of the external selection.
  • the deployment method in this embodiment is classified according to the carrier running the code, including a Panda Tomcat server, an Apache Apache server, and the like. External can choose different deployment methods.
  • the deployment method is related to the deployment test environment that follows.
  • the deployment module 332 is configured to deploy the test environment according to the deployment mode and the language type.
  • the compilation environment is related to the language type, so you need to choose the appropriate compilation environment according to the language type of the source code.
  • the test environment is not only related to the type of language, but also to the way the deployment is chosen. If the deployment mode is selected externally, you need to deploy the test environment according to the selected deployment mode. If no deployment mode is selected, you can provide any deployment mode to deploy the test environment. Generally, any deployment mode can be applied to All source code.
  • the apparatus further includes:
  • the providing unit 38 is configured to provide a shared communication interface for implementing external communication and source code sharing.
  • the shared communication interface integrates cloud sharing and real-time chat tools to communicate with the outside world. Letter and source code sharing.
  • Cloud sharing is implemented using the github source code management tool, in which each person can create a code library of their own, upload their own edited source code into their own code base, and then share their own code base through github. You can do secondary development based on code in other codebases and then update to your own code base.
  • Another added live chat tool is used to communicate between employees, mainly about the comments and communication of the source code in the code base.
  • the apparatus further includes:
  • the integration unit 39 is configured to perform code integration on the source code if the source code is modified externally.
  • the code integration of the source code can be completed automatically, and the integrated code can be compiled. If an error is found during the compilation process, a code violation report is generated.
  • the device for integrating software development provided by the embodiment of the invention can automatically obtain the source code through the basic information of the externally set source code, and deploy the compilation environment and the test environment according to the language type in the source code basic information, and then load the source code. Compile in the compilation environment, get the code data package, then load the code data package into the test environment for testing, and finally release the code passed the test.
  • the embodiment of the present invention can integrate the compiling, testing, and publishing links in the software development process onto a system platform, and each link is automatically implemented, and no manual operation environment of each link is required. Deployment saves time and reduces the probability of errors, thus improving the efficiency of software development.
  • the points may be embodied in the form of a software product, which may be stored in a computer readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer)
  • the server, or network device, etc. performs the methods described in various embodiments or portions of the embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

提供一种软件开发一体化的方法及装置,其中,所述方法主要包括:获取源代码的基本信息(101),所述基本信息包含所述源代码的地址和所述源代码的语言类型;通过所述源代码的地址查找所述源代码(102);根据所述语言类型部署编译环境和测试环境(103),所述编译环境和所述测试环境是分别适配于所述源代码的语言类型的环境;将所述源代码加载到所述编译环境中进行编译,得到代码数据包(104);将所述代码数据包加载到所述测试环境中进行测试(105);将测试通过的代码数据包进行上线发布(106)。与现有技术相比,所述方法及装置能够提高软件开发的效率。

Description

软件开发一体化的方法及装置 技术领域
本发明实施例涉及互联网技术领域,尤其涉及一种软件开发一体化的方法及装置。
背景技术
软件开发是根据用户要求建造出软件系统或者系统中的软件部分的过程。软件开发过程通常涉及源代码开发、编译、测试、发布上线等几个环节。
现有的技术中,软件开发过程中的编译、测试以及发布上线的环节是独立进行的。具体的,需要人为手动配置编译、测试以及发布上线环节的运行环境。例如编译环节需要人工根据源代码的语言类型配置不同的编译环境;测试环节需要测试人员根据源代码的特点部署测试系统版本、语言类型以及具体的测试用例。
在上述软件的开发过程中,发明人发现,通过人工进行各环节运行环境的部署的方式,不仅花费时间长,且容易出错。综上可知,现有的软件开发过程效率低。
发明内容
本发明实施例提供一种软件开发一体化的方法及装置,用以解决现有软件开发过程效率低的问题。
本发明实施例提供一种软件开发一体化的方法,包括:
获取源代码的基本信息,所述基本信息包含所述源代码的地址和所述源代码的语言类型;
通过所述源代码的地址查找所述源代码;
根据所述语言类型部署编译环境和测试环境,所述编译环境和所述测试环境是分别适配于所述源代码的语言类型的环境;
将所述源代码加载到所述编译环境中进行编译,得到代码数据包;
将所述代码数据包加载到所述测试环境中进行测试;
将测试通过的代码数据包进行上线发布。
本发明实施例提供一种软件开发一体化的装置,包括:
获取单元,用于获取源代码的基本信息,所述基本信息包含所述源代码的地址和所述源代码的语言类型;
查找单元,用于通过所述源代码的地址查找所述源代码;
部署单元,用于根据所述语言类型部署编译环境和测试环境,所述编译环境和所述测试环境是分别适配于所述源代码的语言类型的环境;
编译单元,用于将所述源代码加载到所述编译环境中进行编译,得到代码数据包;
测试单元,用于将所述代码数据包加载到所述测试环境中进行测试;
发布单元,用于将测试通过的代码数据包进行上线发布。
本发明实施例提供的软件开发一体化的方法及装置,能够通过外部设置的源代码的基本信息自动获取源代码,并根据源代码基本信息中的语言类型部署编译环境和测试环境,然后将源代码加载到编译环境中进行编译,得到代码数据包,再将代码数据包加载到测试环境中进行测试,最后将测试通过的代码进行上线发布。与现有技术相比,本发明实施例能够将软件开发过程中的编译、测试以及发布环节集成到一个系统平台上,并且每个环节都是自动实现的,无需人工对各环节的运行环境进行部署,在节省时间的同时可以降低发生错误的概率,因此提高了软件开发的效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种软件开发一体化的方法的流程图;
图2为本发明实施例提供的另一种软件开发一体化的方法的流程图;
图3为本发明实施例提供的一种软件开发一体化的装置的组成框图;
图4为本发明实施例提供的另一种软件开发一体化的装置的组成框图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供了一种软件开发一体化的方法,如图1所示,该方法包括:
101、获取源代码的基本信息。
源代码的基本信息是由外部设置和维护的。源代码的基本信息包括源代码的地址、源代码的语言类型、源代码所属的系统。其中地址是指存储源代码的地址;语言类型是指编辑源代码使用的计算机语言类型,包括各种高级计算机编程语言,例如C、C++、爪哇java等;源代码所属的系统分为三种,分别为核心系统、业务支持系统、外围系统,不同的系统的级别不同。
102、通过源代码的地址查找源代码。
从步骤101中的基本信息中查找源代码的地址,然后根据源代码的存储地址获取到源代码。
103、根据语言类型部署编译环境和测试环境。
获取到源代码之后,需要对源代码进行编译和测试。在对源代码进行编译和测试之前首先要部署编译环境和测试环境。不同语言类型的源代码适配的编译环境和测试环境是不同的,因此需要根据源代码的语言类型来部署其适合的编译环境和测试环境。本实施例可以部署适合各种语言类型的编译环境和测试环境,因此对于任何语言类型源代码都可以后面的进行编译和测试。
104、将源代码加载到编译环境中进行编译,得到代码数据包。
在部署好合适的编译环境之后就可以进行源代码的编译了。编译是指把源代码使用的高级计算机语言转变成计算机可以识别的二进制语言。具体的是将由步骤102获取到的源代码加载到由步骤103得到的适配于源代码的编译环境中进行编译。编译的过程主要包括:词法分析、语法分析、语义检查以及中间代码生成、代码优化、目标代码生成。编译主要是通过编译程序对源代码进行分析,并生成目标代码。其中编译程序是由编程人员事先设计好 的,在使用的时候可以直接调用;生成的目标代码就是本实施例中的代码数据包。
105、将代码数据包加载到测试环境中进行测试。
将由步骤104得到的代码数据包加载到由步骤103得到的测试环境进行测试,本实例中的测试是自动化的测试过程,自动化测试依赖于一套可以实现自动化测试的程序,自动化的测试程序是由技术人员提前编辑好的。该自动化测试的程序是可以被复用的。
106、将测试通过的代码数据包进行上线发布。
上线发布是将测试通过的代码数据包部署到实际的计算机系统中,因此代码数据包通过测试是上线发布的前提条件。需要说明的是测试通过并不意味着在上线发布后不会产生运行异常的问题,因此在代码上线发布的过程中需要实时地监控所有实际的计算机系统的运行情况,这样就可确保在代码数据包上线发布过程中及时的发现异常,并及时通知外部。
进一步的,对于属于不同的源代码可以根据所属系统的级别选择图1中的某几个环节进行。其中核心系统属于0级系统,业务支持系统属于1级系统,外围系统属于2级系统,0级和1级系统就需要进行图1中的所有环节,2级系统可以只进行其中的上线发布环节。
本发明实施例提供的软件开发一体化的方法,能够通过外部设置的源代码的基本信息自动获取源代码,并根据源代码基本信息中的语言类型部署编译环境和测试环境,然后将源代码加载到编译环境中进行编译,得到代码数据包,再将代码数据包加载到测试环境中进行测试,最后将测试通过的代码进行上线发布。与现有技术相比,本发明实施例能够将软件开发过程中的编译、测试以及发布环节集成到一个系统平台上,并且每个环节都是自动实现的,无需人工对各环节的运行环境进行部署,在节省时间的同时可以降低发生错误的概率,因此提高了软件开发的效率。
进一步的,作为对图1所示实施例的细化及扩展,本发明还提供了另一实施例。如图2所示,该实施例中软件开发一体化的方法包括:
201、获取源代码的基本信息和部署方式。
获取部署方式是指,获取外部选择的部署方式。本实施例中的部署方式是按照代码运行的载体进行的分类,包括熊猫Tomcat、阿帕奇Apache等。 外部可以选择不同的部署方式。部署方式是与后面的部署测试环境相关的。
另外,本步骤中获取源代码的基本信息的实现方式与图1步骤101的实现方式是相同的,此处不再赘述。
202、通过源代码的地址查找源代码。
本步骤的实现方式与图1步骤102的实现方式相同,此处不再赘述。
203、根据语言类型以及部署方式部署编译环境和测试环境。
编译环境与语言类型有关,所以需要根据源代码的语言类型来选择合适的编译环境。
测试环境不仅与语言类型有关,还跟选择的部署方式有关。若外部选择了部署方式,就需要根据选择的部署方式部署测试环境;若没有进行部署方式的选择,可以提供任一种部署方式进行测试环境的部署,一般情况下任一种部署方式可以适用于所有的源代码。
204、将源代码加载到编译环境中进行编译,得到代码数据包。
本步骤的实现方式与图1步骤104的实现方式相同,此处不再赘述。
205、若编译错误,则生成代码违规报告。
在步骤204编译的过程中,出现的编译错误包括代码的错误、没有注释以及没有测试用例等。编译错误是通过代码评审规则进行判断的,并且将所有的编译错误记录下来生成一个代码违规报告。代码违规报告里会详细的记录编译错误出现的地方、编译错误所属的类型。
206、将代码数据包加载到测试环境中进行测试。
本步骤的实现方式与图1步骤105的实现方式相同,此处不再赘述。
207、将测试通过的代码数据包进行上线发布。
将测试通过的代码数据包上线发布的方式包括以下两种:
方式一
全部发布。全部发布是指将测试通过的代码数据包,一次性发布到所有的计算机系统上。
方式二
灰度发布。灰度发布是指将代码数据包分批发布,先发布给一部分计算机系统,然后在逐步扩大发布的范围直至将代码数据包发布至所有的计算机系统中。具体的在实现分批发布代码数据包时可以将所有的计算机系统分为 不同的组,然后按照分组逐步发布。其中分组可以按照互联网协议(Internet Protocol Address,简称IP)地址分组,或者按照用户所在的机房的不同分组等。
以计算机系统所在的机房的不同进行分组来具体说明灰度分布的实现,假如用户分为3个机房,具体的实现过程为:将测试通过的代码数据包先发布给1号机房的计算机系统,并实时监控计算机系统的运行情况;若1号机房中计算机系统能够满足期望的运行要求,则将代码数据包发布给2号机房中的计算机系统,然后同时实时监控在1号和2号机房中的计算机系统;若1号和2号机房中的计算机系统都满足期望的运行要求,则将代码数据包发布给3号机房的计算机系统,同时也需要实时监控3号机房中的计算机系统的运行情况。
需要说明的是,在将代码数据包分为几个部分进行发布时,可以人为控制每个部分发布的时间间隔,每个时间间隔可以不相同。
进一步的,本实施例为外部提供一个共享通信接口,共享通信接口将云共享和实时聊天工具整合在一起实现外部之间的通信及源代码共享。
云共享是使用github源代码管理工具实现的,其中每个人可以建立一个属于自己的代码库,将自己编辑的源代码上传到自己的代码库中,然后通过github将自己的代码库进行分享,同一个公司的或者同一个部门的员工可以查看到其他所有员工的代码库,也可以在其他的员工代码库中的代码基础上进行二次开发,然后更新到自己的代码库中。
另外添加的实时聊天工具用于实现员工之间的交流,主要是关于代码库中的源代码的评论和交流。
进一步的,本实施例还提供了代码集成的功能,即当外部对源代码进行修改时,就自动的完成对源代码的代码集成,并且自动将集成后的代码进行编译,若编译的过程中发现错误,也会生成一个代码违规报告。如果要对集成的代码进行一个完整的软件编译、测试、发布的过程则需要按照图1或图2的完整流程进行。
进一步的,作为对上述图1和图2所示方法的实现,本发明实施例的另一个实施例还提供了一种软件开发一体化的装置,如图3所示,该装置包括:获取单元31、查询单元32、部署单元33、编译单元34、测试单元35和发布 单元36。
获取单元31,用于获取源代码的基本信息,基本信息包含源代码的地址和源代码的语言类型。
另外获取单元获取的源代码的基本信息中也包括源代码所属的系统。其中基本信息中的地址是指存储源代码的地址;语言类型是指编辑源代码使用的计算机语言类型,包括各种高级计算机编程语言;源代码所属的系统分为三种,分别为核心系统、业务支持系统、外围系统,不同的系统的级别不同。
查找单元32,用于通过源代码的地址查找源代码。
从获取单元中获取的基本信息中查找源代码的地址,然后根据源代码的存储地址获取到源代码。
部署单元33,用于根据语言类型部署编译环境和测试环境,编译环境和测试环境分别适配于源代码的语言类型的环境。
获取到源代码之后,需要对源代码进行编译和测试。在对源代码进行编译和测试之前首先要部署编译环境和测试环境。不同语言类型的源代码适配的编译环境和测试环境是不同的,因此需要根据源代码的语言类型来部署其适合的编译环境和测试环境。本实施例可以部署适合各种语言类型的编译环境和测试环境,因此对于任何语言类型源代码都可以后面的进行编译和测试。
编译单元34,用于将源代码加载到编译环境中进行编译,得到代码数据包。
具体的是将由获取单元获取到的源代码加载到部署单元部署的编译环境中进行编译。编译的过程主要包括:词法分析、语法分析、语义检查以及中间代码生成、代码优化、目标代码生成。编译主要是通过编译程序对源代码进行分析,并生成目标代码。生成的目标代码就是本实施例中的代码数据包。
测试单元35,用于将代码数据包加载到测试环境中进行测试。
将由编译单元得到的代码数据包加载到部署单元部署的测试环境中进行测试,本实例中的测试是自动化的测试过程,自动化测试依赖于一套可以实现自动化测试的程序,自动化的测试程序是由技术人员已经提前编辑好的。该自动化测试的程序是可以被复用的。
发布单元36,用于将测试通过的代码数据包进行上线发布。
本实施例中将测试通过的代码数据包上线发布的方式包括以下两种:分 别是全部发布和灰度发布。全部发布是指将测试通过的代码数据包,一次性发布到所有的计算机系统上。灰度发布是灰度发布是指将代码数据包分批发布,先发布给一部分计算机系统,然后在逐步扩大发布的范围直至将代码数据包发布至所有的计算机系统中。具体的在实现分批发布代码数据包时可以将所有的计算机系统分为不同的组,然后按照分组逐步发布。其中分组可以按照IP地址分组,或者按照计算机系统所在的机房的不同分组等。
进一步的,如图4所示,装置进一步包括:
生成单元37,用于在得到代码数据包之后,若编译错误,则生成代码违规报告,代码违规报告用于记录编译过程中检测出的代码错误信息。
在编译的过程中,出现的编译错误包括代码的错误、没有注释以及没有测试用例等。编译错误是通过代码评审规则进行判断的,并且将所有的编译错误记录下来生成一个代码违规报告。代码违规报告里会详细的记录编译错误出现的地方、编译错误所属的类型。
进一步的,如图4所示,部署单元33,包括:
获取模块331,用于获取部署方式,部署方式为外部选择的部署方式。
获取部署方式是指,获取外部选择的部署方式。本实施例中的部署方式是按照代码运行的载体进行的分类,包括熊猫Tomcat服务器、阿帕奇Apache服务器等。外部可以选择不同的部署方式。部署方式是与后面的部署测试环境相关的。
部署模块332,用于根据部署方式和语言类型部署测试环境。
编译环境与语言类型有关,所以需要根据源代码的语言类型来选择合适的编译环境。
测试环境不仅与语言的类型有关,还跟选择的部署方式有关。若外部选择了部署方式,就需要根据选择的部署方式部署测试环境;若没有进行部署方式的选择,可以提供任一种部署方式进行测试环境的部署,一般情况下任一种部署方式可以适用于所有的源代码。
进一步的,如图4所示,装置进一步包括:
提供单元38,用于提供共享通信接口,共享通信接口用于实现外部之间的通信及源代码共享。
共享通信接口将云共享和实时聊天工具整合在一起实现与外部之间的通 信及源代码共享。
云共享是使用github源代码管理工具实现的,其中每个人可以建立一个属于自己的代码库,将自己编辑的源代码上传到自己的代码库中,然后通过github将自己的代码库进行分享,也可以在其他代码库中的代码基础上进行二次开发,然后更新到自己的代码库中。
另外添加的实时聊天工具用于实现员工之间的交流,主要是关于代码库中的源代码的评论和交流。
进一步的,如图4所示,装置进一步包括:
集成单元39,用于若外部对源代码进行了修改,则对源代码进行代码集成。
当外部对源代码进行修改时,可以自动的完成对源代码的代码集成,并且可以将集成后的代码进行编译,若编译的过程中发现错误,也会生成一个代码违规报告。
本发明实施例提供的软件开发一体化的装置,能够通过外部设置的源代码的基本信息自动获取源代码,并根据源代码基本信息中的语言类型部署编译环境和测试环境,然后将源代码加载到编译环境中进行编译,得到代码数据包,再将代码数据包加载到测试环境中进行测试,最后将测试通过的代码进行上线发布。与现有技术相比,本发明实施例能够将软件开发过程中的编译、测试以及发布环节集成到一个系统平台上,并且每个环节都是自动实现的,无需人工对各环节的运行环境进行部署,在节省时间的同时可以降低发生错误的概率,因此提高了软件开发的效率。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部 分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种软件开发一体化的方法,其特征在于,所述方法包括:
    获取源代码的基本信息,所述基本信息包含所述源代码的地址和所述源代码的语言类型;
    通过所述源代码的地址查找所述源代码;
    根据所述语言类型部署编译环境和测试环境,所述编译环境和所述测试环境是分别适配于所述源代码的语言类型的环境;
    将所述源代码加载到所述编译环境中进行编译,得到代码数据包;
    将所述代码数据包加载到所述测试环境中进行测试;
    将测试通过的代码数据包进行上线发布。
  2. 根据权利要求1所述的方法,其特征在于,在所述得到代码数据包之后,所述方法进一步包括:
    若编译错误,则生成代码违规报告,所述代码违规报告用于记录编译过程中检测出的代码错误信息。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述语言类型部署测试环境,包括:
    获取部署方式,所述部署方式为外部选择的部署方式;
    根据所述部署方式和所述语言类型部署所述测试环境。
  4. 根据权利要求1所述的方法,其特征在于,所述方法进一步包括:
    提供共享通信接口,所述共享通信接口用于实现外部之间的通信及源代码共享。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法进一步包括:
    若外部对所述源代码进行了修改,则对所述源代码进行代码集成。
  6. 一种软件开发一体化的装置,其特征在于,所述装置包括:
    获取单元,用于获取源代码的基本信息,所述基本信息包含所述源代码的地址和所述源代码的语言类型;
    查找单元,用于通过所述源代码的地址查找所述源代码;
    部署单元,用于根据所述语言类型部署编译环境和测试环境,所述编译环境和所述测试环境是分别适配于所述源代码的语言类型的环境;
    编译单元,用于将所述源代码加载到所述编译环境中进行编译,得到代码数据包;
    测试单元,用于将所述代码数据包加载到所述测试环境中进行测试;
    发布单元,用于将测试通过的代码数据包进行上线发布。
  7. 根据权利要求6所述的装置,其特征在于,所述装置进一步包括:
    生成单元,用于在所述得到代码数据包之后,若编译错误,则生成代码违规报告,所述代码违规报告用于记录编译过程中检测出的代码错误信息。
  8. 根据权利要求6所述的装置,其特征在于,所述部署单元,包括:
    获取模块,用于获取部署方式,所述部署方式为外部选择的部署方式;
    部署模块,用于根据所述部署方式和所述语言类型部署所述测试环境。
  9. 根据权利要求6所述的装置,其特征在于,所述装置进一步包括:
    提供单元,用于提供共享通信接口,所述共享通信接口用于实现外部之间的通信及源代码共享。
  10. 根据权利要求6至9中任一项所述的装置,其特征在于,所述装置进一步包括:
    集成单元,用于若外部对所述源代码进行了修改,则对所述源代码进行代码集成。
PCT/CN2016/082822 2015-11-20 2016-05-20 软件开发一体化的方法及装置 WO2017084275A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/245,299 US20170147476A1 (en) 2015-11-20 2016-08-24 Method and apparatus for integration of software development

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510812181.2 2015-11-20
CN201510812181.2A CN105867990A (zh) 2015-11-20 2015-11-20 软件开发一体化的方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/245,299 Continuation US20170147476A1 (en) 2015-11-20 2016-08-24 Method and apparatus for integration of software development

Publications (1)

Publication Number Publication Date
WO2017084275A1 true WO2017084275A1 (zh) 2017-05-26

Family

ID=56623783

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/082822 WO2017084275A1 (zh) 2015-11-20 2016-05-20 软件开发一体化的方法及装置

Country Status (3)

Country Link
US (1) US20170147476A1 (zh)
CN (1) CN105867990A (zh)
WO (1) WO2017084275A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107656739A (zh) * 2017-11-07 2018-02-02 北京奇安信科技有限公司 基于windows系统的代码编译方法及装置
CN109756570A (zh) * 2018-12-29 2019-05-14 深圳点猫科技有限公司 一种实现定制pypi镜像服务器的方法及电子设备

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407106A (zh) * 2016-08-26 2017-02-15 郑州悉知信息科技股份有限公司 一种代码管理系统及方法
CN107291623A (zh) * 2017-07-31 2017-10-24 北京云测信息技术有限公司 一种应用程序测试方法和装置
CN116126333A (zh) * 2018-06-20 2023-05-16 华为技术有限公司 自动化编译的系统和方法
CN111324353B (zh) * 2018-12-14 2022-09-13 中移(杭州)信息技术有限公司 一种持续集成任务的优化方法及装置
CN109871231B (zh) * 2019-01-15 2022-09-30 网宿科技股份有限公司 一种代码共享方法及系统
CN110865934B (zh) * 2019-10-08 2023-10-27 北京百度网讯科技有限公司 代码验证方法、装置、电子设备及可读存储介质
CN110865838A (zh) * 2019-11-15 2020-03-06 北京云迹科技有限公司 机器人升级方法、装置、电子设备和计算机可读存储介质
CN111209032B (zh) * 2020-01-06 2023-06-16 中国银联股份有限公司 灰度发布方法、配置中心服务器、用户终端、系统及介质
US11200155B2 (en) * 2020-04-09 2021-12-14 The Toronto-Dominion Bank System and method for automated application testing
CN113535220B (zh) * 2020-04-15 2023-11-03 北京京东振世信息技术有限公司 一种代码包管理方法和装置
CN111597112B (zh) * 2020-04-30 2023-08-08 北京金山云网络技术有限公司 自动测试方法、装置及电子设备
CN111708646A (zh) * 2020-06-16 2020-09-25 中国建设银行股份有限公司 前端服务平台实现方法、装置、系统和存储介质
CN112948827A (zh) * 2021-01-11 2021-06-11 杭州复杂美科技有限公司 一种源码编译验证方法、系统、设备和储存介质
CN113434146A (zh) * 2021-06-22 2021-09-24 青岛海尔科技有限公司 代码的编译方法、装置、存储介质及电子装置
CN113609005A (zh) * 2021-07-19 2021-11-05 浙江吉利控股集团有限公司 一种软件测试环境管理系统和方法
CN114968274B (zh) * 2022-07-29 2022-11-08 之江实验室 一种基于灰度发布的自动化快速部署前置机的方法及系统
CN117149665B (zh) * 2023-10-31 2024-02-20 芯瞳半导体技术(山东)有限公司 持续集成方法、控制设备、持续集成系统及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983209A (zh) * 2005-12-14 2007-06-20 中兴通讯股份有限公司 一种软件单元测试自动化系统及其方法
CN101436128A (zh) * 2007-11-16 2009-05-20 北京邮电大学 软件测试用例自动生成方法及系统
CN102156643A (zh) * 2011-04-25 2011-08-17 青岛海信传媒网络技术有限公司 软件集成方法及系统
US20120192004A1 (en) * 2011-01-24 2012-07-26 Piotr Findeisen Event information related to server request processing
CN103714003A (zh) * 2013-12-31 2014-04-09 深圳市共进电子股份有限公司 一种终端网关设备软件的自动预测试方法
CN104793946A (zh) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 基于云计算平台的应用部署方法和系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308505A (zh) * 2007-05-16 2008-11-19 国际商业机器公司 提供对远程资源数据的访问的方法和数据处理系统
CN102325153B (zh) * 2011-07-12 2014-08-06 北京新媒传信科技有限公司 一种服务开发方法和系统
CN102902540A (zh) * 2012-09-25 2013-01-30 浙江创佳数字技术有限公司 嵌入式自动化开发方法
CN103793315B (zh) * 2012-10-29 2018-12-21 Sap欧洲公司 监视和改善软件开发质量方法、系统和计算机可读介质
CN103049268B (zh) * 2012-12-25 2016-08-03 中国科学院深圳先进技术研究院 一种基于Naplet的应用开发管理系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983209A (zh) * 2005-12-14 2007-06-20 中兴通讯股份有限公司 一种软件单元测试自动化系统及其方法
CN101436128A (zh) * 2007-11-16 2009-05-20 北京邮电大学 软件测试用例自动生成方法及系统
US20120192004A1 (en) * 2011-01-24 2012-07-26 Piotr Findeisen Event information related to server request processing
CN102156643A (zh) * 2011-04-25 2011-08-17 青岛海信传媒网络技术有限公司 软件集成方法及系统
CN103714003A (zh) * 2013-12-31 2014-04-09 深圳市共进电子股份有限公司 一种终端网关设备软件的自动预测试方法
CN104793946A (zh) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 基于云计算平台的应用部署方法和系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107656739A (zh) * 2017-11-07 2018-02-02 北京奇安信科技有限公司 基于windows系统的代码编译方法及装置
CN109756570A (zh) * 2018-12-29 2019-05-14 深圳点猫科技有限公司 一种实现定制pypi镜像服务器的方法及电子设备

Also Published As

Publication number Publication date
CN105867990A (zh) 2016-08-17
US20170147476A1 (en) 2017-05-25

Similar Documents

Publication Publication Date Title
WO2017084275A1 (zh) 软件开发一体化的方法及装置
US11868231B2 (en) System and method for evaluating code by a hybrid of local and cloud-based computers
US10318412B1 (en) Systems, methods, and apparatus for dynamic software generation and testing
CN109379251B (zh) 继电保护装置过程层goose及sv通信自动测试方法及系统
US8788239B2 (en) Methods, apparatus and articles of manufacture to test batch configurations
CN109522228B (zh) 接口自动化测试数据构造方法、装置、平台及存储介质
US20170192879A1 (en) System and method for automating testing without scripting
EP3115902A1 (en) Framework for automated testing of mobile apps
CN109634843A (zh) 一种面向ai芯片平台的分布式自动化软件测试方法及平台
CN104090776A (zh) 一种软件开发方法及系统
US9535687B2 (en) Audited builds based upon separate class dependency records
CN109828886B (zh) 一种容器云环境下的ci/cd监控方法和系统
Lier et al. The cognitive interaction toolkit–improving reproducibility of robotic systems experiments
CN112435072A (zh) 一种模型创建方法、装置、电子设备及存储介质
CN109460358A (zh) 基于Cmdb的配置管理方法及系统
Blüher et al. DevOps for manufacturing systems: Speeding up software development
CN109408400A (zh) 一种软件代码自动测试方法及测试系统
Jagannatha et al. Comparative study on automation testing using selenium testing framework and QTP
US9612870B2 (en) Inversion of control for executable extensions in a run-time environment
CN114116503A (zh) 一种测试方法、装置、电子设备及存储介质
US11184229B2 (en) Development operation support system, development management server, operation management server, method thereof, and non-transitory computer readable medium storing program thereof
Boydston et al. Joint common architecture (JCA) demonstration architecture centric virtual integration process (ACVIP) shadow effort
JP6988997B2 (ja) 情報処理装置、並びに、テスト管理方法及びプログラム
CN111158653A (zh) 基于sql语言的实时计算程序的集成开发及执行系统
BR102014030880A2 (pt) método para realização de testes automatizados

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16865457

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16865457

Country of ref document: EP

Kind code of ref document: A1