基于Jenkins的項目持續(xù)集成方案研究與實現(xiàn)
發(fā)布時間:2018-03-09 20:15
本文選題:持續(xù)集成 切入點:Jenkins 出處:《西南交通大學(xué)》2017年碩士論文 論文類型:學(xué)位論文
【摘要】:軟件產(chǎn)品的系統(tǒng)架構(gòu)日益復(fù)雜,迭代周期越來越短。而每次產(chǎn)品版本發(fā)布前都需要對代碼進(jìn)行手動集成,使得開發(fā)人員、測試人員經(jīng)常要花大量時間在產(chǎn)品集成上。一旦集成過程中出現(xiàn)問題就有可能導(dǎo)致產(chǎn)品發(fā)布延期,開發(fā)團(tuán)隊不得不尋找一種新的方案來解決面臨的問題。持續(xù)集成通過頻繁地構(gòu)建代碼,保證項目一直都能夠正常運行,降低了發(fā)布產(chǎn)品失敗風(fēng)險,提高了產(chǎn)品質(zhì)量。同時持續(xù)集成能夠減少發(fā)布產(chǎn)品的重復(fù)勞動,節(jié)約人力成本。本文提出了一種基于Jenkins的持續(xù)集成解決方案,該方案使用Jenkins完成任務(wù)的分發(fā)調(diào)度工作,實現(xiàn)了代碼靜態(tài)檢查、編譯、部署和測試功能。主要完成工作如下:1.深入研究了持續(xù)集成理論基礎(chǔ),學(xué)習(xí)了持續(xù)集成過程中涉及到的各種技術(shù)和工具。詳細(xì)設(shè)計了持續(xù)集成架構(gòu),把持續(xù)集成過程分成三個模塊,即自動化構(gòu)建模塊、自動化部署模塊以及自動化測試模塊,并分別對各模塊做出詳細(xì)的設(shè)計。引入Docker容器,作為持續(xù)集成的構(gòu)建環(huán)境,解決了構(gòu)建環(huán)境配置復(fù)雜及重復(fù)配置的問題,達(dá)到了環(huán)境瞬間重現(xiàn)的目的。2.根據(jù)總體設(shè)計實現(xiàn)了自動化構(gòu)建、自動化部署以及自動化測試三個模塊。其中自動化構(gòu)建及自動化部署模塊主要完成了 Jenkins持續(xù)集成服務(wù)器的搭建和系統(tǒng)配置,并完成了相應(yīng)構(gòu)建和部署任務(wù)的腳本開發(fā)和配置工作。自動化測試模塊主要設(shè)計并實現(xiàn)了一套基于Selenium2的自動化測試框架。該框架采用分層結(jié)構(gòu)模型,主要包含UI層、Engine層、Page層、Utility層及底層Selenium2。為了最大程度實現(xiàn)測試自動化,分別設(shè)計并實現(xiàn)了頁面對象代碼生成器和數(shù)據(jù)源XML文檔生成器。最終達(dá)到了頁面元素、測試數(shù)據(jù)及業(yè)務(wù)邏輯相互分離的目標(biāo),減少了代碼耦合,提高了測試腳本的復(fù)用性及可維護(hù)性,也降低了測試腳本的編寫難度,從而滿足了持續(xù)集成對自動化測試的需求。3.通過具體實例驗證了本文設(shè)計的持續(xù)集成方案。驗證了從代碼提交,到代碼靜態(tài)檢查、編譯、單元測試、部署、自動化測試及反饋的完全自動化,達(dá)到了項目持續(xù)集成的目標(biāo)。
[Abstract]:The system architecture of the software product is becoming more complex and the iteration period is getting shorter and shorter, and the code needs to be manually integrated before each release of the product version, so that the developer, Testers often spend a lot of time on product integration. The development team has to look for a new solution to the problem. Continuous integration ensures that the project will continue to work by building code frequently, reducing the risk of failure in the release of the product. At the same time, continuous integration can reduce the repeated work and save the labor cost. This paper presents a solution of continuous integration based on Jenkins, which uses Jenkins to complete the distribution and scheduling of tasks. The functions of code static checking, compiling, deploying and testing are realized. The main work is as follows: 1. The theoretical foundation of continuous integration is deeply studied. The architecture of continuous integration is designed in detail, and the continuous integration process is divided into three modules, that is, automation construction module, automation deployment module and automation test module. And each module is designed in detail. Docker container is introduced as a continuous integrated environment to solve the problem of complex and repeated configuration of the building environment. Achieve the goal of environment instant recurrence. 2. According to the overall design to achieve automatic construction, Automatic deployment and automated testing are three modules, in which the automation construction and automatic deployment module mainly complete the construction and system configuration of the Jenkins continuous integration server. The automatic test module mainly designs and implements a set of automated test framework based on Selenium2. It mainly includes UI layer engine layer and bottom layer selenium 2.In order to realize the test automation to the greatest extent, the page object code generator and the data source XML document generator are designed and implemented respectively. Finally, the page element is achieved. The separation of test data and business logic reduces the code coupling, improves the reusability and maintainability of test scripts, and reduces the difficulty of writing test scripts. In order to meet the requirements of continuous integration for automated testing. 3. Through a concrete example to verify the design of the continuous integration scheme, verify the code from the submission, to code static inspection, compilation, unit testing, deployment, Automated testing and complete automation of feedback, to achieve the goal of continuous integration of the project.
【學(xué)位授予單位】:西南交通大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2017
【分類號】:TP311.52
【參考文獻(xiàn)】
相關(guān)期刊論文 前5條
1 張建;謝天鈞;;基于Docker的平臺即服務(wù)架構(gòu)研究[J];信息技術(shù)與信息化;2014年10期
2 黃華林;;使用Selenium進(jìn)行Web應(yīng)用自動化測試的研究[J];電腦開發(fā)與應(yīng)用;2012年04期
3 吳瑩;;基于Selenium的Web自動化測試框架[J];科技傳播;2011年18期
4 白國靖;;虛擬化技術(shù)在網(wǎng)絡(luò)服務(wù)中的應(yīng)用研究[J];電子世界;2011年09期
5 宋冬生;;Git——版本管理之利器[J];程序員;2007年11期
,本文編號:1590083
本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/1590083.html
最近更新
教材專著