Skip to main content

Module testing

Module testing 

Source
Expand description

The embedded TESTING bundle (ADOPT-04, the D2 landing) — the Jython test framework + its two WebDev routes, ported OUT of agentic-ignition-tooling’s scaffold-testing.sh (1 806-line shell scaffolder) into the repo as data — the ROUTE_FILES precedent, byte-identical semantics, no shell, no Windows problem.

§What ships (20 members, one import)

  • ignition/script-python/resources/testing/<module>/ — the five framework modules (runner, assertions, decorators, helpers, reporter) + __tests__/ (the permanent smoke sentinel — the empty-suite-trap answer: discover ALWAYS has ≥1 module and run_all proves the chain live).
  • com.inductiveautomation.webdev/resources/testing/{run,tags}/ — the WebDev endpoints (run = discover/execute, tags = e2e tag fixtures; tags is require-auth, run is open at the WebDev layer like the cli routes).

§The relocation, retired

The scaffolder wrote the 8.1 layout (ignition/script-python/ testing/… — modules directly under the collection) and every 8.3 deploy needed the relocation patch. The bundle here IS the 8.3 resource-folder layout (…/script-python/resources/testing/… — live-verified on-disk spelling, 8.3.6 rig), and the runner’s discovery walk bases its dotted module paths on the resources container when present (8.3) falling back to the bare collection (8.1) — one walk, both layouts, no per-deploy patch.

§Markers (substituted at pack time, the scriptExec pattern)

  • __IGN_CLI_PROJECT__ — the deploy project name (the runner’s fallback constant + the run route’s scoped-seeding lookup). Exactly 2 sites; a marker-count test pins the total.

Source of truth for the port: .planning/research/ADOPT-RESEARCH.md §D2 handoff (the manifest) + the extracted originals under webdev/testing/ (this repo now owns them; the scaffolder is retired for ign workflows).

Constants§

TESTING_FILES
The testing bundle — (zip_member_path, contents) pairs, the Designer-native 8.3 layout. Members are packed AFTER super::ROUTE_FILES by crate::client::webdev::build_deploy_zip when testing rides the deploy.
TESTING_ROUTES
The testing bundle’s route folder names (URL space: /system/webdev/<project>/testing/<route>).