<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # End-to-end Testing > 原文:[https://docs.gitlab.com/ee/development/testing_guide/end_to_end/](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/) * [What is end-to-end testing?](#what-is-end-to-end-testing) * [How do we test GitLab?](#how-do-we-test-gitlab) * [Testing nightly builds](#testing-nightly-builds) * [Testing staging](#testing-staging) * [Testing code in merge requests](#testing-code-in-merge-requests) * [Using the `package-and-qa` job](#using-the-package-and-qa-job) * [How does it work?](#how-does-it-work) * [With Pipeline for Merged Results](#with-pipeline-for-merged-results) * [Running custom tests](#running-custom-tests) * [Using the `review-qa-all` jobs](#using-the-review-qa-all-jobs) * [How do I run the tests?](#how-do-i-run-the-tests) * [Running tests that require special setup](#running-tests-that-require-special-setup) * [How do I write tests?](#how-do-i-write-tests) * [Where can I ask for help?](#where-can-i-ask-for-help) # End-to-end Testing[](#end-to-end-testing "Permalink") ## What is end-to-end testing?[](#what-is-end-to-end-testing "Permalink") 端到端測試是一種策略,用于檢查您的應用程序在整個軟件堆棧和體系結構中是否按預期工作,包括應該協同工作的所有微服務和組件的集成. ## How do we test GitLab?[](#how-do-we-test-gitlab "Permalink") 我們使用[Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab)構建 GitLab 程序包,然后使用[GitLab QA 協調器](https://gitlab.com/gitlab-org/gitlab-qa)工具測試這些程序包,該工具是 API 和 UI 的黑盒測試框架. ### Testing nightly builds[](#testing-nightly-builds "Permalink") 我們每天晚上運行預定的管道,以測試 Omnibus 創建的每晚構建. 您可以在`https://gitlab.com/gitlab-org/quality/nightly/pipelines` (需要開發人員訪問權限)中找到這些夜間管道. 結果在`#qa-nightly` Slack 頻道中報告. ### Testing staging[](#testing-staging "Permalink") 我們每天晚上運行預定的管道以測試階段. 您可以在`https://gitlab.com/gitlab-org/quality/staging/pipelines` (需要開發人員訪問權限)中找到這些夜間管道. 結果在`#qa-staging` Slack 頻道中報告. ### Testing code in merge requests[](#testing-code-in-merge-requests "Permalink") #### Using the `package-and-qa` job[](#using-the-package-and-qa-job "Permalink") 通過在`test`階段觸發`package-and-qa`手動操作,可以對合并請求運行端到端測試,最終在[`gitlab-qa-mirror`](https://gitlab.com/gitlab-org/gitlab-qa-mirror/)項目的管道中運行(不適用于 fork) ). **這將針對根據合并請求的更改構建的自定義 CE 和 EE(具有終極許可證)Omnibus 程序包進行端到端測試.** [Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab)中的合并請求中也提供了啟動端到端測試的手動操作. 您可以在下面閱讀有關如何使用它以及如何工作的更多信息. #### How does it work?[](#how-does-it-work "Permalink") 當前,我們正在使用類似*多項目管道*的方法來運行質量檢查管道. 圖 LR A1 -.-> | 1\. 觸發 omnibus-gitlab-mirror 管道并等待它完成| A2 B2 [`Trigger-qa`階段 `Trigger:qa-test`工作] -.-> | 2\. 觸發 gitlab-qa-mirror 管道并等待它完成| A3 子圖" gitlab-foss / gitlab 管道" A1 [`test`階段 "打包和質量檢查"工作]結束子圖" omnibus-gitlab 管道" A2 [`Trigger-docker`階段 `Trigger:gitlab-docker`作業]-> |一旦完成| B2 結束子圖" gitlab-qa-鏡像管道" A3> QA 作業運行] -.-> | 3\. 將管道結果報告給"打包和質量檢查"作業 并將結果發布到經過測試的原始提交| A1 端 1. 開發人員觸發手動操作,可以在 GitLab 合并請求中找到該操作. 這將啟動多個項目中的一系列管道. 2. 正在執行的腳本觸發[Omnibus GitLab Mirror 中](https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror)的管道,并等待結果狀態. 我們將此稱為*狀態歸因* . 3. 在[Omnibus GitLab Mirror](https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror)管道中正在構建 GitLab 軟件包. 然后將程序包推送到其容器注冊表. 4. 當軟件包準備就緒并在注冊表中可用時, [Omnibus GitLab Mirror](https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror)管道的最后一步將觸發新的 GitLab QA 管道(具有訪問權限的人可以在`https://gitlab.com/gitlab-org/gitlab-qa-mirror/pipelines`查看它們) `https://gitlab.com/gitlab-org/gitlab-qa-mirror/pipelines` ). 它還等待結果狀態. 5. GitLab QA 從注冊表中提取圖像,旋轉容器,并針對剛剛由`gitlab-qa`工具精心策劃的測試環境運行測試. 6. GitLab QA 管道的結果正在通過 Omnibus 上游傳播回 GitLab 合并請求. 請注意,我們計劃[添加](https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/156)有關`gitlab-qa-mirror`中運行的每個作業/場景中包含的測試的[更多特定信息](https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/156) . #### With Pipeline for Merged Results[](#with-pipeline-for-merged-results "Permalink") 在"合并結果的管道"中,管道在包含源分支和目標分支的合并結果的新引用上運行. 但是,此參考不適用于`gitlab-qa-mirror`管道. 因此,在"合并結果"管道上的端到端測試將使用合并請求源分支的頭部. graph LR A["a1b1c1 - branch HEAD (CI_MERGE_REQUEST_SOURCE_BRANCH_SHA)"] B["x1y1z1 - master HEAD"] C["d1e1f1 - merged results (CI_COMMIT_SHA)"] A --> C B --> C A --> E["E2E tests"] C --> D["Pipeline for merged results"] ##### Running custom tests[](#running-custom-tests "Permalink") 在下游`gitlab-qa-mirror`管道中運行的[現有場景](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md)包括許多測試,但是有時您可能想要運行一個測試或一組與任何現有場景中的組不同的測試. 例如,當我們[對](https://about.gitlab.com/handbook/engineering/quality/guidelines/debugging-qa-test-failures/#dequarantining-tests)一個薄片狀測試進行[隔離](https://about.gitlab.com/handbook/engineering/quality/guidelines/debugging-qa-test-failures/#dequarantining-tests)時,我們首先要確保它不再是薄片狀的. 我們可以使用`ce:custom-parallel`和`ee:custom-parallel`作業來做到這一點. 兩者都是手動作業,您可以使用自定義變量進行配置. 單擊并行作業之一的名稱(而不是播放圖標)時,系統將提示您輸入變量. 您可以使用[`gitlab-qa`](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md#supported-gitlab-environment-variables)可以使用的任何[變量](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md#supported-gitlab-environment-variables)以及這些[變量](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md#supported-gitlab-environment-variables) : | Variable | Description | | --- | --- | | `QA_SCENARIO` | 要運行的方案(默認`Test::Instance::Image` ) | | `QA_TESTS` | 要運行的測試(沒有默認設置,這意味著運行方案中的所有測試). 通過 RSpec 運行測試時,請使用文件路徑,例如, `qa/specs/features/ee/browser_ui`將包括所有`EE` UI 測試. | | `QA_RSPEC_TAGS` | 要添加的 RSpec 標記(無默認值) | 現在, [具有自定義變量的手動作業在重試時將不會使用相同的變量](https://gitlab.com/gitlab-org/gitlab/-/issues/31367) ,因此,如果要多次運行相同的測試,請在每個`custom-parallel`作業中指定相同的變量(最多可使用 10 個變量)您要運行的作業). #### Using the `review-qa-all` jobs[](#using-the-review-qa-all-jobs "Permalink") 在`test`階段的每個管道上,都會自動啟動`review-qa-smoke`作業:它將針對[Review App](../review_apps.html)運行 QA 煙霧套件. 您還可以手動啟動`review-qa-all` :它針對[Review App](../review_apps.html)運行完整的質量檢查套件. **This runs end-to-end tests against a Review App based on [the official GitLab Helm chart](https://gitlab.com/gitlab-org/charts/gitlab/), itself deployed with custom [Cloud Native components](https://gitlab.com/gitlab-org/build/CNG) built from your merge request’s changes.** 有關[審閱應用程序](../review_apps.html)的更多詳細信息,請參見[審閱應用](../review_apps.html)程序. ## How do I run the tests?[](#how-do-i-run-the-tests "Permalink") 如果您不是[在合并請求中測試代碼](#testing-code-in-merge-requests) ,則有兩個主要選項可用于運行測試. 如果您只想對一個實時的 GitLab 實例或一個預先構建的 Docker 映像運行現有測試,則可以使用[GitLab QA 協調器](https://gitlab.com/gitlab-org/gitlab-qa/tree/master/README.md) . 另請參見[可以通過 Orchestrator 運行的測試方案示例](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md#examples) . 另一方面,如果您想在本地開發的 GitLab 環境中運行,則可以使用[GitLab 開發工具包(GDK)](https://gitlab.com/gitlab-org/gitlab-development-kit/) . 請參考[質量檢查自述文件](https://gitlab.com/gitlab-org/gitlab/tree/master/qa/README.md#how-can-i-use-it)和以下部分中的說明. ### Running tests that require special setup[](#running-tests-that-require-special-setup "Permalink") 了解如何執行[需要特殊設置或考慮才能在本地環境上運行的測試](running_tests_that_require_special_setup.html) . ## How do I write tests?[](#how-do-i-write-tests "Permalink") 為了編寫新的測試,您首先需要了解有關 GitLab QA 體系結構的更多信息. 請參閱有關[文檔](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/architecture.md) . 一旦決定了將[測試環境業務流程場景](https://gitlab.com/gitlab-org/gitlab-qa/tree/master/lib/gitlab/qa/scenario)和[實例級場景](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/qa/qa/specs/features)放置在何處,請查看[GitLab QA 自述文件](https://gitlab.com/gitlab-org/gitlab/tree/master/qa/README.md) , [GitLab QA Orchestrator 自述文件](https://gitlab.com/gitlab-org/gitlab-qa/tree/master/README.md)和[已經存在的實例級場景](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/qa/qa/specs/features) . 繼續閱讀: * [Beginner’s Guide](beginners_guide.html) * [Style Guide](style_guide.html) * [Best Practices](best_practices.html) * [Testing with feature flags](feature_flags.html) * [Flows](flows.html) * [RSpec metadata/tags](rspec_metadata_tests.html) ## Where can I ask for help?[](#where-can-i-ask-for-help "Permalink") 您可以在 Slack 上的`#quality`頻道(GitLab 內部)上[`gitlab`](https://gitlab.com/gitlab-org/gitlab/-/issues?label_name[]=QA&label_name[]=test) ,或者[在`gitlab-qa`](https://gitlab.com/gitlab-org/gitlab-qa/-/issues?label_name[]=new+scenario) [問題跟蹤器](https://gitlab.com/gitlab-org/gitlab/-/issues?label_name[]=QA&label_name[]=test)或[`gitlab-qa`問題跟蹤器中](https://gitlab.com/gitlab-org/gitlab-qa/-/issues?label_name[]=new+scenario)找到您要[`gitlab-qa`問題](https://gitlab.com/gitlab-org/gitlab-qa/-/issues?label_name[]=new+scenario) .
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看