init-testing
Scaffold the Jython test framework, WebDev test endpoints, and type stubs into an Ignition project. Usage — /ignition-scada:init-testing [--all] [--force]
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold the Jython test framework, WebDev test endpoints, and type stubs into an Ignition project. Usage — /ignition-scada:init-testing [--all] [--force]
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Ignition Perspective e2e testing reference — Playwright page objects, gateway API helpers, and Perspective DOM conventions. Use when writing or debugging Playwright browser tests for Perspective views.
Ignition testing framework reference — writing and running Jython gateway tests. Use when writing tests, debugging test failures, or working with the testing.* modules.
Scaffold Playwright e2e tests for Perspective views into an Ignition project. Usage — /ignition-scada:init-e2e [--force]
Run Jython gateway tests or Playwright e2e tests. Usage — /ignition-scada:test [module|package|ui|e2e|smoke]
Ignition system.* API reference — 14 modules, 239 functions. Use when writing Ignition Jython scripts.
Run ignition-lint on files or the whole project. Usage — /ignition-scada:ignition-lint [file|directory|profile]
| name | init-testing |
| description | Scaffold the Jython test framework, WebDev test endpoints, and type stubs into an Ignition project. Usage — /ignition-scada:init-testing [--all] [--force] |
Scaffold a complete Jython test framework into the current Ignition project. This creates:
testing/run, testing/tags).ignition-stubs/testing/)Run the detection script to discover project context:
${CLAUDE_PLUGIN_ROOT}/scripts/detect-project.sh
Parse the JSON output and present findings to the user:
Ask the user to confirm or provide their tag provider name.
Check for project inheritance. If parent is not null:
Tell the user: "This project inherits from {parent.name}."
If parent.has_jython_framework is true, explain clearly what this means:
Inherited from parent (NOT created here): The Jython test framework —
testing.runner,testing.assertions,testing.decorators,testing.helpers,testing.reporter— lives in {parent.name} and is inherited automatically. These scripts are shared across all child projects. Any__tests__modules you write in this project will be discovered alongside the parent's tests.Created here (project-scoped, NOT inherited in Ignition):
- WebDev endpoints (
testing/run,testing/tags) — HTTP APIs are project-scoped in Ignition. Each project needs its own endpoints even if the scripts behind them are inherited. Without these, there's no HTTP entry point to run tests against this project.- Type stubs (
.ignition-stubs/testing/) — IDE completions for the inherited test framework. These are local files, not Ignition resources.
If parent not found on disk (parent.root is null): ask the user for the parent project path, or offer to scaffold everything locally.
If existing_testing.jython_framework or existing_testing.webdev_endpoints is true, warn the user and ask if they want to overwrite (--force).
Run the scaffold script:
${CLAUDE_PLUGIN_ROOT}/scripts/scaffold-testing.sh \
--project-root <detected> \
--project-name <detected> \
--gateway-url <detected> \
--tag-provider <confirmed>
Add --skip-scripts if the parent already has the Jython framework.
Add --force if user confirmed overwrite.
Report what was created (list the files).
If the gateway is reachable, verify the setup by hitting the test discovery endpoint:
curl -k -s "<gateway>/system/webdev/<project>/testing/run?discover=true"
Note: This requires a gateway project scan first. Tell the user to scan from Designer or commit + push if using ignition-git-module.
Explain how to write a first test:
ignition/script-python/<package>/__tests__/code.pyfrom testing.decorators import test and from testing.assertions import assert_equal@test decorated functionsprint testing.runner.run_all()If $ARGUMENTS contains --all and the project has Perspective (has_perspective is true), automatically proceed to run the /ignition-scada:init-e2e flow after completing the testing setup.