Testing Simulink Modelsのロゴ

Testing Simulink Models

組織人気
matlab
testing-simulink-models

Tests Simulink models using either ephemeral Gherkin-based tests (model_test) for quick validation or persistent tests (Simulink Test API) authored from requirements or behavioral specs. Requires Simulink Test.

概要

公開者matlab
リポジトリsimulink-agentic-toolkit
スキル名testing-simulink-models
スター
1.2K
フォーク
112
同梱ファイル
24
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 24個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/simulink-agentic-toolkit.git /tmp/simulink-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/simulink-agentic-toolkit/skills-catalog/verification-validation-and-test/testing-simulink-models .claude/skills/testing-simulink-models
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

関連するリクエストがあるとすぐに、モデルが自動的にTesting Simulink Modelsを読み込みます。

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

Testing Simulink Models

Requires Simulink Test and R2023a or later. The requirement-driven entry point also requires Requirements Toolbox. The coverage workflow also requires Simulink Coverage. If Simulink Test is unavailable, use simulating-simulink-models with manual assertions.

When to Use

  • Writing pass/fail tests for a Simulink model or subsystem
  • Verifying expected behavior against requirements or acceptance criteria
  • Creating regression tests to catch future breakage
  • Reproducing and validating bug fixes with structured assertions
  • Collecting decision coverage metrics
  • Authoring persistent tests from linked requirements or a behavioral spec

When NOT to Use

  • Building or editing model structure → use building-simulink-models
  • Running simulations for data exploration, sweeps, or custom analysis → use simulating-simulink-models
  • Querying or resolving parameter values → use model_query_params / model_resolve_params
  • Creating or editing requirements → use generate-requirement-drafts
  • Injecting faults onto model signals without test authoring → use inject-faults
  • FMEA, FHA, FTA, or other safety analysis documents → use manage-safety-analysis
  • Simulink Test is not installed → fall back to simulating-simulink-models with manual assertions

Testing Approaches

This skill provides two testing approaches. Choose based on task context:

Gherkin (model_test)Simulink Test API (test_create family)
PersistenceEphemeral — harness discarded after sessionPersistent — .mldatx files remain in project
Speed~3s (draft mode)~60s (full Simulink Test infrastructure)
TraceabilityNoneFull requirement linking via .slreqx
Use caseBug fixes, quick validation, agentic loopCertification, systematic testing, formal V&V; also takes behavioral specs
Approval neededNoYes — engineer reviews test plan before execution
Coveragecoverage parameter ('none' or 'decision')Via test_run options
ToolboxSimulink TestSimulink Test (+ Requirements Toolbox for requirement path)

→ For Gherkin testing, read references/gherkin-based-fast-testing.md → For Simulink Test API authoring (requirements / behavioral spec), read references/simulink-test-authoring.md

Workflow — Gherkin (Quick Validation)

  1. Understand the component: Use model_overview and model_read on the target subsystem to identify inputs, outputs, and expected behavior.
  2. Write the .feature file: Author a Gherkin test following the syntax in references/gherkin-based-fast-testing.md. Start with one scenario covering the primary nominal case.
  3. Cap StopTime before running: Check the model's StopTime with model_query_params. If it is inf (or unset/auto), you MUST pass a finite stop time to model_test — an infinite sim never returns and hangs MATLAB. Pick a finite value that lets the behavior settle (2–30s for a step response).
  4. Run in draft mode: Call model_test with draft_mode='true' for rapid iteration (~3s). Fix syntax or signal errors.
  5. Run full compilation: Once draft passes, re-run with draft_mode='false' to validate against the actual compiled model (catches type/dimension mismatches).
  6. Expand coverage: Add scenarios for edge cases, fault conditions, and boundary behavior. Use coverage='decision' to identify untested branches.

Workflow — Simulink Test API (Persistent)

  1. Understand the component: Use model_overview and model_read on the target subsystem to identify inputs, outputs, and expected behavior.
  2. Propose test plan → wait for approval: Present what to test, at what scope, and why. Do not call test_create until the engineer approves.
  3. Create test cases: Call test_create with the appropriate entry point — component/model only or requirement-driven (RequirementID + ReqSetPath). Pass TestFile as an absolute path under the working folder (never a bare filename — it would land in the skill's scripts/ dir, since that is the project_path). See references/simulink-test-authoring.md for call shapes.
  4. Propose test configuration → wait for approval: Present stop time, sim config, signal logging, assessments, and parameter overrides for each test case. Do not call test_edit until the engineer approves. Always set a finite StopTime via test_edit — if the model's StopTime is inf (or unset), the test run never returns and hangs MATLAB. Choose a finite value that lets the behavior settle (2–30s for a step response).
  5. Run and report: Call test_run, present pass/fail summary with assessment detail. Engineer decides next steps.

Guardrails

Always

  • Inspect model (model_overview / model_read) before writing tests — otherwise you write tests against wrong I/O
  • Report failures with assessment names, conditions, and signal summaries — users can't diagnose without detail
  • Never run a sim or test with StopTime=inf. Check StopTime before any model_test/test_run; if it is inf or unset, override it with a finite value first. An infinite sim never returns and hangs the MATLAB session (and, in a shared session, every subsequent task).

Never

  • Guess pass/fail criteria — ask the user if unclear
  • Change MATLAB working directory while a model is open — breaks harness cache

References

  • references/gherkin-based-fast-testing.md — Gherkin syntax, draft mode, coverage, Simscape constraints
  • references/simulink-test-authoring.md — API manual: setup, constraints, test_create entry shapes, edit/read/run signatures
  • references/assessment-format.md — LoggedSignals and Assessments struct formats
  • assets/test-structure-template.md — Test structure proposal template (requirement-driven path)
  • assets/test-config-template.md — Test configuration proposal template (requirement-driven path)

Copyright 2026 The MathWorks, Inc.


同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Testing Simulink Models」では何ができますか?

Tests Simulink models using either ephemeral Gherkin-based tests (model_test) for quick validation or persistent tests (Simulink Test API) authored from requirements or behavioral specs. Requires Simulink Test.

TypingMindでTesting Simulink Modelsを使うメリットは何ですか?

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

TypingMindにTesting Simulink Modelsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/verification-validation-and-test/testing-simulink-modelsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Testing Simulink Modelsを使えるAIモデルはどれですか?

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

Testing Simulink Modelsで使えるAIモデルの数に制限はありますか?

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

AIスキル「Testing Simulink Models」は無料ですか?

matlabがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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