{"id":29063,"date":"2025-10-17T07:07:40","date_gmt":"2025-10-17T07:07:40","guid":{"rendered":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/?page_id=29063"},"modified":"2025-10-17T18:37:46","modified_gmt":"2025-10-17T09:37:46","slug":"gitlab","status":"publish","type":"page","link":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/integration-guide\/requirements-and-defects-integrations\/available-integrations\/gitlab\/","title":{"rendered":"Integrate with GitLab"},"content":{"rendered":"<div class=\"callout callout--info\">\n<p>This article refers to integrating with<span>\u00a0<\/span><strong>GitLab Issues<\/strong>. If you&#8217;re looking for information about CI\/CD integrations, please see the documentation on<span>\u00a0<\/span><a href=\"\/test-automation\/ci-cd-tools-integration\/gitlab-ci-cd\/\" target=\"_blank\" rel=\"noopener\">Integrating with GitLab CI\/CD<\/a>.<\/p>\n<\/div>\n<p>TestRail integrates with GitLab so your team can link, view, add, and push issues between TestRail and GitLab as<span>\u00a0<\/span><a href=\"\/configuring-defect\/\" target=\"_blank\" rel=\"noopener\">bugs\/defects<\/a>,<span>\u00a0<\/span><a href=\"\/configuring-reference\/\" target=\"_blank\" rel=\"noopener\">requirements\/references<\/a>, or both. The TestRail integration with GitLab supports the following use cases:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"list-bullet\">\n<li><a href=\"#h_01HB6W7DZ4W177ZZX9BTG70WQH\">Link test cases to requirements<\/a><\/li>\n<li><a href=\"#h_01HB6W7DZ4FPC973Z2ZW9FQYMT\">Start creating requirements from TestRail<\/a><\/li>\n<li><a href=\"#h_01HB6W7DZ4JRBWZFS1QQZD14G4\">View requirements in TestRail<\/a><\/li>\n<li><a href=\"#h_01HB6W7DZ4NH80NDNZMDY8XNZ3\">Link defects to test results<\/a><\/li>\n<li><a href=\"#h_01HB6WEEZSNTAFBQ0NF2G622P5\">Submit new defects in GitLab<\/a><\/li>\n<li><a href=\"#h_01HB6WEEZSGRWTV4ND4XYEHJ3W\">Submit new defects from TestRail<\/a><\/li>\n<li><a href=\"#View_defects_in_TestRail\">View defects in TestRail<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>You don\u2019t have to use all the listed integration options; you can mix and match the integration with other tools. Configuring the integration usually only takes a few minutes. This guide explains how to configure the integration and how it works.<\/p>\n\n\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube-nocookie.com\/embed\/WZXzphQb-v0\" width=\"700\" height=\"394\" frameborder=\"0\" allowfullscreen=\"\"><\/iframe><\/p>\n\n\n<h2 id=\"h_01HB6W7DZ4W177ZZX9BTG70WQH\">Link test cases to requirements<\/h2>\n<p>When establishing test coverage, while creating or modifying test cases, just include one or more Issues IDs (separated by commas) in the References field.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_01.jpg\" alt=\"\" width=\"931\" height=\"337\" class=\"aligncenter size-full wp-image-29087\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_01.jpg 931w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_01-480x174.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 931px, 100vw\" \/><\/a><\/p>\n<p>The <strong>References<\/strong> you set in your test cases will be converted to a direct link to GitLab issues.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_02.jpg\" alt=\"\" width=\"935\" height=\"302\" class=\"aligncenter size-full wp-image-29088\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_02.jpg 935w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_02-480x155.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 935px, 100vw\" \/><\/a><\/p>\n<h2 id=\"h_01HB6W7DZ4FPC973Z2ZW9FQYMT\">Start creating requirements from TestRail<\/h2>\n<p>GitLab issues can serve as a source of requirements, making them valuable references for test cases. TestRail offers a convenient Add link feature within the test case editor view, enabling seamless navigation to the GitLab issues screen. This feature expedites the process of creating new requirements that you wish to associate with your test cases. It&#8217;s important to remember that once you&#8217;ve created a new work item, you should copy and paste its ID into the References field for proper traceability.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_03.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_03.jpg\" alt=\"\" width=\"777\" height=\"518\" class=\"aligncenter size-full wp-image-29089\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_03.jpg 777w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_03-480x320.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 777px, 100vw\" \/><\/a><\/p>\n<h3 id=\"h_01HB6W4MPDYPE3HEZ7AT7E9B8J\">Configuring the Reference Add Url<\/h3>\n<p>To start creating new requirements from TestRail, you should configure the GitLab<span>\u00a0<\/span><strong>Reference Add Url<\/strong><span>\u00a0<\/span>in TestRail by following the steps below.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"list-colored\">\n<li>Go to the<span>\u00a0<\/span><strong>Admin<\/strong>\u00a0page, select<span>\u00a0<\/span><strong>Integration<\/strong><span>\u00a0<\/span>to configure globally or<span>\u00a0<\/span><strong>Projects<\/strong><span>\u00a0<\/span>for a single project, and open the<span>\u00a0<\/span><strong>Reference<\/strong>s tab<\/li>\n<li>Insert your the<strong><span>\u00a0<\/span>Reference Add Url<\/strong><span>\u00a0<\/span>using the following pattern<span>\u00a0<\/span><code class=\"inline-code\">https:\/\/<span>&lt;GitLab_Space_URL&gt;<\/span>\/<span>&lt;project&gt;\/<\/span><span>-<\/span><span>\/issues<\/span>\/new<\/code><\/li>\n<li>Click<span>\u00a0<\/span><strong>Save Settings<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong><strong><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_04.jpg\" alt=\"\" width=\"934\" height=\"320\" class=\"aligncenter size-full wp-image-29090\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_04.jpg 934w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_04-480x164.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 934px, 100vw\" \/><\/a><\/strong><\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<h2 id=\"h_01HB6W7DZ4JRBWZFS1QQZD14G4\">View requirements in TestRail<\/h2>\n<p><span>TestRail can retrieve additional information from IDs entered into the\u00a0<\/span><strong>References<\/strong><span>\u00a0field of TestRail entities, such as test cases, test runs, and milestones. Simply hover over the links and a dialog will show you all the latest information without having to navigate to GitLab.<\/span><\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_05.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_05.jpg\" alt=\"\" width=\"936\" height=\"407\" class=\"aligncenter size-full wp-image-29091\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_05.jpg 936w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_05-480x209.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 936px, 100vw\" \/><\/a><\/p>\n<h3 id=\"h_01HB6FK1DQXQJJA7FRJXE61HQP\" class=\"ip-location-block-dropup ip-location-block-dropdown\">Configuring the Reference Plugin<\/h3>\n<p>To view requirements directly in TestRail, you should configure the GitLab<span>\u00a0<\/span><strong>Reference Plugin<\/strong><span>\u00a0<\/span>in TestRail by following the steps below.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"list-colored\">\n<li>Create a<span>\u00a0<\/span><a href=\"\/user-variables\/\" target=\"_blank\" rel=\"noopener\">User Variable<\/a><span>\u00a0<\/span>for the GitLab Personal Access Token (PAT)<\/li>\n<li>Go to the<span>\u00a0<\/span><strong>Admin<\/strong>\u00a0page, select<span>\u00a0<\/span><strong>Integration<\/strong><span>\u00a0<\/span>to configure globally or<span>\u00a0<\/span><strong>Projects<\/strong><span>\u00a0<\/span>for a single project, and open the<span>\u00a0<\/span><strong>References<\/strong><span>\u00a0<\/span>tab<\/li>\n<li>Select your<span>\u00a0<\/span><em>GitLab<\/em>\u00a0variant in the Reference Plugin drop-down list<\/li>\n<li>Configure the connection settings in the<span>\u00a0<\/span><strong>[connection]<\/strong><span>\u00a0<\/span>section\n<ul class=\"list-colored\">\n<li><strong>address<\/strong>: https:\/\/&lt;GitLab_URL&gt;\/<\/li>\n<li><strong>token<\/strong>: your<span>\u00a0<\/span><a href=\"\/user-variables\/\" target=\"_blank\" rel=\"noopener\">User Variable<\/a><span>\u00a0<\/span>which you can create from GitLab<\/li>\n<li><strong>project_id<\/strong>: your<span>\u00a0<\/span><strong>Project ID<\/strong><span>\u00a0<\/span>from GitLab. The<span>\u00a0<\/span><strong>Project ID<\/strong><span>\u00a0<\/span>is displayed on the Project overview page, under the project name as shown in the screenshot below<\/li>\n<\/ul>\n<\/li>\n<li>Click<span>\u00a0<\/span><strong>Save Settings<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_06.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_06.jpg\" alt=\"\" width=\"925\" height=\"633\" class=\"aligncenter size-full wp-image-29092\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_06.jpg 925w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_06-480x328.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 925px, 100vw\" \/><\/a><\/p>\n<h2 id=\"h_01HB6W7DZ4NH80NDNZMDY8XNZ3\">Link defects to test results<\/h2>\n<p>The Defect View URL is used to build a link to GitLab based on the Defect ID, so you can simply click on an ID to open the issue directly in GitLab.<\/p>\n<p>When you set up the Defect View URL integration with GitLab Issues, you can paste the ID of a GitLab issue in the Defects field of a test result and TestRail will automatically convert that ID into a clickable link to view the issue in GitLab. This allows your team to link tests with GitLab issues and create defect and traceability reports in TestRail.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_07.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_07.jpg\" alt=\"\" width=\"933\" height=\"451\" class=\"aligncenter size-full wp-image-29093\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_07.jpg 933w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_07-480x232.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 933px, 100vw\" \/><\/a><\/p>\n<h3 id=\"h_01HB6FK1DQXQJJA7FRJXE61HQP\">Configuring the Defect View Url<\/h3>\n<p>To link defects to test results in TestRail, you should configure the GitLab Defect View Url in TestRail by following the steps below.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"list-colored\">\n<li>Go to the<span>\u00a0<\/span><strong>Admin<\/strong>\u00a0page, select<span>\u00a0<\/span><strong>Integration<\/strong><span>\u00a0<\/span>to configure globally or<span>\u00a0<\/span><strong>Projects<\/strong><span>\u00a0<\/span>for a single project, and open the<span>\u00a0<\/span><strong>Defects<\/strong><span>\u00a0<\/span>tab<\/li>\n<li>Insert your<span>\u00a0<\/span><strong>Defect View Url<\/strong><span>\u00a0<\/span>using the following pattern<span>\u00a0<\/span><code class=\"inline-code\">https:\/\/<span>&lt;GitLab_Space_URL&gt;<\/span>\/<span>&lt;project&gt;\/<\/span><span>-<\/span><span>\/issues\/<\/span><span>%id%<\/span><\/code><\/li>\n<li>Click<span>\u00a0<\/span><strong>Save Settings<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Note<\/strong><span>\u00a0<\/span>: Please make sure to replace<span>\u00a0<\/span><code class=\"inline-code\">&lt;<span>GitLab_Space_URL<\/span>&gt;<\/code><span>\u00a0<\/span>and<span>\u00a0<\/span><code class=\"inline-code\">&lt;<span>project<\/span>&gt;<\/code>with the actual repository and the owner name in GitLab you want to integrate with.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_08.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_08.jpg\" alt=\"\" width=\"937\" height=\"308\" class=\"aligncenter size-full wp-image-29094\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_08.jpg 937w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_08-480x158.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 937px, 100vw\" \/><\/a><\/p>\n<h2 id=\"h_01HB6WEEZSNTAFBQ0NF2G622P5\">Submit new defects in GitLab<\/h2>\n<p>TestRail provides quick navigation to report defects using the GitLab interface. You can do it from two different places &#8211; the<span>\u00a0<\/span><strong>Defects menu<\/strong><span>\u00a0<\/span>and the<span>\u00a0<\/span><strong>Add Test Result dialog<\/strong>.<\/p>\n<p>The<span>\u00a0<\/span><strong>Defects menu<\/strong>, also known as TestRail\u2019s<span>\u00a0<\/span><a href=\"\/configuring-defect\/#i-9\" target=\"_blank\" rel=\"noopener\">Defect From Anywhere<\/a><span>\u00a0<\/span>feature, is displayed on top of most pages for quick access.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_09.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_09.jpg\" alt=\"\" width=\"934\" height=\"380\" class=\"aligncenter size-full wp-image-29095\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_09.jpg 934w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_09-480x195.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 934px, 100vw\" \/><\/a><\/p>\n<p><span>The\u00a0<\/span><strong>Add Test Result dialog<\/strong><span>\u00a0displays the\u00a0<\/span><strong>Add link<\/strong><span>\u00a0next to the\u00a0<\/span><strong>Defects field<\/strong><span>\u00a0for quickly and conveniently navigating to GitLab in order to submit a defect when your test is failing.<\/span><\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_10.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_10.jpg\" alt=\"\" width=\"773\" height=\"599\" class=\"aligncenter size-full wp-image-29096\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_10.jpg 773w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_10-480x372.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 773px, 100vw\" \/><\/a><\/p>\n<h3 id=\"h_01HB6FK1DQXQJJA7FRJXE61HQP\">Configuring the Defect Add Url<\/h3>\n<p>To quickly navigate to GutHub to create a new defect, you should configure GitLab Defect Url in TestRail by following the steps below.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"list-colored\">\n<li>Go to the<span>\u00a0<\/span><strong>Admin<\/strong>\u00a0page, select<span>\u00a0<\/span><strong>Integration<\/strong><span>\u00a0<\/span>to configure globally or<span>\u00a0<\/span><strong>Projects<\/strong><span>\u00a0<\/span>for a single project, and open the<span>\u00a0<\/span><strong>Defects<\/strong><span>\u00a0<\/span>tab<\/li>\n<li>Insert your<span>\u00a0<\/span><strong>Defect Add Url<\/strong><span>\u00a0<\/span>using the following pattern<span>\u00a0<\/span><code class=\"inline-code\">https:\/\/<span>&lt;GitLab_Space_URL&gt;<\/span><span>\/&lt;project&gt;\/<\/span><span>-<\/span>\/issues\/new<\/code><\/li>\n<li>Click<span>\u00a0<\/span><strong>Save Settings<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_11.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_11.jpg\" alt=\"\" width=\"779\" height=\"286\" class=\"aligncenter size-full wp-image-29097\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_11.jpg 779w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_11-480x176.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 779px, 100vw\" \/><\/a><\/p>\n<p><span>Note : Please make sure to replace\u00a0<\/span><code class=\"inline-code\">&lt;<span>GitLab_Space_URL<\/span>&gt;<\/code><span>\u00a0and\u00a0<\/span><code class=\"inline-code\">&lt;<span>project<\/span>&gt;<\/code><span>\u00a0with the actual repo and the owner name in GitLab you want to integrate with.<\/span><\/p>\n<h2 id=\"h_01HB6WEEZSGRWTV4ND4XYEHJ3W\">Submit new defects from TestRail<\/h2>\n<p>To enhance the seamless integration of defect reporting, TestRail offers a pre-configured GitLab defect plugin. This plugin empowers you to effortlessly submit new issues to GitLab directly from within TestRail.<\/p>\n<p>By utilizing the intuitive<span>\u00a0<\/span><strong>Push Defect dialog<\/strong>, you can swiftly generate a fresh defect complete with a title, description, and any additional fields that GitLab supports. This streamlined process ensures a smoother defect management workflow.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_12.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_12.jpg\" alt=\"\" width=\"780\" height=\"677\" class=\"aligncenter size-full wp-image-29098\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_12.jpg 780w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_12-480x417.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 780px, 100vw\" \/><\/a><\/p>\n<p>You can open the defect submission dialog from two places &#8211; the<span>\u00a0<\/span><strong>Defects menu<\/strong><span>\u00a0<\/span>and the<span>\u00a0<\/span><strong>Add Test Result dialog<\/strong>.<\/p>\n<p>The<span>\u00a0<\/span><strong>Defects menu<\/strong>, also known as TestRail\u2019s<span>\u00a0<\/span><a href=\"\/configuring-defect\/#i-9\" target=\"_blank\" rel=\"noopener\">Defect From Anywhere<\/a><span>\u00a0<\/span>feature, is displayed on top of most pages for quick access.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_13.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_13.jpg\" alt=\"\" width=\"777\" height=\"313\" class=\"aligncenter size-full wp-image-29099\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_13.jpg 777w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_13-480x193.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 777px, 100vw\" \/><\/a><\/p>\n<p>The<strong> Add Test Result dialog<\/strong> displays the <strong>Push link<\/strong> next to the <strong>Defects field<\/strong> to efficiently report a defect while you&#8217;re submitting your test results.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_14.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_14.jpg\" alt=\"\" width=\"782\" height=\"607\" class=\"aligncenter size-full wp-image-29100\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_14.jpg 782w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_14-480x373.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 782px, 100vw\" \/><\/a><\/p>\n<h3 id=\"h_01HB6FK1DQXQJJA7FRJXE61HQP\">Configuring the Defect Plugin<\/h3>\n<p>To submit new defects straight from TestRail, you should configure the GutHub <strong>Defect Plugin<\/strong> in TestRail by following the steps below.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"list-colored\">\n<li>Go to the <strong>Admin<\/strong>\u00a0page, select <strong>Integration<\/strong> to configure globally or <strong>Projects<\/strong> for a single project, and open the References tab<\/li>\n<li>Select your <em>GitLab<\/em> variant in the<strong> Defect Plugin<\/strong> drop-down list<\/li>\n<li>Configure the connection settings in the <strong>[connection]<\/strong> section\n<ul class=\"list-colored\">\n<li><strong>address<\/strong>: https:\/\/<span style=\"color: #3c3c3c; background-color: #f7f7f7;\">&lt;GitLab_URL&gt;<\/span>\/<\/li>\n<li><strong>token<\/strong>: your <a href=\"https:\/\/docs.gitlab.com\/ee\/user\/profile\/personal_access_tokens.html\" target=\"_blank\" rel=\"noopener\">personal access token <\/a>\u00a0which you can create from GitLab<\/li>\n<li><strong>project_id<\/strong>: your <strong>Project ID<\/strong> from GitLab. The <strong>Project <\/strong><strong>ID<\/strong> is displayed on the Project overview page, under the project name as shown in the screenshot below<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_15.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_15.jpg\" alt=\"\" width=\"635\" height=\"186\" class=\"aligncenter size-full wp-image-29101\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_15.jpg 635w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_15-480x141.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 635px, 100vw\" \/><\/a><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Click <strong><strong>Save Settings<\/strong><\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_16.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_16.jpg\" alt=\"\" width=\"779\" height=\"463\" class=\"aligncenter size-full wp-image-29102\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_16.jpg 779w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_16-480x285.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 779px, 100vw\" \/><\/a><\/p>\n<h2 id=\"h_01HB6WEEZSBFRCSNF50VK5ZESH\">View defects in TestRail<\/h2>\n<p>Simply hover over defect links and a dialog will show you all the latest information without having to navigate to GitLab. These links are available in the test results directly, as well as the Defects section on test runs, test plans and milestones.<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_17.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_17.jpg\" alt=\"\" width=\"789\" height=\"485\" class=\"aligncenter size-full wp-image-29103\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_17.jpg 789w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_17-480x295.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 789px, 100vw\" \/><\/a><\/p>\n<h3 id=\"h_01HB6FK1DQXQJJA7FRJXE61HQP\">Configuring the Defect Plugin<\/h3>\n<p>To submit new defects straight from TestRail, you should configure the GutHub <strong>Defect Plugin<\/strong> in TestRail by following the steps below.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"list-colored\">\n<li>Go to the <strong>Admin<\/strong>\u00a0page, select <strong>Integration<\/strong> to configure globally or <strong>Projects<\/strong> for a single project, and open the References tab<\/li>\n<li>Select your <em>GitLab<\/em>\u00a0variant in the Reference Plugin drop-down list<\/li>\n<li>Configure the connection settings in the <strong>[connection]<\/strong> section\n<ul class=\"list-colored\">\n<li><strong>address<\/strong>: https:\/\/<span style=\"color: #3c3c3c; background-color: #f7f7f7;\">&lt;GitLab_URL&gt;<\/span>\/<\/li>\n<li><strong>token<\/strong>: your <a href=\"https:\/\/docs.gitlab.com\/ee\/user\/profile\/personal_access_tokens.html\" target=\"_blank\" rel=\"noopener\">personal access token <\/a>\u00a0which you can create from GitLab<\/li>\n<li><strong>project_id<\/strong>: your <strong>Project ID<\/strong> from GitLab. The <strong>Project ID<\/strong> is displayed on the Project overview page, under the project name as shown in the screenshot below<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_18.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_18.jpg\" alt=\"\" width=\"635\" height=\"186\" class=\"aligncenter size-full wp-image-29104\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_18.jpg 635w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_18-480x141.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 635px, 100vw\" \/><\/a><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Click <strong><strong>Save Settings<\/strong><\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_19.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_19.jpg\" alt=\"\" width=\"779\" height=\"465\" class=\"aligncenter size-full wp-image-29105\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_19.jpg 779w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_19-480x287.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 779px, 100vw\" \/><\/a><\/p>\n<p>It is also possible to customize the fields that appear via link hovering. You can see more information on how to do it on the <a href=\"\/server-guide\/customizations-and-extensions\/example-custom-plugin\/\" target=\"_blank\" rel=\"noopener\">Customizing the Requirement\/Defect Plugins<\/a> section.<\/p>\n<h2 id=\"h_01H8Y9P5D39WNYGJWSEFBN925Z\">Advanced customizations<\/h2>\n<h3 id=\"h_01H8YC0HD6K9KGTYG9D7JJ69QH\">User variables<\/h3>\n<p>We recommend using <a href=\"\/user-variables\/\" target=\"_blank\" rel=\"noopener\">User Variables<\/a> when configuring any integration credentials. This allows you to provide generic credentials without disclosing them, and also lets users define their own credentials in their personal<br \/>settings, for better access control. Below you can see an example of how to set variables in your configuration.<\/p>\n<pre><code class=\"shell\">gitlab_token=%gitlab_token%\ngitlab_project_id=%gitlab_project_id%<\/code><\/pre>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_20.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_20-1024x245.jpg\" alt=\"\" width=\"1024\" height=\"245\" class=\"aligncenter size-large wp-image-29106\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_20-980x234.jpg 980w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/gitlab_20-480x115.jpg 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/a><\/p>\n<h3 id=\"customizing_defect_plugins\" class=\"sectionedit3\">Customizing the Requirement\/Defect Plugins<\/h3>\n<p>The GitLab plugin was built to work with a standard GitLab configuration. TestRail allows you to customize the fields which appear in the Push dialog as well as when hovering over work item IDs, both for requirements and defects. Preconfigured push fields and hover fields can be set to <code class=\"inline-code\">on<\/code> or <code class=\"inline-code\">off<\/code> in their respective <code class=\"inline-code\">[push.fields]<\/code> and <code class=\"inline-code\">[hover.fields]<\/code> sections, and you can also change their order, which will be reflected<br \/>in the UI.<\/p>\n<p>Some fields (such as the title) are always enabled and may not appear in these sections due to always being required by either TestRail or GitLab.<\/p>\n<p>In addition to enabling, disabling, or re-organizing fields as described above, it\u2019s also possible to change additional options per field. To do this, you would define a section for the field, such as <code class=\"inline-code\">[push.field.description]<\/code> and specify additional options within this section.<\/p>\n<pre><code class=\"config\">[push.field.description]\nlabel=Detailed Description\nrequired=true<\/code><\/pre>\n<p>Please see below for full list and explanation of the available field options:<\/p>\n<table class=\"table table--hover\" style=\"border-collapse: collapse; width: 100%;\">\n<thead>\n<tr>\n<th style=\"width: 20.2857%;\"><strong>Option<\/strong><\/th>\n<th style=\"width: 79.5714%;\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"width: 20.2857%;\"><code class=\"inline-code\">label<\/code><\/td>\n<td style=\"width: 79.5714%;\">Specifies the display name of the field in the Push Defect<br \/>dialogue\u00a0<em>(Required for custom fields)<\/em><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 20.2857%;\"><code class=\"inline-code\">size<\/code><\/td>\n<td style=\"width: 79.5714%;\">Specifies whether the field is displayed as a compact field <code class=\"inline-code\">(compact)<\/code> or uses the full width of the dialogue <code class=\"inline-code\">(full)<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 20.2857%;\"><code class=\"inline-code\">remember<\/code><\/td>\n<td style=\"width: 79.5714%;\">Specifies if previously selected values for this field should be remembered and<br \/>restored the next time the Push Defect dialogue is opened<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 20.2857%;\"><code class=\"inline-code\">required<\/code><\/td>\n<td style=\"width: 79.5714%;\">Specifies if this field is mandatory or optional and whether users are required<br \/>to enter a value for this field in the Push Defect dialogue<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"reference_urls\" class=\"sectionedit5\">Attachments<\/h4>\n<p>The GitLab Defect Plugin supports submitting attachments to GitLab as well. This field can be turned on and off, but cannot be customized. To submit one or more attachments to GitLab, simply drag the attachment to the attachments or description areas of the push dialog or click on the area to choose an attachment from your file system.<\/p>\n<p><!-- START note --><\/p>\n<div class=\"callout callout--info\">\n<p id=\"h_01HBB3JWQVRTEVPRPRYVJ5VS8V\" class=\"callout__title callout__icon\"><em class=\"fas fa-info-circle\">\u00a0<\/em>To enable attachments in the push dialog, add \u2018attachments=on\u2019 to the <code class=\"inline-code\">[push.fields]<\/code> section of the Defect Plugin\u2019s settings.<\/p>\n<\/div>\n<p><!-- END note --><\/p>","protected":false},"excerpt":{"rendered":"<p>This article refers to integrating with\u00a0GitLab Issues. If you&#8217;re looking for information about CI\/CD int [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":6734,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-29063","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/29063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/comments?post=29063"}],"version-history":[{"count":43,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/29063\/revisions"}],"predecessor-version":[{"id":29126,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/29063\/revisions\/29126"}],"up":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/6734"}],"wp:attachment":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/media?parent=29063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}