<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Maestro on gkzz.dev</title>
    <link>https://gkzz.dev/tags/maestro/</link>
    <description>Recent content in Maestro on gkzz.dev</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 20 Jul 2026 00:00:00 +0900</lastBuildDate>
    <atom:link href="https://gkzz.dev/tags/maestro/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>maestro testコマンドの `--test-output-dir` と `--debug-output` の違いをドキュメントとサンプルコードから追ってみる</title>
      <link>https://gkzz.dev/posts/maestro-test-output-log-artifact-capture/</link>
      <pubDate>Mon, 20 Jul 2026 00:00:00 +0900</pubDate>
      <guid>https://gkzz.dev/posts/maestro-test-output-log-artifact-capture/</guid>
      <description>&lt;h2 id=&#34;はじめに&#34;&gt;はじめに&lt;/h2&gt;
&lt;p&gt;Maestro の &lt;code&gt;maestro test&lt;/code&gt; コマンドでは、&lt;code&gt;--test-output-dir&lt;/code&gt; と &lt;code&gt;--debug-output&lt;/code&gt; などのオプションで、スクリーンショットやログなどの artifact が出力されます。両者はどちらも「artifact の保存先を指定するオプション」に見えるのですが、実際には扱うファイルがやや異なります。&lt;/p&gt;
&lt;p&gt;この違いを意識しないと、落ちたテストの調査で「あるはずの artifact が見つからない」ということが起こりえます。
たとえば、スクリーンショットを探していたら &lt;code&gt;maestro.log&lt;/code&gt; しか入っていなかったり、逆にログだけ別ディレクトリに出ていたり。&lt;/p&gt;
&lt;p&gt;そこで、この記事では &lt;code&gt;maestro test&lt;/code&gt; の artifact 周りを整理します。また、ドキュメントとサンプルコードを頼りに、これらのオプションの違いや使用例を探ってみます。&lt;/p&gt;
&lt;p&gt;この記事で最初に押さえたいのは、次の4点です。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--test-output-dir&lt;/code&gt; はスクリーンショットや動画の主な置き場&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--debug-output&lt;/code&gt; は &lt;code&gt;maestro.log&lt;/code&gt; の主な置き場&lt;/li&gt;
&lt;li&gt;&lt;code&gt;commands-*.json&lt;/code&gt; は artifact 調査で見ることになる主要なファイル&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--flatten-debug-output&lt;/code&gt; は &lt;code&gt;--debug-output&lt;/code&gt; の artifact 群のディレクトリ階層をフラットにする&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;レポート系のフォーマットは下記の2つです。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--format&lt;/code&gt; : レポートのフォーマット。
&lt;ul&gt;
&lt;li&gt;例：&lt;code&gt;--format junit&lt;/code&gt; , &lt;code&gt;--format html&lt;/code&gt; , &lt;code&gt;--format html-detailed&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--output&lt;/code&gt; : 上記のレポートの出力場所。省略した場合はカレントディレクトリに出力。
&lt;ul&gt;
&lt;li&gt;例：&lt;code&gt;--output build/report.xml&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;なお、AI 系のレポートは生成条件が別なのでこの記事では深追いしません。&lt;/p&gt;
&lt;p&gt;参考：&lt;a href=&#34;https://docs.maestro.dev/maestro-flows/workspace-management/ai-test-analysis&#34;&gt;https://docs.maestro.dev/maestro-flows/workspace-management/ai-test-analysis&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;1---test-output-dir----debug-output----flatten-debug-output-オプションの早見表&#34;&gt;1. &lt;code&gt;--test-output-dir&lt;/code&gt; / &lt;code&gt;--debug-output&lt;/code&gt; / &lt;code&gt;--flatten-debug-output&lt;/code&gt; オプションの早見表&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;--test-output-dir&lt;/code&gt; / &lt;code&gt;--debug-output&lt;/code&gt; / &lt;code&gt;--flatten-debug-output&lt;/code&gt; オプションの早見表をご覧ください。ここでは「flag の役割」と「実際に目に入る artifact」を分けて書きます。実際の挙動を見ると、&lt;a href=&#34;https://github.com/mobile-dev-inc/maestro-docs/blob/3c44ca2c6d6b11056e2164ac177ee9674139fde2/flows/workspace-management/test-reports-and-artifacts.md?plain=1#L111-L125&#34;&gt;ドキュメント&lt;/a&gt; のように、&lt;code&gt;Yes / No&lt;/code&gt; の二値だけで読むと誤解しやすいので、まずは役割ベースで整理するほうがよいかと思います。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
