GitLab CI测试集成实战 – 从代码提交到测试报告全流程

---

前言

大家好,我是GitOps玩家。做CI/CD实践6年,GitLab CI是我常用的CI平台。今天分享GitLab CI测试集成的完整流程。 ---

一、GitLab CI配置

.gitlab-ci.yml结构

`yaml stages: - build - test - deploy unit_test: stage: test script: - pytest tests/unit api_test: stage: test script: - newman run tests/collection.json ` ---

二、RunnerGo集成

`yaml runnergo_test: stage: test script: - curl -X POST ${RUNNERGO_URL}/api/plan/run ` ---

三、测试报告

`yaml artifacts: reports: junit: reports/*.xml paths: - reports/ ` ---

总结

GitLab CI要点: | 环节 | 配置 | |------|------| | 流水线 | stages定义 | | 测试执行 | script命令 | | 报告上传 | artifacts配置 | --- 下期预告:探索性测试方法论 - 发现隐藏Bug的秘密武器
分享到:

探索 RunnerGo 全栈测试平台

RunnerGo 是一款面向企业的全栈测试平台,集接口测试、自动化测试、性能测试、UI测试于一体,助力企业提升研发效能。

接口测试
性能测试
自动化测试
UI测试
免费体验 RunnerGo