{"id":27854,"date":"2025-10-01T05:39:15","date_gmt":"2025-10-01T05:39:15","guid":{"rendered":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/?page_id=27854"},"modified":"2025-10-27T19:22:10","modified_gmt":"2025-10-27T10:22:10","slug":"ci-cd-pipelines","status":"publish","type":"page","link":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/test-automation\/testrail-cli\/ci-cd-pipelines\/","title":{"rendered":"CI\/CD \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3067\u306e TRCLI"},"content":{"rendered":"<figure style=\"width: 50%;\" class=\"wysiwyg-image wysiwyg-image-resized\"><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/TestRail_CLI-Navy-Logo.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/TestRail_CLI-Navy-Logo-300x121.png\" alt=\"\" width=\"300\" height=\"121\" class=\"alignnone wp-image-28361 size-medium\" \/><\/a><\/figure>\n<h2 id=\"h_01K1WXY7DDY8ACKBSHAWP9S7GS\">TRCLI \u304c\u5bb9\u6613\u306b CI\/CD \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u9069\u5408\u3059\u308b\u7406\u7531<\/h2>\n<p>TRCLI \u306f TestRail \u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3 \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u3042\u308a\u3001API \u3092\u4ecb\u3057\u3066 TestRail \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3078\u306e\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u81ea\u52d5\u5316\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u7406\u7531\u306b\u3088\u308a\u3001TRCLI \u306f\u5bb9\u6613\u306b CI\/CD\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306b\u9069\u5408\u3057\u307e\u3059\u3002\u00a0<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>JUnit \u5f62\u5f0f\u306e XML (Playwright\u3001Selenium \u306a\u3069) \u304b\u3089 TestRail \u3078\u306e<strong>\u81ea\u52d5\u5316\u3055\u308c\u305f\u30ec\u30dd\u30fc\u30c8\u3092\u5408\u7406\u5316<\/strong>\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u8a2d\u5b9a\u30d9\u30fc\u30b9\u306e\u81ea\u52d5\u5316\u3068\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9<\/strong>\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3001\u8907\u6570\u306e\u74b0\u5883\u306b\u308f\u305f\u3063\u3066\u4e88\u6e2c\u3068\u53cd\u5fa9\u304c\u53ef\u80fd\u306a\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002<\/li>\n<li>\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u8efd\u91cf\u3067\u3042\u308a\u3001CI \u6bb5\u968e\u3067\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u4f5c\u6210\u306b\u6700\u9069\u3067\u3059\u3002<\/li>\n<li><strong>\u5931\u6557\u3092\u8a31\u5bb9<\/strong>\u3067\u304d\u308b\u305f\u3081\u3001\u30c6\u30b9\u30c8\u304c\u5931\u6557\u3057\u305f\u5834\u5408\u3067\u3082\u3001\u5e38\u306b\u7d50\u679c\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\u30b8\u30e7\u30d6\u9593\u3067<strong>\u6210\u679c\u7269<\/strong>\u304c\u5171\u6709\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\u8a8d\u8a3c\u60c5\u5831\u3068\u30e1\u30bf\u30c7\u30fc\u30bf\u306b\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u74b0\u5883\u5909\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"h_01K1WT35PPK3AEJ98K1SGS5YC2\">\u524d\u63d0\u6761\u4ef6<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>API \u30a2\u30af\u30bb\u30b9\u304c\u6709\u52b9\u5316\u3055\u308c\u305f TestRail \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9<\/li>\n<li>\u81ea\u52d5\u5316\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u304c JUnit \u5f62\u5f0f\u306e XML \u3092\u51fa\u529b\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068<\/li>\n<li>CI \u74b0\u5883\u306b (<code class=\"inline-code\">pip install trcli<\/code> \u7d4c\u7531\u3067) TRCLI \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3053\u3068<\/li>\n<li>\u8a8d\u8a3c\u60c5\u5831\u304c\u5b89\u5168\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3053\u3068 (\u74b0\u5883\u5909\u6570\u307e\u305f\u306f CI \u306e\u30b7\u30fc\u30af\u30ec\u30c3\u30c8)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"h_01K1WXVXVYRE6V8PPD1811Q4MG\">\u4e3b\u8981\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">stages:\n  - test\n  - upload-results\n\ntest-job:\n  image: node:latest\n  script:\n    - npm install\n    - npx playwright test --reporter junit\n  artifacts:\n    when: always\n    paths: [test-results\/]\n  allow_failure: true\n\nupload-results:\n  image: python:latest\n  dependencies: [test-job]\n  script:\n    - pip install trcli\n    - trcli -y \\\n        -h https:\/\/your.testrail.io\/ \\\n        --project \"My Project\" \\\n        --username $TR_USERNAME \\\n        --password $TR_API_TOKEN \\\n        parse_junit \\\n        -f test-results\/junit-report.xml \\\n        --title \"CI Test Run - $CI_PIPELINE_ID\" \\\n        --run-description \"GitLab pipeline $CI_PIPELINE_URL\" \\\n        --close-run<\/pre>\n<pre><code class=\"language-yaml inline-code\"><\/code><\/pre>\n<figure style=\"width: 100%;\" class=\"wysiwyg-table wysiwyg-table-align-left\">\n<table style=\"font-size: 13px;\" class=\"table--hover wysiwyg-table-resized\"><colgroup> <col style=\"width: 26%;\" \/> <col style=\"width: 36%;\" \/> <col style=\"width: 38%;\" \/> <\/colgroup>\n<thead>\n<tr>\n<th>\u30d5\u30e9\u30b0<\/th>\n<th>\u76ee\u7684<\/th>\n<th>CI\/CD \u306e\u30d2\u30f3\u30c8<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code class=\"inline-code\">--host<\/code>, <code class=\"inline-code\">--project<\/code><\/td>\n<td>\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5148 TestRail \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a73\u7d30<\/td>\n<td>\u74b0\u5883\u5909\u6570\u307e\u305f\u306f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3068\u904b\u7528\u306b\u5bfe\u5fdc\u3057\u307e\u3059<\/td>\n<\/tr>\n<tr>\n<td><code class=\"inline-code\">-u<\/code>\u3001 <code>-p<\/code> (\u307e\u305f\u306f API \u30ad\u30fc)<\/td>\n<td>\u8a8d\u8a3c<\/td>\n<td>\u5b89\u5168\u306a\u5909\u6570\u3068\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059<\/td>\n<\/tr>\n<tr>\n<td><code class=\"inline-code\">parse_junit<\/code><\/td>\n<td>JUnit XML \u30ec\u30dd\u30fc\u30c8\u306e\u53d6\u308a\u8fbc\u307f<\/td>\n<td>\u4ed6\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5bfe\u5fdc\u3059\u308b\u305d\u306e\u4ed6\u306e\u30d1\u30fc\u30b5\u30fc\u304c\u3042\u308a\u307e\u3059<\/td>\n<\/tr>\n<tr>\n<td><code class=\"inline-code\">-f<\/code><\/td>\n<td>CI \u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u5185\u306e JUnit \u30d5\u30a1\u30a4\u30eb \u30d1\u30b9<\/td>\n<td>\u6210\u679c\u7269\u306e\u5834\u6240\u306b\u5408\u308f\u305b\u307e\u3059<\/td>\n<\/tr>\n<tr>\n<td><code class=\"inline-code\">--run-description<\/code><\/td>\n<td>\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 \u30ea\u30f3\u30af \uff08CI \u5b9f\u884c URL \u306a\u3069)<\/td>\n<td>\u30c8\u30ec\u30fc\u30b5\u30d3\u30ea\u30c6\u30a3\u3092\u5f37\u5316\u3057\u307e\u3059<\/td>\n<\/tr>\n<tr>\n<td><code class=\"inline-code\">--close-run<\/code><\/td>\n<td>\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5f8c\u306b\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u3067\u30af\u30ed\u30fc\u30ba<\/td>\n<td>\u8907\u6570\u306e CI \u30b9\u30c6\u30c3\u30d7\u306b\u308f\u305f\u3063\u3066\u4e00\u8cab\u6027\u3092\u78ba\u4fdd\u3057\u307e\u3059<\/td>\n<\/tr>\n<tr>\n<td><code class=\"inline-code\">--case_result_statuses:<\/code><\/td>\n<td>\u30b9\u30c6\u30fc\u30bf\u30b9\u540d\u3092\u30ab\u30b9\u30bf\u30e0 TestRail ID \u306b\u30de\u30c3\u30d4\u30f3\u30b0<\/td>\n<td>\u30c1\u30fc\u30e0\u3054\u3068\u306e\u30ab\u30b9\u30bf\u30e0 \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u5b9f\u73fe\u3057\u307e\u3059<\/td>\n<\/tr>\n<tr>\n<td><code class=\"inline-code\">--run-id<\/code><\/td>\n<td>\u65b0\u3057\u3044\u30e9\u30f3\u3092\u4f5c\u6210\u3059\u308b\u4ee3\u308f\u308a\u306b\u65e2\u5b58\u306e\u30e9\u30f3\u306b\u8ffd\u52a0<\/td>\n<td>\u5931\u6557\u3057\u305f\u30c6\u30b9\u30c8\u306e\u518d\u5b9f\u884c\u306b\u4fbf\u5229\u3067\u3059<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 id=\"h_01K1WT2KFSBE96DQYDNMDHRNWX\">\u30d9\u30b9\u30c8 \u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb (<\/strong><code class=\"inline-code\"><code class=\"inline-code\"><\/code><\/code><strong>config.yml<\/strong><strong>)<\/strong> \u3092\u4f7f\u7528\u3057\u3066\u3001\u8a2d\u5b9a (\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3001\u30b9\u30a4\u30fc\u30c8\u3001\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3001\u30d0\u30c3\u30c1 \u30b5\u30a4\u30ba) \u3092\u4e00\u5143\u5316\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u8a8d\u8a3c\u60c5\u5831\u306b\u74b0\u5883\u5909\u6570\u3092\u4f7f\u7528\u3059\u308b &#8211; <\/strong>\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306e\u5916\u3067\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u3092\u4fdd\u7ba1\u3057\u307e\u3059\u3002TRCLI \u306f CLI \u30d5\u30e9\u30b0\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3001\u74b0\u5883\u5909\u6570\u306e\u9806\u306b\u512a\u5148\u3057\u307e\u3059\u3002<\/li>\n<li>TRCLI \u306b\u7d44\u307f\u8fbc\u307e\u308c\u305f<strong>\u30ea\u30c8\u30e9\u30a4\/\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0<\/strong>\u52d5\u4f5c\u3092\u6709\u52b9\u306b\u3057\u3066\u3001TestRail API \u306e\u30ec\u30fc\u30c8\u5236\u9650\u306b\u5bfe\u51e6\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u30d0\u30c3\u30c1 \u30b5\u30a4\u30ba\u306e\u8abf\u6574<\/strong>: \u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u3042\u305f\u308a 50 \u30ec\u30b3\u30fc\u30c9\u3067\u3059\u304c\u3001<code class=\"inline-code\">batch_size<\/code> \u3092\u4f7f\u3063\u3066\u5927\u898f\u6a21\u7528\u306b\u8abf\u6574\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><strong>\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u56fa\u5b9a<\/strong>: \u7279\u306b GitHub \u306e <code class=\"inline-code\">gurock\/trcli-action<\/code> \u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u5834\u5408\u306f\u3001\u5909\u66f4\u3092\u58ca\u3055\u306a\u3044\u3088\u3046\u306b\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u9593\u3067\u4e00\u8cab\u3057\u305f TRCLI \u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"h_01K1WT2KFVTYPF8CW7YGJSF7S3\">\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u30d2\u30f3\u30c8<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>\u7d42\u4e86\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3059\u308b: <code class=\"inline-code\">0<\/code> \u306f\u6210\u529f\u3092\u610f\u5473\u3057\u30010 \u4ee5\u5916\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3084\u8a8d\u8a3c\u306e\u30a8\u30e9\u30fc\u3092\u793a\u3057\u307e\u3059\u3002<\/li>\n<li>\u8a73\u7d30\u306a\u30ed\u30b0\u8a18\u9332\u306e\u305f\u3081\u306b <code class=\"inline-code\">--verbose<\/code> \u307e\u305f\u306f <code class=\"inline-code\">--verify<\/code> \u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/li>\n<li>\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u304c\u5b58\u5728\u3057\u306a\u3044\u305f\u3081\u306b\u5931\u6557\u3059\u308b\u5834\u5408\u306f\u3001 <code class=\"inline-code\">--auto_create_cases_yes<\/code> \u3092\u30aa\u30f3\u306b\u3059\u308b\u304b\u3001\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u304c\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059 (\u4f8b: <code class=\"inline-code\">auto<\/code>\u3001<code class=\"inline-code\">name<\/code>\u3001<code class=\"inline-code\">property<\/code>)\u3002<\/li>\n<li>API \u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3092\u76e3\u8996\u3059\u308b &#8211; \u30ed\u30b0\u306b\u306f\u81ea\u52d5\u7684\u306b\u518d\u8a66\u884c\u304c\u53cd\u6620\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"h_01K1WT2KFWD8WBR4PH4RXHDFY8\">CI\/CD \u7d71\u5408\u306e\u305f\u3081\u306e\u30b9\u30bf\u30fc\u30bf\u30fc \u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/h2>\n<p>\u2705 \u81ea\u52d5\u5316\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u304c JUnit XML \u51fa\u529b\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p>\u2705 CI \u30b8\u30e7\u30d6\u306b TRCLI \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u30b9\u30c6\u30c3\u30d7 (\u4f8b: <code class=\"inline-code\">pip install trcli<\/code>) \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u2705 CI \u74b0\u5883\u5909\u6570\/\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u3092\u4ed5\u69d8\u3057\u3066\u8a8d\u8a3c\u60c5\u5831\u3092\u4fdd\u8b77\u3057\u307e\u3059\u3002<\/p>\n<p>\u2705 <code class=\"inline-code\">parse_junit<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u9069\u5207\u306a\u30d5\u30e9\u30b0\u304a\u3088\u3073\u74b0\u5883\u5909\u6570\u3068\u3068\u3082\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u2705 CI \u5b9f\u884c\u306b\u30ea\u30f3\u30af\u3059\u308b <code class=\"inline-code\">--run-description<\/code> \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u2705 <code class=\"inline-code\">--close-run<\/code> \u3092\u4f7f\u7528\u3057\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3067 <code class=\"inline-code\">--run-id<\/code> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u2705 \u5fc5\u8981\u306b\u5fdc\u3058\u3066 <code class=\"inline-code\">batch_size<\/code>\u3001\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3001\u30b9\u30ec\u30c3\u30c9\u3092\u8abf\u6574\u3057\u307e\u3059\u3002<\/p>\n<p>\u2705 \u30aa\u30d7\u30b7\u30e7\u30f3: <code class=\"inline-code\">--case_result_statuses<\/code>\u3092\u4ecb\u3057\u3066\u30ab\u30b9\u30bf\u30e0 \u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002<\/p>\n<h2 id=\"h_01K1WVBPWDWKDCHFE3S9F4KHWX\">CI\/CD \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u7528\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n<p>TRCLI\u3067 <code class=\"inline-code\">config.yml<\/code> \u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u9759\u7684\u30b3\u30f3\u30d5\u30a3\u30ae\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u30b3\u30de\u30f3\u30c9\u547c\u3073\u51fa\u3057\u306e\u5916\u306b\u51fa\u3059\u3053\u3068\u3067\u3001CI\/CD \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u7c21\u7d20\u5316\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u304c\u3088\u308a\u660e\u78ba\u304b\u3064\u5b89\u5168\u306b\u4fdd\u305f\u308c\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3082\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>\u30b3\u30de\u30f3\u30c9\u3092\u3088\u308a\u7c21\u6f54\u306b\u3059\u308b<\/strong>: <code class=\"inline-code\">--host<\/code>\u3001<code class=\"inline-code\">--project<\/code> \u306a\u3069\u306e\u3088\u3046\u306b\u7e70\u308a\u8fd4\u3055\u308c\u308b\u5f15\u6570\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u7ba1\u7406\u306e\u6539\u5584<\/strong>: \u8a2d\u5b9a\u306b\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u3092\u30cf\u30fc\u30c9\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3059\u308b\u4ee3\u308f\u308a\u306b\u3001\u74b0\u5883\u5909\u6570\u3092\u53c2\u7167\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u79fb\u690d\u6027<\/strong>: \u30ed\u30fc\u30ab\u30eb \u30b9\u30af\u30ea\u30d7\u30c8\u3068 GitHub Actions\u3001GitLab\u3001Jenkins\u3001\u305d\u306e\u4ed6\u306e CI \u30c4\u30fc\u30eb\u3067\u540c\u3058\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u74b0\u5883\u56fa\u6709\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb<\/strong>: \u74b0\u5883\u3054\u3068\u306b\u7570\u306a\u308b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059 (\u4f8b: <code class=\"inline-code\">config.staging.yml<\/code>\u3001<code class=\"inline-code\">config.prod.yml<\/code>)\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4 id=\"h_01K1WY4HJMKV7V8K8QWCH0SJFD\">\u4f8b\uff1a<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">- name: Upload test results to TestRail\n  uses: gurock\/trcli-action@v1\n  with:\n    args: &gt;\n      -y\n      --config .testrail\/config.yml\n      parse_junit\n      -f test-results\/junit.xml<\/pre>\n<h4 id=\"h_01K1WVQR5PGJSMHRPK8EDNEQNT\">\u7d76\u5bfe\u306b\u907f\u3051\u308b\u3079\u304d\u4e8b\u9805:<\/h4>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><code class=\"inline-code\">config.yml<\/code>\u306b\u5b9f\u969b\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u76f4\u63a5\u30cf\u30fc\u30c9\u30b3\u30fc\u30c9\u3059\u308b\u3053\u3068<\/li>\n<li>\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u3092\u542b\u3080 <code class=\"inline-code\">config.yml<\/code> \u3092\u516c\u958b\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30b3\u30df\u30c3\u30c8\u3059\u308b\u3053\u3068<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"h_01K1WXXGJ90HHTAY4TZTMSGCB0\">TRCLI \u7d4c\u7531\u3067\u30c6\u30b9\u30c8\u7d50\u679c\u3092TestRail \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308bGitHub \u30a2\u30af\u30b7\u30e7\u30f3\u306e\u4f8b<\/h2>\n<figure class=\"wysiwyg-media\">\n<div data-oembed-url=\"https:\/\/youtu.be\/CzXnuKbUICs?feature=shared\"><iframe style=\"width: 100%; aspect-ratio: 16 \/ 9;\" src=\"\/\/www.youtube-nocookie.com\/embed\/CzXnuKbUICs?feature=shared\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" allow=\"encrypted-media\">\n<p>\u3053\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306f\u4ee5\u4e0b\u3092\u81ea\u52d5\u5316\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u4f9d\u5b58\u95a2\u4fc2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30c6\u30b9\u30c8\u306e\u5b9f\u884c<\/li>\n<li>TRCLI \u3067 JUnit \u5f62\u5f0f\u306e\u7d50\u679c\u3092 TestRail \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/li>\n<\/ol>\n<pre><code class=\"language-yaml inline-code\">name: Playwright Tests + Upload to TestRail on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test-and-upload: runs-on: ubuntu-latest env: TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }} TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }} TESTRAIL_HOST: https:\/\/yourcompany.testrail.io TESTRAIL_PROJECT: \"My Project Name\" steps: - name: Checkout code uses: actions\/checkout@v4 - name: Set up Node.js uses: actions\/setup-node@v4 with: node-version: 18 - name: Install dependencies run: npm ci - name: Run Playwright tests and generate JUnit report run: | npx playwright install npx playwright test --reporter=junit continue-on-error: true # Always upload results, even if tests fail - name: Upload results to TestRail uses: gurock\/trcli-action@v1 with: args: &gt; -y --host ${{ env.TESTRAIL_HOST }} --project \"${{ env.TESTRAIL_PROJECT }}\" --username \"${{ env.TESTRAIL_USERNAME }}\" --password \"${{ env.TESTRAIL_API_KEY }}\" parse_junit -f test-results\/junit.xml --title \"GitHub Run #${{ github.run_number }}\" --run-description \"GitHub Actions run: ${{ github.server_url }}\/${{ github.repository }}\/actions\/runs\/${{ github.run_id }}\" --close-run<\/code><\/pre>\n<h3 id=\"h_01K1WSJ6N1KM6C4VM4GJZ011AJ\">\u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a<\/h3>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u304c\u516c\u958b\u3055\u308c\u308b\u306e\u3092\u9632\u3050\u306b\u306f\u3001\u6b21\u306e\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li><strong>[GitHub] &gt; \u30ea\u30dd\u30b8\u30c8\u30ea &gt; [Settings] &gt; [Secrets and variables] &gt; [Action]<\/strong> \u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/li>\n<li>\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\n<ul>\n<li><code class=\"inline-code\">TESTRAIL_USERNAME<\/code>: TestRail \u30ed\u30b0\u30a4\u30f3\u7528\u96fb\u5b50\u30e1\u30fc\u30eb \u30a2\u30c9\u30ec\u30b9\u3067\u3059<\/li>\n<li><code class=\"inline-code\">TESTRAIL_API_KEY<\/code>: TestRail API \u30c8\u30fc\u30af\u30f3 (<em>[\u500b\u4eba\u8a2d\u5b9a] &gt; [API \u30ad\u30fc]<\/em> \u3067\u53c2\u7167\u3067\u304d\u307e\u3059)<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 id=\"h_01K1WSHYCK5G6Q1TFCRHT3X6SC\">\u6ce8\u610f<\/h3>\n<ul>\n<li><code class=\"inline-code\">--close-run<\/code> \u306f\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5f8c\u3059\u3050\u306b\u30e9\u30f3\u3092\u30af\u30ed\u30fc\u30ba\u3057\u307e\u3059\u3002<\/li>\n<li><code class=\"inline-code\">--run-description<\/code> \u306b\u306f\u3001TestRail \u5185\u3067\u30af\u30ea\u30c3\u30af\u53ef\u80fd\u306a GitHub Actions \u3078\u306e\u30ea\u30f3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u51fa\u529b\u306b\u5408\u308f\u305b\u3066 <code class=\"inline-code\">test-results\/junit.xml<\/code> \u3092\u8abf\u6574\u3057\u307e\u3059\u3002<\/li>\n<li><code class=\"inline-code\">continue-on-error: true<\/code> \u306f\u3001\u30c6\u30b9\u30c8\u304c\u5931\u6557\u3057\u3066\u3082\u7d50\u679c\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"h_01K1WSM589JG89G32H1GD08BJX\">\u4e26\u5217\u30b8\u30e7\u30d6\u304a\u3088\u3073\u5358\u4e00\u30e9\u30f3\u7528 GitHub Action \u306e\u4f8b<\/h2>\n<p>\u3053\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u3088\u308a\u3001\u8907\u6570\u306e\u30c6\u30b9\u30c8 \u30b8\u30e7\u30d6\u304c\u7d50\u679c\u3092\u5171\u901a\u306e TestRail \u30e9\u30f3\u306b\u30d7\u30c3\u30b7\u30e5\u3067\u304d\u3001\u8907\u6570\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u30c6\u30b9\u30c8 \u30b9\u30a4\u30fc\u30c8\u5168\u4f53\u306e\u5b9f\u884c\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-yaml inline-code\">name: Parallel Playwright Tests + TestRail Upload on: workflow_dispatch: push: branches: [ main ] pull_request: branches: [ main ] jobs: create-run: runs-on: ubuntu-latest outputs: run-id: ${{ steps.create-run.outputs.run-id }} env: TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }} TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }} TESTRAIL_HOST: https:\/\/yourcompany.testrail.io TESTRAIL_PROJECT: \"My Project Name\" steps: - name: Create TestRail run id: create-run run: | pip install trcli RUN_ID=$(trcli -y  --host \"$TESTRAIL_HOST\"  --project \"$TESTRAIL_PROJECT\"  --username \"$TESTRAIL_USERNAME\"  --password \"$TESTRAIL_API_KEY\"  create_run  --title \"CI Run #${{ github.run_number }}\"  --run-description \"Triggered by GitHub Actions\"  --suite-id 1  --json | jq -r '.id') echo \"run-id=$RUN_ID\" &gt;&gt; \"$GITHUB_OUTPUT\" test-linux: needs: create-run runs-on: ubuntu-latest env: TESTRAIL_RUN_ID: ${{ needs.create-run.outputs.run-id }} TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }} TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }} TESTRAIL_HOST: https:\/\/yourcompany.testrail.io TESTRAIL_PROJECT: \"My Project Name\" steps: - name: Checkout code uses: actions\/checkout@v4 - name: Set up Node.js uses: actions\/setup-node@v4 with: node-version: 18 - name: Install dependencies run: npm ci - name: Run Playwright tests (Linux) run: | npx playwright install npx playwright test --reporter=junit continue-on-error: true - name: Upload results (Linux) uses: gurock\/trcli-action@v1 with: args: &gt; -y --host ${{ env.TESTRAIL_HOST }} --project \"${{ env.TESTRAIL_PROJECT }}\" --username \"${{ env.TESTRAIL_USERNAME }}\" --password \"${{ env.TESTRAIL_API_KEY }}\" parse_junit -f test-results\/junit.xml --run-id ${{ env.TESTRAIL_RUN_ID }} test-windows: needs: create-run runs-on: windows-latest env: TESTRAIL_RUN_ID: ${{ needs.create-run.outputs.run-id }} TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }} TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }} TESTRAIL_HOST: https:\/\/yourcompany.testrail.io TESTRAIL_PROJECT: \"My Project Name\" steps: - name: Checkout code uses: actions\/checkout@v4 - name: Set up Node.js uses: actions\/setup-node@v4 with: node-version: 18 - name: Install dependencies run: npm ci - name: Run Playwright tests (Windows) run: | npx playwright install npx playwright test --reporter=junit continue-on-error: true - name: Upload results (Windows) uses: gurock\/trcli-action@v1 with: args: &gt; -y --host ${{ env.TESTRAIL_HOST }} --project \"${{ env.TESTRAIL_PROJECT }}\" --username \"${{ env.TESTRAIL_USERNAME }}\" --password \"${{ env.TESTRAIL_API_KEY }}\" parse_junit -f test-results\/junit.xml --run-id ${{ env.TESTRAIL_RUN_ID }} close-run: needs: [test-linux, test-windows] runs-on: ubuntu-latest env: TESTRAIL_RUN_ID: ${{ needs.create-run.outputs.run-id }} TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }} TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }} TESTRAIL_HOST: https:\/\/yourcompany.testrail.io TESTRAIL_PROJECT: \"My Project Name\" steps: - name: Close the TestRail run run: | pip install trcli trcli -y  --host \"$TESTRAIL_HOST\"  --project \"$TESTRAIL_PROJECT\"  --username \"$TESTRAIL_USERNAME\"  --password \"$TESTRAIL_API_KEY\"  close_run  --run-id $TESTRAIL_RUN_ID<\/code><\/pre>\n<h2 id=\"h_01K1WSNB141QQC9NW3NMWZ7GGB\">\u3053\u306e\u69cb\u9020\u306e\u7406\u7531<\/h2>\n<ul>\n<li><code class=\"inline-code\">create-run<\/code> \u306f\u3001\u3059\u3079\u3066\u306e\u30c6\u30b9\u30c8\u30b8\u30e7\u30d6\u3067\u4f7f\u7528\u3055\u308c\u308b TestRail \u306e\u30e9\u30f3 ID \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>\u5404\u30c6\u30b9\u30c8 \u30b8\u30e7\u30d6\u306f\u3001 <code class=\"inline-code\">--run-id<\/code>\u3092\u4f7f\u7528\u3057\u3066\u500b\u5225\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/li>\n<li><code class=\"inline-code\">close-run<\/code> \u306f\u3059\u3079\u3066\u306e\u7d50\u679c\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u305f\u5f8c\u306b\u3060\u3051\u30e9\u30f3\u3092\u30af\u30ed\u30fc\u30ba\u3057\u307e\u3059\u3002<\/li>\n<li>\u3088\u308a\u591a\u304f\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3084\u30de\u30c8\u30ea\u30af\u30b9 \u30d3\u30eb\u30c9\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u7c21\u5358\u306b\u62e1\u5f35\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<hr \/>\n<div style=\"background-color: #f0f6fc; border-left: 5px solid #0072CE; border-radius: 6px; padding: 16px;\">\n<p style=\"font-size: 16px;\">\ud83c\udf93 <strong><\/strong><span style=\"color: #0072ce;\"><strong>TestRail Academy<\/strong><\/span> \u3067\u30c6\u30b9\u30c8 \u30b9\u30ad\u30eb\u3092\u5411\u4e0a\u3055\u305b\u307e\u3057\u3087\u3046\u3002<strong><\/strong><br \/>\u7121\u511f\u306e\u81ea\u5df1\u5b66\u7fd2\u578b\u30b3\u30fc\u30b9\u3067 TestRail \u3092\u6d3b\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\ud83d\udc49 <a style=\"color: #0072ce;\" href=\"https:\/\/academy.testrail.com\/plus\/catalog\/courses\/139\" target=\"_blank\" rel=\"noopener noreferrer\"><strong><span class=\"wysiwyg-underline\">\u4eca\u3059\u3050\u5b66\u7fd2\u3092\u59cb\u3081\u308b<\/span><\/strong><\/a><\/p>\n<p><a href=\"https:\/\/academy.testrail.com\/plus\/catalog\/courses\/139\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/support.testrail.com\/hc\/article_attachments\/39966093144980\" alt=\"1679917783_TestRail_Academy_Course_Banner_Image.png\" width=\"1170\" height=\"449\" \/><\/a><\/p>\n<\/div>\n<h2 id=\"h_01K1JXF5NYFRTAWRXBRKSRAT4D\">\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/support.testrail.com\/hc\/en-us\/articles\/7146548750868-Overview-and-installation\" target=\"_blank\" rel=\"noopener noreferrer\">TRCLI \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/gurock\/testrail-cli\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub: testrail-cli<\/a><\/li>\n<li><a href=\"https:\/\/support.testrail.com\" target=\"_blank\" rel=\"noopener noreferrer\">TestRail \u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u306e\u30de\u30cb\u30e5\u30a2\u30eb<\/a><\/li>\n<\/ul>\n<p><\/p><\/iframe><\/div>\n<\/figure>\n\n\n<p>\u3053\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306f\u4ee5\u4e0b\u3092\u81ea\u52d5\u5316\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4f9d\u5b58\u95a2\u4fc2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30c6\u30b9\u30c8\u306e\u5b9f\u884c<\/li>\n\n\n\n<li>TRCLI \u3067 JUnit \u5f62\u5f0f\u306e\u7d50\u679c\u3092 TestRail \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">name: Playwright Tests + Upload to TestRail\n\non:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n\njobs:\n  test-and-upload:\n    runs-on: ubuntu-latest\n    env:\n      TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}\n      TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}\n      TESTRAIL_HOST: https:\/\/yourcompany.testrail.io\n      TESTRAIL_PROJECT: \"My Project Name\"\n\n    steps:\n      - name: Checkout code\n        uses: actions\/checkout@v4\n\n      - name: Set up Node.js\n        uses: actions\/setup-node@v4\n        with:\n          node-version: 18\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run Playwright tests and generate JUnit report\n        run: |\n          npx playwright install\n          npx playwright test --reporter=junit\n        continue-on-error: true  # Always upload results, even if tests fail\n\n      - name: Upload results to TestRail\n        uses: gurock\/trcli-action@v1\n        with:\n          args: &gt;\n            -y\n            --host ${{ env.TESTRAIL_HOST }}\n            --project \"${{ env.TESTRAIL_PROJECT }}\"\n            --username \"${{ env.TESTRAIL_USERNAME }}\"\n            --password \"${{ env.TESTRAIL_API_KEY }}\"\n            parse_junit\n            -f test-results\/junit.xml\n            --title \"GitHub Run #${{ github.run_number }}\"\n            --run-description \"GitHub Actions run: ${{ github.server_url }}\/${{ github.repository }}\/actions\/runs\/${{ github.run_id }}\"\n            --close-run<\/pre>\n<h3 class=\"wp-block-heading\" id=\"h_01K1WSJ6N1KM6C4VM4GJZ011AJ\">\u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a<\/h3>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u304c\u516c\u958b\u3055\u308c\u308b\u306e\u3092\u9632\u3050\u306b\u306f\u3001\u6b21\u306e\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol class=\"wp-block-list\">\n<li><strong>[GitHub] &gt; \u30ea\u30dd\u30b8\u30c8\u30ea &gt; [Settings] &gt; [Secrets and variables] &gt; [Action]<\/strong>\u00a0\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/li>\n<li>\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\n<ul class=\"wp-block-list\">\n<li><code>TESTRAIL_USERNAME<\/code>: TestRail \u30ed\u30b0\u30a4\u30f3\u7528\u96fb\u5b50\u30e1\u30fc\u30eb \u30a2\u30c9\u30ec\u30b9\u3067\u3059<\/li>\n<li><code>TESTRAIL_API_KEY<\/code>: TestRail API \u30c8\u30fc\u30af\u30f3 (<em>[\u500b\u4eba\u8a2d\u5b9a] &gt; [API \u30ad\u30fc]<\/em>\u00a0\u3067\u53c2\u7167\u3067\u304d\u307e\u3059)<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h3 class=\"wp-block-heading ip-location-block-dropup ip-location-block-dropdown\" id=\"h_01K1WSHYCK5G6Q1TFCRHT3X6SC\">\u6ce8\u610f<\/h3>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"wp-block-list\">\n<li><code>--close-run<\/code>\u00a0\u306f\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5f8c\u3059\u3050\u306b\u30e9\u30f3\u3092\u30af\u30ed\u30fc\u30ba\u3057\u307e\u3059\u3002<\/li>\n<li><code>--run-description<\/code>\u00a0\u306b\u306f\u3001TestRail \u5185\u3067\u30af\u30ea\u30c3\u30af\u53ef\u80fd\u306a GitHub Actions \u3078\u306e\u30ea\u30f3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u51fa\u529b\u306b\u5408\u308f\u305b\u3066\u00a0<code>test-results\/junit.xml<\/code>\u00a0\u3092\u8abf\u6574\u3057\u307e\u3059\u3002<\/li>\n<li><code>continue-on-error: true<\/code>\u00a0\u306f\u3001\u30c6\u30b9\u30c8\u304c\u5931\u6557\u3057\u3066\u3082\u7d50\u679c\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h_01K1WSM589JG89G32H1GD08BJX\"><span id=\"_GitHub_Action-2\">\u4e26\u5217\u30b8\u30e7\u30d6\u304a\u3088\u3073\u5358\u4e00\u30e9\u30f3\u7528 GitHub Action \u306e\u4f8b<\/span><\/h2>\n<p>\u3053\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u3088\u308a\u3001\u8907\u6570\u306e\u30c6\u30b9\u30c8 \u30b8\u30e7\u30d6\u304c\u7d50\u679c\u3092\u5171\u901a\u306e TestRail \u30e9\u30f3\u306b\u30d7\u30c3\u30b7\u30e5\u3067\u304d\u3001\u8907\u6570\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u30c6\u30b9\u30c8 \u30b9\u30a4\u30fc\u30c8\u5168\u4f53\u306e\u5b9f\u884c\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">name: Parallel Playwright Tests + TestRail Upload\n\non:\n  workflow_dispatch:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n\njobs:\n  create-run:\n    runs-on: ubuntu-latest\n    outputs:\n      run-id: ${{ steps.create-run.outputs.run-id }}\n    env:\n      TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}\n      TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}\n      TESTRAIL_HOST: https:\/\/yourcompany.testrail.io\n      TESTRAIL_PROJECT: \"My Project Name\"\n    steps:\n      - name: Create TestRail run\n        id: create-run\n        run: |\n          pip install trcli\n          RUN_ID=$(trcli -y \\\n            --host \"$TESTRAIL_HOST\" \\\n            --project \"$TESTRAIL_PROJECT\" \\\n            --username \"$TESTRAIL_USERNAME\" \\\n            --password \"$TESTRAIL_API_KEY\" \\\n            create_run \\\n            --title \"CI Run #${{ github.run_number }}\" \\\n            --run-description \"Triggered by GitHub Actions\" \\\n            --suite-id 1 \\\n            --json | jq -r '.id')\n          echo \"run-id=$RUN_ID\" &gt;&gt; \"$GITHUB_OUTPUT\"\n\n  test-linux:\n    needs: create-run\n    runs-on: ubuntu-latest\n    env:\n      TESTRAIL_RUN_ID: ${{ needs.create-run.outputs.run-id }}\n      TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}\n      TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}\n      TESTRAIL_HOST: https:\/\/yourcompany.testrail.io\n      TESTRAIL_PROJECT: \"My Project Name\"\n    steps:\n      - name: Checkout code\n        uses: actions\/checkout@v4\n\n      - name: Set up Node.js\n        uses: actions\/setup-node@v4\n        with:\n          node-version: 18\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run Playwright tests (Linux)\n        run: |\n          npx playwright install\n          npx playwright test --reporter=junit\n        continue-on-error: true\n\n      - name: Upload results (Linux)\n        uses: gurock\/trcli-action@v1\n        with:\n          args: &gt;\n            -y\n            --host ${{ env.TESTRAIL_HOST }}\n            --project \"${{ env.TESTRAIL_PROJECT }}\"\n            --username \"${{ env.TESTRAIL_USERNAME }}\"\n            --password \"${{ env.TESTRAIL_API_KEY }}\"\n            parse_junit\n            -f test-results\/junit.xml\n            --run-id ${{ env.TESTRAIL_RUN_ID }}\n\n  test-windows:\n    needs: create-run\n    runs-on: windows-latest\n    env:\n      TESTRAIL_RUN_ID: ${{ needs.create-run.outputs.run-id }}\n      TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}\n      TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}\n      TESTRAIL_HOST: https:\/\/yourcompany.testrail.io\n      TESTRAIL_PROJECT: \"My Project Name\"\n    steps:\n      - name: Checkout code\n        uses: actions\/checkout@v4\n\n      - name: Set up Node.js\n        uses: actions\/setup-node@v4\n        with:\n          node-version: 18\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run Playwright tests (Windows)\n        run: |\n          npx playwright install\n          npx playwright test --reporter=junit\n        continue-on-error: true\n\n      - name: Upload results (Windows)\n        uses: gurock\/trcli-action@v1\n        with:\n          args: &gt;\n            -y\n            --host ${{ env.TESTRAIL_HOST }}\n            --project \"${{ env.TESTRAIL_PROJECT }}\"\n            --username \"${{ env.TESTRAIL_USERNAME }}\"\n            --password \"${{ env.TESTRAIL_API_KEY }}\"\n            parse_junit\n            -f test-results\/junit.xml\n            --run-id ${{ env.TESTRAIL_RUN_ID }}\n\n  close-run:\n    needs: [test-linux, test-windows]\n    runs-on: ubuntu-latest\n    env:\n      TESTRAIL_RUN_ID: ${{ needs.create-run.outputs.run-id }}\n      TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}\n      TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}\n      TESTRAIL_HOST: https:\/\/yourcompany.testrail.io\n      TESTRAIL_PROJECT: \"My Project Name\"\n    steps:\n      - name: Close the TestRail run\n        run: |\n          pip install trcli\n          trcli -y \\\n            --host \"$TESTRAIL_HOST\" \\\n            --project \"$TESTRAIL_PROJECT\" \\\n            --username \"$TESTRAIL_USERNAME\" \\\n            --password \"$TESTRAIL_API_KEY\" \\\n            close_run \\\n            --run-id $TESTRAIL_RUN_ID<\/pre>\n<h2 class=\"wp-block-heading\" id=\"h_01K1WSNB141QQC9NW3NMWZ7GGB\"><span id=\"i-7\">\u3053\u306e\u69cb\u9020\u306e\u7406\u7531<\/span><\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"wp-block-list\">\n<li><code>create-run<\/code>\u00a0\u306f\u3001\u3059\u3079\u3066\u306e\u30c6\u30b9\u30c8\u30b8\u30e7\u30d6\u3067\u4f7f\u7528\u3055\u308c\u308b TestRail \u306e\u30e9\u30f3 ID \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>\u5404\u30c6\u30b9\u30c8 \u30b8\u30e7\u30d6\u306f\u3001\u00a0<code>--run-id<\/code>\u3092\u4f7f\u7528\u3057\u3066\u500b\u5225\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/li>\n<li><code>close-run<\/code>\u00a0\u306f\u3059\u3079\u3066\u306e\u7d50\u679c\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u305f\u5f8c\u306b\u3060\u3051\u30e9\u30f3\u3092\u30af\u30ed\u30fc\u30ba\u3057\u307e\u3059\u3002<\/li>\n<li>\u3088\u308a\u591a\u304f\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3084\u30de\u30c8\u30ea\u30af\u30b9 \u30d3\u30eb\u30c9\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u7c21\u5358\u306b\u62e1\u5f35\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h_01K1JXF5NYFRTAWRXBRKSRAT4D\"><span id=\"i-8\">\u53c2\u8003\u60c5\u5831<\/span><\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/test-automation\/testrail-cli\/overview-and-installation\/\" target=\"_blank\" rel=\"noopener\">TRCLI \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/gurock\/trcli\" target=\"_blank\" rel=\"noopener\">GitHub: testrail-cli<\/a><\/li>\n<li><a href=\"\/\" target=\"_blank\" rel=\"noopener\">TestRail \u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u306e\u30de\u30cb\u30e5\u30a2\u30eb<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>TRCLI \u304c\u5bb9\u6613\u306b CI\/CD \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u9069\u5408\u3059\u308b\u7406\u7531 TRCLI \u306f TestRail \u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3 \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u3042\u308a\u3001API \u3092\u4ecb\u3057\u3066 TestRail \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3078\u306e\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u81ea\u52d5\u5316\u3057 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":24151,"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-27854","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/27854","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=27854"}],"version-history":[{"count":15,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/27854\/revisions"}],"predecessor-version":[{"id":29717,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/27854\/revisions\/29717"}],"up":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/24151"}],"wp:attachment":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/media?parent=27854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}