CN114490319A - A distributed continuous integration automated testing method and system - Google Patents
A distributed continuous integration automated testing method and system Download PDFInfo
- Publication number
- CN114490319A CN114490319A CN202111568565.6A CN202111568565A CN114490319A CN 114490319 A CN114490319 A CN 114490319A CN 202111568565 A CN202111568565 A CN 202111568565A CN 114490319 A CN114490319 A CN 114490319A
- Authority
- CN
- China
- Prior art keywords
- test
- code
- environment
- verification
- automated
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 193
- 230000010354 integration Effects 0.000 title claims abstract description 45
- 238000012795 verification Methods 0.000 claims abstract description 45
- 238000000034 method Methods 0.000 claims abstract description 27
- 238000013515 script Methods 0.000 claims abstract description 19
- 238000011161 development Methods 0.000 claims abstract description 11
- 238000010276 construction Methods 0.000 claims abstract description 7
- 230000008569 process Effects 0.000 claims description 19
- 239000000779 smoke Substances 0.000 claims description 16
- 230000006870 function Effects 0.000 claims description 9
- 238000001514 detection method Methods 0.000 claims description 8
- BUGBHKTXTAQXES-UHFFFAOYSA-N Selenium Chemical compound [Se] BUGBHKTXTAQXES-UHFFFAOYSA-N 0.000 claims description 6
- 229910052711 selenium Inorganic materials 0.000 claims description 6
- 239000011669 selenium Substances 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 claims description 4
- 230000036541 health Effects 0.000 claims description 4
- 230000000391 smoking effect Effects 0.000 abstract 1
- 238000010998 test method Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012827 research and development Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3696—Methods or tools to render software testable
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3698—Environments for analysis, debugging or testing of software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,特别涉及一种基于微服务架构的分布式持续集成自动化测试方法和系统。The invention relates to the field of computer technology, in particular to a distributed continuous integration automated testing method and system based on a micro-service architecture.
背景技术Background technique
代码持续集成是一种软件工程流程,是将所有软件工程师对于软件的工作副本不断地集成到代码主干的一种举措。开发人员会一天中频繁地将代码集成到主干,每次集成都会触发一系列自动化流程,如图1所示,其包括编译、自动化测试、部署发布等环节。在代码持续集成过程中,集成的效率是需要特别关注的,代码集成到主干的速度越快,相关工作人员获得反馈的时间就能缩短,实践过程也更加流畅。Code continuous integration is a software engineering process that is an effort to continuously integrate all software engineers' working copies of software into the code backbone. Developers will frequently integrate code into the trunk throughout the day, and each integration will trigger a series of automated processes, as shown in Figure 1, which includes compilation, automated testing, deployment and release. In the process of code continuous integration, the efficiency of integration needs special attention. The faster the code is integrated into the backbone, the shorter the time for relevant staff to get feedback, and the smoother the practice process.
目前的代码持续集成在实践中,流程中的各个环节,例如编译构建环节、自动化测试环节均运行在同一台服务器上。倘若遇到微服务架构开发的软件情况下,微服务数量众多,自动化测试数量也较为庞大,自动化测试环节运行时间会变得比较长,导致得到持续集成结果反馈的速度较慢,从而影响软件开发效率,且在运行自动化环节的过程中服务器会一直被占用,无法响应其他任务,造成资源无法被充分利用。The current code is continuously integrated in practice, and all links in the process, such as compilation and construction, and automated testing, all run on the same server. In the case of software developed with a microservice architecture, the number of microservices is large and the number of automated tests is relatively large, and the running time of the automated test link will become longer, resulting in slower feedback of continuous integration results, thus affecting software development. In addition, in the process of running the automation link, the server will be occupied all the time, unable to respond to other tasks, resulting in the inability to make full use of resources.
发明内容SUMMARY OF THE INVENTION
本发明的目的是在于提供一种分布式持续集成自动化测试方法和系统,以解决现有代码持续集成过程中运行自动化测试时间长、持续集成效率降低的问题。The purpose of the present invention is to provide a distributed continuous integration automated testing method and system, so as to solve the problems of long running time of automated testing and low continuous integration efficiency in the process of continuous integration of existing codes.
第一方面,本发明提供了一种分布式持续集成自动化测试方法,包括下述步骤:In a first aspect, the present invention provides a distributed continuous integration automated testing method, comprising the following steps:
S1、开发环境节点服务器根据代码管理工具提交的代码路径,获取代码并进行打包编译,在编译完成后,挂接代码自动扫描任务进行代码规范性校验;且在代码规范性校验通过后创建Docker镜像文件并推送至Docker镜像仓库;S1. The development environment node server obtains the code and packages and compiles it according to the code path submitted by the code management tool. After the compilation is completed, the automatic code scanning task is attached to perform code normative verification; and it is created after the code normative verification is passed. Docker image file and push to Docker image repository;
S2、测试环境节点服务器通过集成服务编排工具从所述Docker镜像仓库拉取镜像,自动构建产品测试环境;S2, the test environment node server pulls the image from the Docker image warehouse through the integrated service orchestration tool, and automatically builds a product test environment;
S3、调用分布式云节点服务器先进行自动化脚本做冒烟测试,并在冒烟测试完成后,分别执行UI自动化测试和接口自动化测试;S3. Invoke the distributed cloud node server to perform an automated script for smoke test first, and after the smoke test is completed, perform UI automation test and interface automation test respectively;
S4、测试完成后,由消息通知服务器自动生成自动化测试报告并发送给项目相关人员。S4. After the test is completed, an automated test report is automatically generated by the message notification server and sent to the relevant personnel of the project.
第二方面,本发明提供了一种分布式持续集成自动化测试系统,包括:In a second aspect, the present invention provides a distributed continuous integration automated testing system, including:
开发环境节点服务器,用于根据代码管理工具提交的代码路径,获取代码并进行打包编译,在编译完成后,挂接代码自动扫描任务进行代码规范性校验;且在代码规范性校验通过后创建Docker镜像文件并推送至Docker镜像仓库;The development environment node server is used to obtain the code and package and compile it according to the code path submitted by the code management tool. After the compilation is completed, the automatic code scanning task is attached to perform code normative verification; and after the code normative verification is passed Create a Docker image file and push it to the Docker image repository;
测试环境节点服务器,用于通过集成服务编排工具从所述Docker镜像仓库拉取镜像,自动构建产品测试环境;The test environment node server is used to pull the image from the Docker image warehouse through the integration service orchestration tool, and automatically build the product test environment;
分布式云节点服务器,用于先进行自动化脚本做冒烟测试,并在冒烟测试完成后,分别执行UI自动化测试和接口自动化测试;Distributed cloud node server, which is used to perform smoke test with automated script first, and after the smoke test is completed, execute UI automation test and interface automation test respectively;
消息通知服务器,用于在测试完成后自动生成自动化测试报告并发送给项目相关人员。The message notification server is used to automatically generate an automated test report and send it to project stakeholders after the test is completed.
本发明实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:将编译构建环节、自动化测试环节分别运行在不同的服务器上,通过测试环境节点服务器自动构建产品测试环境,采用分布式云节点服务器作冒烟测试、UI自动化测试和接口自动化测试。由于开发环境节点服务器仅用于代码的编译和规范性校验,与测试无关,因此在微服务架构下即使微服务数量众多,自动化测试数量庞大,仍能保证持续集成结果的快速反馈,从而解决现有技术中在持续集成过程中运行自动化测试的时间较长,导致持续集成效率较低的技术问题。One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: the compilation and construction links and the automated testing links are respectively run on different servers, the product testing environment is automatically constructed through the testing environment node server, and the Distributed cloud node server for smoke test, UI automation test and interface automation test. Since the development environment node server is only used for code compilation and normative verification, and has nothing to do with testing, under the microservice architecture, even if there are a large number of microservices and a large number of automated tests, it can still ensure rapid feedback of continuous integration results. In the prior art, it takes a long time to run automated tests in the continuous integration process, which leads to the technical problem of low continuous integration efficiency.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.
附图说明Description of drawings
下面参照附图结合实施例对本发明作进一步的说明。The present invention will be further described below with reference to the accompanying drawings and embodiments.
图1为现有软件从编译到部署发布的过程流程示意图;Figure 1 is a schematic diagram of the process flow of existing software from compilation to deployment and release;
图2为本发明实施例一中方法中的流程图;Fig. 2 is the flow chart in the method in
图3为本发明实施例自动化测试的分布式结构示意图;3 is a schematic diagram of a distributed structure of automated testing according to an embodiment of the present invention;
图4为本发明实施例自动化测试报告生成状态示意图;4 is a schematic diagram of an automated test report generation state according to an embodiment of the present invention;
图5为本发明实施例Sonar工具的一界面示意图;5 is a schematic diagram of an interface of a Sonar tool according to an embodiment of the present invention;
图6为本发明一具体实施例在研发阶段和测试阶段的流程示意图;FIG. 6 is a schematic flowchart of a specific embodiment of the present invention in the research and development stage and the testing stage;
图7为本发明实施例二中系统的结构示意图。FIG. 7 is a schematic structural diagram of a system in
具体实施方式Detailed ways
本申请实施例通过提供一种分布式持续集成自动化测试方法和系统,以解决现有代码持续集成过程中运行自动化测试时间长、持续集成效率降低的问题。The embodiments of the present application provide a distributed continuous integration automated testing method and system to solve the problems of long time for running automated tests and low continuous integration efficiency in the existing code continuous integration process.
本申请实施例中的技术方案,总体思路如下:将编译构建环节、自动化测试环节分别运行在不同的服务器上,通过测试环境节点服务器自动构建产品测试环境,采用分布式云节点服务器作冒烟测试、UI自动化测试和接口自动化测试。由于开发环境节点服务器仅用于代码的编译和规范性校验,与测试无关,足以应对微服务数量众多的的微服务架构下的自动化测试,从而解决现有技术中在持续集成过程中运行自动化测试的时间较长,导致持续集成效率较低的技术问题。The general idea of the technical solutions in the embodiments of the present application is as follows: the compilation and construction links and the automated testing links are respectively run on different servers, the product testing environment is automatically constructed through the test environment node server, and the distributed cloud node server is used for smoke testing. , UI automation testing and interface automation testing. Because the development environment node server is only used for code compilation and normative verification, and has nothing to do with testing, it is sufficient to deal with automated testing under the microservice architecture with a large number of microservices, thus solving the problem of running automation in the continuous integration process in the existing technology. The testing time is longer, which leads to technical problems with lower continuous integration efficiency.
实施例一Example 1
如图2所示,本实施例提供一种分布式持续集成自动化测试方法,包括下述步骤:As shown in FIG. 2, this embodiment provides a distributed continuous integration automated testing method, including the following steps:
S1、开发环境节点服务器根据代码管理工具提交的代码路径,获取代码并进行打包编译,在编译完成后,挂接代码自动扫描任务进行代码规范性校验;且在代码规范性校验通过后创建Docker镜像文件并推送至Docker镜像仓库;S1. The development environment node server obtains the code and packages and compiles it according to the code path submitted by the code management tool. After the compilation is completed, the automatic code scanning task is attached to perform code normative verification; and it is created after the code normative verification is passed. Docker image file and push to Docker image repository;
S2、测试环境节点服务器通过集成服务编排工具从所述Docker镜像仓库拉取镜像,自动构建产品测试环境;S2, the test environment node server pulls the image from the Docker image warehouse through the integrated service orchestration tool, and automatically builds a product test environment;
S3、如图3所示,调用分布式云节点服务器先进行自动化脚本做冒烟测试,并在冒烟测试完成后,分别执行UI自动化测试和接口自动化测试;S3. As shown in Figure 3, the distributed cloud node server is called to perform an automated script for smoke test first, and after the smoke test is completed, UI automation test and interface automation test are performed respectively;
S4、如图4所示,测试完成后,由消息通知服务器自动生成自动化测试报告并发送给项目相关人员。S4. As shown in Fig. 4, after the test is completed, an automated test report is automatically generated by the message notification server and sent to the relevant project personnel.
其中,作为本实施例的一种更优或更为具体的实现方式,所述方法还包括:Wherein, as a better or more specific implementation manner of this embodiment, the method further includes:
S5、类生产环境节点服务器使用服务编排工具从镜像仓库拉取镜像,自动构建类生产环境,挂接安全性测试工具和性能测试工具,验证工程质量和性能,验证完成后自动发送类生产环境发布完成的提示。S5. The node server of the production-like environment uses the service orchestration tool to pull the image from the mirror warehouse, automatically builds the production-like environment, connects the security testing tools and performance testing tools, verifies the project quality and performance, and automatically sends the production-like environment release after the verification is completed. Completed prompt.
所述自动构建产品测试环境具体是:The automatic construction of the product test environment is specifically:
S21、调用云接口部署服务;S21. Invoke the cloud interface to deploy the service;
S22、通过健康检查接口判断服务是否启动成功,若是,则完成测试环境的准备并触发分布式云节点服务器,若否,则将启动不成功的消息反馈给开发和测试人员。S22. Determine whether the service is successfully started through the health check interface. If yes, complete the preparation of the test environment and trigger the distributed cloud node server. If not, feed back a message of unsuccessful startup to the developers and testers.
如图5所示,所述S1中,所述代码规范性校验内容包括:前端代码规范性校验、后端代码规范性校验以及单元测试JUNIT且所述代码规范性校验使用Sonar工具进行,该Sonar工具提供了“项目”、“问题”、“代码规则”、“质量配置”以及“质量阈”的界面;其中:As shown in Figure 5, in the S1, the code normative verification content includes: front-end code normative verification, back-end code normative verification, and unit test JUNIT, and the code normative verification uses the Sonar tool To proceed, the Sonar tool provides interfaces for Projects, Issues, Code Rules, Quality Configurations, and Quality Thresholds; where:
所述“项目”用于查看被进行安全扫描的项目信息;The "item" is used to view the item information that has been scanned for security;
所述“问题”用于查看被扫描的项目的问题信息;The "issue" is used to view issue information for the item being scanned;
所述“代码规则”用于用于设置代码检测的规则;The "code rules" are used to set rules for code detection;
所述“质量配置”用于在分析时配置使用的规则集合,每个语言都有默认配置;The "quality configuration" is used to configure the set of rules used during analysis, and each language has a default configuration;
所述“质量阈”相当于一个代码检测的阈值,代码问题超过阈值会出现提示,或发送邮件通知;The "quality threshold" is equivalent to a code detection threshold, and a prompt will appear if the code problem exceeds the threshold, or an email notification will be sent;
所述S4中,在自动化测试报告反馈结果发送给项目相关人员后,若有新功能和相关Bug,则在测试人员手工验证所述新功能和相关Bug通过后,整理自动化测试脚本加入到测试用例库,自动发送消息给项目相关人员,提示产品测试发布完成。In the S4, after the feedback result of the automated test report is sent to the relevant personnel of the project, if there are new functions and related bugs, after the testers manually verify that the new functions and related bugs pass, the automated test scripts are sorted and added to the test case. The library automatically sends a message to the relevant personnel of the project to prompt the completion of the product test release.
所述集成服务编排工具为Docker Compose或k8s;所述UI自动化测试使用基于Selenium的测试平台Automate,而接口自动化测试使用Jmeter脚本和Requests+接收打桩测试工具Mock完成主线流程验证。The integration service orchestration tool is Docker Compose or k8s; the UI automation test uses the Selenium-based test platform Automate, and the interface automation test uses the Jmeter script and the Requests+ receiving piling test tool Mock to complete the main line process verification.
综上,如图6所示,比较清晰的描述了在持续集成流水线的不同阶段的任务内容:To sum up, as shown in Figure 6, the tasks in different stages of the continuous integration pipeline are clearly described:
一、研发阶段1. R&D stage
研发人员提交代码前,使用Sonar相关插件扫描代码,修改完成后提交代码管理工具git;Before developers submit code, use Sonar related plug-ins to scan the code, and submit the code management tool git after modification;
二、测试阶段2. Test phase
开发环境节点服务器利用Jenkins任务编排工具从git获取提交的代码路径,通过Maven打包编译,在编译过程中启用Junit单元测试,编译完成后,挂接代码自动扫描任务进行代码规范性校验,工具使用Sonar代码规范性检查通过后创建Docker镜像文件并推送至Docker镜像仓库;The development environment node server uses the Jenkins task orchestration tool to obtain the submitted code path from git, package and compile it through Maven, and enable Junit unit testing during the compilation process. After the Sonar code specification check is passed, a Docker image file is created and pushed to the Docker image repository;
测试环境节点服务器通过集成服务编排工具Docker Compose或k8s,从镜像仓库拉取镜像,自动构建产品测试环境,并触发自动化测试节点服务器,通过自动化脚本做冒烟测试,测试完成后,测试工作分为两部分内容:The test environment node server integrates the service orchestration tool Docker Compose or k8s, pulls the image from the mirror warehouse, automatically builds the product test environment, triggers the automated test node server, and performs the smoke test through the automated script. After the test is completed, the test work is divided into Two parts:
(1)通过两台云节点服务器分别执行UI自动化测试和接口自动化测试,其中UI自动化测试使用基于Selenium的测试平台Automate,而接口自动化测试使用Jmeter脚本和Requests+接收打桩测试工具Mock完成主线流程验证。在代码编译打包完成后,测试服务器会被触发调用,其负责管理调用两台分布式云服务器,其中一台Windows Server使用基于Selenium自主研发的UI自动化测试平台Automate,对市面上常见的Chrome、Firefox、IE和phantomJS等浏览器提供支持,执行UI测试;另一台Linux服务器负责运行jmeter接口测试脚本和使用python语言编写的基于requests库的接口测试代码。在测试执行完成后,会通过邮件将测试结果反馈给相关人员,进行后续工作。(1) Execute UI automation test and interface automation test respectively through two cloud node servers. The UI automation test uses the Selenium-based test platform Automate, while the interface automation test uses Jmeter script and Requests+ receiving piling test tool Mock to complete the main line process verification. After the code is compiled and packaged, the test server will be triggered and called, which is responsible for managing and calling two distributed cloud servers. One of the Windows Servers uses Automate, a UI automation testing platform based on Selenium’s self-developed. , IE and phantomJS and other browsers provide support to perform UI testing; another Linux server is responsible for running the jmeter interface test script and the interface test code based on the requests library written in python language. After the test execution is completed, the test results will be fed back to the relevant personnel via email for follow-up work.
(2)测试人员手工验证新功能和相关Bug,测试通过后,整理自动化测试脚本加入到测试用例库,验证完成后自动发送提示邮件,产品测试发布完成;(2) The testers manually verify the new functions and related bugs. After the test is passed, the automated test scripts are sorted and added to the test case library. After the verification is completed, a reminder email is automatically sent, and the product test release is completed;
三、部署阶段:3. Deployment stage:
当产品发布大版本时,需要在类生产环境做安全性测试和性能测试,类生产环境尽可能按照生产环境搭建,包括网络,数据量,服务部署拓扑等,由类生产环境节点服务器使用服务编排工具从镜像仓库拉取镜像,自动构建类生产环境,通过Jenkins集成DockerCompose或K8s,从镜像仓库拉取镜像,自动构建集成测试环境,jenkins挂接安全性测试工具和性能测试工具,验证工程质量和性能,验证完成后自动发送提示邮件,类生产环境发布完成。When a large version of a product is released, it is necessary to perform security testing and performance testing in a production-like environment. The production-like environment should be built according to the production environment as much as possible, including network, data volume, service deployment topology, etc., and the production-like environment node server will use the service orchestration The tool pulls images from the mirror warehouse, automatically builds a production-like environment, integrates DockerCompose or K8s through Jenkins, pulls images from the mirror warehouse, and automatically builds an integrated test environment. Jenkins connects security testing tools and performance testing tools to verify project quality and After the verification is completed, a reminder email is automatically sent, and the production-like environment is released.
基于同一发明构思,本申请还提供了与实施例一中的方法对应的装置,详见实施例二。Based on the same inventive concept, the present application also provides a device corresponding to the method in the first embodiment, and the details are in the second embodiment.
实施例二
如图7所示,在本实施例中提供了一种分布式持续集成自动化测试系统,包括:As shown in FIG. 7, a distributed continuous integration automated testing system is provided in this embodiment, including:
开发环境节点服务器,用于根据代码管理工具提交的代码路径,获取代码并进行打包编译,在编译完成后,挂接代码自动扫描任务进行代码规范性校验;且在代码规范性校验通过后创建Docker镜像文件并推送至Docker镜像仓库;The development environment node server is used to obtain the code and package and compile it according to the code path submitted by the code management tool. After the compilation is completed, the automatic code scanning task is attached to perform code normative verification; and after the code normative verification is passed Create a Docker image file and push it to the Docker image repository;
测试环境节点服务器,用于通过集成服务编排工具从所述Docker镜像仓库拉取镜像,自动构建产品测试环境;The test environment node server is used to pull the image from the Docker image warehouse through the integration service orchestration tool, and automatically build the product test environment;
分布式云节点服务器,用于先进行自动化脚本做冒烟测试,并在冒烟测试完成后,分别执行UI自动化测试和接口自动化测试;Distributed cloud node server, which is used to perform smoke test with automated script first, and after the smoke test is completed, execute UI automation test and interface automation test respectively;
消息通知服务器,用于在测试完成后自动生成自动化测试报告并发送给项目相关人员。The message notification server is used to automatically generate an automated test report and send it to project stakeholders after the test is completed.
其中,作为本实施例的一种更优或更为具体的实现方式,所述装置还包括:Wherein, as a better or more specific implementation manner of this embodiment, the device further includes:
类生产环境节点服务器,用于通过服务编排工具从镜像仓库拉取镜像,自动构建类生产环境;挂接安全性测试工具和性能测试工具,验证工程质量和性能,验证完成后自动发送类生产环境发布完成的提示。The production-like environment node server is used to pull images from the mirror warehouse through the service orchestration tool to automatically build a production-like environment; hook up the security testing tools and performance testing tools to verify the quality and performance of the project, and automatically send the production-like environment after the verification is completed. Post completion prompt.
所述自动构建产品测试环境具体过程是:调用云接口部署服务;通过健康检查接口判断服务是否启动成功,若是,则完成测试环境的准备并触发分布式云节点服务器,若否,则将启动不成功的消息反馈给开发和测试人员。The specific process of automatically constructing the product test environment is as follows: calling the cloud interface to deploy the service; judging whether the service is successfully started through the health check interface; if so, complete the preparation of the test environment and trigger the distributed cloud node server; Success messages are fed back to developers and testers.
所述代码规范性校验内容包括:前端代码规范性校验、后端代码规范性校验以及单元测试JUNIT且所述代码规范性校验使用Sonar工具进行,该Sonar工具提供了“项目”、“问题”、“代码规则”、“质量配置”以及“质量阈”的界面;其中:The code normative verification content includes: front-end code normative verification, back-end code normative verification, and unit test JUNIT, and the code normative verification is performed using the Sonar tool, which provides "projects", Interface for Issues, Code Rules, Quality Configuration, and Quality Thresholds; where:
所述“项目”用于查看被进行安全扫描的项目信息;The "item" is used to view the item information that has been scanned for security;
所述“问题”用于查看被扫描的项目的问题信息;The "issue" is used to view issue information for the item being scanned;
所述“代码规则”用于用于设置代码检测的规则;The "code rules" are used to set rules for code detection;
所述“质量配置”用于在分析时配置使用的规则集合,每个语言都有默认配置;The "quality configuration" is used to configure the set of rules used during analysis, and each language has a default configuration;
所述“质量阈”相当于一个代码检测的阈值,代码问题超过阈值会出现提示,或发送邮件通知;The "quality threshold" is equivalent to a code detection threshold, and a prompt will appear if the code problem exceeds the threshold, or an email notification will be sent;
所述消息通知服务器在将自动化测试报告反馈结果发送给项目相关人员后,若有新功能和相关Bug,则在测试人员手工验证所述新功能和相关Bug通过后,整理自动化测试脚本加入到测试用例库,自动发送消息给项目相关人员,提示产品测试发布完成。The message notification server, after sending the automated test report feedback results to the relevant project personnel, if there are new functions and related bugs, after the testers manually verify that the new functions and related bugs pass, the automated test scripts are sorted and added to the test. The use case library automatically sends a message to the relevant project personnel to prompt the completion of the product test release.
所述集成服务编排工具为Docker Compose或k8s;所述UI自动化测试使用基于Selenium的测试平台Automate,而接口自动化测试使用Jmeter脚本和Requests+接收打桩测试工具Mock完成主线流程验证。The integration service orchestration tool is Docker Compose or k8s; the UI automation test uses the Selenium-based test platform Automate, and the interface automation test uses the Jmeter script and the Requests+ receiving piling test tool Mock to complete the main line process verification.
由于本发明实施例二所介绍的系统,为实施本发明实施例一的方法所采用的系统,故而基于本发明实施例一所介绍的方法,本领域所属人员能够了解该装置的具体结构及变形,故而在此不再赘述。凡是本发明实施例一的方法所采用的装置都属于本发明所欲保护的范围。Since the system introduced in the second embodiment of the present invention is the system used to implement the method in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and deformation of the device , so it is not repeated here. All devices used in the method of
本申请实施例中提供的技术方案,至少具有如下技术效果或优点:将编译构建环节、自动化测试环节分别运行在不同的服务器上,通过测试环境节点服务器自动构建产品测试环境,采用分布式云节点服务器作冒烟测试、UI自动化测试和接口自动化测试。由于开发环境节点服务器仅用于代码的编译和规范性校验,与测试无关,因此在微服务架构下即使微服务数量众多,自动化测试数量庞大,仍能保证持续集成结果的快速反馈,从而解决现有技术中在持续集成过程中运行自动化测试的时间较长,导致持续集成效率较低的技术问题。The technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: the compilation and construction links and the automated testing links are respectively run on different servers, the product testing environment is automatically constructed through the testing environment node server, and distributed cloud nodes are used. The server performs smoke testing, UI automation testing and interface automation testing. Since the development environment node server is only used for code compilation and normative verification, and has nothing to do with testing, under the microservice architecture, even if there are a large number of microservices and a large number of automated tests, it can still ensure rapid feedback of continuous integration results. In the prior art, it takes a long time to run automated tests in the continuous integration process, which leads to the technical problem of low continuous integration efficiency.
虽然以上描述了本发明的具体实施方式,但是熟悉本技术领域的技术人员应当理解,我们所描述的具体的实施例只是说明性的,而不是用于对本发明的范围的限定,熟悉本领域的技术人员在依照本发明的精神所作的等效的修饰以及变化,都应当涵盖在本发明的权利要求所保护的范围内。Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments we describe are only illustrative, rather than used to limit the scope of the present invention. Equivalent modifications and changes made by a skilled person in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111568565.6A CN114490319A (en) | 2021-12-21 | 2021-12-21 | A distributed continuous integration automated testing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111568565.6A CN114490319A (en) | 2021-12-21 | 2021-12-21 | A distributed continuous integration automated testing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114490319A true CN114490319A (en) | 2022-05-13 |
Family
ID=81494758
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111568565.6A Pending CN114490319A (en) | 2021-12-21 | 2021-12-21 | A distributed continuous integration automated testing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114490319A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115034095A (en) * | 2022-08-10 | 2022-09-09 | 国网江苏省电力有限公司信息通信分公司 | Sensitive state research and development simulation system |
CN115509544A (en) * | 2022-11-22 | 2022-12-23 | 成都佰维存储科技有限公司 | NVME continuous integration method and device, readable storage medium and electronic equipment |
CN116400987A (en) * | 2023-06-06 | 2023-07-07 | 智者四海(北京)技术有限公司 | Continuous integration method, device, electronic equipment and storage medium |
CN117354208A (en) * | 2023-09-28 | 2024-01-05 | 广州翼辉信息技术有限公司 | CI/CD-based automatic test method and system for CODESYS bus protocol stack |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109710524A (en) * | 2018-12-19 | 2019-05-03 | 上海华兴数字科技有限公司 | A kind of automatic test approach, system and computer storage medium |
CN110209421A (en) * | 2019-05-23 | 2019-09-06 | 北京奥鹏远程教育中心有限公司 | For educating the automation continuous integrating management method of cloud platform |
CN111198814A (en) * | 2019-12-23 | 2020-05-26 | 曙光信息产业(北京)有限公司 | An Acceptance System for Continuous Integration and Continuous Delivery |
CN111552644A (en) * | 2020-04-28 | 2020-08-18 | 成都库珀区块链科技有限公司 | A software continuous integration method based on microservice architecture |
CN112100051A (en) * | 2020-07-30 | 2020-12-18 | 江苏清微智能科技有限公司 | Automatic smoking test system and test method thereof |
CN112765043A (en) * | 2021-03-16 | 2021-05-07 | 上饶市中科院云计算中心大数据研究院 | Automatic testing method and device based on docker |
CN112988594A (en) * | 2021-04-25 | 2021-06-18 | 郑州信大捷安信息技术股份有限公司 | Integrated detection method and system for code quality evaluation |
CN113703730A (en) * | 2021-08-30 | 2021-11-26 | 平安普惠企业管理有限公司 | Continuous integration method and device, computer equipment and storage medium |
-
2021
- 2021-12-21 CN CN202111568565.6A patent/CN114490319A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109710524A (en) * | 2018-12-19 | 2019-05-03 | 上海华兴数字科技有限公司 | A kind of automatic test approach, system and computer storage medium |
CN110209421A (en) * | 2019-05-23 | 2019-09-06 | 北京奥鹏远程教育中心有限公司 | For educating the automation continuous integrating management method of cloud platform |
CN111198814A (en) * | 2019-12-23 | 2020-05-26 | 曙光信息产业(北京)有限公司 | An Acceptance System for Continuous Integration and Continuous Delivery |
CN111552644A (en) * | 2020-04-28 | 2020-08-18 | 成都库珀区块链科技有限公司 | A software continuous integration method based on microservice architecture |
CN112100051A (en) * | 2020-07-30 | 2020-12-18 | 江苏清微智能科技有限公司 | Automatic smoking test system and test method thereof |
CN112765043A (en) * | 2021-03-16 | 2021-05-07 | 上饶市中科院云计算中心大数据研究院 | Automatic testing method and device based on docker |
CN112988594A (en) * | 2021-04-25 | 2021-06-18 | 郑州信大捷安信息技术股份有限公司 | Integrated detection method and system for code quality evaluation |
CN113703730A (en) * | 2021-08-30 | 2021-11-26 | 平安普惠企业管理有限公司 | Continuous integration method and device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
周有志: ""基于云计算分布式系统性能测试技术研究与应用"", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
周有志: ""基于云计算分布式系统性能测试技术研究与应用"", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 12, 15 December 2015 (2015-12-15), pages 4 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115034095A (en) * | 2022-08-10 | 2022-09-09 | 国网江苏省电力有限公司信息通信分公司 | Sensitive state research and development simulation system |
CN115034095B (en) * | 2022-08-10 | 2022-11-04 | 国网江苏省电力有限公司信息通信分公司 | Sensitive state research and development simulation system |
CN115509544A (en) * | 2022-11-22 | 2022-12-23 | 成都佰维存储科技有限公司 | NVME continuous integration method and device, readable storage medium and electronic equipment |
CN115509544B (en) * | 2022-11-22 | 2023-03-21 | 成都佰维存储科技有限公司 | NVME continuous integration method and device, readable storage medium and electronic equipment |
CN116400987A (en) * | 2023-06-06 | 2023-07-07 | 智者四海(北京)技术有限公司 | Continuous integration method, device, electronic equipment and storage medium |
CN116400987B (en) * | 2023-06-06 | 2023-08-18 | 智者四海(北京)技术有限公司 | Continuous integration method, device, electronic equipment and storage medium |
CN117354208A (en) * | 2023-09-28 | 2024-01-05 | 广州翼辉信息技术有限公司 | CI/CD-based automatic test method and system for CODESYS bus protocol stack |
CN117354208B (en) * | 2023-09-28 | 2024-04-16 | 广州翼辉信息技术有限公司 | Automatic CODESYS bus protocol stack testing method and system based on CI/CD |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109683899B (en) | Software integration method and device | |
CN114490319A (en) | A distributed continuous integration automated testing method and system | |
US11366747B2 (en) | Unified test automation system | |
US11169902B2 (en) | Techniques for evaluating collected build metrics during a software build process | |
US10678666B1 (en) | Method and system for implementing automated test and retest procedures in a virtual test environment | |
US10572249B2 (en) | Software kit release management | |
US9477581B2 (en) | Integrated system and method for validating the functionality and performance of software applications | |
CN105701010A (en) | Method and device for accelerating software testing | |
JP2010231782A (en) | Method and system for function automation | |
CN112130956A (en) | Jenkins-based automatic CI/CD pipeline method | |
US20170220324A1 (en) | Data communication accelerator system | |
CN114297056A (en) | An automated testing method and system | |
CN110727575A (en) | Information processing method, system, device and storage medium | |
CN115658038A (en) | Jenkins-based defeatops system, method and related equipment | |
CN115344300A (en) | Branch pipeline construction method, device, equipment and storage medium | |
EP3683675A1 (en) | System, apparatus and method of integrated deployment | |
CN116954628A (en) | Automatic code merging method and system supporting CICD | |
CN115061746A (en) | Jenkins-based vehicle network controller product development method and system | |
de Cleva Farto et al. | Reuse of model-based tests in mobile apps | |
TWI695284B (en) | Agile software development system and method thereof | |
CN113094267B (en) | Test result collection method and device | |
CN114328185A (en) | Continuous Integration Information Aggregation System | |
WO2020042086A1 (en) | Method and system for implementing devops | |
Raassina | DevOps and test automation configuration for an analyzer project | |
CN117707600A (en) | Application release method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20220513 |
|
WD01 | Invention patent application deemed withdrawn after publication |