Skip to content

test runner: app test endpoint and runner.cfm break under subfolder installs #3251

Description

@bpamiri

Surfaced while triaging discussion #2887 (mikegrogan). The runtime set(subpath=...) fix landed in 4.0.5 and works, but three testing-layer gaps remain for apps served from a subfolder / CommandBox multi-app topology. These are distinct from #3025 (a refactor-scoped fix for the web runner mutating live application.wheels, not the items below).

1. ?format=html on the app test endpoint silently returns JSON

vendor/wheels/tests/app-runner.cfm:117-131 — the html branch (which is also the no-format default) emits application/json, not an HTML report. The inline comment says this is deliberate ("for the app-runner we just emit the JSON in this branch too"). Only the core runner (vendor/wheels/tests/runner.cfm) falls through to html.cfm.

A user opening /wheels/app/tests?format=html in a browser reasonably expects the TestBox-style HTML report and instead gets raw JSON, with no documentation of the limitation.

  • Either render a real HTML report for app tests, or document that /wheels/app/tests supports format=json|txt|junit only and html returns JSON by design.

2. runner.cfm hardcodes /wheels/tests/app-runner.cfm — breaks subfolder topologies

The shipped template cli/lucli/templates/app/tests/runner.cfm does <cfinclude template="/wheels/tests/app-runner.cfm">, which depends on the /wheels mapping resolving correctly. In a CommandBox multi-subfolder setup the mapping doesn't resolve the way it does for a single rooted app, so the include fails.

  • Resolve the app-runner include relative to the app's subpath (reuse the set(subpath=...) / WHEELS_SUBPATH derivation) instead of an absolute /wheels/... path.

3. Testing guide over-states what wheels new scaffolds

web/sites/guides/src/content/docs/v4-0-0/testing/index.mdx:29,32,94 documents tests/specs/view/, tests/specs/browser/, and tests/TestRunner.cfc. The template (cli/lucli/templates/app/tests/) ships only specs/{controllers,functional,models}/ and no TestRunner.cfc. New users following the guide look for folders/files that don't exist.

  • Reconcile the testing guide with the actual template contents (the template is the source of truth — either add the folders to the template or correct the docs).

Note: the reporter's CLI errors stem from running the outdated CommandBox/ForgeBox wheels-cli package (tracked at #3180/#3181), not a missing framework fix — wheels test --base-path shipped in PR #3028. That is being addressed directly in the discussion thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions