# GitLab tests in the Continuous Integration (CI) context > 原文:[https://docs.gitlab.com/ee/development/testing_guide/ci.html](https://docs.gitlab.com/ee/development/testing_guide/ci.html) * [Test suite parallelization on the CI](#test-suite-parallelization-on-the-ci) * [Monitoring](#monitoring) * [CI setup](#ci-setup) # GitLab tests in the Continuous Integration (CI) context[](#gitlab-tests-in-the-continuous-integration-ci-context "Permalink") ## Test suite parallelization on the CI[](#test-suite-parallelization-on-the-ci "Permalink") 我们当前的 CI 并行化设置如下: 1. 在`prepare`阶段的`retrieve-tests-metadata`作业可确保我们有一个`knapsack/report-master.json`文件: * 从 S3 提取`knapsack/report-master.json`文件,如果不在此处,则使用`{}`初始化文件. 2. 每个`[rspec|rspec-ee] [unit|integration|system|geo] nm`作业均使用`knapsack rspec`运行,并且应具有均匀分布的测试份额: * 之所以起作用,是因为"默认情况下传递了所有先前阶段的工件"以来,作业可以访问`knapsack/report-master.json` . * 作业将自己的报告路径设置为`"knapsack/${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json"` . * 如果背包正在执行任务,则运行的测试文件应列在`Report specs` ,而不是" `Leftover specs` . 3. `update-tests-metadata`作业(仅[在规范项目的](https://gitlab.com/gitlab-org/gitlab)预定管道上运行)将所有`knapsack/rspec*_pg_*.json`文件合并在一起,然后将它们全部合并为一个`knapsack/report-master.json`文件,然后将其上传到 S3. 之后,下一个管道将使用最新的`knapsack/report-master.json`文件. ## Monitoring[](#monitoring "Permalink") [监视](../performance.html#rspec-profiling) GitLab 测试套件的`master`分支以及名称中包含`rspec-profile`任何分支. [公共仪表板](https://redash.gitlab.com/public/dashboards/l1WhHXaxrCWM5Ai9D7YDqHKehq6OU3bx5gssaiWe?org_slug=default)可供所有人查看. 随意查看最慢的测试文件并尝试对其进行改进. ## CI setup[](#ci-setup "Permalink") * [由于性能原因](https://jtway.co/speed-up-your-rails-test-suite-by-6-in-1-line-13fedb869ec4) ,CI 中默认情况下禁用 Rails 日志到`log/test.log` . 要覆盖此设置,请提供`RAILS_ENABLE_TEST_LOG`环境变量. * * * [Return to Testing documentation](index.html)