{"id":17787,"date":"2023-01-05T07:51:34","date_gmt":"2023-01-05T07:51:34","guid":{"rendered":"https:\/\/44.225.35.201\/testrail\/docs\/801\/server-guide\/customizations-and-extensions\/custom-report-plugins\/reports-building-a-custom-report-plugin-1-3\/"},"modified":"2023-09-12T13:44:59","modified_gmt":"2023-09-12T04:44:59","slug":"custom-report-1","status":"publish","type":"page","link":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/server-guide\/customizations-and-extensions\/custom-report-plugins\/custom-report-1\/","title":{"rendered":"\u30ab\u30b9\u30bf\u30e0 \u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210 (1\/3)"},"content":{"rendered":"<p><strong><a href=\"\/custom-reports-introduction\/\" target=\"_blank\" rel=\"noopener\">\u30ab\u30b9\u30bf\u30e0 \u30ec\u30dd\u30fc\u30c8:\u306f\u3058\u3081\u306b<\/a><\/strong>\u3067\u8ff0\u3079\u305f\u3088\u3046\u306b \u3001\u30ec\u30dd\u30fc\u30c8\u306f PHP \u3067\u958b\u767a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u72ec\u81ea\u306e\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u307e\u305f\u306f\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001PHP \u306b\u3064\u3044\u3066\u306e\u57fa\u672c\u7684\u306a\u77e5\u8b58\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u30ec\u30dd\u30fc\u30c8\u95a2\u9023\u306e\u7528\u8a9e\u304a\u3088\u3073\u30ec\u30dd\u30fc\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u57fa\u672c\u69cb\u9020\u3092\u307e\u3060\u3088\u304f\u7406\u89e3\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u5148\u306b\u305d\u3061\u3089\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u5b8c\u5168\u306b\u6a5f\u80fd\u3059\u308b\u30b5\u30f3\u30d7\u30eb \u30ab\u30b9\u30bf\u30e0 \u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u8a73\u3057\u304f\u8aac\u660e\u3057\u307e\u3059\u3002\u3053\u306e\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u76ee\u7684\u306f\u3001\u8a2d\u5b9a\u3055\u308c\u305f\u30b9\u30b3\u30fc\u30d7 (\u30de\u30a4\u30eb\u30b9\u30c8\u30fc\u30f3\u3084\u30c6\u30b9\u30c8\u8a08\u753b\/\u30e9\u30f3\u306a\u3069) \u3067\u306e\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u306e\u30bf\u30a4\u30d7\u304a\u3088\u3073\u512a\u5148\u9806\u4f4d\u3054\u3068\u306e\u7d50\u679c\u5206\u5e03\u3092\u8868\u793a\u3059\u308b\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u5b8c\u5168\u306a\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f GitHub \u3067\u3082\u5165\u624b\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"callout callout--success\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"https:\/\/github.com\/gurock\/testrail-custom\/tree\/master\/reports\/tests_property_results\/4.x\" target=\"_blank\" rel=\"noopener\"><em class=\"fas fa-download\">\u00a0<\/em> \u201cTests: Property Results\u201d \u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3 (TestRail 4.x \u4ee5\u964d)<\/a>\n<ul>\n<li>TestRail 4.x \u4ee5\u964d\u7528\u306e PHP\/CSS\/JS \u30b3\u30fc\u30c9\u304c\u3042\u308b GitHub \u30ea\u30dd\u30b8\u30c8\u30ea<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"callout callout--success\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"https:\/\/github.com\/gurock\/testrail-custom\/tree\/master\/reports\/tests_property_results\/3.x\" target=\"_blank\" rel=\"noopener\"><em class=\"fas fa-download\">\u00a0<\/em> \u201cTests: Property Results\u201d \u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3 (TestRail 3.x)<\/a>\n<ul>\n<li>TestRail 3.x \u7528\u306e PHP\/CSS\/JS \u30b3\u30fc\u30c9\u304c\u3042\u308b GitHub \u30ea\u30dd\u30b8\u30c8\u30ea<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"callout callout--info\">\n<p class=\"callout__title callout__icon\"><em class=\"fas fa-info-circle\">\u00a0<\/em>[et_pb_text admin_label=&#8221;Note&#8221; _builder_version=&#8221;4.4.2&#8243; background_color=&#8221;#F0F8FF&#8221; hover_enabled=&#8221;0&#8243; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#b0c4de&#8221;]<\/p>\n<p>\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001TestRail \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u591a\u5c11\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059 (\u305f\u3068\u3048\u3070\u30ec\u30dd\u30fc\u30c8 \u30d5\u30a9\u30fc\u30e0\u306e\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u306a\u3069)\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001TestRail \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u4e00\u81f4\u3059\u308b GitHub \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3001TestRail \u30d0\u30fc\u30b8\u30e7\u30f3 (4.x) \u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text]<\/p>\n<\/div>\n<h2>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u521d\u671f\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/h2>\n<p>\u6700\u521d\u306b\u3001\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u7528\u306e\u65b0\u3057\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u521d\u671f\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u540d\u524d\u306b\u306f\u3001\u30ec\u30dd\u30fc\u30c8\u306e\u76ee\u7684\u3084\u4e3b\u8981\u306a\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u542b\u3081\u308b\u306e\u304c\u9069\u5207\u3067\u3059\u3002\u547d\u540d\u898f\u5247\u3068\u3057\u3066\u3001\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3 (\u305f\u3068\u3048\u3070 \u201ctests\u201d) \u3092\u5148\u982d\u306b\u7f6e\u304d\u3001\u30ec\u30dd\u30fc\u30c8\u306e\u5185\u5bb9\u3092\u8868\u3059\u7c21\u5358\u306a\u8aac\u660e\u3092\u8ffd\u52a0\u3057\u307e\u3059 (\u201cproperty_results\u201d \u306a\u3069)\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u6b21\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre>tests_property_results\/\ntests_property_results\/about.json\ntests_property_results\/i18n\/\ntests_property_results\/i18n\/translations\/\ntests_property_results\/i18n\/translations\/en\/reports_tpr.php\ntests_property_results\/report.php<\/pre>\n<p>about.json \u306f\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8aac\u660e\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308a\u3001report.php \u306b\u306f PHP \u30d9\u30fc\u30b9\u306e\u5b9f\u88c5\u30af\u30e9\u30b9\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u3002i18n \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u306f\u7ffb\u8a33\u30d5\u30a1\u30a4\u30eb\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>about.json<\/h3>\n<p>\u8aac\u660e\u30d5\u30a1\u30a4\u30eb\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3001\u30e9\u30d9\u30eb (\u540d\u524d)\u3001\u8aac\u660e\u306a\u3069\u306e\u307b\u304b\u3001\u7ffb\u8a33\u30d5\u30a1\u30a4\u30eb\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">{\n  \"author\": \"Gurock Software\",\n  \"version\": 1,\n  \"label\": \"l:reports_tpr_meta_label\",\n  \"summary\": \"l:reports_tpr_meta_summary\",\n  \"description\": \"l:reports_tpr_meta_description\",\n  \"group\": \"l:reports_tpr_meta_group\",\n  \"translations\": [\"reports_tpr\"]\n}<\/pre>\n<h3>reports_tpr.php<\/h3>\n<p>\u7ffb\u8a33\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u8aac\u660e\u30d5\u30a1\u30a4\u30eb\u3067\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u521d\u671f\u6587\u5b57\u5217\u3067\u8a2d\u5b9a\u3055\u308c\u3001TestRail \u306e Reports \u30a8\u30ea\u30a2\u306e\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3069\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u304b\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">$lang['reports_tpr_meta_label'] = 'Property Results';\n$lang['reports_tpr_meta_group'] = 'Samples';\n$lang['reports_tpr_meta_summary'] = 'Demonstrates how to develop custom report plugins.';\n$lang['reports_tpr_meta_description'] = 'Demonstrates how to develop custom report plugins and serves as a reference for new report plugins.';<\/pre>\n<p>\u4ed6\u306e\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u306e\u540d\u524d\u304c\u7af6\u5408\u3059\u308b\u30ea\u30b9\u30af\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u305f\u3081\u306b\u3001\u7ffb\u8a33\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u306f\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u540d (tests_property_results -&gt; tpr) \u3068\u95a2\u9023\u4ed8\u3051\u308b\u3079\u304d\u3067\u3059\u3002<\/p>\n<h3>report.php<\/h3>\n<p>report.php \u306b\u306f\u5b9f\u969b\u306e\u30ec\u30dd\u30fc\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5b9f\u88c5\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u30ec\u30dd\u30fc\u30c8 \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8868\u793a\u304a\u3088\u3073\u691c\u8a3c\u3092\u884c\u3046\u305f\u3081\u306e\u3059\u3079\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u3001\u3055\u3089\u306b\u5b9f\u969b\u306e\u30ec\u30dd\u30fc\u30c8\u306e\u8868\u793a\u51e6\u7406\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u6982\u8981\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059 (\u901a\u5e38\u306f\u7701\u7565\u3055\u308c\u308b\u8ffd\u52a0\u306e\u30b3\u30e1\u30f3\u30c8\u4ed8\u304d)\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">class Tests_property_results_report_plugin extends Report_plugin\n{\n  public function render_form($context)\n  {\n    ..\n  }\n \n  \/**\n   * Run\n   *\n   * Expected to generate the static HTML page for the report. Is\n   * passed the previously configured report parameters (custom\n   * options). Is expected to return an array with the following\n   * keys:\n   *\n   * html:        The HTML content as string (should only be used\n   *              for smaller reports or during development).\n   * html_file:   The path of the static HTML file as string. This\n   *              is an alternative and the recommended way to\n   *              return the HTML. This should point to a temporary\n   *              file which is automatically deleted by TestRail\n   *              after 'run' was executed.\n   * resources:   Array of resource files to copy to the output\n   *              directories (optional).\n   *\/\n  public function run($context, $options)\n  {\n    ..\n  }\n  \n  ..\n}<\/pre>\n<p>TestRail \u306f\u3001\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u306e\u5f8c\u308d\u306b \u201c_report_plugin\u201d \u304c\u4ed8\u3044\u305f\u540d\u524d\u306e\u30af\u30e9\u30b9\u3092\u671f\u5f85\u3057\u307e\u3059\u3002\u307e\u305f\u3001 \u201cReport_plugin\u201d \u3068\u3044\u3046\u540d\u524d\u306e\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u57fa\u5e95\u30af\u30e9\u30b9\u304b\u3089\u6d3e\u751f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8<\/h3>\n<p>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u3092\u9664\u3044\u3066\u3001report.php \u306e\u5404\u30e1\u30bd\u30c3\u30c9\u306b\u306f\u3001\u30ec\u30dd\u30fc\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u307e\u305f\u306f\u74b0\u5883\u306b\u95a2\u3059\u308b\u8a73\u7d30\u3092\u542b\u3080 $context \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u6e21\u3055\u308c\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u3053\u308c\u306b\u306f\u73fe\u5728\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304a\u3088\u3073\u95a2\u9023\u30aa\u30d7\u30b7\u30e7\u30f3 (\u30ab\u30b9\u30bf\u30e0 \u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30b9\u30ad\u30fc\u30e0\u306a\u3069) \u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30a9\u30fc\u30e0<\/h2>\n<p>TestRail \u3067\u306f\u3001\u3059\u3079\u3066\u306e\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u30d5\u30a9\u30fc\u30e0\u304c\u5fc5\u8981\u3067\u3059\u3002\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u306f\u3001\u975e\u5e38\u306b\u57fa\u672c\u7684\u306a\u7a7a\u306e\u30d5\u30a9\u30fc\u30e0\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001report.php \u306e prepare_form \u3068 validate_form \u306f\u7121\u8996\u3057\u3066\u3001render_form \u3060\u3051\u306b\u6ce8\u76ee\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">public function render_form($context)\n{\n  $params = array(\n    'project' =&gt; $context['project']\n  );\n \n  return array(\n    'form' =&gt; $this-&gt;render_view(\n      'form',\n      $params,\n      true\n    )\n  );\n}<\/pre>\n<p>render_form \u306f\u3001\u300c\u30d5\u30a9\u30fc\u30e0\u300d\u3068\u547c\u3070\u308c\u308b\u30d3\u30e5\u30fc\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u3001\u305d\u306e\u7d50\u679c\u3092 TestRail \u306b\u8fd4\u3057\u307e\u3059\u3002\u30d3\u30e5\u30fc\u306f\u3001\u9759\u7684 HTML \u30d5\u30a1\u30a4\u30eb\u306e\u751f\u6210\u3092\u62c5\u5f53\u3059\u308b\u5358\u7d14\u306a PHP \u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u30d3\u30e5\u30fc\u306b\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u6e21\u3059\u3053\u3068\u304c\u3067\u304d\u3001\u6e21\u3055\u308c\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306f\u30d3\u30e5\u30fc\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u74b0\u5883\u3067\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u30d3\u30e5\u30fc\u306f\u30ec\u30dd\u30fc\u30c8\u30d7\u30e9\u30b0\u30a4\u30f3\u306e \u201cviews\u201d \u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u7f6e\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4eca\u56de\u306f form.php \u306f\u7a7a\u306e\u307e\u307e\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre>tests_property_results\/views\/\ntests_property_results\/views\/form.php<\/pre>\n<p>\u30d5\u30a9\u30fc\u30e0\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u76f4\u63a5\u8fd4\u3059\u3053\u3068\u3082\u3001\u914d\u5217\u306e\u5f62\u3067\u3088\u308a\u8907\u96d1\u306a\u7d50\u679c\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u5c06\u6765\u306e\u5909\u66f4\u306b\u5099\u3048\u3066\u5f8c\u8005\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30ec\u30dd\u30fc\u30c8\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0<\/h2>\n<p>\u30ec\u30dd\u30fc\u30c8\u306f \u201crun\u201d \u306b\u3088\u3063\u3066\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u9759\u7684 HTML\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u3066\u30ec\u30dd\u30fc\u30c8\u304c\u53c2\u7167\u3059\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u30ea\u30b9\u30c8\u3068\u5171\u306b\u8fd4\u3059\u3053\u3068\u304c\u671f\u5f85\u3055\u308c\u3066\u3044\u307e\u3059\u3002report.php \u306e \u6700\u5c0f\u9650\u306e\u5b9f\u88c5\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">class Tests_property_results_report_plugin extends Report_plugin\n{\n  \/\/ The resources (files) to copy to the output directory when\n  \/\/ generating a report.\n  private static $_resources = array(\n    'js\/jquery.js',\n    'styles\/print.css',\n    'styles\/reset.css',\n    'styles\/view.css'\n  );\n \n  ..\n \n  public function run($context, $options)\n  {\n    $project = $context['project'];\n \n    \/\/ Render the report to a temporary file and return the path\n    \/\/ to TestRail (including additional resources that need to be\n    \/\/ copied).\n    return array(\n      'resources' =&gt; self::$_resources,\n      'html_file' =&gt; $this-&gt;render_page(\n        'index',\n        array(\n          'report' =&gt; $context['report'],\n          'project' =&gt; $project\n        )\n      )\n    );\n  }\n}<\/pre>\n<p>\u901a\u5e38\u3001\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u6700\u3082\u8907\u96d1\u306a\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308a\u3001\u3059\u3079\u3066\u306e\u8981\u7d20\u304c\u307e\u3068\u3081\u3089\u308c\u308b\u5834\u6240\u3067\u3059\u3002\u30e1\u30bd\u30c3\u30c9\u306f TestRail \u304b\u3089\u524d\u8ff0\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3068\u30ec\u30dd\u30fc\u30c8\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u53d7\u3051\u53d6\u308a\u3001\u901a\u5e38\u3001\u6b21\u306e\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>\u30ec\u30dd\u30fc\u30c8\u306e\u30b9\u30b3\u30fc\u30d7\u3092\u78ba\u8a8d\u3057\u3066\u30bb\u30c3\u30c8 \u30a2\u30c3\u30d7\u3057\u307e\u3059<\/li>\n<li>\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u5bfe\u8c61\u306e\u30c7\u30fc\u30bf\u3092\u8a08\u7b97\u3057\u307e\u3059<\/li>\n<li>\u30c7\u30fc\u30bf\u3092\u30d3\u30e5\u30fc\u306b\u6e21\u3057\u3066\u9759\u7684 HTML \u3092\u8fd4\u3057\u307e\u3059<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>\u4eca\u56de\u306f\u3001render_form \u3068\u540c\u69d8\u306b\u3001\u6700\u4f4e\u9650\u306e\u30d3\u30e5\u30fc (\u201cindex\u201d) \u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u3001\u305d\u306e\u7d50\u679c\u3092 TestRail \u306b\u8fd4\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30ec\u30dd\u30fc\u30c8\u51fa\u529b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3059\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u30ea\u30b9\u30c8\u3082\u8fd4\u3057\u307e\u3059\u3002\u30d3\u30e5\u30fc (index.php) \u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">$min_width = 960;\n \n$header = array(\n  'project' =&gt; $project,\n  'report' =&gt; $report,\n  'meta' =&gt; $report_obj-&gt;get_meta(),\n  'min_width' =&gt; $min_width,\n  'css' =&gt; array(\n    'styles\/reset.css' =&gt; 'all',\n    'styles\/view.css' =&gt; 'all',\n    'styles\/print.css' =&gt; 'print'\n  ),\n  'js' =&gt; array(\n    'js\/jquery.js'\n  )\n);\n \n$GI-&gt;load-&gt;view('report_plugins\/layout\/header', $header);\n?&gt;\n \nThe report content goes here. \n \n$temp = array();\n$temp['report'] = $report;\n$temp['meta'] = $report_obj-&gt;get_meta();\n$temp['show_options'] = true;\n$temp['show_report'] = true;\n$GI-&gt;load-&gt;view('report_plugins\/layout\/footer', $temp);<\/pre>\n<p>$GI \u306f TestRail \u306e\u30b9\u30fc\u30d1\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\u3001\u3059\u3079\u3066\u306e\u30d3\u30e5\u30fc\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u30b5\u30d6\u30d3\u30e5\u30fc\u3092\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u3001\u30ec\u30dd\u30fc\u30c8\u306e\u30d8\u30c3\u30c0\u30fc\u304a\u3088\u3073\u30d5\u30c3\u30bf\u30fc\u306b TestRail \u306e\u6a19\u6e96\u30d3\u30e5\u30fc\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<h3>\u958b\u767a\u30e2\u30fc\u30c9<\/h3>\n<p>\u6b21\u306b\u3001\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30c6\u30b9\u30c8\u3092\u958b\u59cb\u3057\u307e\u3059\u3002\u305d\u308c\u306b\u306f\u3001\u901a\u5e38\u3001TestRail \u306e [\u30ec\u30dd\u30fc\u30c8] \u30bf\u30d6\u306b\u79fb\u52d5\u3057\u3001\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u9078\u629e\u3057\u3066\u30da\u30fc\u30b8\u4e0b\u90e8\u306e [\u30ec\u30dd\u30fc\u30c8\u306e\u8ffd\u52a0] \u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9 \u30bf\u30b9\u30af\u304c\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210\u3057\u3066\u30ec\u30dd\u30fc\u30c8\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u5f85\u3061\u307e\u3059\u3002\u3053\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306f\u901a\u5e38\u306e TestRail \u30e6\u30fc\u30b6\u30fc\u306b\u306f\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u65b0\u3057\u3044\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u958b\u767a\u3001\u30c6\u30b9\u30c8\u3001\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u3068\u304d\u306b\u306f\u5c11\u3057\u9762\u5012\u3067\u3059\u3002\u5e78\u3044\u306a\u3053\u3068\u306b\u3001TestRail \u306b\u306f\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u5bb9\u6613\u306b\u3059\u308b\u3001\u7279\u5225\u306a\u30ec\u30dd\u30fc\u30c8\u958b\u767a\u30e2\u30fc\u30c9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30e2\u30fc\u30c9\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001TestRail \u306e config.php \u30d5\u30a1\u30a4\u30eb\u306b\u6b21\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">define('DEPLOY_DEVELOP_REPORT', true);<\/pre>\n<p>\u958b\u767a\u30e2\u30fc\u30c9\u3092\u6709\u52b9\u306b\u3059\u308b\u3068\u3001\u30ec\u30dd\u30fc\u30c8 \u30d5\u30a9\u30fc\u30e0\u306b\u6b21\u306e\u3088\u3046\u306b [\u30ec\u30dd\u30fc\u30c8\u306e\u8ffd\u52a0\u3068\u8868\u793a] \u30dc\u30bf\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/develop-mode2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/develop-mode2.png\" alt=\"\" width=\"387\" height=\"31\" class=\"aligncenter size-full wp-image-8994\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/develop-mode2.png 387w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/develop-mode2-300x24.png 300w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/a><\/p>\n<p>\u3053\u306e\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001TestRail \u306f\u901a\u5e38\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u51e6\u7406\u3092\u56de\u907f\u3057\u3066\u305f\u3060\u3061\u306b\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u30ec\u30dd\u30fc\u30c8\u304c\u5229\u7528\u53ef\u80fd\u306b\u306a\u308b\u3068\u3001\u30ec\u30dd\u30fc\u30c8\u3092\u8868\u793a\u3059\u308b\u7279\u5225\u306a\u30da\u30fc\u30b8\u306b\u81ea\u52d5\u7684\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u308c\u307e\u3059\u3002\u958b\u767a\u30e2\u30fc\u30c9\u306e\u6700\u3082\u4fbf\u5229\u306a\u70b9\u306f\u3001\u3044\u3064\u3067\u3082\u3053\u306e\u30da\u30fc\u30b8\u3092\u66f4\u65b0\u3057\u3066\u3001\u30ec\u30dd\u30fc\u30c8\u3092\u518d\u751f\u6210\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2>\u5b9f\u884c<\/h2>\n<p>\u958b\u767a\u30e2\u30fc\u30c9\u3092\u6709\u52b9\u306b\u3057\u305f\u3089\u3001\u65b0\u3057\u3044\u30ec\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002\u6b21\u306e\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/first-run.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/first-run.png\" alt=\"\" width=\"550\" height=\"254\" class=\"aligncenter size-full wp-image-9046\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/first-run.png 550w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/first-run-480x222.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 550px, 100vw\" \/><\/a><\/p>\n<h2>\u6b21\u306e\u30b9\u30c6\u30c3\u30d7<\/h2>\n<p>\u6b21\u306e\u30d1\u30fc\u30c8\u3067\u3001\u30ec\u30dd\u30fc\u30c8 \u30d5\u30a9\u30fc\u30e0\u3078\u306e\u5165\u529b\u65b9\u6cd5\u3068\u3001\u3053\u308c\u3089\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30ec\u30dd\u30fc\u30c8\u306e\u751f\u6210\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"\/custom-report-2\"><strong>\u30ab\u30b9\u30bf\u30e0 \u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210 (2)<\/strong><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u30ab\u30b9\u30bf\u30e0 \u30ec\u30dd\u30fc\u30c8:\u306f\u3058\u3081\u306b\u3067\u8ff0\u3079\u305f\u3088\u3046\u306b \u3001\u30ec\u30dd\u30fc\u30c8\u306f PHP \u3067\u958b\u767a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u72ec\u81ea\u306e\u30ec\u30dd\u30fc\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u307e\u305f\u306f\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001PHP \u306b\u3064\u3044\u3066\u306e\u57fa\u672c\u7684\u306a\u77e5\u8b58\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30ec\u30dd\u30fc\u30c8\u95a2\u9023\u306e\u7528\u8a9e\u304a\u3088\u3073\u30ec\u30dd [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":14805,"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-17787","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/17787","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=17787"}],"version-history":[{"count":27,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/17787\/revisions"}],"predecessor-version":[{"id":23538,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/17787\/revisions\/23538"}],"up":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/14805"}],"wp:attachment":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/media?parent=17787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}