Run Tests Kitのロゴ

Run Tests Kit

組織
microsoft
run-tests-kit

Run a batch test suite via the Copilot Studio Kit (Dataverse API). Uses the Power CAT Copilot Studio Kit to execute test cases against a published agent and produces pass/fail results with latencies. Requires the Kit installed in the environment, an App Registration with Dataverse permissions, and a published agent.

概要

公開者microsoft
リポジトリskills-for-copilot-studio
スキル名run-tests-kit
スター
478
フォーク
101
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    microsoftがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルRun Tests KitをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills/run-tests-kit
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/skills-for-copilot-studio.git /tmp/skills-for-copilot-studio
mkdir -p .claude/skills
cp -r /tmp/skills-for-copilot-studio/skills/run-tests-kit .claude/skills/run-tests-kit
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでRun Tests Kitを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にRun Tests Kitを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Run Tests Kitは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Run Tests via Copilot Studio Kit

Run a batch test suite against a published Copilot Studio agent using the Power CAT Copilot Studio Kit.

Prerequisites

The user must have:

  1. The Copilot Studio Kit installed in their Power Platform environment
  2. Published their agent in the Copilot Studio UI
  3. Created a test set in the Copilot Studio Kit
  4. An Azure App Registration with Dataverse permissions

Phase 1: Configure Settings

  1. Read tests/settings.json (relative to the user's project CWD) and check for missing or placeholder values (containing YOUR_).

  2. If the file doesn't exist, create it from the template:

    bash
    cp ${CLAUDE_SKILL_DIR}/../../tests/settings-example.json ./tests/settings.json
  3. If values are missing, ask the user for each missing value. Explain where to find each one:

    • Environment URL (dataverse.environmentUrl): "What is your Dataverse environment URL? Find it in Power Platform admin center or Copilot Studio > Settings > Session Details. It looks like https://orgXXXXXX.crm.dynamics.com"
    • Tenant ID (dataverse.tenantId): "What is your Azure tenant ID? Find it in Azure Portal > Microsoft Entra ID > Overview. It's a GUID like c87f36f7-fc65-453c-9019-0d724f21bc42"
    • Client ID (dataverse.clientId): "What is your App Registration client ID? Find it in Azure Portal > App Registrations > your app > Application (client) ID. It's a GUID."
    • Agent Configuration ID (testRun.agentConfigurationId): "What is your agent configuration ID? In Copilot Studio, go to your agent > Tests tab. The ID is a GUID found in the URL or test configuration."
    • Test Set ID (testRun.agentTestSetId): "What is your test set ID? In Copilot Studio, go to your agent > Tests tab > select your test set. The ID is a GUID found in the URL."

    Ask for ALL missing values at once (don't ask one at a time).

  4. Write tests/settings.json with the collected values:

    json
    {
      "dataverse": {
        "environmentUrl": "<value>",
        "tenantId": "<value>",
        "clientId": "<value>"
      },
      "testRun": {
        "agentConfigurationId": "<value>",
        "agentTestSetId": "<value>"
      }
    }
  5. If all values are already configured and valid, proceed to Phase 2.

Phase 2: Run Tests

  1. Ensure tests/package.json exists in the user's project. If not, copy it:

    bash
    cp ${CLAUDE_SKILL_DIR}/../../tests/package.json ./tests/package.json
  2. Install dependencies if tests/node_modules/ doesn't exist:

    bash
    npm install --prefix tests
  3. Run the test script in the background with a 100-minute timeout (6000000ms):

    bash
    node ${CLAUDE_SKILL_DIR}/../../tests/run-tests.js --config-dir ./tests

    Use run_in_background: true for this command. Save the returned task ID.

  4. Wait 10 seconds, then check the background task output (non-blocking check).

  5. Detect the authentication state from the output:

    • If the output contains "Using cached token": Authentication succeeded automatically. Tell the user: "Authentication successful (cached credentials). Tests are running, this may take several minutes..."

    • If the output contains "use a web browser to open the page": Extract the URL and device code from the message. Present this prominently to the user:

      Authentication Required

      Open your browser to: https://microsoft.com/devicelogin Enter the code: XXXXXXXXX (extract the actual code from the output)

      After signing in, the tests will continue automatically.

    • If the output contains an error: Report the error to the user and stop.

    • If the output is empty or incomplete: Wait another 10 seconds and check again (retry up to 3 times).

  6. Wait for the background task to complete (blocking). The script polls every 20 seconds until all tests finish and downloads results as a CSV.

  7. Read the final output to get the success rate and CSV filename.

  8. Proceed to Phase 3.

Phase 3: Analyze Results

  1. Get the results: Glob: tests/test-results-*.csv — read the most recent CSV file (newest by modification time).

  2. Parse the CSV columns:

    ColumnMeaning
    Test UtteranceThe user message that was tested
    Expected ResponseWhat the test expected
    ResponseWhat the agent actually responded
    Latency (ms)Response time
    ResultSuccess, Failed, Unknown, Error, or Pending
    Test TypeResponse Match, Topic Match, Generative Answers, Multi-turn, Plan Validation, or Attachments
    Result ReasonWhy the test passed or failed
  3. Focus on failed tests (Result = Failed or Error). For each failure, analyze:

    • Test Type = Topic Match: The wrong topic was triggered, or no topic matched. Check trigger phrases and model descriptions.
    • Test Type = Response Match: The response didn't match expected. Check SendActivity messages, instructions, or generative answer config.
    • Test Type = Generative Answers: The generative answer was incorrect or missing. Check knowledge sources, SearchAndSummarizeContent, and agent instructions.
    • Test Type = Plan Validation: The orchestrator's plan was wrong. Check topic descriptions and agent-level instructions.
    • Test Type = Multi-turn: A multi-turn conversation failed. Check topic flow, variable handling, and conditions.
  4. Proceed to Phase 4 (Propose Fixes).

Phase 4: Propose Fixes

  1. For each failure, identify the relevant YAML file(s):

    • Auto-discover the agent: Glob: **/agent.mcs.yml
    • Find the relevant topic by matching the test utterance against trigger phrases and model descriptions
    • Read the topic file to understand the current flow
  2. Propose specific YAML changes to fix each failure. Present them to the user as a summary:

    • Which test(s) failed and why
    • Which file(s) need changes
    • What the proposed change is (show the diff)
  3. Wait for user decision. The user can:

    • Accept all — apply all proposed changes
    • Accept partially — apply only some changes (ask which ones)
    • Reject — discard proposed changes and discuss alternative approaches
  4. Apply accepted changes using the Edit tool. After applying, remind the user to push and publish again before re-running tests.

Test Result Codes Reference

Result: 1=Success, 2=Failed, 3=Unknown, 4=Error, 5=Pending
Test Type: 1=Response Match, 2=Topic Match, 3=Attachments, 4=Generative Answers, 5=Multi-turn, 6=Plan Validation
Run Status: 1=Not Run, 2=Running, 3=Complete, 4=Not Available, 5=Pending, 6=Error

よくある質問

AIスキル「Run Tests Kit」では何ができますか?

Run a batch test suite via the Copilot Studio Kit (Dataverse API). Uses the Power CAT Copilot Studio Kit to execute test cases against a published agent and produces pass/fail results with latencies. Requires the Kit installed in the environment, an App Registration with Dataverse permissions, and a published agent.

TypingMindでRun Tests Kitを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Run Tests Kitはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにRun Tests Kitをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills/run-tests-kitを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Run Tests Kitを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Run Tests Kitは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもRun Tests Kitを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Run Tests Kit」は無料ですか?

はい。microsoftがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇