Home Mold

implement-galaxy-workflow-test

Assemble Galaxy workflow test fixtures and assertions.

reviewed target/galaxy

Mold health

ok
  • Source layout

    Every file beside index.md is one the mold kind declares.

  • Axis fields

    target-specific fields are coherent.

  • Eval plan

    Abstract oracle: the properties any cast of this Mold must satisfy.

    eval.md declares properties and check type.

    eval.md ↗
  • Scenarios

    Concrete cases bound to fixtures, run against the eval properties.

    scenarios.md declares cases bound to fixtures.

    scenarios.md ↗
  • Typed refs

    9 typed references; 0 resolver issues.

  • On-demand triggers

    All on-demand references describe triggers.

  • Evidence checks

    Hypothesis references include verification.

axis
target-specific
target
galaxy
name
implement-galaxy-workflow-test
contract

Reference Loading

Typed references describe what casting consumes, and when the generated skill should load each artifact.

CLI Command validate-tests

Command reference. Usually cast to a sidecar and loaded only when invoked.

Purpose
Run the cheap static workflow-test validation and workflow-label cross-check before Planemo execution.
Trigger
After authoring or editing a Galaxy workflow test file and before Planemo invocation.
CLI Tool planemo

Tool-level install metadata. Aggregated into the cast bundle's Required Tools section.

Purpose
Runtime for workflow_test_init / workflow_test_on_invocation; install before authoring tests against a live invocation.
Schema galaxy-workflow-test-plan

Structured contract copied for validation or lookup.

Purpose
Input contract: read the schema-valid Galaxy test plan (job inputs, expected outputs, assertion intent, tolerances, label assumptions, unresolved mappings, omissions) and convert it into tests-format output, reconciling assumed labels and fixtures against the real draft.
Verify
Consume a cast test plan from a *-test-to-galaxy-test-plan Mold and confirm tests-format output can be authored from it without re-reading the source summary.
Research galaxy-workflow-testability-design

Background synthesis loaded by explicit progressive-disclosure metadata.

Purpose
Revise workflow inputs, outputs, labels, checkpoints, and collection identifiers so meaningful tests can be authored.
Trigger
When test authoring reveals missing labels, omitted workflow-level outputs, unstable collection identifiers, weakly assertable final outputs, or fixture-shape pressure on workflow inputs.
Research planemo-workflow-test-architecture

Background synthesis loaded by explicit progressive-disclosure metadata.

Purpose
Write tests with stable labels and artifacts that Planemo can connect back to Galaxy invocations, jobs, and outputs.
Trigger
When adding or revising workflow tests that will be iterated with Planemo or generated from existing invocations.

Cast artifacts

How to install →

Artifact handoffs

/ pipeline contract

Produces

  • galaxy-workflow-test yaml galaxy-workflow.gxwf-tests.yml

    Galaxy workflow test file (tests-format) with job inputs, expected outputs, assertions; passes static schema + label cross-check. Named as the workflow basename + `-tests.yml` so Planemo discovers it as the companion of `galaxy-workflow.gxwf.yml`.

Consumes

implement-galaxy-workflow-test

Assemble a Galaxy workflow test file (tests-format) from the schema-valid Galaxy test plan (galaxy-workflow-test-plan), the concrete gxformat2 workflow (galaxy-workflow.gxwf.yml), and the resolved test-data refs. One invocation produces the companion test file whose job inputs come from the workflow inputs and whose assertions come from the plan’s assertion intent. The output must validate against tests-format and pass the workflow-label cross-check before any Planemo run.

Name the companion off the workflow’s basename. Planemo discovers the test file by stripping only the workflow’s final extension and appending -tests.yml, so the companion of galaxy-workflow.gxwf.yml is galaxy-workflow.gxwf-tests.yml (keep the .gxwf) — not galaxy-workflow-tests.yml. Derive the name from whatever the workflow file is actually called; a .ga workflow would instead pair with <basename>-tests.yml.

The workflow is the contract: input and output labels in the test file must address real workflow input/output labels. The test plan’s bindings may be assumed or unresolved — especially for synthesized (freeform-sourced) plans whose workflow.label_source is interface-brief — so reconcile each plan binding against the real workflow labels here, and resolve unresolved[] entries and storage: unresolved fixtures against the workflow and the resolved test-data refs. When authoring reveals a missing label, an omitted workflow output, or an unstable collection identifier, treat it as testability pressure on the workflow itself — surface it per galaxy-workflow-testability-design rather than asserting around it.

Sequence

  1. Bootstrap. Prefer generating the test skeleton from a real invocation, not from scratch:

  2. Author job inputs and stage their data. Wire each workflow input to a test-data-refs entry, and make the data the test references actually exist on disk before any Planemo run:

    • Prefer a bare remote location: (iwc-test-data-conventions, remote-URL-first) whenever the ref is a single fetchable artifact — Galaxy fetches it at upload time, so nothing is staged locally. Record the hash when known.
    • Materialize a local test-data/ layout only when the ref needs prep a URL can’t express — a concatenation (e.g. per-isolate chromosome+plasmid into one FASTA), a subset (one chromosome, selected loci), or a column split into named collection elements. In that case the test file’s path: entries point at files this Mold writes: fetch from the ref’s verified source URLs, run the documented prep, and lay the result out in the test-data/ directory addressed by the *-tests.yml, relative to the workflow. The collection element identifiers in the staged layout must match the test file and the workflow labels exactly.
    • Never emit a path: (or location:) the test references but no source produces — an un-materialized path passes the static cross-check and fails only at upload, far from here. If a ref is resolved: false, surface the gap rather than authoring a path to a file that does not exist.

    Inputs must match the workflow’s collection shapes and datatypes.

  3. Author assertions. Materialize the plan’s assertion intent into concrete output assertions. Choose assertion families and tolerances per planemo-asserts-idioms; check each shortcut against iwc-shortcuts-anti-patterns so an existence-only or size-only assertion is a deliberate choice, not an evasion. Honor the plan’s omissions[] and treat low-confidence synthesized intent as a starting point to tighten against the real invocation.

  4. Validate static. Run validate-tests for the schema gate, then the workflow-label cross-check (checkTestsAgainstWorkflow): zero missing input labels, zero missing output labels, no collection/datatype mismatches. Fix before spending a Planemo run.

  5. Run green. Drive planemo test with the staged data. “Managed Galaxy” here means Planemo-managed: planemo test bootstraps its own Galaxy and installs the workflow’s tools from the Tool Shed/conda — it does not require a pre-provisioned external server, so absence of a running Galaxy is not a reason to skip this gate (cost/runtime of heavy tool or reference-DB installs may be, but that is a deliberate deferral, not an impossibility). On green, hand off the test file plus enough invocation/job/assertion context for run-workflow-test and debug-galaxy-workflow-output to use if a later run fails.

Author tests with stable labels and artifacts that Planemo can connect back to Galaxy invocations, jobs, and outputs (planemo-workflow-test-architecture) — that traceability is what makes the downstream debug Mold able to locate failure evidence.

Incoming References (16)

  • changeset-to-galaxy-test-plan related mold — Carry an existing Galaxy workflow's tests forward as a regression baseline and augment them for a change-set's deltas, emitting a Galaxy test plan.
  • freeform-summary-to-galaxy-test-plan related note — Synthesize a Galaxy workflow test plan from a free-form summary and the Galaxy design briefs.
  • CWL → GALAXY phase of pipeline — Path from a CWL Workflow to a Galaxy gxformat2 workflow. Lighter upstream extraction.
  • INTERVIEW → GALAXY phase of pipeline — Interview-driven path to a Galaxy gxformat2 workflow through the shared freeform-summary handoff.
  • NEXTFLOW → GALAXY phase of pipeline — Direct path from a Nextflow pipeline to a Galaxy gxformat2 workflow.
  • PAPER → GALAXY phase of pipeline — Direct path from a paper to a Galaxy gxformat2 workflow. No CWL intermediate.
  • UPDATE-INTERVIEW → GALAXY phase of pipeline — Interview-driven, edit-in-place modification of an existing Galaxy gxformat2 workflow via a reviewable change-set, reusing the per-step draft loop.
  • Component Nextflow Testing related mold — nf-test patterns mapped to Galaxy planemo asserts and CWL test equivalents — backs the nextflow test-plan Molds and summarize-nextflow §7.
  • Galaxy Workflow Testability Design related note — Design guidance for Galaxy workflow inputs, outputs, and checkpoints that make IWC-style workflow tests possible.
  • Iwc Shortcuts Anti Patterns related note — What IWC test suites cut corners on (accepted) vs what's a code smell — existence-only probes, sim_size deltas, image dim checks, label coupling.
  • Iwc Test Data Conventions related note — How IWC workflows organize and reference test data — Zenodo-first, SHA-1 integrity, collection shapes, CVMFS gotchas.
  • Nextflow nf-test snapshots to Galaxy/Planemo assertions related mold — Translates nf-test snapshot assertions into Galaxy workflow test-format assertions, broken out by module-level vs pipeline-level test shape.
  • Planemo Asserts Idioms related note — Decision and idiom guide for picking planemo workflow-test assertions: which family per output type, how to size tolerances, when to validate.
  • Planemo workflow-test architecture related mold — Reference for Planemo workflow test/run architecture, Galaxy modes, API polling, and noisy failure boundaries.
  • Galaxy workflow test plan related note — JSON Schema for the intermediate Galaxy workflow test-plan handoff produced by the test-plan Molds and consumed by implement-galaxy-workflow-test.
  • Galaxy workflow test format related note — JSON Schema for the planemo workflow test format (`<workflow>-tests.yml`), vendored from `@galaxy-tool-util/schema`.